Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file ast.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128(* This file is free software, part of dolmen. See file "LICENSE" for more information. *)(** AST requirement for the Smtlib format.
The smtlib format is widely used among SMT solvers, and is the language
of the smtlib benchmark library. Terms are expressed as s-expressions,
and top-level directives include everything needed to use a prover
in an interactive loop (so it includes directive for getting and setting options,
getting information about the solver's internal model, etc...) *)moduletypeId=sigtypet(** The type of identifiers *)typenamespace(** Namespace for identifiers *)valsort:namespacevalterm:namespacevalattr:namespace(** The namespace for sorts (also called typee), terms
and attributes, respectively. *)valmk:namespace->string->t(** Make an identifier from a name and namespace. *)valindexed:namespace->string->stringlist->t(** Create an indexed identifier. *)endmoduletypeTerm=sigtypet(** The type of terms. *)typeid(** The type of identifiers for constants. *)typelocation(** The type of locations. *)valconst:?loc:location->id->t(** Constants, i.e non predefined symbols. This includes both constants
defined by theories, defined locally in a problem, and also quantified variables. *)valstr:?loc:location->string->t(** Quoted strings. According to the smtlib manual, these can be interpreted as
either string literals (when the String theory is used), or simply constants *)valint:?loc:location->string->tvalreal:?loc:location->string->tvalhexa:?loc:location->string->tvalbinary:?loc:location->string->t(** Constants lexically recognised as numbers in different formats. According to the smtlib
manual, these should not always be interpreted as numbers since their interpretation
is actually dependent on the theory set by the problem. *)valcolon:?loc:location->t->t->t(** Juxtaposition of terms, used to annotate terms with their type. *)valapply:?loc:location->t->tlist->t(** Application. *)valletand:?loc:location->tlist->t->t(** Local parrallel bindings. The bindings are a list of terms built using
the [colon] function. *)valforall:?loc:location->tlist->t->t(** Universal quantification. *)valexists:?loc:location->tlist->t->t(** Existencial quantification. *)valmatch_:?loc:location->t->(t*t)list->t(** Pattern matching. The first term is the term to match,
and each tuple in the list is a match case, which is a pair
of a pattern and a match branch. *)valsexpr:?loc:location->tlist->t(** S-expressions. Used in smtlib's annotations, *)valannot:?loc:location->t->tlist->t(** Attach a list of attributes (also called annotations) to a term. As written
in the smtlib manual, "Term attributes have no logical meaning --
semantically, [attr t l] is equivalent to [t]" *)end(** Implementation requirements for Smtlib terms. *)moduletypeStatement=sigtypet(** The type of statements. *)typeid(** The type of identifiers. *)typeterm(** The type of terms. *)typelocation(** The type of locations. *)typedefs(** Definition for model values *)valfun_def:?loc:location->id->termlist->termlist->term->term->defs(** Defines a new function. [fun_def f args ret body] is such that
applications of [f] are equal to [body] (module substitution of the arguments),
which should be of type [ret]. *)valfuns_def_rec:?loc:location->(id*termlist*termlist*term*term)list->defs(** Defines a list of mutually recursive functions. *)valsat:?loc:location->defslistoption->t(** Create a `SAT` answer with an (optional) model. *)valunsat:?loc:location->unit->t(** Create an `UNSAT` answer. *)valerror:?loc:location->string->t(** Create an `ERROR` answer. *)end(** implementation requirement for smtlib statements. *)