Commit Graph

10 Commits

Author SHA1 Message Date
Leo Lara
f379cd1e0e Put setup in its own indentation level 2023-05-30 13:44:21 +07:00
Steve Wang
656362bc08 steve/issue 7 ci (#15)
rustfmt and clippy check, with skip check option for markdown files and
docs

rustfmt check taken from zkEVM

@leolara These edits change the source code (by fixing warnings and
conforming to rustfmt). Most are cosmetic, but I'd still suggest you
review them. Thanks!

---------

Co-authored-by: Steve Wang <qwang97@wharton.upenn.edu>
Co-authored-by: Chih Cheng Liang <chihchengliang@gmail.com>
2023-05-03 05:46:39 +00:00
Steve Wang
c5097d09d0 lookup column implementation (#3)
High Level Description
Simplified syntax for adding and building lookup columns. 
- Adding lookup: call add_lookup in step_type_def to modify StepTypeContext
- Building lookup: call lookup() without a parameter to initialize; call add(source_column, lookup_column) to build lookup match constraints; call enable(enabler_column) to add an enabler column
- Example: add_lookup(lookup().add(source_col_1, lookup_col_1).enable(enabler_col).add(source_col_2, lookup_col2)

Technical Details (from a user -> dsl -> ast -> ir perspective):
1. Added LookupBuilder to dsl/cb with exposed methods to update Lookup in ast
2. Modified Lookup in ast to include an annotation field, which is now auto generated, as well as an enabler column field
3. Lookup now takes (Constraint, Expr) for (LHS, RHS), where LHS is the source column and RHS is the lookup column; Lookup takes Constraint for the enabler column
4. In ir, PolyLookup takes the auto-generated annotation from Lookup in ast and Halo2 backend takes annotation from PolyLookup in ir.

Next Step
1. Test the new lookup syntax on zkEVM bytecode circuit

---------
(With lots of inspirations and guidance from Leo Lara)
Co-authored-by: Steve Wang <qian.wang.wg24@wharton.upenn.edu>
2023-04-24 14:00:41 +07:00
Leo Lara
3237f567e3 Remove deprecated 2023-04-13 22:53:55 +07:00
Leo Lara
1c5b13a156 Not necessary to add annotations to constraints anymore 2023-04-13 18:39:50 +07:00
Leo Lara
ae40739f88 Remove unnecesary mut borrow 2023-04-12 19:45:20 +07:00
ChihChengLiang
60f296dcf7 fix examples and compiles 2023-04-11 19:32:31 +09:00
Leo Lara
7f5d90ab25 3rd commit 2023-03-27 09:39:05 +07:00
Leo Lara
ac87e74706 2nd commit 2023-03-22 10:37:40 +07:00
Leo Lara
bde4455a45 Initial commit 2023-03-20 19:20:56 +07:00