Commit Graph

80 Commits

Author SHA1 Message Date
Edward Chen
450aa8df93 cleaning merge 2022-01-27 03:41:42 -05:00
Edward Chen
9bffa84a98 IR partitioning 2022-01-27 03:18:12 -05:00
Edward Chen
60a5c2d866 merged main to graphing 2022-01-26 13:14:32 -05:00
Edward Chen
75572c6a2c C Frontend (#22) 2022-01-20 10:16:27 -08:00
Edward Chen
996ee74c76 partitioned ir 2022-01-19 17:06:24 -05:00
Edward Chen
cce425efe7 updated graph partitioning 2022-01-13 15:27:27 -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
Edward Chen
2a11ecf8ed added graphing support for converting IR to Chaco format 2021-12-17 02:58:22 -05: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
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
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
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
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
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
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
193a680eaa adding arr struct 2021-09-30 23:44:36 -04:00
Edward Chen
d83c26de06 conditionals work!0 2021-09-30 22:20:53 -04:00
Edward Chen
7af5c69940 ite... doesn't work yet 2021-09-28 20:27:50 -04:00
Edward Chen
5a46a5da8d updated zok tests and added casting to c frontend 2021-09-24 16:00:34 -04:00
Edward Chen
b654c484d0 adding in boolean and bitwise operations for c frontend 2021-09-20 17:19:18 -04:00
Edward Chen
4a01517ea3 int tests work for c frontendgit add .git add . 2021-09-19 21:05:34 -04:00
Edward Chen
9d3dd64da9 adding in parameter parsing and completed ast for simple add program 2021-09-16 21:21:02 -04:00
Edward Chen
c2851e8152 binops 2021-09-16 17:06:56 -04:00