Decides whether a Presburger formula has a solution over the integers. Formulas are values in a pool that shares equal nodes, every integer is a bigint, and the algorithms charge fuel to a Budget. The machine and decision packages use it for counter and length constraints.
Algorithms
Cooper quantifier elimination. Removes the quantifiers of a Presburger formula by miniscoping, scaling and bound or residue expansion, so every formula can be decided (Cooper 1972). (eliminateQuantifiers, COOPER_BACKEND)
Hermite normal form. Reduces a conjunction's equality rows by integer row operations before Cooper elimination. (hermiteEqualities)
Omega test. Decides existential formulas with equality rewriting, real shadows, dark shadows and splinters (Pugh 1991). Quantifier alternation is supported when each projected equality has a unit coefficient or an inequality projection has a unit side. Unsupported projections make accepts return false. (OMEGA_BACKEND)
Cross-checked decision. Runs one backend, replays its model on the quantifier-free form, and checks an unsatisfiable answer with the second backend. (decideSatisfiability)
Formula evaluation. Evaluates a quantifier-free formula under a valuation. (evaluateFormula)
Stable dump. Prints a formula as one line per reachable node, independent of node ids. (dumpFormula)
Data structures
Formula pool. A hash-consing pool for linear terms and formulas. Builders normalize atoms by their gcd, push negations to the atoms, and flatten and deduplicate connectives. The pool finds an equal node through numeric keys, which are tuples of 32-bit integers in tuple tables, so interning builds no strings. A new formula charges fuel for its depth and has no fixed depth cap. (FormulaPool, Formula, LinearTerm, Variable, Valuation)
Solver results. The backend interface and the satisfiability outcome with its model. (Backend, Solution, SatisfiabilityDecision, SolveStatus)
Enumerations. Name the closed sets of strings that the types and the wire data of the package use. (BackendId, Corroboration, FormulaKind)