package lambdapi
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ef0c364e355c6c44327e62e79c484b1808d6e144bd6b899d39f0c9c3a351d5f2
sha512=b8b01a1203ea75ae79c59f67e787097f3df7603fc814776fbdd867625165dd00c70918d6edbfdc05c3a63fe7686f95e0523ad106f9da63234a2db33c4d42837e
doc/lambdapi.parsing/Parsing/Scope/index.html
Module Parsing.ScopeSource
Scoping. Convert parsed terms in core terms by finding out which identifiers are bound variables or function symbol declared in open modules.
val scope_term :
?typ:bool ->
?mok:(int -> Core.Term.meta option) ->
bool ->
Core.Sig_state.sig_state ->
Core.Env.env ->
Syntax.p_term ->
Core.Term.termscope ~typ ~mok prv expo ss env p t turns a pterm t into a term in the signature state ss and environment env (for bound variables). If expo is Public, then the term must not contain any private subterms. If ~typ is true, then t must be a type (defaults to false). No new metavariables may appear in t, but metavariables in the image of mok may be used. The function mok defaults to the function constant to None
type pre_rule = {pr_sym : Core.Term.sym;(*Head symbol of the LHS.
*)pr_lhs : Core.Term.term list;(*Arguments of the LHS.
*)pr_vars : Core.Term.term_env Bindlib.mvar;(*Pattern variables that appear in the RHS. The last
*)pr_xvars_nbvariables do not appear in the LHS.pr_rhs : Core.Term.tbox;(*Body of the RHS, should only be unboxed once.
*)pr_names : (int, string) Hashtbl.t;(*Gives the original name (if any) of pattern variable at given index.
*)pr_arities : int array;(*Gives the arity of all the pattern variables in field
*)pr_vars.pr_xvars_nb : int;(*Number of variables that appear in the RHS but not in the LHS.
*)
}Representation of a rewriting rule prior to SR-checking.
rule_of_pre_rule r converts a pre-rewrite rule into a rewrite rule.
scope_rule ur ss r turns a parser-level rewriting rule r, or a unification rule if ur is true, into a pre-rewriting rule.
val scope_rw_patt :
Core.Sig_state.sig_state ->
Core.Env.env ->
Syntax.p_rw_patt ->
(Core.Term.term, Core.Term.tbinder) Syntax.rw_pattscope_rw_patt ss env t turns a parser-level rewrite tactic specification s into an actual rewrite specification (possibly containing variables of env and using ss for aliasing).