Comparison constraint implementation for the Constraint behaviour.
Evaluates comparison constraints (:gt, :lt, :gte, :lte, :eq,
:neq) which filter bindings without introducing new variable bindings.
This module is the canonical evaluator for comparison operations. It is
dispatched to by ExDatalog.Constraint.evaluate/3 when the constraint's
op is one of the comparison operators.
Summary
Functions
Evaluates a comparison 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 comparison constraint against a binding environment.
Accepts an IR.Constraint struct as produced by the compiler. Returns
{:ok, binding} (unchanged) when the comparison succeeds, or :filter
when it fails or an input variable is unbound.