module Expr:sig..end
General Expressions (terms)
type expr
val ast_of_expr : expr -> AST.ast
val expr_of_ast : AST.ast -> expr
val simplify : expr -> Params.params option -> exprReturns a simplified version of the expression.
Expr.get_simplify_help
val get_simplify_help : context -> stringA string describing all available parameters to Expr.Simplify.
val get_simplify_parameter_descrs : context -> Params.ParamDescrs.param_descrsRetrieves parameter descriptions for simplifier.
val get_func_decl : expr -> FuncDecl.func_declThe function declaration of the function that is applied in this expression.
val get_num_args : expr -> intThe number of arguments of the expression.
val get_args : expr -> expr listThe arguments of the expression.
val update : expr -> expr list -> exprUpdate the arguments of the expression using an array of expressions. The number of new arguments should coincide with the current number of arguments.
val substitute : expr -> expr list -> expr list -> exprSubstitute every occurrence of from[i] in the expression with to[i], for i smaller than num_exprs.
The result is the new expression. The arrays from and to must have size num_exprs.
For every i smaller than num_exprs, we must have that
sort of from[i] must be equal to sort of to[i].
val substitute_one : expr -> expr -> expr -> exprSubstitute every occurrence of from in the expression with to.
Expr.substitute
val substitute_vars : expr -> expr list -> exprSubstitute the free variables in the expression with the expressions in the expr array
For every i smaller than num_exprs, the variable with de-Bruijn index i is replaced with term to[i].
val translate : expr -> context -> exprTranslates (copies) the term to another context.
val to_string : expr -> stringReturns a string representation of the expression.
val is_numeral : expr -> boolIndicates whether the term is a numeral
val is_well_sorted : expr -> boolIndicates whether the term is well-sorted.
val get_sort : expr -> Sort.sortThe Sort of the term.
val is_const : expr -> boolIndicates whether the term represents a constant.
val mk_const : context -> Symbol.symbol -> Sort.sort -> exprCreates a new constant.
val mk_const_s : context -> string -> Sort.sort -> exprCreates a new constant.
val mk_const_f : context -> FuncDecl.func_decl -> exprCreates a constant from the func_decl.
val mk_fresh_const : context -> string -> Sort.sort -> exprCreates a fresh constant with a name prefixed with a string.
val mk_app : context -> FuncDecl.func_decl -> expr list -> exprCreate a new function application.
val mk_numeral_string : context -> string -> Sort.sort -> exprCreate a numeral of a given sort.
val mk_numeral_int : context -> int -> Sort.sort -> exprCreate a numeral of a given sort. This function can be used to create numerals that fit in a machine integer.
It is slightly faster than MakeNumeral since it is not necessary to parse a string.
val equal : expr -> expr -> boolComparison operator.
val compare : expr -> expr -> intObject Comparison.