argumentcomputer / lurk

Lurk is a Turing-complete programming language for zk-SNARKs. It is a statically scoped dialect of Lisp, influenced by Scheme and Common Lisp.
https://docs.argument.xyz
MIT License
47 stars 3 forks source link

Trace generation and Lair code generation for Loam backend #304

Open winston-h-zhang opened 2 months ago

winston-h-zhang commented 2 months ago

Issue #124 details the Lair-side changes that are necessary to support Loam. We also need some Loam-side changes in order to integrate with Lair.

I think we can expect trace generation to be fairly straightforward to implement.

For more on the second point: Given #124, i.e. if we have the provide and require opcodes, we can directly translate the relation clauses in each rule. The other conditional causes need to be arithmetized into Lair, which can also happen directly with some modification to ascent!, e.g. allowing the user to embed any Lair syntax into the rules, which we can paste into the generated Lair function. Finally, as discussed with @wwared and @gabriel-barrett, Loam chips and Lair functions aren't exactly semantically the same, so some coordination has to happen on this boundary for a complete integration.