module Cube:sig..end
Cubes and simplifications
type t = private {
|
vars : |
(* | existential variables, all distinct | *) |
|
litterals : |
(* | conjunction of litterals as a set | *) |
|
array : |
(* | conjunction of litterals as an array | *) |
the type of cubes, i.e. a conjunction of litterals existentially quanfified by distinct variables. The invariant that the array and the set correspond to the same conjunction is enforced.
val create : Variable.t list -> Types.SAtom.t -> tcreate a cube given its existential variables and a conjunction
val normal_form : t -> tputs a cube in normal form, so as to have the existential variables
contiguous (#1, #2, #3, ...). Performs variable renaming if
necessary.
val create_normal : Types.SAtom.t -> tcreate a cube in normal form by finding the quantified variables
val subst : Variable.subst -> t -> tapply a substitution on a cube
val dim : t -> intreturns the number of exitential distinct variables, i.e. the dimension of the cube
val size : t -> intreturns the number of atoms in the conjuction
The following five functions implements cheap checks for detecting inconsistencies
val inconsistent : ?use_sets:bool -> t -> bool
val inconsistent_2 : ?use_sets:bool -> t -> t -> boolis the conjunction of c1 and c2 inconsistent knowing that c1 and c2
are consitent on their own.
val inconsistent_set : Types.SAtom.t -> boolreturns true if the conjunction inconsistent
val inconsistent_array : Types.ArrayAtom.t -> boolsame as Cube.inconsistent_set but for arrays
val inconsistent_2arrays : Types.ArrayAtom.t -> Types.ArrayAtom.t -> boolsame as Cube.inconsistent_2 but for arrays
val simplify_atoms_base : Types.SAtom.t -> Types.SAtom.t -> Types.SAtom.tsimplify_atoms_base b c simplifies c in the context of b.
Raises Exit if it becomes inconsistent
val simplify_atoms : Types.SAtom.t -> Types.SAtom.tsimplify a conjunction. Raises Exit if it becomes inconsistent.
val simplify : t -> tsimplify a cube. Raises Exit if it becomes inconsistent.
val elim_ite_simplify_atoms : Types.SAtom.t -> Types.SAtom.t listlifts if-then-else constructs and simplify a conjunction
val elim_ite_simplify : t -> t listlifts if-then-else constructs and simplify a cube
val resolve_two : t -> t -> t option
val satom_globs : Types.SAtom.t -> Types.Term.Set.t
val print : Format.formatter -> t -> unit