-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
66 lines (57 loc) · 2.1 KB
/
TODO
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# TODO For Disp
## Week Goal
- Extract Evaluatable Structure from Syntax Tree
## 2nd Week Goal
- Evaluate Evaluatable Structure
## Month
- Type system encodings
## Active Tasks
- Parser (Text -> Tokens -> Spanned AST). - MVP DONE
- Investigate chumsky error - PR Submitted
- Other person has different error after PR merged
- Figure out how to write parser unit tests. (Look at what rust-lang does)
- Create some example files.
- Rewrite Expression Evaluation
- Implement Type Checking
- Refactor existing REPL Impl
- Ongoing
- Work on creating and saving graph structures (ontologies).
- Maybe look into interfacing with a Graph/Relational DB for this?
## Goals Outline
### Basic Binary Format
* Zero-copy deserialization parser rkyv for serialization/deserialization
- AST Format
- Programming this alongside Praser
- Separate Semantic and Syntactic Format
- Ontology-Based Format (?)
### Finish Parser
* Current Syntax Example:
* ```rust
/// Vector definition 1
Vec2 := { x: Num, y: Num }
/// Vector definition 2
Vec2_v2 := Array{Num, 2}
/// Derive an isomorphic relation
Isomorphic{Vec2, Vec2_v2} := iso_derive[Vec2, Vec2_v2][{v -> v.x, v -> v[0]}, {v -> v.y, v -> v[1]}]
/// Vector addition definition 1
add := { lhs: Vec2 } -> ({rhs} -> {
x := lhs.x + rhs.x,
y := lhs.y + rhs.y,
}): Vec2 -> (Vec2 -> Vec2)
/// Vector addition definition 2
add_v2 := { lhs: Vec2, rhs: Vec2 } -> Vec2 {
x := lhs.x + rhs.x,
y := lhs.y + rhs.y,
}
/// Prove functional equivalence (TODO)
let _ : Isomorphic[add, add_v2]
```
### Implement Pretty-printer
* Print out the semantic tree
* Store removed syntactic information and add it back so that parsing is completely reversible
* Different formats (This is out-of-scope for this project)
### Interpreter
* Loading text (.disp) and binary (.dbf) files
* Use Ontological Format as a Module-system (i.e. stores definitions).
* Parse user commands and interactively ask user for which specific implementation they want (if multiple are in scope).
*