Implement basic compilation
- Dominant language
- C
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Implement enough of the compiler to make it successfully compile the `Prelude` and ideally simple programs that interface with it. This requires us to
- Implement the translation from ICurry to LLVM IR (partially done, needs some rework, see below)
- Implement the runtime (in `runtime.c`, partially done)
- Implement external functions from the Prelude in (in `prelude_external.c`)
Next steps:
- [ ] Update the runtime and the translation to follow a scheme where functions don't return CurryNodes and instead just mutate the single argument (representing the entire expression)
- e.g. `curryNodeNewInteger`, etc would have to be rewritten slightly to not return anything
- We would have to deal with edge cases, e.g. what happens when we try to 'assign' a number to a node that already represent a function call?
- An assertion that a variable is free or a placeholder may be useful
- We might want to pass the name of the variable representing the new expression node (to be 'assigned') to `trExpr`
Useful resources:
- The [`curry2go`](https://github.com/curry-language/curry2go) compiler which targets Go instead of LLVM IR and implements a similar translation
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.