Skip to main content Module ast Copy item path Source ac_operators assertions Debug-only structural assertions for AST/model integrity. categories comprehension declaration enumerated eval matrix Utility functions for working with matrices. pretty Functions for pretty printing Conjure models. records sat_decision Semantic SAT encoding decisions. Clauses and solver literals belong to the adaptor. serde Serde serialization/ deserialization helpers. unnamed DecisionVariable Represents a decision variable within a computational model. DeclarationPtr A shared pointer to a Declaration . EnumVariantVal ExprInfo A struct for the information about expressions ExpressionArena Arena-backed representation of an Expression tree. ExpressionNodeId Stable handle for an expression node stored in an ExpressionArena . Field A named field of a record or variant.
Used in [AbstractLiteral::Record] / [AbstractLiteral::Variant] and
in corresponding domains FuncAttr MSetAttr Metadata Per-expression metadata used for typing, source mapping, and runtime caches. Model An Essence model. Moo A clone-on-write, reference counted pointer to an AST type. Objective A single-objective optimisation statement. PartitionAttr PermutationAttr A permutation is inherently total and bijective by definition, so unlike partition or
function, its only attribute is a size constraint on numMoved, the number of moved points
(i.e. the points not fixed by the permutation) – confirmed against real Conjure’s own
numMoved/minNumMoved/maxNumMoved keywords (real Conjure does not accept
size/minSize/maxSize here, unlike set/relation/etc). Reference A reference to a declaration (variable, parameter, etc.) RelAttr SequenceAttr SerdeModel A model that is de/serializable using serde. SetAttr SymbolTable The global symbol table, mapping names to their definitions. SymbolTablePtr AbstractLiteral Atom An Atom is an indivisible expression, such as a literal or a reference. BinaryAttr DeclarationKind A specific kind of declaration. Domain Variants are ordered from fully resolved to unresolved; keep broad matches in this order. DomainOpError An error thrown by an operation on domains. Expression Represents different types of expressions used to define rules and constraints in the model. GroundDomain Variants use the project-wide type/domain ordering; keep broad matches in the same order. IntVal A variable or expression appearing inside an int range of an unresolved domain;
E.g int(1..x), int(2, 4..(2*y)), set (minSize x) of int(1..5), etc JectivityAttr Literal A literal value, equivalent to constants in Conjure. Name A reference to an object stored in the [SymbolTable]. OptimiseDirection Whether an objective is minimised or maximised. PartialityAttr Range ReturnType Variants use the project-wide type/domain ordering; keep broad matches in the same order. SATIntEncoding SatEncodingDecision A Boolean operation whose truth is asserted or bound to a named output. UnresolvedDomain Variants use the project-wide type/domain ordering; keep broad matches in the same order. OXIDE_INT_MAX Default upper bound used when a finite solver needs bounds for an unbounded integer. OXIDE_INT_MIN Default lower bound used when a finite solver needs bounds for an unbounded integer. HasDomain Types that have a Domain . Typeable Guaranteed to always typecheck discriminant_from_value domain_has_int_from_values Whether domain takes its values from a collection expression anywhere inside it. eval_constant Simplify an expression to a constant if possible
Returns:
None if the expression cannot be simplified to a constant (e.g. if it contains a variable)
Some(Const) if the expression can be simplified to a constant eval_constant_local Simplify an expression to a constant using only constants already present at this node. finish_root_evaluator_normalisation Finishes evaluator normalisation on the model root after rewriting completes. floor_div Essence division rounds towards negative infinity.
Returns None for zero divisors or a quotient outside the integer range. floor_mod Essence modulo has the divisor’s sign and is undefined for zero divisors.
Widened arithmetic also handles i32::MIN % -1, whose remainder is zero. generator_values_from_expr Values for a constant collection expression used during constant folding. normalise_evaluator_local Applies the evaluator normalisation hook to a focused expression. normalise_root_constraint_deep Deep-normalises a single top-level constraint, or returns None if it is already normal. normalise_root_constraints_deep normalise_root_constraints_local Applies local root-list partial evaluation (strip true, propagate false, flatten ands). normalise_root_selective_deep_expr Deep-normalises selected non-flat top-level constraints in root. print_hash_stats run_partial_evaluator run_partial_evaluator_local Partially evaluates expr using only information already available at the focused node. try_lower_bool_atom_eq_true Rewrites x = true / true = x to x when x is a non-literal boolean atom. DomainPtr