class ABSTRACT_BACKTRACKING_CUT_POINT

Features exported to ABSTRACT_BACKTRACKING

Instances of that class are used by the ABSTRACT_BACKTRACKING to record "cut points" data. A cut point is an indication of up to wich alternative are to be removed from the exploration.

Instances of that class are inserted in the continuation path to be retrieved by dynamic cast during calls to cut.

Direct parents

conformant parents

ABSTRACT_BACKTRACKING_SEQUENCE

non-conformant parents

ABSTRACT_BACKTRACKING_GLOBALS

Summary

exported features

Details

top_alternative: ABSTRACT_BACKTRACKING_ALTERNATIVE

Record of what top of the stack of alternative is to restore when cut is called. Managed by ABSTRACT_BACKTRACKING.

set_top_alternative (value: ABSTRACT_BACKTRACKING_ALTERNATIVE)

ensure

  • definition: top_alternative = value

next_sequence (explorer: ABSTRACT_BACKTRACKING)

Do nothing: remove itself (as if it were the end of a sequence) and evaluate the continuation by issuing a 'continue'.

require

    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

    release

    Called by ABSTRACT_BACKTRACKING to release current instance to the pool.

    require

    • pool /= Void

    get_twin: ABSTRACT_BACKTRACKING_CUT_POINT

    Return a twin of current from the pool

    require

    • pool /= Void

    ensure

    • Result.is_equal(Current)

    deferred pool: ABSTRACT_BACKTRACKING_POOL[ABSTRACT_BACKTRACKING_CUT_POINT]

    The pool that will record Current

    pool_of_cut_points: ABSTRACT_BACKTRACKING_POOL_OF_CUT_POINT

    Bank of cut points