deferred class ABSTRACT_BACKTRACKING
Summary
Class invariant
Overview
features
Common client features
Control of the exploration
Internal
Internal deferred
Specific to sequences
Specific to alternatives
internal: allocation and collection
search_first
effective procedure
Resets all and searchs the first solution.
search_next
effective procedure
Searchs the next solution.
search_is_success: BOOLEAN
writable attribute
True when search is successfull
is_off: BOOLEAN
effective function
True when search is finished
clear
effective procedure
Clears the current state to nothing.
is_cleared: BOOLEAN
effective function
True if no partial data remain in the current state
push_sequence (sequence: ABSTRACT_BACKTRACKING_SEQUENCE)
effective procedure
Pushs the 'sequence' in front of the continuation path.
push_alternative (alternative: ABSTRACT_BACKTRACKING_ALTERNATIVE)
effective procedure
Pushs the 'alternative' before the continuation path.
continue
effective procedure
Continues the exploration of the current path.
backtrack
effective procedure
Stops the exploration of the current path and tries to explore the next alternative path.
push_cut_point
effective procedure
Inserts a cut point into the continuation path.
cut
effective procedure
Removes the alternatives until the one recorded by the next cut point in the continuation path.
cut_all
effective procedure
Cuts all alternatives.
stop_search_loop: BOOLEAN
writable attribute
True if at the end of a search.
search
effective procedure
Common search loop to search_first and serch_next
cut_until (alternative: ABSTRACT_BACKTRACKING_ALTERNATIVE)
effective procedure
Cut all alternatives until 'alternative'.
evaluate_current_state
deferred procedure
That feature is called to evaluate the current state.
context_clear
deferred procedure
Clear any saved context.
context_push
deferred procedure
Push the current context.
context_restore
deferred procedure
Restore the context to the last saved one.
context_restore_and_pop
deferred procedure
Restore the context to the last saved one and drop it.
context_cut
deferred procedure
Remove the last saved context.
writable attribute
Stack of sequences represented by its top (can be Void)
current_continuation: ABSTRACT_BACKTRACKING_SEQUENCE
writable attribute
The current continuation path
pop_sequence
effective procedure
Removes the current sequence and replace it by the next sequence in the continuation path.
writable attribute
Stack of alternatives represented by its top (can be Void)
continue_alternative
effective procedure
Returns to the alternative on the top of the stack and put its saved continuation path as the current continuation path.
pop_alternative
effective procedure
Returns to the alternative on the top of the stack and put its saved continuation path as the current continuation path.
remove_top_sequence
effective procedure
Removes the top sequence.
remove_top_alternative
effective procedure
Removes the top alternative.
once function
Bank of cut points