-
Notifications
You must be signed in to change notification settings - Fork 220
Description
What will you do?
We'll implement a lisp targeting Bril, and try to run some programs with it.
How will you do it?
We found some links. First, https://bernsteinbear.com/assets/img/kelsey-ssa-cps.pdf, which suggests an algorithm for converting from continuation passing style (a simplification of functional languages) to SSA. There's also surely an algorithm for converting from Lisp / functional to CPS. Then, we can use our existing infrastructure for manipulating the resulting SSA. We'll probably use an off-the-shelf parser, like Pest, for simplicity.
Otherwise, we might scope our Lisp out / get implementation details based on https://www.buildyourownlisp.com/contents (a project to implement a lisp in C), as presumably one of these toy starter-project type implementations is reasonably narrow in scope to start with. The book also suggests some extensions, which is convenient!
How will you empirically measure success?
We'll see if a select few Lisp programs work as a start, and then perhaps find some more complicated examples from the internet or elsewhere to continue. Something else that could be interesting is comparing / re-implementing some of the benchmarks in our Lisp and comparing the generated code against the imperative version.
Team members:
@pedropontesgarcia