Documentation
alt-ergo-lib lib
AltErgoLib
. Expr
Module
Data structures
type decl_kind =
| Dtheory
| Daxiom
| Dgoal
| Dpredicate of t
| Dfunction of t
type term_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 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
different views of an expression
constant casts
Extracts the integer value of the expression, if there is one.
The returned value may be negative or null.
Extracts the rounding mode value of the expression, if there is one.
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 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 -> t
val mk_and : t -> t -> bool -> t
val mk_if : t -> t -> t -> t
val mk_ite : t -> t -> t -> 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 *
clean trigger: remove useless terms in multi-triggers after inlining of lets
val elim_let : recursive :bool -> letin -> t
val elim_iff : t -> t -> 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
val save_cache : unit -> unit
val reinit_cache : unit -> unit
Reinitializes the module's cache
module Core : sig ... end
Constructors from the smtlib core theory. https://smtlib.cs.uiowa.edu/theories-Core.shtml
module Ints : sig ... end
Constructors from the smtlib theory of integers. https://smtlib.cs.uiowa.edu/theories-Ints.shtml
Constructors from the smtlib theory of fixed-size bit-vectors and the QF_BV logic.