275 Commits

Author SHA1 Message Date
Alex Ozdemir
efd74f7b76 Remove nightly from README 2022-01-10 02:43:05 -08:00
Alex Ozdemir
cba4bdc925 Cache submodule build (#38) 2022-01-09 08:49:07 -08:00
Alex Ozdemir
11242a686e TODOs 2022-01-06 09:58:30 -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
Alex Ozdemir
aadd6b7c2d Make the SMT solver configurable. (#34) 2021-12-29 12:22:52 -08:00
Alex Ozdemir
48ac44a3ee Dockerfile 2021-12-20 00:13:43 -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
Alex Ozdemir
8a9f294d8d Dual licenses (Apache, MIT) 2021-12-07 09:44:17 -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
Alex Ozdemir
3963728c6a rm dbg statements from opa_bench 2021-11-19 20:57:23 -08: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
Edward Chen
c078fa464a Fixed compiler warnings in lowering to ABY (#21) 2021-09-15 13:12:37 -04:00
Edward Chen
991c710cea Support lowering loops to ABY (#19)
* loops for ABY!
2021-09-03 11:24:53 -04:00
Edward Chen
92cff0a119 Integrated EZPC helper file (#18)
* Added EZPC helper file, updated output, added shift tests
2021-09-02 18:08:08 -04:00
Edward Chen
d9d66896b3 Added support for multiple outputs in test cases (#17) 2021-08-31 19:24:14 -07: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
3b964f0bd3 OPA-by-ILP benchmark example 2021-08-24 10:01:19 -07:00
Alex Ozdemir
2226ad901f Draft OPA implementation (#15) 2021-08-24 08:29:54 -07:00
Alex Ozdemir
3691bb91b8 Sharing assignment types 2021-08-23 16:34:59 -07:00
Edward Chen
df8cdeece9 More efficient comparison calls (#14) 2021-08-20 07:25:52 -07:00
Edward Chen
0528353296 Tested ite (#13) 2021-08-19 09:35:38 -07:00
Edward Chen
8848bfee6f Updated parameter passing for ABY test cases (#12)
* Updated parameter passing for ABY test cases

-Uses `dict` instead of `list` to pass arguments into ABY tests
-Using `dict` allows for referencing between parameter name and value regardless of parameter order
2021-08-18 20:14:32 -07:00
Edward Chen
3b0bbc9fff added const value translation for ABY (#11) 2021-08-16 22:54:41 -07:00
Alex Ozdemir
fa711e6900 ZoKrates->ILP toolchain and tests (#10) 2021-08-07 00:08:46 -07:00
Alex Ozdemir
cbcbf2e195 Optimization unit tests for BV->ILP 2021-08-05 15:32:51 -07:00
Alex Ozdemir
ac732a647b Most of BV->ILP
Omitting operators:
* bvudiv, bvurem, bvshl, bvashr, bvlshr
2021-08-05 15:02:23 -07:00
Alex Ozdemir
56ce319d4d format 2021-08-05 10:07:48 -07:00
Alex Ozdemir
41082b58c4 Resolve warnings 2021-08-05 10:07:48 -07:00
Alex Ozdemir
3e3da8c028 SHA-MAJ elimination rewrite 2021-08-04 21:42:59 -07:00
Alex Ozdemir
6c0374b944 Dependencies update & scripts 2021-08-04 21:42:45 -07:00
Alex Ozdemir
51d802813f Bool->ILP (#9) 2021-08-04 18:22:15 -07:00
Alex Ozdemir
39c9c6ae00 CBC dependency for LPs (#8) 2021-08-04 14:03:26 -07:00
Edward Chen
d7dfe956e1 updated submodules (#7) 2021-08-04 00:24:13 -07:00
Edward Chen
61b011998c updated time cmd for both OSX and LINUX (#6) 2021-08-04 00:01:35 -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
22a5e508fe Don't use equality assertions pervasively.
Also: special case ZoK entry fn return for proof/smt/MPC
2021-07-07 11:48:31 -07:00
Alex Ozdemir
2fc86af5d3 src::ir::term::garbage_collect doc 2021-07-02 23:41:33 -07:00
Alex Ozdemir
44c2700073 Add profile script 2021-07-02 22:41:56 -07:00
Alex Ozdemir
3a6e6462ee Update hashconsing dependency to ahash-based version.
I actually fixed this a long time ago, but the fix got lost when I
replaced a local hashconsing dependency with a github one.

Huge performance win.
2021-07-01 23:35:35 -07:00
Alex Ozdemir
e08c9d9119 run CI on ci branch 2021-06-29 23:37:14 -07:00
Alex Ozdemir
aa11f4df74 try CI 2021-06-29 23:35:46 -07:00
Alex Ozdemir
35496f84c9 Add parser for (_ bvVAL WIDTH) bit-vec model format 2021-06-29 23:34:20 -07:00
Alex Ozdemir
b13cb383fd Add note about nightly compiler 2021-06-29 23:31:24 -07:00
Alex Ozdemir
ce3dac53b1 Also look for the ZoK stdlib in third_party/ZoKrates/zokrates_stdlib/stdlib subdirs 2021-06-29 23:15:59 -07:00