About the code
The structure of source code
The source code can be found in src
, in the following folders:
andromeda.ml
- main programconfig.ml
- runtime configuration parameterssyntax.mli
- abstract syntax of the meta-language (desugared form)- folder
parser
:desugar.ml
- desugar theInput
syntax toSyntax
syntax.input.mli
- abstract syntax of the meta-language (sugared form)lexer.ml
- the lexical structure of the meta-languageparser.mly
- the meta-language parser
- folder
utils
:level.ml
- precedence levels for concrete syntaxlocation.ml
- source-code location datatypename.ml
- manipulation of namesprint.ml
- general printing routinesstore.ml
- implementation of mutable storage
- folder
nucleus
:assumption.ml
- tracking of dependency of terms on free variablesjdg.ml
- type-theoretic judgments and contextsTT.ml
- type theory syntax
- folder
runtime
:equal.ml
- judgmental equalityeval.ml
- evaluation of meta-language computationsexternal.ml
- interface to OCaml functionsmatching.ml
- meta-language pattern matchingpredefined.ml
- pre-defined types and valuesruntime.ml
- meta-language run-time values, operations, and handlerstoplevel.ml
- toplevel computations
- folder
typing
: AML typing (under construction)
Main evaluation loop
- An expression is parsed using the lexer
parser/lexer.ml
and the parserparser/parser.mly
. The result is a top-level computation of typeInput.toplevel
. parser/desugar.ml
converts the parsedInput
entity to the correspondingSyntax
entity. Desugaring discerns names into bound variables (represented as de Bruijn indices), constants, data constructors, and operations.typing/mlty.ml
infers the ML-types (under construction)runtime/eval.ml
evaluatesSyntax.toplevel
to aRuntime.toplevel
. In the course of a top-level evaluation there are subordinate evaluation procedures, the most interesting of which takes a computationSyntax.comp
to aRuntime.result
which is either aRuntime.value
or an operation.