summaryrefslogtreecommitdiff
path: root/vm0/README.md
blob: fc894291c383ad33692d1b4c035ed00db591a10f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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)