Commit Graph

77 Commits

Author SHA1 Message Date
Edward Chen
58ef4dd291 Added function and import support for C frontend 2022-02-07 03:03:04 -05:00
Edward Chen
a8d09793cf adding function stack 2022-02-04 16:08:55 -05:00
Edward Chen
75572c6a2c C Frontend (#22) 2022-01-20 10:16:27 -08:00
Edward Chen
e16fbc773e addressed comments 2022-01-19 23:56:48 -05:00
Edward Chen
b019e04670 updated merge 2022-01-19 13:03:53 -05:00
Edward Chen
ef00fd1e83 cleaning code 2022-01-19 12:49:28 -05:00
Edward Chen
c4ff5094b0 added binarize opt pass 2022-01-17 15:28:08 -05:00
Alex Ozdemir
cba4bdc925 Cache submodule build (#38) 2022-01-09 08:49:07 -08:00
Edward Chen
28a5527897 merged with master 2022-01-08 20:46:31 -05: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
Alex Ozdemir
8914c007cd Public inputs for proofs. (#27) 2021-12-10 13:09:05 -08:00
Edward Chen
57166c7cc9 updated cost models for hycc 2021-12-09 17:45:01 -05:00
Edward Chen
adac3c114f added proof to c frontend 2021-12-07 03:33:03 -05:00
Edward Chen
30ccc35bec updating c frontend to include proof mode 2021-12-07 03:18:30 -05:00
Edward Chen
4d51c27ff4 remove pycache files 2021-12-07 02:05:47 -05:00
Alex Ozdemir
b25b18ea8f Merge remote-tracking branch 'origin/c_frontend' into c_frontend 2021-12-06 21:05:56 -08:00
Edward Chen
fdd29e89e3 biomatching test works 2021-12-03 01:04:36 +00:00
Alex Ozdemir
a702a55e93 very basic C zkp 2021-12-02 15:48:16 -08:00
Edward Chen
8268841128 demo 2021-12-01 08:16:35 +00: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
Ubuntu
201f41d941 working kmeans test 2021-11-30 04:17:53 +00: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
Ubuntu
51e5bfdf28 updated ilp solver 2021-11-25 08:34:09 +00:00
Edward Chen
cdb6e4c3e0 working kmeans test! 2021-11-18 03:16:18 -05:00
Edward Chen
9416f6af77 update 2021-11-17 18:01:33 -05:00
Edward Chen
6fcbaddee7 oom on gcc compiler now? 2021-11-17 17:35:19 -05:00
Edward Chen
f6cb183c8c time to change lowering memory efficiency 2021-11-17 13:32:26 -05:00
Edward Chen
ec8bf83558 does kmeans work? 2021-11-15 20:50:14 -05:00
Edward Chen
082dd79617 almost there 2021-11-14 02:53:13 -05:00
Edward Chen
4d903b77c7 kmeans test works! 2021-11-12 02:39:32 -05:00
Edward Chen
ccc939b3c0 almost fixed kmeans 2021-11-12 01:14:01 -05:00
Edward Chen
fe9f66b69c kmeans test 2021-11-12 00:24:44 -05:00
Edward Chen
9eeeea15f9 fixing array size const folding 2021-11-11 22:19:07 -05:00
Edward Chen
62f0e53381 adding in folding calls 2021-11-11 21:29:51 -05:00
Edward Chen
b6fc9e112d support passing in arrays as parameters 2021-11-04 16:43:50 -04:00
Edward Chen
8c0afa7ffc need to change how to input arrays 2021-11-04 00:49:39 -04:00
Edward Chen
ec74621ccf for loop support 2021-11-03 22:12:11 -04:00
Edward Chen
dc0cadc5ee small changes 2021-10-27 23:20:52 -04:00
Edward Chen
16635ac4ef passes all c test 2021-10-27 23:11:18 -04:00
Edward Chen
835e411f94 temp 2021-10-27 14:16:20 -04:00
Edward Chen
a3e5de40b2 refactoring c_frontend, including signed int and extending arrays to use AllocID 2021-10-25 20:34:31 -04: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
fda3fa76a3 Merge branch 'master' into c_frontend 2021-10-20 18:31:46 -04:00
Alex Ozdemir
efe0d62263 Proof of high-value & tests 2021-10-18 15:29:37 -07:00
Edward Chen
a0d07c5717 array stores and loads work! 2021-10-13 22:09:19 -04:00
Edward Chen
9c20fd55f4 temp 2021-10-08 16:26:33 -04:00
Edward Chen
2b320a6426 decl initialization for array types and need to reverse search ctx to get LOC 2021-10-06 22:11:43 -04:00
Edward Chen
82358e89fd array sum! 2021-10-03 17:51:23 -04:00
Edward Chen
193a680eaa adding arr struct 2021-09-30 23:44:36 -04:00