hermod-recon-framework
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hermod.ReCon.Presburger.Parser

Synopsis

Documentation

type Parser = Parsec Void Text Source #

formula :: Parser Formula Source #

Parse a Presburger arithmetic formula.

Precedence table (outermost / lowest binding first):

  ∀x. φ   ∃x. φ     quantifiers
  φ ⇒ ψ             implication (right-associative)
  φ ∨ ψ             disjunction (right-associative)
  φ ∧ ψ             conjunction (right-associative)
  ¬ φ               negation    (prefix, binds to single atom)
  ⊥  ⊤  (φ)  d∣t  t rel t     atoms

Note: to combine a quantifier with a connective write φ ∧ (∀x. ψ) — quantifiers inside sub-formulas must be parenthesised.

intTerm :: Parser IntTerm Source #

Full IntTerm: atoms joined by + and -.