Membership constraint implementation for the Constraint behaviour.
Evaluates membership constraints (:member) which filter bindings based
on whether a value is present in a constant list. The left operand must
be bound; the right operand must be a constant list. Returns :filter
when the value is not in the list or the left variable is unbound.
Summary
Functions
Evaluates a membership constraint against a binding environment.
Functions
@spec evaluate( ExDatalog.IR.Constraint.t(), ExDatalog.Engine.Binding.t(), ExDatalog.Constraint.Context.t() ) :: {:ok, ExDatalog.Engine.Binding.t()} | :filter
Evaluates a membership constraint against a binding environment.
Accepts an IR.Constraint struct as produced by the compiler. Returns
{:ok, binding} (unchanged) when the left value is a member of the
right list, or :filter when it is not or the left variable is unbound.