AltErgoLib.Symbols
type operator =
| Tite
| Plus
| Minus
| Mult
| Div
| Modulo
| Pow
| Access of Dolmen.Std.Expr.term_cst
| Record
| Constr of Dolmen.Std.Expr.term_cst
| Destruct of Dolmen.Std.Expr.term_cst
| Get
| Set
| Concat
| Extract of int * int
| Sign_extend of int
| Repeat of int
| BVnot
| BVand
| BVor
| BVxor
| BVadd
| BVsub
| BVmul
| BVudiv
| BVurem
| BVshl
| BVlshr
| Int2BV of int
| BV2Nat
| Float
| Integer_round
| Sqrt_real
| Sqrt_real_default
| Sqrt_real_excess
| Abs_int
| Abs_real
| Real_of_int
| Real_is_int
| Int_floor
| Int_ceil
| Integer_log2
| Max_real
| Max_int
| Min_real
| Min_int
| Not_theory_constant
| Is_theory_constant
| Linear_dependency
type name_space =
| User
This symbol was defined by the user, and appears as is somewhere in a source file.
As an exception, if the name we got from the user starts with either "." or "@" (which are prefixes reserved for solver use in the SMT-LIB standard), the name will be printed with an extra ".". So if the user writes ".x" or "@x", it will be printed as "..x" and ".@x" instead.
Normally, this shouldn't occur, but we do this to ensure no confusion even if invalid names ever sneak through.
*)| Internal
This symbol is an internal implementation detail of the solver, such as a proxy formula or the abstracted counterpart of AC symbols.
Internal names are printed with a ".!" prefix.
*)| Fresh
This symbol is a "fresh" internal name. Fresh internal names play a similar role as internal names, but they always represent a constant that was introduced during solving as part of some kind of purification or abstraction procedure.
In order to correctly implement AC(X) in the presence of distributive symbols, symbols generated for AC(X) abstraction use a special namespace, Fresh_ac
below.
To ensure uniqueness, fresh names must always be generated using Id.Namespace.Internal.fresh ()
.
In particular, fresh names are only used to denote constants, not arbitrary functions.
*)| Fresh_ac
This symbol has been introduced as part of the AC(X) abstraction process. This is notably used by some parts of AC(X) that check if terms contains fresh symbols (see contains_a_fresh_alien
in the Arith
module for an example).
These correspond to the K sort in the AC(X) paper. They use a different name space from other fresh symbols because we need to be able to know whether a fresh symbol comes from the AC(X) abstraction procedure in order to prevent loops.
To ensure uniqueness, AC abstraction names must always be generated using Id.Namespace.Internal.fresh ()
.
| Skolem
This symbol has been introduced as part of skolemization, and represents the (dependent) variable of an existential quantifier. Skolem names can have arbitrary arity to depend on previous skolem names in binding order (so if you have `(exists (x y) e)` then there will be a skolem variable `sko_x` and a skolem function `(sko_y sko_x)`).
*)| Abstract
This symbol has been introduced as part of model generation, and represents an abstract value.
To ensure uniqueness, abstract names must always be generated using Id.Namespace.Abstract.fresh ()
.
The name_space
type discriminates the different types of names. The same string in different name spaces is considered as different names.
Note that the names stored in the Name
constructor below are mangled during creation of the symbol: a special prefix is added depending on the name space.
val name : ?kind:name_kind -> ?defined:bool -> ?ns:name_space -> string -> t
Create a new symbol with the given name.
By default, names are created in the User
name space.
Note that names are pre-mangled: the hs
field of the resulting name may not be exactly the name that was passed to this function (however, calling `name` with the same string but two different name spaces is guaranteed to return two Name
s with distinct hs
fields).
val int : string -> t
val bitv : string -> t
val real : string -> t
val constr : Dolmen.Std.Expr.term_cst -> t
val destruct : Dolmen.Std.Expr.term_cst -> t
val mk_bound : bound_kind -> Ty.t -> is_open:bool -> is_lower:bool -> bound
val is_ac : t -> bool
val is_internal : t -> bool
Check if the symbol is internal name that should never be printed on the regular output.
val hash : t -> int
val to_string : t -> string
val print : t Fmt.t
val to_string_clean : t -> string
val print_clean : t Fmt.t
val pp_name : (name_space * string) Fmt.t
val pp_ae_operator : operator Fmt.t
val pp_smtlib_operator : operator Fmt.t
val fresh_skolem_var : string -> Var.t
val fresh_skolem_name : string -> t
Resets to 0 the fresh symbol counter
val is_get : t -> bool
val is_set : t -> bool
val print_bound : Stdlib.Format.formatter -> bound -> unit
val string_of_bound : bound -> string