NAME

Logic::Relational::State - Represents a frozen search state in the logic engine.

METHODS

new

Constructor. Accepts substitution, goals, propagators, ancestors, and table_cache.

substitution

Returns the current Logic::Relational::Substitution.

goals

Returns the arrayref of remaining goals.

propagators

Returns the arrayref of active constraint propagator callbacks.

ancestors

Returns the arrayref of active ancestor call terms along the current derivation path.

table_cache

Returns the shared subgoal memoization hashref for the active query.

has_goals

Returns true if there are remaining goals to prove.

split_first_goal

Returns the first goal and the list of remaining goals.

add_propagator

Returns a new state with the given constraint propagator added.

propagate

Runs all active constraint propagators until a fixpoint is reached.

derive

Derives a successor state with updated substitution, goals, propagators, or ancestors.

canonical_term_signature

Computes a canonical string signature for a term under a substitution, normalizing unbound logical variables by order of first appearance (V0, V1, ...).