package lambdapi
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=1066aed2618fd8e6a400c5147dbf55ea977ce8d3fe2e518ac6785c6775a1b8be
sha512=f7f499626aba92e070ae69581299a58525973fdbfd04a160ed3ac89209fb6cbe307b816d0b23e1b75bc83467ce8b4b0530c6f9816eaf58f7a07fde65a450106c
doc/lambdapi.parsing/Parsing/Scope/index.html
Module Parsing.Scope
Source
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 :
?find_sym:Core.Sig_state.find_sym ->
?typ:bool ->
?mok:(int -> Core.Term.meta option) ->
bool ->
Core.Sig_state.sig_state ->
Core.Env.env ->
Syntax.p_term ->
Core.Term.term
scope_term ~find_sym ~typ ~mok prv ss env t
turns a pterm t
into a term in the signature state ss
and environment env
(for bound variables). If prv
is true
, 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
. The function ~find_sym
is used to scope symbol identifiers.
val scope_search_pattern :
?find_sym:Core.Sig_state.find_sym ->
?typ:bool ->
?mok:(int -> Core.Term.meta option) ->
Core.Sig_state.sig_state ->
Core.Env.env ->
Syntax.p_term ->
Core.Term.term
scope_search_pattern ~find_sym ~typ prv ss env t
turns a pterm t
meant to be a search patter into a term in the signature state ss
and environment env
(for bound variables). 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
. The function ~find_sym
is used to scope symbol identifiers.
val scope_rule :
?find_sym:Core.Sig_state.find_sym ->
bool ->
Core.Sig_state.sig_state ->
Syntax.p_rule ->
Core.Term.sym_rule
scope_rule ~find_sym ur ss r
turns a parser-level rewriting rule r
, or a unification rule if ur
is true, into a pre-rewriting rule. The function ~find_sym
is used to scope symbol identifiers.
val scope_rw_patt :
Core.Sig_state.sig_state ->
Core.Env.env ->
Syntax.p_rw_patt ->
(Core.Term.term, Core.Term.binder) Syntax.rw_patt
scope_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).