Commit Graph

26 Commits

Author SHA1 Message Date
Edward Chen
60a5c2d866 merged main to graphing 2022-01-26 13:14:32 -05:00
Edward Chen
32c5fd18db graphing v1 2022-01-25 14:14:05 -05:00
Edward Chen
75572c6a2c C Frontend (#22) 2022-01-20 10:16:27 -08:00
Edward Chen
c8070bbd09 updating graph partitioning scheme 2022-01-13 01:41:33 -05:00
Alex Ozdemir
cba4bdc925 Cache submodule build (#38) 2022-01-09 08:49:07 -08:00
Alex Ozdemir
a9fd7888c4 Resolve lints and add clippy to CI (#35)
`front::zokrates` is currently excluded
2022-01-01 12:27:36 -08:00
Alex Ozdemir
f2744e0c06 IR-based Zokrates front-end (#33)
The ZoKrates front-end now represents ZoK arrays as IR arrays, and ZoK structures as (type-tagged) IR tuples.

During this change, I discovered that IR support for eliminating tuples and arrays was not complete.

Thus the change list is:

    The ZoK front-end uses IR arrays and tuples
    Improve IR passes for array and tuple elimination
    Enforce cargo fmt in CI
    Bugfix: handle ZoK accessors in L-values in the correct order
    Bugfix: add array evaluation to the IR

This PR does not:

    implement an array flattening pass
    implement permutation-based memory-checking

Benefits:

    The ZoK->R1CS compiler is now ~5.88x faster (as defined by the time it takes to run the tests in master's scripts/zokrates_test.zsh script: this goes from 8.59s to 1.46s)
        For benchmarks with multi-dimensional arrays, the ZoK->R1CS compiler can now compile them with reasonable speed. Before it it would time out on even tiny examples.
    The ZoK->R1CS compiler will be able to benefit from future memory-checking improvements
    IR support for arrays and tuples is complete now, making those parts of the IR more accessible to future front-ends.

alex-ozdemir added 21 commits 11 days ago
2022-01-01 11:44:56 -08:00
Edward Chen
30ccc35bec updating c frontend to include proof mode 2021-12-07 03:18:30 -05:00
Alex Ozdemir
a702a55e93 very basic C zkp 2021-12-02 15:48:16 -08:00
Alex Ozdemir
be8fd6a536 Merge branch 'master' into c_frontend 2021-11-30 17:00:29 -08:00
Alex Ozdemir
4ffa05fca6 Datalog (#26)
Support a datalog variant.
2021-11-30 13:26:25 -08:00
Alex Ozdemir
8a05a107ed Deterministic compilation & better CLI (#25)
This PR makes compilation deterministic (by switching to fxhash) and improves the CLI.

Technically, the std-based hash tables cannot be guaranteed to have the deterministic iteration order that we need, regardless of what hash you use, so I've added some micro-tests for the property that we need. I'm not optimistic about getting better guarantees from std, but I'll try.

The CLI has also changed.
2021-11-29 15:17:32 -08:00
Edward Chen
6fcbaddee7 oom on gcc compiler now? 2021-11-17 17:35:19 -05:00
Edward Chen
88b6768798 minor changes to add in typing for integers, address some review comments 2021-10-22 01:32:58 -04:00
Edward Chen
eb01f3e07f Working C frontend supporting just one main function, binary arithmetic, if-else stmts, & array select and store. Supports both integer and boolean types. 2021-10-20 18:27:59 -04:00
Alex Ozdemir
efe0d62263 Proof of high-value & tests 2021-10-18 15:29:37 -07:00
Edward Chen
7af5c69940 ite... doesn't work yet 2021-09-28 20:27:50 -04:00
Edward Chen
a4297bc022 updated testing suite for both zok and c frontends 2021-09-27 19:39:17 -04:00
Edward Chen
5a46a5da8d updated zok tests and added casting to c frontend 2021-09-24 16:00:34 -04:00
Edward Chen
4a01517ea3 int tests work for c frontendgit add .git add . 2021-09-19 21:05:34 -04:00
Edward Chen
fd2a7e4bf2 Added Conversion Gates & Integrated with OPA SharingMap (#16)
* OPA-by-ILP benchmark example

* Reverted unverified push to master branch

* Added conversion gates and integrated ABY lowering with SharingMap

Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
2021-08-25 22:38:50 -07:00
Edward Chen
5579b99888 Revert "Added conversion gates and integrated SharingMap"
This reverts commit bd022fad38.
2021-08-25 16:48:07 -04:00
Edward Chen
bd022fad38 Added conversion gates and integrated SharingMap 2021-08-25 16:45:24 -04:00
Alex Ozdemir
fa711e6900 ZoKrates->ILP toolchain and tests (#10) 2021-08-07 00:08:46 -07:00
Edward Chen
68da42993c Zok to ABY pipeline (#4)
Lowering layer from CirC IR to ABY 
- Lowers IR to ABY C++ 
- Writes translated code into ABY submodule and update CMake files
- tests using Python to run ABY executables

Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
2021-07-28 21:33:21 -07:00
Alex Ozdemir
fad440db7f Tests 2021-06-25 23:56:51 -07:00