1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253(*
MSAT is free software, using the Apache license, see file LICENSE
Copyright 2014 Guillaume Bury
Copyright 2014 Simon Cruanes
*)(** SMT formulas
This module defines the required implementation of formulas for
an SMT solver.
*)typenegated=|Negated(** changed sign *)|Same_sign(** kept sign *)(** This type is used during the normalisation of formulas.
See {!val:Expr_intf.S.norm} for more details. *)moduletypeS=sig(** SMT formulas *)typet(** The type of atomic formulas. *)typeproof(** An abstract type for proofs *)valequal:t->t->bool(** Equality over formulas. *)valhash:t->int(** Hashing function for formulas. Should be such that two formulas equal according
to {!val:Expr_intf.S.equal} have the same hash. *)valprint:Format.formatter->t->unit(** Printing function used among other thing for debugging. *)valdummy:t(** Formula constant. A valid formula should never be physically equal to [dummy] *)valneg:t->t(** Formula negation. Should be an involution, i.e. [equal a (neg neg a)] should
always hold. *)valnorm:t->t*negated(** Returns a 'normalized' form of the formula, possibly negated
(in which case return [Negated]). This function is used to recognize
the link between a formula [a] and its negation [neg a], so the goal is
that [a] and [neg a] normalise to the same formula,
but one returns [Same_sign] and the other one returns [Negated] *)end