diff options
| author | Marc Vertes <mvertes@free.fr> | 2023-08-24 17:16:39 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2023-08-24 17:16:39 +0200 |
| commit | 9fdef50606a2942389189cd61397e17c0a0ccfd7 (patch) | |
| tree | e89a4aa3a61a6ab41abb4b6533ec9a2d9d7e2ce9 /vm0/README.md | |
| parent | ec8eb9defc7cd68fcd3afa0058773bcbc33ecd63 (diff) | |
codegen: add Interpreter struct
This makes the code easier to use.
Diffstat (limited to 'vm0/README.md')
| -rw-r--r-- | vm0/README.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vm0/README.md b/vm0/README.md new file mode 100644 index 0000000..fc89429 --- /dev/null +++ b/vm0/README.md @@ -0,0 +1,27 @@ +# vm0 + +vm0 is a virtual machine executing directly the syntax tree. + +```mermaid +graph LR +s[ ] --> |source| a(scanner) +--> |tokens| b(parser) +--> |AST| c(vm) +subgraph vm0 + c +end +style s height:0px; +``` + +The execution is performed by walking the AST and evaluating each +visited node. + + +## Motivation + +- have a reference execution model for each defined language +- usable for compilation time evaluation +- to modelize similar VMs (i.e. gnovm) +- to validate and compare with other VMs (once it is itself validated) +- could serve as a basis for AST based symbolic execution (to be + investigated) |
