Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file abstract_syntax.ml
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091(**************************************************************************)(* *)(* ACG development toolkit *)(* *)(* Copyright 2008-2023 INRIA *)(* *)(* More information on "https://acg.loria.fr/" *)(* License: CeCILL, see the LICENSE file or "http://www.cecill.info" *)(* Authors: see the AUTHORS file *)(* *)(* *)(* *)(* *)(* *)(**************************************************************************)moduleAbstract_syntax=structtypelocation=Lexing.position*Lexing.position(** The type of the kind of associativity for infix operators *)typeassociativity=Left|Right|NonAss(** The type of the syntactic behaviour of constants defined in
the signature *)typesyntactic_behavior=|Default|Prefix|Infixofassociativity*float(* the float indicates precedence in the total order of infix
operators *)|Bindertypeabstraction=Linear|Non_lineartypeterm=|Varof(string*location)(** If the term is variable (bound by a binder)*)|Constof(string*location)(** If the term is a constant (not bound by a binder) *)|Absof(string*location*term*location)(** If the term is a intuitionistic abstraction *)|LAbsof(string*location*term*location)(** If the term is a linear abstraction *)|Appof(term*term*location)(** If the term is an application *)letrecunlinearize_term=function|Var_asv->v|Const_asc->c|Abs(x,loc,t,loc')->Abs(x,loc,unlinearize_termt,loc')|LAbs(x,loc,t,loc')->Abs(x,loc,unlinearize_termt,loc')|App(t,u,loc)->App(unlinearize_termt,unlinearize_termu,loc)typetype_def=|Type_atomof(string*location*termlist)(** If the type is atomic. The third parameter is the terms to
which the type is applied in case of a dependent type. The
list is empty if the type does not depend on any type *)|Linear_arrowof(type_def*type_def*location)(** If the type is described with a linear abstraction *)|Arrowof(type_def*type_def*location)(** If the type is described with a intuitionistic abstraction
*)(* | Dep of (string * location * type_def) * type_def * location
(** If the type is a dependent type *)
| Type_Abs of (string * location * type_def) * location
(** If the type is a dependent type build with an abstraction *) *)typesig_entry=|Type_declof(string*location*kind)(** The first parameter ([string]) is the name of the type,
the second parameter is the place in the file where it was
defined *)|Type_defof(string*location*type_def*kind)(** Tthe first parameter ([string]) is the name of the defined type,
the second parameter is the place in the file where it was
defined and the last parameter is its value *)|Term_declof(string*syntactic_behavior*location*type_def)(** The first parameter ([string]) is the name of the constant,
the second parameter is the place in the file where it was
defined and the last parameter is its type *)|Term_defof(string*syntactic_behavior*location*term*type_def)(** The first parameter ([string]) is the name of the constant,
the second parameter is the place in the file where it was
defined and the last parameter is its value *)andkind=Koftype_deflisttypelex_entry=|Typeof(string*location*type_def)|Constantof(string*location*term)end