Commit Graph

161 Commits

Author SHA1 Message Date
Edward Chen
e16fbc773e addressed comments 2022-01-19 23:56:48 -05:00
Edward Chen
d9625aba3f lint 2022-01-19 15:07:24 -05:00
Edward Chen
b019e04670 updated merge 2022-01-19 13:03:53 -05:00
Edward Chen
c4ff5094b0 added binarize opt pass 2022-01-17 15:28:08 -05:00
Edward Chen
1f4f8f6c1c clippy! 2022-01-08 21:42:22 -05:00
Edward Chen
51b0da571d updated format 2022-01-08 21:00:11 -05:00
Edward Chen
28a5527897 merged with master 2022-01-08 20:46:31 -05: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
Alex Ozdemir
aadd6b7c2d Make the SMT solver configurable. (#34) 2021-12-29 12:22:52 -08:00
Alex Ozdemir
81b364c2a7 Switch to stable (#32) 2021-12-19 22:35:02 -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
30ccc35bec updating c frontend to include proof mode 2021-12-07 03:18:30 -05:00
Alex Ozdemir
b25b18ea8f Merge remote-tracking branch 'origin/c_frontend' into c_frontend 2021-12-06 21:05:56 -08: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
Alex Ozdemir
3963728c6a rm dbg statements from opa_bench 2021-11-19 20:57:23 -08: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
8f7533148e kmeans array select is wrong somewhere.. 2021-11-12 11:23:07 -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
Alex Ozdemir
46d5a14aa9 Support Op::ConstArray in SMT target 2021-11-04 13:57:39 -07: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
40a4342826 passed all tests 2021-10-27 23:33:47 -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
d9a837c30c flatten array in c 2021-10-26 21:21:36 -04:00
Edward Chen
8f5115c6af allocation ids are weird... 2021-10-25 23:56:06 -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
a16b80733a extracted type_ into its own helper function 2021-10-22 02:27:54 -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
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
df8dd66ce0 Fix build:
I forgot to run the tests, and one of them failed to build (cause: a
bls12_381 version upgrade that I triggered).

Fixed now.
2021-10-18 16:44:13 -07:00
Alex Ozdemir
efe0d62263 Proof of high-value & tests 2021-10-18 15:29:37 -07:00