Documentation
alt-ergo-lib lib
AltErgoLib
. Expr
Module
Data structures
type decl_kind =
| Dtheory
| Daxiom
| Dgoal
| Dpredicate of t
| Dfunction of t
type view = private {
f : Symbols.t ;
xs : t list ;
ty : Ty.t ;
bind : bind_kind ;
tag : int;
vars : (Ty.t * int) Symbols.Map.t ;
vty : AltErgoLib .Ty.Svty.t;
depth : int;
nb_nodes : int;
pure : bool;
mutable neg : t option ;
}
and quantified = private {
name : string;
main : t ;
toplevel : bool;
user_trs : trigger list ;
binders : binders ;
sko_v : t list ;
sko_vty : Ty.t list ;
loc : Loc.t ;
kind : decl_kind ;
}
and letin = private {
let_v : Symbols.t ;
let_e : t ;
in_e : t ;
let_sko : t ;
is_bool : bool;
}
and trigger = {
content : t list ;
semantic : semantic_trigger list ;
hyp : t list ;
t_depth : int;
from_user : bool;
guard : t option ;
}
module Set : Stdlib .Set.S with type elt = t
module Map : Stdlib .Map.S with type key = t
type term_view = private
| Term of view
| Not_a_term of {
is_lit : bool;
}
type lit_view = private
| Eq of t * t
| Eql of t list
| Distinct of t list
| Builtin of bool * Symbols.builtin * t list
| Pred of t * bool
| Not_a_lit of {
is_form : bool;
}
different views of an expression
pretty printing
val print : Stdlib .Format.formatter -> t -> unit
val print_list : Stdlib .Format.formatter -> t list -> unit
val print_list_sep : string -> Stdlib .Format.formatter -> t list -> unit
val print_triggers : Stdlib .Format.formatter -> trigger list -> unit
Comparison and hashing functions
val compare : t -> t -> int
val equal : t -> t -> bool
Some auxiliary functions
val free_type_vars : t -> AltErgoLib .Ty.Svty.t
val is_ground : t -> bool
val is_positive : t -> bool
val is_fresh_skolem : t -> bool
val type_info : t -> Ty.t
Labeling and models
val is_in_model : t -> bool
val name_of_lemma : t -> string
val name_of_lemma_opt : t option -> string
val print_tagged_classes : Stdlib .Format.formatter -> Set .t list -> unit
smart constructors for terms
val bitv : string -> Ty.t -> t
val fresh_name : Ty.t -> t
smart constructors for literals
val mk_eq : iff :bool -> t -> t -> t
val mk_distinct : iff :bool -> t list -> t
simple smart constructors for formulas
val mk_or : t -> t -> bool -> int -> t
val mk_and : t -> t -> bool -> int -> t
val mk_imp : t -> t -> int -> t
val mk_iff : t -> t -> int -> t
val mk_if : t -> t -> t -> int -> t
val mk_xor : t -> t -> int -> t
val mk_ite : t -> t -> t -> int -> t
Substitutions
Subterms, and related stuff
val sub_terms : Set .t -> t -> Set .t
sub_term acc e
returns the acc augmented with the term and all its sub-terms. Returns the acc if e is not a term. Does not go through literals (except positive uninterpreted predicates application) and formulas
val max_pure_subterms : t -> Set .t
max_pure_subterms e
returns the maximal pure terms of the given expression
val max_terms_of_lit : t -> Set .t
returns the maximal terms of the given literal. Assertion failure if not a literal (should replace the assertion failure with a better error) *
val max_ground_terms_of_lit : t -> Set .t
returns the maximal ground terms of the given literal. Assertion failure if not a literal *
traverses a formula recursively and collects its atoms. Only ground atoms are kept if ~only_ground is true
traverses a formula recursively and collects its maximal ground terms
skolemization and other smart constructors for formulas *
val elim_iff : t -> t -> int -> with_conj :bool -> t
val print_th_elt : Stdlib .Format.formatter -> th_elt -> unit
val const_term : t -> bool
return true iff the given argument is a term without arguments