deferred class ABSTRACT_BACKTRACKING_SEQUENCE

Features exported to ABSTRACT_BACKTRACKING

Abstract realisation of a sequence iterator for the ABSTRACT_BACKTRACKING

The ABSTRACT_BACKTRACKING uses the fields continuation to record the continuation path and calls the feature 'next_sequence' to let the current object choose how to continue the exploration.

Direct parents

conformant parents

ABSTRACT_BACKTRACKING_POOLABLE

Known children

conformant children

ABSTRACT_BACKTRACKING_CUT_POINT, BACKTRACKING_SEQUENCE, BACKTRACKING_SEQUENCE_LIST

Summary

exported features

Details

previous: ABSTRACT_BACKTRACKING_SEQUENCE

For the linked stack of sequences. Managed by ABSTRACT_BACKTRACKING.

continuation: ABSTRACT_BACKTRACKING_SEQUENCE

The sequence to continue after a success in exploration of the current sequence. Managed by ABSTRACT_BACKTRACKING.

set_continuation (value: ABSTRACT_BACKTRACKING_SEQUENCE)

ensure

  • definition: continuation = value

deferred next_sequence (explorer: ABSTRACT_BACKTRACKING)

Called by ABSTRACT_BACKTRACKING to let the current object switch to the next state to explore. Two actions must be performed by that feature:

  - make iteration actions and then call
     'pop_sequence' if this is the last state
     to be explored.
  - select the state to be evaluated or
     call 'continue' or call 'backtrack'.

require

    release

    Called by ABSTRACT_BACKTRACKING to release current instance to the pool.

    require

    • pool /= Void

    get_twin: ABSTRACT_BACKTRACKING_SEQUENCE

    Return a twin of current from the pool

    require

    • pool /= Void

    ensure

    • Result.is_equal(Current)

    deferred pool: ABSTRACT_BACKTRACKING_POOL[ABSTRACT_BACKTRACKING_SEQUENCE]

    The pool that will record Current