Files
circ/Cargo.toml
Alex Ozdemir 157370f307 Eliminate tuples with persistent vectors (#75)
Change: The tuple elimination pass now represents its *tuple trees*
using nested persistent vectors of non-tuple terms, rather than standard
terms.

Rationale: When large oblivious arrays are transformed to tuples, said
tuples are large, and updates to them use the tuple update operator.
However, when we eliminate those tuples, we essentially replace the
update operator with an explicit tuple (tree). For a large number of
updates, this entails quadratic memory usage.

Of course, it doesn't *need* to: each update only modifies one spot in
the tuple.

Thus, in this patch, we change the representation of tuples in tuple
tree from a standard term---whose children are in a vector---such that
the children are now in a persistent vector from the `im` crate. This
allows for an "update" operation on the vector that takes log time and
log new space.

Effect: This reduces the compiler's memory usage on
`examples/C/mpc/benchmarks/2pc_biomatch_40x.c` from ~28GB to ~1GB. It
also makes the compiler substantially faster on that benchmark.
2022-04-11 13:13:58 -07:00

77 lines
1.8 KiB
TOML

[package]
name = "circ"
version = "0.1.0"
authors = ["Alex Ozdemir <aozdemir@hmc.edu>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
circ_fields = { path = "circ_fields" }
#hashconsing = "1.3"
hashconsing = { git = "https://github.com/alex-ozdemir/hashconsing.git", branch = "phash"}
rug = "1.11"
gmp-mpfr-sys = "1.4"
lazy_static = "1.4"
rand = "0.8"
rsmt2 = { version = "0.14", optional = true }
#rsmt2 = { git = "https://github.com/alex-ozdemir/rsmt2.git" }
ieee754 = "0.2"
zokrates_parser = { path = "third_party/ZoKrates/zokrates_parser", optional = true }
zokrates_pest_ast = { path = "third_party/ZoKrates/zokrates_pest_ast", optional = true }
typed-arena = "2.0"
log = "0.4"
thiserror = "1.0"
bellman = { version = "0.11", optional = true }
ff = "0.11"
fxhash = "0.2"
good_lp = { version = "1.1", features = ["lp-solvers", "coin_cbc"], default-features = false, optional = true }
lp-solvers = { version = "0.0.4", optional = true }
serde_json = "1.0"
lang-c = { version = "0.10.1", optional = true}
logos = "0.12"
pest = "2.1"
pest_derive = "2.1"
pest-ast = "0.3"
from-pest = "0.3"
itertools = "0.10"
petgraph = "0.6"
paste = "1.0"
im = "15"
[dev-dependencies]
quickcheck = "1"
quickcheck_macros = "1"
env_logger = "0.8"
bls12_381 = "0.6"
structopt = "0.3"
approx = "0.5.0"
[features]
default = ["bls12381"]
bls12381 = []
ff_dfl = []
c = ["lang-c"]
lp = ["good_lp", "lp-solvers"]
r1cs = ["bellman"]
smt = ["rsmt2"]
zok = ["zokrates_parser", "zokrates_pest_ast"]
[[example]]
name = "circ"
[[example]]
name = "zxi"
required-features = ["smt", "zok"]
[[example]]
name = "zxc"
required-features = ["smt", "zok"]
[[example]]
name = "opa_bench"
required-features = ["lp"]
[profile.release]
debug = true