Commit Graph

95 Commits

Author SHA1 Message Date
Edward Chen
094b45e76b test 2022-05-23 15:06:58 -04:00
Edward Chen
e36957bbc1 minor 2022-05-23 01:34:29 -04:00
Edward Chen
03bd078b67 minor 2022-05-20 14:19:43 -04:00
Edward Chen
ee43df20e2 memory explosion 2022-05-19 22:47:11 -04:00
Edward Chen
4a2255c0e5 testing calls 2022-05-18 13:17:52 -04:00
Edward Chen
4d0923847f checkpoint 2022-05-14 17:31:04 -04:00
Edward Chen
bc094d4776 merged with master 2022-05-04 18:13:36 -04:00
Edward Chen
f7995c5a8b merge with master 2022-05-04 17:33:50 -04:00
Edward Chen
c5e85b1ab3 updated test cases 2022-05-04 17:22:54 -04:00
Riad S. Wahby
a3fa232ba2 improve memory consumption ; add Z# strict unary op, ternary ?:, and type aliases (#77)
* update TODO

* add quiet mode to zxc

* Drop and garbage collection

This commit adds Drop instances and related functionality that force
garbage collection at life cycle end of various structs that contain
Terms.

I didn't implement Drop for Computation because its Terms are generally
moved into a converter. This means that back-ends are responsible for
garbage collecting (see new functionality in ILP, R1cs, and ABY).

* collect the cfold table, too

* prevent double-panic as a result of garbage_collect()

* z# parser: zx is a default extension too

* update Cargo.lock

* strictness un-op #()

also added err messages for asserts and ?: ternary support from ZoK upstream

* for assignments, strict rhs => strict lhs

* zsharp: type definitions WIP

Still missing monomorphization.

* type defns: generic inference

* struct monomorphization for type aliased structs

* different approach: no monomorphization, just canonicalize aliases

* canonicalize struct names

* typedef tests

things work except that importing an alias and not its referent breaks typechecking

* add error message about needing to import referent structs

* update hashconsing pointer in Cargo.toml

* maybe_garbage_collect should also return early when panicking

Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
2022-05-04 10:08:23 -07:00
Edward Chen
c9ec54bc1a broken test case 2022-04-28 23:37:27 -04:00
Edward Chen
4e49788723 broken playground 2022-04-27 21:17:16 -04:00
Edward Chen
a8b9e9f11d db test case works 2022-04-27 02:10:24 -04:00
Edward Chen
b6932d1dbf adding db test case 2022-04-23 17:27:50 -04:00
Edward Chen
3158539b86 mnist test 2022-04-21 17:19:43 -04:00
Edward Chen
3586f31c48 working gauss testcase for c frontend 2022-04-21 11:52:08 -04:00
Edward Chen
99e1b11a2e updated cfold and gauss test case 2022-04-21 00:03:32 -04:00
Edward Chen
67624c723a merged master 2022-04-19 15:55:19 -04:00
Riad S. Wahby
50b97f6acb zsharp fixes ; speed improvements (#73)
This PR does two things:

- Fixes some scoping issues in Z# having to do with the context in which function and struct definitions are interpreted.
- Improves speed and reduces TermTable memory consumption by 2x (by keying on Arc<TermData> rather than TermData)
- Improves speed for Z# array handling with a BTreeMap -> HashMap swap
- Adds intrinsic widening casts in Z#. These were previously handled by bit-splitting, which is wasteful.
 
On array-heavy Z# programs, this PR improves speed by about 5x and memory consumption by roughly the same.

---

* zsharp::term::ir_array should use HashMap (faster, less memory)

* perf improvements

constant folding: get rid of redundant clones
bitvector: impl arith for refs
TermTable: don't store redundant term as key

* EMBED widening casts

* generic inf: need to push fn defn context onto filestack

* canonicalize path in err msg

* need struct defn on filestack, too

* no need to warn about U32 indexing in zsharp

* fix warning
2022-04-08 21:16:35 -04:00
Edward Chen
63e3bea1b8 Adding benchmark scripts and logging for ABY backend (#72) 2022-04-06 04:04:52 -04:00
Edward Chen
ffa2ac3dc9 Updated ABY tests to ignore logging code (#71) 2022-04-05 02:08:40 -04:00
Edward Chen
fa01772ef5 typedef 2022-03-31 13:41:32 -04:00
Riad S. Wahby
8c8e704914 field flexibility ; add limit for linearity reduction (#66)
Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
2022-03-25 15:03:09 -07:00
Edward Chen
13f9a092b5 Updated ABY VM to include IN bytecode instruction (#65)
- updated ABY interpreter to include IN gates
- Added tqdm requirement
2022-03-24 15:53:44 -04:00
Edward Chen
c150068722 fixing aby zokrates build and test pipeline 2022-03-24 12:35:35 -04:00
Edward Chen
dd353e62b1 ptr stores 2022-03-24 11:12:46 -04:00
Edward Chen
740a2851fe working kmeans test case and c_frontend 2022-03-24 03:39:18 -04:00
Edward Chen
e0a2ec838a minor 2022-03-23 16:55:01 -04:00
Edward Chen
9111b6f49b merge with remote 2022-03-23 03:19:52 -04:00
Edward Chen
6020f88d33 updated biomatch testcase 2022-03-23 03:18:23 -04:00
Edward Chen
51abd326ca merged new bytecode 2022-03-23 03:15:19 -04:00
Edward Chen
33b3543c1f biomatch test 2022-03-23 03:14:06 -04:00
Edward Chen
d37e1bb2fe updated ABY interpreter to include IN gates 2022-03-22 18:58:01 -04:00
Edward Chen
2de36e183d broken test case 2022-03-19 01:57:56 +00:00
Edward Chen
90c7bfee49 not working yet 2022-03-18 21:49:08 -04:00
Edward Chen
962d041b6b need to change derive types to return vec 2022-03-14 01:17:44 -04:00
Edward Chen
af99a21da1 starting pointer implementation 2022-03-03 01:37:21 -05:00
Edward Chen
18cf8ebc97 very crude but working c struct frontend 2022-03-02 23:29:09 -05:00
Edward Chen
f288ad9331 merged with main 2022-03-01 17:14:16 -05:00
Edward Chen
8fed29bd32 ABY VM and Interpreter (#47)
Updated ABY testing framework with an ABY bytecode and interpreter
2022-02-28 19:47:50 -05:00
Edward Chen
4e1f128eed fixing path error 2022-02-28 18:42:29 -05:00
Edward Chen
20a4b3fa10 removed make file 2022-02-28 18:11:26 -05:00
Edward Chen
1d0e77715b updated build system to use ABY interpreter 2022-02-28 18:01:09 -05:00
Edward Chen
6d06441d0b merge with master 2022-02-28 15:45:00 -05:00
Edward Chen
8b4ff8ff93 Updating build system (#51) 2022-02-26 02:21:53 -05:00
Edward Chen
b9526234ac Updating build system (#44)
`python3 driver.py -h`
2022-02-25 17:13:10 -05:00
Edward Chen
36e6836706 struct field store need to be updated 2022-02-24 15:01:00 -05:00
Edward Chen
746c9ae2ec working (but incorrect) struct and array implementation 2022-02-24 10:38:43 -05:00
Edward Chen
fc5621ec10 tested! 2022-02-22 17:35:03 -05:00
Edward Chen
2b36c986e0 updated ABY 2022-02-17 17:32:18 -05:00