A mapping from variables to their assigned values.
This is the result of constraint solving.
Uses an immutable HashMap for efficient cloning during constraint solving.
A constraint satisfaction problem consisting of constraints and a range of variables to solve for.
The problem is considered solved when all variables in the range are assigned.
A type constraint that assigns specific sorts to each argument position.
Constructs a set of Assign constraints that fully constrain the type of arguments.
A constraint that can be applied to variable assignments.
Constraints are used in type inference to represent relationships between variables and values.
A trait for generating type constraints from atom applications.
This is used to create constraints that ensure proper typing of function/primitive applications.
Creates an assignment constraint that binds a variable to a specific value.
The constraint fails if the variable is already assigned to a different value.
Creates an equality constraint between two variables.
If one of the variable has a known value, the constraint propagates value to the other variable.
If both variables have known but different values, the constraint fails.
Creates an implication constraint that activates when all watch variables are assigned.
The constraint function is called with the values of the watch variables to generate the actual constraint.
Creates an exclusive-or constraint that requires exactly one sub-constraint to be satisfied.
The constraint proceeds if exactly one sub-constraint can be satisfied and all others lead to failure.
The constraint fails if zero sub-constraints can be satisfied.