Module Logtk_parsers.Ast_dk
AST utils for dedukti
module A = Logtk.UntypedASTmodule T = Logtk.STerminclude T
Simple Terms
.
type location= Logtk.ParseLocation.ttype var=|V of string|Wildcardtype t= private{term : view;loc : location option;attrs : attr list;}and match_branch=|Match_case of string * var list * t|Match_default of tand view=|Var of varvariable
|Const of stringconstant
|AppBuiltin of Logtk.Builtin.t * t list|App of t * t listapply term
|Ite of t * t * t|Match of t * match_branch list|Let of (var * t) list * t|Bind of Logtk.Binder.t * typed_var list * tbind n variables
|List of t listspecial constructor for lists
|Record of (string * t) list * var optionextensible record
and typed_var= var * t optionand attr=|Attr_distinct_consttype term= t
val mk_var : ?loc:location -> var -> tval app : ?loc:location -> t -> t list -> tval app_const : ?loc:location -> string -> t list -> tval builtin : ?loc:location -> Logtk.Builtin.t -> tval app_builtin : ?loc:location -> Logtk.Builtin.t -> t list -> tval const : ?loc:location -> ?attrs:attr list -> string -> tval bind : ?loc:location -> Logtk.Binder.t -> typed_var list -> t -> tval ite : ?loc:location -> t -> t -> t -> tval match_ : ?loc:location -> t -> match_branch list -> tval let_ : ?loc:location -> (var * t) list -> t -> tval list_ : ?loc:location -> t list -> tval nil : tval record : ?loc:location -> (string * t) list -> rest:var option -> tval at_loc : loc:location -> t -> tval wildcard : tval is_app : t -> boolval is_var : t -> boolval true_ : tval false_ : tval and_ : ?loc:location -> t list -> tval or_ : ?loc:location -> t list -> tval not_ : ?loc:location -> t -> tval equiv : ?loc:location -> t -> t -> tval xor : ?loc:location -> t -> t -> tval imply : ?loc:location -> t -> t -> tval eq : ?loc:location -> t -> t -> tval neq : ?loc:location -> t -> t -> tval forall : ?loc:location -> typed_var list -> t -> tval exists : ?loc:location -> typed_var list -> t -> tval lambda : ?loc:location -> typed_var list -> t -> tval int_ : Z.t -> tval of_int : int -> tval rat : Q.t -> tval real : string -> tval tType : tval term : tval prop : tval ty_int : tval ty_rat : tval ty_real : tval fun_ty : ?loc:location -> t list -> t -> tval forall_ty : ?loc:location -> typed_var list -> t -> tval ty_unfold : t -> t list * tval unfold_bind : Logtk.Binder.t -> t -> typed_var list * t
module Set = Logtk.STerm.Setmodule Map = Logtk.STerm.Mapmodule Tbl = Logtk.STerm.Tblmodule StringSet = Logtk.STerm.StringSetmodule Seq = Logtk.STerm.Seqval ground : t -> boolval close_all : Logtk.Binder.t -> t -> tBind all free vars with the symbol
include Logtk.Interfaces.PRINT with type t := t
Formats
module TPTP = Logtk.STerm.TPTPmodule TPTP_THF = Logtk.STerm.TPTP_THFmodule ZF = Logtk.STerm.ZFval pp_in : Logtk.Output_format.t -> t CCFormat.printer
Subst
module StrMap = Logtk.STerm.StrMaptype statement= Logtk.UntypedAST.statementtype ty= T.t
val cast : T.t -> T.t -> termval const : string -> T.tval mk_const : string -> T.t -> termval mk_const_t : string -> termval var : string -> T.tval mk_var : string -> T.t -> termval mk_var_t : string -> termval v : string -> varval ty_aliases : (string, ty) Stdlib.Hashtbl.tval find_alias : or_else:ty -> string -> tyval add_alias : string -> T.t -> unitval type_nat : term
exceptionUnknown_builtin of stringexceptionBad_arity of string * intexceptionApplication_head_is_not_a_var of term
val mk_app : T.t -> T.t list -> T.tval mk_app_const : string -> T.t list -> T.tval mk_arrow_l : T.t list -> T.t -> T.tval mk_arrow : T.t -> T.t -> T.tval mk_fun : T.typed_var list -> T.t -> T.tval mk_forall : T.typed_var list -> T.t -> T.tval mk_int : string -> T.tval ty_prop : T.tval mk_ty_decl : ?loc:A.Loc.t -> string -> A.ty -> A.statementval mk_assert : ?loc:A.Loc.t -> name:string -> A.term -> A.statementval mk_goal : ?loc:A.Loc.t -> name:string -> A.term -> A.statementval mk_def : ?loc:A.Loc.t -> string -> A.ty -> T.t -> A.statementval mk_rewrite : ?loc:A.Loc.t -> A.term -> A.statement