| Copyright | (c) Masahiro Sakai 2011-2013 |
|---|---|
| License | BSD-style |
| Maintainer | masahiro.sakai@gmail.com |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
ToySolver.Arith.Cooper.FOL
Description
Documentation
eliminateQuantifiers :: Formula (Atom Rational) -> Maybe QFFormula Source
Eliminate quantifiers and returns equivalent quantifier-free formula.
returns eliminateQuantifiers φ(ψ, lift) such that:
- ψ is a quantifier-free formula and
LIA ⊢ ∀y1, …, yn. φ ↔ ψwhere{y1, …, yn} = FV(φ) ⊇ FV(ψ), and - if
M ⊧_LIA ψthenlift M ⊧_LIA φ.
φ may or may not be a closed formula.
solveFormula :: VarSet -> Formula (Atom Rational) -> SatResult Integer Source
solveFormula {x1,…,xm} φ- returns
such thatSatMM ⊧_LIA φwhen suchMexists, - returns
when suchUnsatMdoes not exists, and - returns
whenUnknownφis beyond LIA.