Module fungi_lang::dynamics [−][src]
Syntax for dynamic, evaluation-time structures.
Notably, some of these syntantic forms are absent from programs written by the programmer; rather, they only arise dynamically, from running these programs, and in some cases, by using Adapton engine.
However, since they are common to multiple operational semantics
(eval
and reduce
), we separate these dynamic structures from any
one particular evaluation semantics.
For practical reasons, these AST structures still must be mentioned in
the static structure. Namely, the Exp::HostEval
form holds a
function over these types, providing a "trapdoor" for libraries to
extend the core evaluation rules below with custom ones (e.g., for
standard library primitives, such as vectors).
See also: The ExpTerm type.
Structs
EnvRec |
Enums
Env |
TODO-Sometime: Prune the environments (using free variables as filters) |
ExpTerm |
Terminal expressions (a la CBPV), but in environment-passing style, where (closed) lambda terms have closing environments. |
NameTmVal |
Name Term Values. The value forms (name and lambda) for the Name Term sub-language (STLC + names). |
RtVal |
Run-time values. Compare to ast::Val. |
Functions
close_val |
Given a closing environment and an |
close_val_rec |
See |
engine_name_of_ast_name |
Name conversion. Convert an |
env_emp | |
env_find | |
env_push | |
nametm_eval |
Evaluate a name term, dynamically (see also: |
nametm_eval_rec |
Evaluate a name term, dynamically (see also: |
nametm_of_nametmval |
Convert a name term value back into (the same) name term |
nametm_subst |
Substitute a name term value for a free variable in another term |
nametm_subst_rec |
Substitute a name term value for a free variable in another term |
proj_namespace_name |
project/pattern-match the name of namespace, defined as the
sub-term |
ret |
Wrapper for |
Type Definitions
RtValRec |
Run-time values |