Gil_syntax.Formula
GIL Formulae
type t =
| True
Logical true
*)| False
Logical false
*)| Not of t
Logical negation
*)| And of t * t
Logical conjunction
*)| Or of t * t
Logical disjunction
*)| Eq of Expr.t * Expr.t
Expression equality
*)| Impl of t * t
Logical implication
*)| FLess of Expr.t * Expr.t
Expression less-than for numbers
*)| FLessEq of Expr.t * Expr.t
Expression less-than-or-equal for numbers
*)| ILess of Expr.t * Expr.t
Expression less-than for integers
*)| ILessEq of Expr.t * Expr.t
Expression less-than-or-equal for integeres
*)| StrLess of Expr.t * Expr.t
Expression less-than for strings
*)| SetMem of Expr.t * Expr.t
Set membership
*)| SetSub of Expr.t * Expr.t
Set subsetness
*)| ForAll of (string * Type.t option) list * t
Forall
*)| IsInt of Expr.t
IsInt e <=> (e : float) /\ (e % 1. == 0)
*)val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
val of_bool : bool -> t
val lvars : t -> Utils.Prelude.SS.t
Get all the logical variables
val pvars : t -> Utils.Prelude.SS.t
Get all the program variables
val alocs : t -> Utils.Prelude.SS.t
Get all the abstract locations
val clocs : t -> Utils.Prelude.SS.t
Get all the concrete locations
val locs : t -> Utils.Prelude.SS.t
Get all locations
val get_print_info :
t ->
Utils.Prelude.SS.t * Utils.Prelude.SS.t * Utils.Prelude.SS.t
Get print info
Get all the logical expressions of the formula of the form (Lit (LList lst)) and (EList lst)
val list_lexprs : t -> Gil_syntax.Expr.Set.t
Get all the list expressions
push_in_negations a
takes negations off the toplevel of a
and pushes them in the leaves. For example push_in_negations (Not (And (True, False)))
returns Or (False, False)
val pp : Stdlib.Format.formatter -> t -> unit
Pretty-printer
val full_pp : Stdlib.Format.formatter -> t -> unit
Pretty-printer with constructors (will not parse)
Lifts an expression to a formula, if possible. It returns the lifted expression and its negation
subst_clocs subst e
Substitutes expressions of the form Lit (Loc l)
with subst l
in e
val strings_and_numbers : t -> string list * float list
Returns a list of strings and a list of numbers that are contained in the formula
module Infix : sig ... end