diff --git a/Cargo.lock b/Cargo.lock index 64139eb840..06b437507f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,9 +38,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher", @@ -109,7 +109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72f2a841f04c2eaeb5a95312e5201a9e4b7c95b64ca99870d6bd2e2376df540a" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 1.0.109", ] @@ -120,7 +120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6118baab6285accf088b31d5ea5029c37bbf9d98e62b4d8720a0a5a66bc2e427" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 1.0.109", ] @@ -132,9 +132,9 @@ checksum = "7e4f181fc1a372e8ceff89612e5c9b13f72bff5b066da9f8d6827ae65af492c4" [[package]] name = "allocator-api2" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f263788a35611fba42eb41ff811c5d0360c58b97402570312a350736e2542e" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "anes" @@ -168,15 +168,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -214,9 +214,9 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "assert_cmd" @@ -233,6 +233,17 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "async-trait" +version = "0.1.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" +dependencies = [ + "proc-macro2", + "quote 1.0.31", + "syn 2.0.26", +] + [[package]] name = "atty" version = "0.2.14" @@ -298,6 +309,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "blake2" version = "0.10.6" @@ -315,7 +332,7 @@ checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" dependencies = [ "arrayref", "arrayvec", - "constant_time_eq 0.2.5", + "constant_time_eq 0.2.6", ] [[package]] @@ -338,13 +355,12 @@ dependencies = [ [[package]] name = "bstr" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", - "once_cell", - "regex-automata 0.1.10", + "regex-automata", "serde", ] @@ -485,7 +501,7 @@ checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck", "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 2.0.26", ] @@ -544,9 +560,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" [[package]] name = "core-foundation" @@ -566,9 +582,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -641,9 +657,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", @@ -654,9 +670,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -708,7 +724,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 1.0.109", ] @@ -776,6 +792,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + [[package]] name = "either" version = "1.8.1" @@ -825,9 +847,9 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" @@ -994,15 +1016,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "h2" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -1056,18 +1078,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1120,9 +1133,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1225,26 +1238,25 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", + "hermit-abi 0.3.2", + "rustix 0.38.4", "windows-sys 0.48.0", ] @@ -1268,9 +1280,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" @@ -1283,9 +1295,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -1322,8 +1334,10 @@ dependencies = [ name = "leo-compiler" version = "1.8.3" dependencies = [ + "dotenvy", "leo-ast", "leo-errors", + "leo-package", "leo-parser", "leo-passes", "leo-span", @@ -1395,7 +1409,10 @@ dependencies = [ "indexmap 1.9.3", "lazy_static", "leo-errors", + "rand", "serde", + "snarkvm", + "snarkvm-console", "toml 0.7.6", "tracing", ] @@ -1462,9 +1479,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libz-sys" @@ -1490,6 +1507,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + [[package]] name = "lock_api" version = "0.4.10" @@ -1502,9 +1525,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "memchr" @@ -1514,9 +1537,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -1620,13 +1643,13 @@ dependencies = [ [[package]] name = "num-derive" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" dependencies = [ "proc-macro2", - "quote 1.0.29", - "syn 1.0.109", + "quote 1.0.31", + "syn 2.0.26", ] [[package]] @@ -1660,11 +1683,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -1701,7 +1724,7 @@ version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -1717,7 +1740,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 2.0.26", ] @@ -1771,7 +1794,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -1787,9 +1810,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -1811,9 +1834,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -1829,9 +1852,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plotters" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" dependencies = [ "num-traits", "plotters-backend", @@ -1842,24 +1865,24 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" [[package]] name = "plotters-svg" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" dependencies = [ "plotters-backend", ] [[package]] name = "portable-atomic" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" +checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" [[package]] name = "ppv-lite86" @@ -1897,9 +1920,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -1921,9 +1944,9 @@ checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" [[package]] name = "quote" -version = "1.0.29" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" dependencies = [ "proc-macro2", ] @@ -1995,7 +2018,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2004,7 +2027,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2026,21 +2049,15 @@ checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.2", + "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.1.10" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - -[[package]] -name = "regex-automata" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" dependencies = [ "aho-corasick", "memchr", @@ -2049,9 +2066,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "reqwest" @@ -2123,27 +2140,40 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.21.2" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e32ca28af694bc1bbf399c33a516dbdf1c90090b8ab23c2bc24f834aa2247f5f" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.1", "sct", ] @@ -2157,6 +2187,16 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.101.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rusty-hook" version = "0.11.2" @@ -2171,9 +2211,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -2186,11 +2226,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -2201,9 +2241,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -2221,7 +2261,7 @@ version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2259,9 +2299,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" @@ -2279,17 +2319,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 2.0.26", ] [[package]] name = "serde_json" -version = "1.0.97" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.0.0", "itoa", "ryu", "serde", @@ -2379,14 +2419,15 @@ dependencies = [ [[package]] name = "snarkvm" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb55d3117b1cb5f4ecba3afaede11536171f212aa1b4082dacb58cc5b198323" +checksum = "d51707986a2508a29b1b3b86288b47883aa215ff4e41f2990ca3e72680f841ac" dependencies = [ "anstyle", "anyhow", "clap", "colored", + "dotenvy", "indexmap 2.0.0", "num-format", "once_cell", @@ -2408,9 +2449,9 @@ dependencies = [ [[package]] name = "snarkvm-algorithms" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3a127a0ea10ed55a63753c77b172bccf26f360de5a98bcfd9844429ee7e3b4" +checksum = "ef22b259e4b10eac5551eb275294c9e38292a3e0084dac3e08458b56bfffaa80" dependencies = [ "aleo-std", "anyhow", @@ -2438,9 +2479,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9d6c6ca5b7676b7965c2cee631def41ab96bc9f2fe324907f248231501fa12" +checksum = "498c8a748df8e7c11677d5986847fd2ea83d5461fc7bcde6dfb92377f2d66879" dependencies = [ "snarkvm-circuit-account", "snarkvm-circuit-algorithms", @@ -2453,9 +2494,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-account" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0897e3d6130d098121d1798bbc8a08f734de4efe234abed5c01ebb588f6099ec" +checksum = "c894c0a68b196d7e2c9a71e053e2de112d2f66f0aa99e2bf97c1b9953c61b35d" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-network", @@ -2465,9 +2506,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-algorithms" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c57658a5aa1effcef7c93a08af4c87ce7bdbd46fb2208f86358e2053555b81c" +checksum = "51b02ba606ba478b0402120699a7d0662b730d5f5c8bcfced1ec71b646d69d8e" dependencies = [ "snarkvm-circuit-types", "snarkvm-console-algorithms", @@ -2476,9 +2517,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-collections" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d412403bb467901f7de68c76ff9bf53ed88b5391de2e68a04071af88b780f10f" +checksum = "ef62f608c14c44458ed4d2cdc456abe306000fdc9e97f4cda55d78aeea9de5d3" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-types", @@ -2487,9 +2528,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-environment" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a58a810f21aca59ee903e9db2bea29dc3fb7af82fde0bb50ec01e95359569226" +checksum = "ca29800b3a7060a6af158b560784a0d2a23ea1f4f2aa8522e4125f49e5ef4ce0" dependencies = [ "indexmap 2.0.0", "itertools 0.11.0", @@ -2506,15 +2547,15 @@ dependencies = [ [[package]] name = "snarkvm-circuit-environment-witness" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ac826726517bd503a375fce4d616f192bca407b0130ca14b5aa7ae1a901421" +checksum = "c4463ed0185f12580d084928f46ced637b97768cc94a0c9c81329bcd4b1d24a5" [[package]] name = "snarkvm-circuit-network" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b3fc9b80f027b0a55f84f56719305fd9dc89e9bfcff198afe5a4c48ee3cbfe" +checksum = "a64be49149457737bfd95b72210b4d46470f762c7d58709b244c566075778c86" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-collections", @@ -2524,9 +2565,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-program" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eb64cee93771eb27ed58cabf286642e4ac33b0158a7b42431a751f8dd850303" +checksum = "5149b60d3e4bbdae78a025436731905492c4958a0e4b6846746fd50cc4b2de59" dependencies = [ "snarkvm-circuit-account", "snarkvm-circuit-collections", @@ -2538,9 +2579,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed4a945c7745e10fe67be911bb33cfed77e6b5a47b33a3c7dda2291cb206049" +checksum = "9069501824d03e72a9f3ea569505390f75f5f49c64b3db2875d42e243a50a2f3" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-address", @@ -2554,9 +2595,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-address" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c84f049bd3503611bbf38f10e1a552cba2e480fb1913845d59ee23a173a8e86" +checksum = "0e615ef1005a894a6e8c76b2a7c4e003ed6b7891c0806cd66a28d76fc7cfed35" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2568,9 +2609,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-boolean" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7152b425a06f672d813fa5e6a729440def1f28e6823232317b14dbcdb2bf288f" +checksum = "24657138c98bb551f34d82671a52bf29378ebde4921d13ffb77b5cd3fcf42166" dependencies = [ "snarkvm-circuit-environment", "snarkvm-console-types-boolean", @@ -2578,9 +2619,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-field" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26560433b704e4df9828a94b68564b234d5ce0cb548e42c544d828892d879766" +checksum = "7dd0b38bb596b7bf21b7131176c62948b37d225d2281b004cdbb4f97feb6e784" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2589,9 +2630,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-group" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18eb1f406e97d5e5c7703a8c9cc9bc4a261c7bdb8d2d553a87f41637001e37dd" +checksum = "c3c09875078ce200ebfc8b746f44aeeb667dc7352c8924497b3cc706526e6c85" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2602,9 +2643,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-integers" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2230bc28497448c9841013ba6e22daff53161e417616e8661d70e87de59faa4c" +checksum = "d833bc5b145390625ae1657bec2f817de9f2e2e81dedbad0e7c296b898dd1e5c" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2614,9 +2655,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-scalar" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3692e5a3f14bc8a9cdf470e4eb8e128d6fcca51bfc4b321c798aa61913c72ea2" +checksum = "d4eb4100f18bf51f1d1dd09f4d830d8fd165335c76912eb0d12fbef0d1813166" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2626,9 +2667,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-string" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe0a730257aad4e7e1db33cbd1e804aeb636ca86113d381b09d62c468e74207" +checksum = "042159987ae2f8ca30241e1f6d7242cab1505c02e23ef2ade773060be09bdcc6" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2639,9 +2680,9 @@ dependencies = [ [[package]] name = "snarkvm-console" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a52e5c7a899899edb585e206f54a364949e0dd4a0595427934a3949e260c0ed" +checksum = "9d0d58fe27ccaa3a4404fa0e9ed1ecdf4c55c8bc645e0465a7713e3ed3591b94" dependencies = [ "snarkvm-console-account", "snarkvm-console-algorithms", @@ -2653,9 +2694,9 @@ dependencies = [ [[package]] name = "snarkvm-console-account" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4adbb5299fd6958ba24c043e67208a95db1aa148c7d4febd66aba16eb79264e7" +checksum = "e7885e04293ea0c720f2299f2c4623733a2ec761fc00ea3c044902547d9edf4a" dependencies = [ "bs58", "snarkvm-console-network", @@ -2664,9 +2705,9 @@ dependencies = [ [[package]] name = "snarkvm-console-algorithms" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf84caf1eaac04f06a14f7818e519e6b4f5d9b4a26a62227d6cff1e9b5b5774" +checksum = "303d778794833bbeab39791a3a2843da5dd0b1abefe820d1085aae5f1a9328ba" dependencies = [ "blake2s_simd", "smallvec", @@ -2677,9 +2718,9 @@ dependencies = [ [[package]] name = "snarkvm-console-collections" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce43d1d2ef86839cb24362004bcc70c90ba4247dd2cc43ea8fdc6ccf16633dc2" +checksum = "57378d48cb5cfcba1953291eeb804daed59059fddd11a443587549b8be8495c8" dependencies = [ "aleo-std", "rayon", @@ -2689,9 +2730,9 @@ dependencies = [ [[package]] name = "snarkvm-console-network" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2837afb34a60e09bada60e3d164f8fc54f80029656e258d09a8ef9a749cc11" +checksum = "81b5fdd78bffa798b711e30d9f68d5a10eb5cc1f0f57c3e323cbe45a3c269da2" dependencies = [ "anyhow", "indexmap 2.0.0", @@ -2713,9 +2754,9 @@ dependencies = [ [[package]] name = "snarkvm-console-network-environment" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135fbd42d96c09670d6f6a90cf5bfaf3f59bb076f016d43e1f9752094d469c4" +checksum = "5516c44e60ce7f1db408350846fd728d130f529b79af44ebe6cf3c051efa974c" dependencies = [ "anyhow", "bech32", @@ -2731,9 +2772,9 @@ dependencies = [ [[package]] name = "snarkvm-console-program" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317c3637bdd3057498629779132b65e75290ee32930a3866519b4313783cc40f" +checksum = "0ad85034aa1ba1b6ecb73005395942c21f783ed9d743b3f6bc92f09ea04c73c1" dependencies = [ "enum_index", "enum_index_derive", @@ -2751,9 +2792,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b82379c642dc8bcaeef24715dc197495c44a46b37942c33fd2f7dd101c8539b" +checksum = "311f6c99ab991e9ceca0a1cb349abafad0f183c9b1ea5e13adb75ad83c46eb35" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-address", @@ -2767,9 +2808,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-address" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6b434896f9f30a559adaf72c1d3e389d55fc5b6f7c81b1436c90832836dc6d2" +checksum = "9351a0aa6c2b5ed9bb3989400f6f1343c1f858279d74abb2739219fbd55aafce" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2779,18 +2820,18 @@ dependencies = [ [[package]] name = "snarkvm-console-types-boolean" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cabb76ad8a178faf0808cc1ea050e73856f776707c1b764a5192740a2f79b863" +checksum = "4c9d0e50d85cf1031d174a1af5a5ed9d8a6e67b62460cb41bd11e97210e49a62" dependencies = [ "snarkvm-console-network-environment", ] [[package]] name = "snarkvm-console-types-field" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f787d254d43ea4aa962ac6930340f09e640ec70a4baa8795b51472539e1036" +checksum = "41085cc3c19e779b26e16ed4bf9db823ae79a27fc9bb0d96fafd731fb55c2203" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2798,9 +2839,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-group" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8f1e859c83f2a4e1ebd4a9805680497a7fbfe0615681c18311131a3ed47451" +checksum = "6088fb58f1d4970e10d2b8fdd1c7cd208c68f0adefb50a4e7e54d0a553a42d11" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2810,9 +2851,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-integers" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c6bb27e84d0b375a985cfbb27188615609d8faa986cb78ec298a1ad6752b21" +checksum = "9e6d6cd06912b7c35b78d1316e069a5de34c52e3154e8675320f8f7481ab7300" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2821,9 +2862,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-scalar" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ca9aff825a47be71a85091f716512d8779d9ccad2d4443327de952ed18d4c7" +checksum = "a98ee6590c4910c692a260653b06143f85a4e25ab0908b41a7dba24b2024bf4b" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2832,9 +2873,9 @@ dependencies = [ [[package]] name = "snarkvm-console-types-string" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb4a67c4557ddbe258f22754379f22a57d8b3826ddf1c293b04ab23dcae14a9" +checksum = "6f71ef07fd84150f6deb8e16322d609811b6427a12b852b44d9bd179bf9d96c2" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2844,9 +2885,9 @@ dependencies = [ [[package]] name = "snarkvm-curves" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79a7aae73e06e3af3f5fc3a477628b215e9867a27949010bc38294c535f29f1a" +checksum = "b7656af538c27d800d2c4d0189f7b3eac665ea5cd30021892393bc16028dd506" dependencies = [ "rand", "rayon", @@ -2859,9 +2900,9 @@ dependencies = [ [[package]] name = "snarkvm-fields" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a364585eba401aa7a3e0b530720113afce8a1675603b32b119b8226d1a9903" +checksum = "325012393d646818188fdeafc50af49b51ab00d8ed45d4e8bd68723c46c5ecc2" dependencies = [ "aleo-std", "anyhow", @@ -2877,9 +2918,9 @@ dependencies = [ [[package]] name = "snarkvm-ledger" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4385f62cc5e84a376376f63f89ba20a19a61c68d513985cb1b2cb70869423e99" +checksum = "f146f8864fcd9aa638972843201d92f2200185d8eb240e39090d375f5dc366ce" dependencies = [ "aleo-std", "anyhow", @@ -2888,16 +2929,88 @@ dependencies = [ "rand", "rayon", "snarkvm-console", + "snarkvm-ledger-block", + "snarkvm-ledger-coinbase", + "snarkvm-ledger-query", + "snarkvm-ledger-store", "snarkvm-synthesizer", "time", "tracing", ] [[package]] -name = "snarkvm-parameters" -version = "0.12.6" +name = "snarkvm-ledger-block" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d7b05d31785576ad85ef2789dc8fc90329ec0a1f02bd61c7d544f3f54bffde" +checksum = "8978e6923fbff60b9601ae7c6f724aa73738ed2889317a1ed85bafadf8ba391a" +dependencies = [ + "indexmap 2.0.0", + "rayon", + "serde_json", + "snarkvm-console", + "snarkvm-ledger-coinbase", + "snarkvm-synthesizer-program", + "snarkvm-synthesizer-snark", +] + +[[package]] +name = "snarkvm-ledger-coinbase" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b17f3369bada07eb1adc36cb6d42ce972ca491c1e0cb31152b153085d1b281" +dependencies = [ + "anyhow", + "bincode", + "blake2", + "itertools 0.11.0", + "rayon", + "serde_json", + "snarkvm-algorithms", + "snarkvm-console", + "snarkvm-curves", + "snarkvm-fields", + "snarkvm-synthesizer-snark", + "snarkvm-utilities", +] + +[[package]] +name = "snarkvm-ledger-query" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9199c6aa26857a40e09aa478c676156e060bf6e0243033fc089860d7e7faea63" +dependencies = [ + "async-trait", + "reqwest", + "snarkvm-console", + "snarkvm-ledger-store", + "snarkvm-synthesizer-program", + "ureq", +] + +[[package]] +name = "snarkvm-ledger-store" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff44232c1639bdb7878c889afe3dce1d641e9043b7a235ff45883e6582f742d" +dependencies = [ + "anyhow", + "bincode", + "indexmap 2.0.0", + "parking_lot", + "rayon", + "serde", + "snarkvm-console", + "snarkvm-ledger-block", + "snarkvm-ledger-coinbase", + "snarkvm-synthesizer-program", + "snarkvm-synthesizer-snark", +] + +[[package]] +name = "snarkvm-parameters" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82cdcd3e148fdcebc357c555aa7252632c704a2edfd2cde2e97e36296e07307f" dependencies = [ "aleo-std", "anyhow", @@ -2920,74 +3033,67 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2628224ef7ee761ec0f2c77cbb7efc971f915d2c01883cc6f7089e063f5d5119" +checksum = "aa08be7ec396f517d1c80c4f70e8043fdbb99e8468a11791d117f680e39c710b" dependencies = [ "aleo-std", - "anyhow", - "bincode", - "blake2", - "colored", "indexmap 2.0.0", - "itertools 0.11.0", - "once_cell", "parking_lot", - "paste", "rand", - "rand_chacha", - "rayon", - "reqwest", - "serde", - "serde_json", - "snarkvm-algorithms", "snarkvm-circuit", "snarkvm-console", - "snarkvm-curves", - "snarkvm-fields", - "snarkvm-synthesizer-coinbase", + "snarkvm-ledger-block", + "snarkvm-ledger-query", + "snarkvm-ledger-store", + "snarkvm-synthesizer-process", "snarkvm-synthesizer-program", "snarkvm-synthesizer-snark", - "snarkvm-utilities", "tracing", - "ureq", ] [[package]] -name = "snarkvm-synthesizer-coinbase" -version = "0.12.6" +name = "snarkvm-synthesizer-process" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88e702f8f13f8aa3ba1fc89e6c760f22358b1b3f0e9d4535bedd8a8c481819ba" +checksum = "cef14a15ccde7e2958c9d017420ec081997a404d0b3d2f7dd6405374f76f6b03" dependencies = [ - "anyhow", - "bincode", - "blake2", - "itertools 0.11.0", + "aleo-std", + "colored", + "indexmap 2.0.0", + "once_cell", + "parking_lot", + "rand", "rayon", - "serde_json", - "snarkvm-algorithms", + "snarkvm-circuit", "snarkvm-console", - "snarkvm-curves", - "snarkvm-fields", + "snarkvm-ledger-block", + "snarkvm-ledger-query", + "snarkvm-ledger-store", + "snarkvm-synthesizer-program", "snarkvm-synthesizer-snark", - "snarkvm-utilities", ] [[package]] name = "snarkvm-synthesizer-program" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0bec7c66086c2fa8eceb18467dd0692c07b38e16a8a2aa74ab82d2a684e868" +checksum = "ce082387e6e93a99f43711caece2a8d388fe6bb68bc123cb41450619755bdd35" dependencies = [ "indexmap 2.0.0", + "paste", + "rand", + "rand_chacha", + "serde_json", + "snarkvm-circuit", "snarkvm-console", ] [[package]] name = "snarkvm-synthesizer-snark" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1721c7b2e4da47c355ed48efcae208dc46885a3a65290db80e4845814dd2ce14" +checksum = "01f2d22d78772aaecb9d85a4e04996b2647c45da86e13ad2aa797a6bffbeb6a9" dependencies = [ "bincode", "once_cell", @@ -2999,9 +3105,9 @@ dependencies = [ [[package]] name = "snarkvm-utilities" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16329751e82faca0c9ae2e14f9951e77669f28c488194bdae90a2d7905b5f55" +checksum = "5b22ed5713bd0dc52e0a0f369a71d54dad8d8f3367db8b29ae136b13264ac728" dependencies = [ "aleo-std", "anyhow", @@ -3019,12 +3125,12 @@ dependencies = [ [[package]] name = "snarkvm-utilities-derives" -version = "0.12.6" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d90f007329c4b49ed72e92267e8722c96a1b2e5461d4d2bfe0bbb44b46b3f9ec" +checksum = "51bf32bc20dd98531e638f4e352c88a5956b264b82651fc8eae54c4d93c4d0b6" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 2.0.26", ] @@ -3074,7 +3180,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "unicode-ident", ] @@ -3085,7 +3191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "unicode-ident", ] @@ -3118,7 +3224,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix", + "rustix 0.37.23", "windows-sys 0.48.0", ] @@ -3162,7 +3268,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 2.0.26", ] @@ -3178,9 +3284,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ "serde", "time-core", @@ -3219,11 +3325,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", "mio", @@ -3289,9 +3396,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.12" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ "indexmap 2.0.0", "serde", @@ -3320,12 +3427,12 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 2.0.26", ] @@ -3393,9 +3500,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -3435,7 +3542,7 @@ dependencies = [ "log", "once_cell", "rustls", - "rustls-webpki", + "rustls-webpki 0.100.1", "serde", "serde_json", "url", @@ -3504,11 +3611,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -3520,9 +3626,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3530,24 +3636,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 2.0.26", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -3557,22 +3663,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ - "quote 1.0.29", + "quote 1.0.31", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", - "quote 1.0.29", + "quote 1.0.31", "syn 2.0.26", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -3580,15 +3686,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -3600,7 +3706,7 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "rustls-webpki", + "rustls-webpki 0.100.1", ] [[package]] @@ -3634,21 +3740,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -3664,7 +3755,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -3684,9 +3775,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -3783,9 +3874,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 02c9d03725..db69377cd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,10 +31,10 @@ members = [ ] [workspace.dependencies.snarkvm] -version = "0.12.6" + version = "=0.14.5" [workspace.dependencies.snarkvm-console] -version = "0.12.3" + version = "=0.14.5" [lib] path = "leo/lib.rs" diff --git a/compiler/compiler/Cargo.toml b/compiler/compiler/Cargo.toml index 3e20fec249..20f2b57222 100644 --- a/compiler/compiler/Cargo.toml +++ b/compiler/compiler/Cargo.toml @@ -43,7 +43,14 @@ version = "0.10" [dev-dependencies.leo-test-framework] path = "../../tests/test-framework" -version = "1.4.0" +version = "1.8.3" + +[dev-dependencies.leo-package] +path = "../../leo/package" +version = "1.8.3" + +[dev-dependencies.dotenvy] +version = "0.15.7" [dev-dependencies.rand] version = "0.8" diff --git a/compiler/compiler/tests/compile.rs b/compiler/compiler/tests/compile.rs index a18fd6a20b..1995ae14b7 100644 --- a/compiler/compiler/tests/compile.rs +++ b/compiler/compiler/tests/compile.rs @@ -101,6 +101,7 @@ fn run_test(test: Test, handler: &Handler, buf: &BufferEmitter) -> Result Result( - None, - package.manifest_file().development_private_key(), + &dotenv_private_key(package.directory()).unwrap(), function_name, &inputs, rng, diff --git a/compiler/compiler/tests/utilities/mod.rs b/compiler/compiler/tests/utilities/mod.rs index b1980a91ea..e402b6a53f 100644 --- a/compiler/compiler/tests/utilities/mod.rs +++ b/compiler/compiler/tests/utilities/mod.rs @@ -20,13 +20,13 @@ use leo_errors::{ LeoError, LeoWarning, }; +use leo_package::root::env::Env; use leo_passes::{CodeGenerator, Pass}; use leo_span::source_map::FileName; -use leo_test_framework::Test; +use leo_test_framework::{test::TestConfig, Test}; use snarkvm::prelude::*; -use leo_test_framework::test::TestConfig; use snarkvm::{file::Manifest, package::Package}; use std::{ cell::RefCell, @@ -109,12 +109,18 @@ pub fn setup_build_directory(program_name: &str, bytecode: &String, handler: &Ha // Create the manifest file. let _manifest_file = Manifest::create(&directory, &program_id).unwrap(); + // Create the environment file. + Env::::new().write_to(&directory).unwrap(); + if Env::::exists_at(&directory) { + println!(".env file created at {:?}", &directory); + } + // Create the build directory. let build_directory = directory.join("build"); fs::create_dir_all(build_directory).unwrap(); // Open the package at the temporary directory. - handler.extend_if_error(Package::::open(&directory).map_err(LeoError::Anyhow)) + handler.extend_if_error(Package::::open(&directory).map_err(LeoError::Anyhow)) } pub fn new_compiler( @@ -222,3 +228,14 @@ pub fn compile_and_process<'a>(parsed: &'a mut Compiler<'a>) -> Result Result> { + use std::str::FromStr; + dotenvy::from_path(directory.join(".env")).map_err(|_| anyhow!("Missing a '.env' file in the test directory."))?; + // Load the private key from the environment. + let private_key = dotenvy::var("PRIVATE_KEY").map_err(|e| anyhow!("Missing PRIVATE_KEY - {e}"))?; + // Parse the private key. + PrivateKey::::from_str(&private_key) +} diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 7c07ed48db..0e8b081573 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -458,7 +458,7 @@ impl<'a> CodeGenerator<'a> { Expression::Identifier(identifier) => identifier.name, _ => unreachable!("Parsing guarantees that all `input.function` is always an identifier."), }; - let return_type = &self.symbol_table.borrow().functions.get(&function_name).unwrap().output_type; + let return_type = &self.symbol_table.borrow().lookup_fn_symbol(function_name).unwrap().output_type; match return_type { Type::Unit => { call_instruction.push(';'); diff --git a/compiler/passes/src/flattening/flatten_statement.rs b/compiler/passes/src/flattening/flatten_statement.rs index 907f401f4a..402c7dd748 100644 --- a/compiler/passes/src/flattening/flatten_statement.rs +++ b/compiler/passes/src/flattening/flatten_statement.rs @@ -169,7 +169,7 @@ impl StatementReconstructor for Flattener<'_> { _ => unreachable!("Parsing guarantees that `function` is an identifier."), }; - let function = self.symbol_table.borrow().functions.get(&function_name).unwrap(); + let function = self.symbol_table.borrow().lookup_fn_symbol(function_name).unwrap(); match &function.output_type { // If the function returns a tuple, reconstruct the assignment and add an entry to `self.tuples`. Type::Tuple(tuple) => { @@ -246,7 +246,7 @@ impl StatementReconstructor for Flattener<'_> { Expression::Identifier(identifier) => { // Retrieve the entry in the symbol table for the mapping. // Note that this unwrap is safe since type checking ensures that the mapping exists. - let variable = self.symbol_table.borrow().variables.get(&identifier.name).unwrap(); + let variable = self.symbol_table.borrow().lookup_variable(identifier.name).unwrap(); match &variable.type_ { Type::Mapping(mapping_type) => &*mapping_type.value, _ => unreachable!("Type checking guarantee that `arguments[0]` is a mapping."), @@ -281,7 +281,7 @@ impl StatementReconstructor for Flattener<'_> { _ => unreachable!("Parsing guarantees that `function` is an identifier."), }; - let function = self.symbol_table.borrow().functions.get(&function_name).unwrap(); + let function = self.symbol_table.borrow().lookup_fn_symbol(function_name).unwrap(); let output_type = match &function.output_type { Type::Tuple(tuple) => tuple.clone(), diff --git a/compiler/passes/src/static_single_assignment/rename_expression.rs b/compiler/passes/src/static_single_assignment/rename_expression.rs index a93752981d..5c2f92df80 100644 --- a/compiler/passes/src/static_single_assignment/rename_expression.rs +++ b/compiler/passes/src/static_single_assignment/rename_expression.rs @@ -201,7 +201,7 @@ impl ExpressionConsumer for StaticSingleAssigner<'_> { // Lookup the struct definition. // Note that type checking guarantees that the correct struct definition exists. - let struct_definition: &Struct = self.symbol_table.borrow().structs.get(&input.name.name).unwrap(); + let struct_definition: &Struct = self.symbol_table.borrow().lookup_struct(input.name.name).unwrap(); // Initialize the list of reordered members. let mut reordered_members = Vec::with_capacity(members.len()); diff --git a/errors/src/errors/cli/cli_errors.rs b/errors/src/errors/cli/cli_errors.rs index cd371d2f3a..decb0957e6 100644 --- a/errors/src/errors/cli/cli_errors.rs +++ b/errors/src/errors/cli/cli_errors.rs @@ -89,65 +89,79 @@ create_messages!( } @backtraced - failed_to_execute_aleo_build { + failed_to_execute_build { args: (error: impl Display), - msg: format!("Failed to execute the `aleo build` command.\nSnarkVM Error: {error}"), + msg: format!("Failed to execute the `build` command.\nSnarkVM Error: {error}"), help: None, } @backtraced - failed_to_execute_aleo_new { + failed_to_execute_new { args: (error: impl Display), - msg: format!("Failed to execute the `aleo new` command.\nSnarkVM Error: {error}"), + msg: format!("Failed to execute the `new` command.\nSnarkVM Error: {error}"), help: None, } @backtraced - failed_to_execute_aleo_run { + failed_to_execute_run { args: (error: impl Display), - msg: format!("Failed to execute the `aleo run` command.\nSnarkVM Error: {error}"), + msg: format!("Failed to execute the `run` command.\nSnarkVM Error: {error}"), help: None, } @backtraced - failed_to_execute_aleo_node { + failed_to_execute_node { args: (error: impl Display), - msg: format!("Failed to execute the `aleo node` command.\nSnarkVM Error: {error}"), + msg: format!("Failed to execute the `node` command.\nSnarkVM Error: {error}"), help: None, } @backtraced - failed_to_execute_aleo_deploy { + failed_to_execute_deploy { args: (error: impl Display), - msg: format!("Failed to execute the `aleo deploy` command.\nSnarkVM Error: {error}"), + msg: format!("Failed to execute the `deploy` command.\nSnarkVM Error: {error}"), help: None, } @backtraced - failed_to_parse_aleo_new { + failed_to_parse_new { args: (error: impl Display), - msg: format!("Failed to parse the `aleo new` command.\nSnarkVM Error: {error}"), + msg: format!("Failed to parse the `new` command.\nSnarkVM Error: {error}"), help: None, } @backtraced - failed_to_parse_aleo_run { + failed_to_parse_run { args: (error: impl Display), - msg: format!("Failed to parse the `aleo run` command.\nSnarkVM Error: {error}"), + msg: format!("Failed to parse the `run` command.\nSnarkVM Error: {error}"), help: None, } @backtraced - failed_to_parse_aleo_node { + failed_to_parse_node { args: (error: impl Display), - msg: format!("Failed to parse the `aleo node` command.\nSnarkVM Error: {error}"), + msg: format!("Failed to parse the `node` command.\nSnarkVM Error: {error}"), help: None, } @backtraced - failed_to_parse_aleo_deploy { + failed_to_parse_deploy { args: (error: impl Display), - msg: format!("Failed to parse the `aleo deploy` command.\nSnarkVM Error: {error}"), + msg: format!("Failed to parse the `deploy` command.\nSnarkVM Error: {error}"), + help: None, + } + + @backtraced + failed_to_parse_execute { + args: (error: impl Display), + msg: format!("Failed to parse the `execute` command.\nSnarkVM Error: {error}"), + help: None, + } + + @backtraced + failed_to_execute_execute { + args: (error: impl Display), + msg: format!("Failed to execute the `execute` command.\nSnarkVM Error: {error}"), help: None, } ); diff --git a/errors/src/errors/package/package_errors.rs b/errors/src/errors/package/package_errors.rs index 888e921956..1100a7ff98 100644 --- a/errors/src/errors/package/package_errors.rs +++ b/errors/src/errors/package/package_errors.rs @@ -305,4 +305,12 @@ create_messages!( msg: "The `src/` directory can contain only one file and must be named `main.leo`.".to_string(), help: None, } + + /// For when the environment file has an IO error. + @backtraced + io_error_env_file { + args: (error: impl ErrorArg), + msg: format!("IO error env file from the provided file path - {error}"), + help: None, + } ); diff --git a/examples/README.md b/examples/README.md index 9fa6db7dc3..854f260608 100644 --- a/examples/README.md +++ b/examples/README.md @@ -10,16 +10,17 @@ This directory includes the following Leo code examples: 6. Message -> Initialization of a struct 7. Token -> Record example -## Build Guide - -To compile each example, run: -```bash -leo build -``` -When you run this command for the first time the snarkvm parameters (universal setup) will be downloaded, these are necessary to run the programs. +## Run Guide To run each program, run: ```bash leo run main ``` -This command will look in the input file inputs/*.in where should find a section [main] and use the variables as inputs to the program. \ No newline at end of file +This command will look in the input file inputs/*.in where should find a section [main] and use the variables as inputs to the program. + +## Execute Guide + +To execute each program call, run: +```bash +leo execute main --endpoint +``` \ No newline at end of file diff --git a/examples/auction/.env b/examples/auction/.env new file mode 100644 index 0000000000..8222b1f559 --- /dev/null +++ b/examples/auction/.env @@ -0,0 +1,4 @@ + +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkp5wvamYgK3WCAdpBQxZqQX8XnuN2u11Y6QprZTriVwZVc + diff --git a/examples/auction/.gitignore b/examples/auction/.gitignore index b28696155d..750b56f237 100644 --- a/examples/auction/.gitignore +++ b/examples/auction/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/auction/README.md b/examples/auction/README.md index 4c3e129447..1daa6aff9f 100644 --- a/examples/auction/README.md +++ b/examples/auction/README.md @@ -38,17 +38,14 @@ Leo provides users with a command line interface for compiling and running Leo p Users may either specify input values via the command line or provide an input file in `inputs/`. ### Configuring Accounts -The `program.json` file contains a private key and address. +The `.env` file contains a private key. This is the account that will be used to sign transactions and is checked for record ownership. -When executing programs as different parties, be sure to set the `private_key` and `address` fields in `program.json` to the appropriate values. +When executing programs as different parties, be sure to set the `PRIVATE_KEY` field in `.env` to the appropriate values. See `./run.sh` for an example of how to run the program as different parties. -The [Aleo SDK](https://github.com/AleoHQ/leo/tree/testnet3) provides a command line interface for generating new accounts. -To generate a new account, run -``` -leo account new -``` +The [Aleo SDK](https://github.com/AleoHQ/leo/tree/testnet3) provides an interface for generating new accounts. +To generate a new account, navigate to [aleo.tools](https://aleo.tools). ### Providing inputs via the command line. diff --git a/examples/auction/build/main.aleo b/examples/auction/build/main.aleo new file mode 100644 index 0000000000..480fe0cda5 --- /dev/null +++ b/examples/auction/build/main.aleo @@ -0,0 +1,35 @@ +program auction.aleo; + +record Bid: + owner as address.private; + bidder as address.private; + amount as u64.private; + is_winner as boolean.private; + + +function place_bid: + input r0 as address.private; + input r1 as u64.private; + assert.eq self.caller r0; + cast aleo1fxs9s0w97lmkwlcmgn0z3nuxufdee5yck9wqrs0umevp7qs0sg9q5xxxzh r0 r1 false into r2 as Bid.record; + output r2 as Bid.record; + + +function resolve: + input r0 as Bid.record; + input r1 as Bid.record; + assert.eq self.caller aleo1fxs9s0w97lmkwlcmgn0z3nuxufdee5yck9wqrs0umevp7qs0sg9q5xxxzh; + gte r0.amount r1.amount into r2; + ternary r2 r0.owner r1.owner into r3; + ternary r2 r0.bidder r1.bidder into r4; + ternary r2 r0.amount r1.amount into r5; + ternary r2 r0.is_winner r1.is_winner into r6; + cast r3 r4 r5 r6 into r7 as Bid.record; + output r7 as Bid.record; + + +function finish: + input r0 as Bid.record; + assert.eq self.caller aleo1fxs9s0w97lmkwlcmgn0z3nuxufdee5yck9wqrs0umevp7qs0sg9q5xxxzh; + cast r0.bidder r0.bidder r0.amount true into r1 as Bid.record; + output r1 as Bid.record; diff --git a/examples/auction/build/program.json b/examples/auction/build/program.json new file mode 100644 index 0000000000..86302fc7f2 --- /dev/null +++ b/examples/auction/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "auction.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/auction/inputs/auction.in b/examples/auction/inputs/auction.in index c3471d4116..468e9d44c1 100644 --- a/examples/auction/inputs/auction.in +++ b/examples/auction/inputs/auction.in @@ -19,7 +19,7 @@ second: Bid = Bid { bidder: aleo1fxs9s0w97lmkwlcmgn0z3nuxufdee5yck9wqrs0umevp7qs0sg9q5xxxzh, amount: 90u64, is_winner: false, - _nonce: 1635474322959998727812727786860193861506102794050195384593971440884677453921group, + _nonce: 1511010328912449299156978046557700301564153667442988008615502964863620401388group, }; [finish] diff --git a/examples/auction/program.json b/examples/auction/program.json index dd9f504e84..86302fc7f2 100644 --- a/examples/auction/program.json +++ b/examples/auction/program.json @@ -2,9 +2,5 @@ "program": "auction.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkp5wvamYgK3WCAdpBQxZqQX8XnuN2u11Y6QprZTriVwZVc", - "address": "aleo1fxs9s0w97lmkwlcmgn0z3nuxufdee5yck9wqrs0umevp7qs0sg9q5xxxzh" - }, "license": "MIT" } diff --git a/examples/auction/run.sh b/examples/auction/run.sh index 88f1aeb1d9..b1e2dd3145 100755 --- a/examples/auction/run.sh +++ b/examples/auction/run.sh @@ -27,17 +27,11 @@ echo " ######## ######## ############################################################################### " -# Swap in the private key and address of the first bidder to program.json. -echo "{ - \"program\": \"auction.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkpG9Af9z5Ha4ejVyMCqVFXRKknSm8L1ELEwcc4htk9YhVK\", - \"address\": \"aleo1yzlta2q5h8t0fqe0v6dyh9mtv4aggd53fgzr068jvplqhvqsnvzq7pj2ke\" - }, - \"license\": \"MIT\" -}" > program.json +# Swap in the private key and address of the first bidder to .env. +echo " +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpG9Af9z5Ha4ejVyMCqVFXRKknSm8L1ELEwcc4htk9YhVK +" > .env # Have the first bidder place a bid of 10. echo " @@ -55,18 +49,11 @@ echo " " leo run place_bid aleo1yzlta2q5h8t0fqe0v6dyh9mtv4aggd53fgzr068jvplqhvqsnvzq7pj2ke 10u64 || exit -# Swap in the private key and address of the second bidder to program.json. -echo "{ - \"program\": \"auction.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkpAFshdsj2EqQzXh5zHceDapFWVCwR6wMCJFfkLYRKupug\", - \"address\": \"aleo1esqchvevwn7n5p84e735w4dtwt2hdtu4dpguwgwy94tsxm2p7qpqmlrta4\" - }, - \"license\": \"MIT\" -}" > program.json - +# Swap in the private key and address of the second bidder to .env. +echo " +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpAFshdsj2EqQzXh5zHceDapFWVCwR6wMCJFfkLYRKupug +" > .env # Have the second bidder place a bid of 90. echo " @@ -84,17 +71,11 @@ echo " " leo run place_bid aleo1esqchvevwn7n5p84e735w4dtwt2hdtu4dpguwgwy94tsxm2p7qpqmlrta4 90u64 || exit -# Swap in the private key and address of the auctioneer to program.json. -echo "{ - \"program\": \"auction.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkp5wvamYgK3WCAdpBQxZqQX8XnuN2u11Y6QprZTriVwZVc\", - \"address\": \"aleo1fxs9s0w97lmkwlcmgn0z3nuxufdee5yck9wqrs0umevp7qs0sg9q5xxxzh\" - }, - \"license\": \"MIT\" -}" > program.json +# Swap in the private key and address of the auctioneer to .env. +echo " +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkp5wvamYgK3WCAdpBQxZqQX8XnuN2u11Y6QprZTriVwZVc +" > .env # Have the auctioneer select the winning bid. echo " diff --git a/examples/basic_bank/.env b/examples/basic_bank/.env new file mode 100644 index 0000000000..ca52526e34 --- /dev/null +++ b/examples/basic_bank/.env @@ -0,0 +1,4 @@ + +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpHtqVWT6fSHgUMNxsuVf7eaR6id2cj7TieKY1Z8CP5rCD + diff --git a/examples/basic_bank/.gitignore b/examples/basic_bank/.gitignore index b28696155d..750b56f237 100644 --- a/examples/basic_bank/.gitignore +++ b/examples/basic_bank/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/basic_bank/README.md b/examples/basic_bank/README.md index 3af3db25c2..a5cc843230 100644 --- a/examples/basic_bank/README.md +++ b/examples/basic_bank/README.md @@ -39,20 +39,14 @@ Leo provides users with a command line interface for compiling and running Leo p Users may either specify input values via the command line or provide an input file in `inputs/`. ### Configuring Accounts -The `program.json` file contains a private key and address. +The `.env` file contains a private key. This is the account that will be used to sign transactions and is checked for record ownership. -When executing programs as different parties, be sure to set the `private_key` and `address` fields in `program.json` to the appropriate values. - - +When executing programs as different parties, be sure to set the `PRIVATE_KEY` field in `.env` to the appropriate values. See `./run.sh` for an example of how to run the program as different parties. -The [Aleo SDK](https://github.com/AleoHQ/leo/tree/testnet3) provides a command line interface for generating new accounts. -To generate a new account, run -``` -leo account new -``` - +The [Aleo SDK](https://github.com/AleoHQ/leo/tree/testnet3) provides an interface for generating new accounts. +To generate a new account, navigate to [aleo.tools](https://aleo.tools). ### Providing inputs via the command line. 1. Run diff --git a/examples/basic_bank/build/main.aleo b/examples/basic_bank/build/main.aleo new file mode 100644 index 0000000000..f0498806f6 --- /dev/null +++ b/examples/basic_bank/build/main.aleo @@ -0,0 +1,561 @@ +program basic_bank.aleo; + +record Token: + owner as address.private; + amount as u64.private; + + +mapping balances: + key left as field.public; + value right as u64.public; + +function issue: + input r0 as address.private; + input r1 as u64.private; + assert.eq self.caller aleo1t0uer3jgtsgmx5tq6x6f9ecu8tr57rzzfnc2dgmcqldceal0ls9qf6st7a; + cast r0 r1 into r2 as Token.record; + output r2 as Token.record; + + +function deposit: + input r0 as Token.record; + input r1 as u64.private; + sub r0.amount r1 into r2; + cast r0.owner r2 into r3 as Token.record; + hash.bhp256 r0.owner into r4 as field; output r3 as Token.record; + + finalize r4 r1; + +finalize deposit: + input r0 as field.public; + input r1 as u64.public; + get.or_use balances[r0] 0u64 into r2; + add r2 r1 into r3; + set r3 into balances[r0]; + + +closure calculate_interest: + input r0 as u64; + input r1 as u64; + input r2 as u64; + lt 0u64 r2 into r3; + mul r0 r1 into r4; + div r4 10000u64 into r5; + add r0 r5 into r6; + ternary r3 r6 r0 into r7; + lt 1u64 r2 into r8; + mul r7 r1 into r9; + div r9 10000u64 into r10; + add r7 r10 into r11; + ternary r8 r11 r7 into r12; + lt 2u64 r2 into r13; + mul r12 r1 into r14; + div r14 10000u64 into r15; + add r12 r15 into r16; + ternary r13 r16 r12 into r17; + lt 3u64 r2 into r18; + mul r17 r1 into r19; + div r19 10000u64 into r20; + add r17 r20 into r21; + ternary r18 r21 r17 into r22; + lt 4u64 r2 into r23; + mul r22 r1 into r24; + div r24 10000u64 into r25; + add r22 r25 into r26; + ternary r23 r26 r22 into r27; + lt 5u64 r2 into r28; + mul r27 r1 into r29; + div r29 10000u64 into r30; + add r27 r30 into r31; + ternary r28 r31 r27 into r32; + lt 6u64 r2 into r33; + mul r32 r1 into r34; + div r34 10000u64 into r35; + add r32 r35 into r36; + ternary r33 r36 r32 into r37; + lt 7u64 r2 into r38; + mul r37 r1 into r39; + div r39 10000u64 into r40; + add r37 r40 into r41; + ternary r38 r41 r37 into r42; + lt 8u64 r2 into r43; + mul r42 r1 into r44; + div r44 10000u64 into r45; + add r42 r45 into r46; + ternary r43 r46 r42 into r47; + lt 9u64 r2 into r48; + mul r47 r1 into r49; + div r49 10000u64 into r50; + add r47 r50 into r51; + ternary r48 r51 r47 into r52; + lt 10u64 r2 into r53; + mul r52 r1 into r54; + div r54 10000u64 into r55; + add r52 r55 into r56; + ternary r53 r56 r52 into r57; + lt 11u64 r2 into r58; + mul r57 r1 into r59; + div r59 10000u64 into r60; + add r57 r60 into r61; + ternary r58 r61 r57 into r62; + lt 12u64 r2 into r63; + mul r62 r1 into r64; + div r64 10000u64 into r65; + add r62 r65 into r66; + ternary r63 r66 r62 into r67; + lt 13u64 r2 into r68; + mul r67 r1 into r69; + div r69 10000u64 into r70; + add r67 r70 into r71; + ternary r68 r71 r67 into r72; + lt 14u64 r2 into r73; + mul r72 r1 into r74; + div r74 10000u64 into r75; + add r72 r75 into r76; + ternary r73 r76 r72 into r77; + lt 15u64 r2 into r78; + mul r77 r1 into r79; + div r79 10000u64 into r80; + add r77 r80 into r81; + ternary r78 r81 r77 into r82; + lt 16u64 r2 into r83; + mul r82 r1 into r84; + div r84 10000u64 into r85; + add r82 r85 into r86; + ternary r83 r86 r82 into r87; + lt 17u64 r2 into r88; + mul r87 r1 into r89; + div r89 10000u64 into r90; + add r87 r90 into r91; + ternary r88 r91 r87 into r92; + lt 18u64 r2 into r93; + mul r92 r1 into r94; + div r94 10000u64 into r95; + add r92 r95 into r96; + ternary r93 r96 r92 into r97; + lt 19u64 r2 into r98; + mul r97 r1 into r99; + div r99 10000u64 into r100; + add r97 r100 into r101; + ternary r98 r101 r97 into r102; + lt 20u64 r2 into r103; + mul r102 r1 into r104; + div r104 10000u64 into r105; + add r102 r105 into r106; + ternary r103 r106 r102 into r107; + lt 21u64 r2 into r108; + mul r107 r1 into r109; + div r109 10000u64 into r110; + add r107 r110 into r111; + ternary r108 r111 r107 into r112; + lt 22u64 r2 into r113; + mul r112 r1 into r114; + div r114 10000u64 into r115; + add r112 r115 into r116; + ternary r113 r116 r112 into r117; + lt 23u64 r2 into r118; + mul r117 r1 into r119; + div r119 10000u64 into r120; + add r117 r120 into r121; + ternary r118 r121 r117 into r122; + lt 24u64 r2 into r123; + mul r122 r1 into r124; + div r124 10000u64 into r125; + add r122 r125 into r126; + ternary r123 r126 r122 into r127; + lt 25u64 r2 into r128; + mul r127 r1 into r129; + div r129 10000u64 into r130; + add r127 r130 into r131; + ternary r128 r131 r127 into r132; + lt 26u64 r2 into r133; + mul r132 r1 into r134; + div r134 10000u64 into r135; + add r132 r135 into r136; + ternary r133 r136 r132 into r137; + lt 27u64 r2 into r138; + mul r137 r1 into r139; + div r139 10000u64 into r140; + add r137 r140 into r141; + ternary r138 r141 r137 into r142; + lt 28u64 r2 into r143; + mul r142 r1 into r144; + div r144 10000u64 into r145; + add r142 r145 into r146; + ternary r143 r146 r142 into r147; + lt 29u64 r2 into r148; + mul r147 r1 into r149; + div r149 10000u64 into r150; + add r147 r150 into r151; + ternary r148 r151 r147 into r152; + lt 30u64 r2 into r153; + mul r152 r1 into r154; + div r154 10000u64 into r155; + add r152 r155 into r156; + ternary r153 r156 r152 into r157; + lt 31u64 r2 into r158; + mul r157 r1 into r159; + div r159 10000u64 into r160; + add r157 r160 into r161; + ternary r158 r161 r157 into r162; + lt 32u64 r2 into r163; + mul r162 r1 into r164; + div r164 10000u64 into r165; + add r162 r165 into r166; + ternary r163 r166 r162 into r167; + lt 33u64 r2 into r168; + mul r167 r1 into r169; + div r169 10000u64 into r170; + add r167 r170 into r171; + ternary r168 r171 r167 into r172; + lt 34u64 r2 into r173; + mul r172 r1 into r174; + div r174 10000u64 into r175; + add r172 r175 into r176; + ternary r173 r176 r172 into r177; + lt 35u64 r2 into r178; + mul r177 r1 into r179; + div r179 10000u64 into r180; + add r177 r180 into r181; + ternary r178 r181 r177 into r182; + lt 36u64 r2 into r183; + mul r182 r1 into r184; + div r184 10000u64 into r185; + add r182 r185 into r186; + ternary r183 r186 r182 into r187; + lt 37u64 r2 into r188; + mul r187 r1 into r189; + div r189 10000u64 into r190; + add r187 r190 into r191; + ternary r188 r191 r187 into r192; + lt 38u64 r2 into r193; + mul r192 r1 into r194; + div r194 10000u64 into r195; + add r192 r195 into r196; + ternary r193 r196 r192 into r197; + lt 39u64 r2 into r198; + mul r197 r1 into r199; + div r199 10000u64 into r200; + add r197 r200 into r201; + ternary r198 r201 r197 into r202; + lt 40u64 r2 into r203; + mul r202 r1 into r204; + div r204 10000u64 into r205; + add r202 r205 into r206; + ternary r203 r206 r202 into r207; + lt 41u64 r2 into r208; + mul r207 r1 into r209; + div r209 10000u64 into r210; + add r207 r210 into r211; + ternary r208 r211 r207 into r212; + lt 42u64 r2 into r213; + mul r212 r1 into r214; + div r214 10000u64 into r215; + add r212 r215 into r216; + ternary r213 r216 r212 into r217; + lt 43u64 r2 into r218; + mul r217 r1 into r219; + div r219 10000u64 into r220; + add r217 r220 into r221; + ternary r218 r221 r217 into r222; + lt 44u64 r2 into r223; + mul r222 r1 into r224; + div r224 10000u64 into r225; + add r222 r225 into r226; + ternary r223 r226 r222 into r227; + lt 45u64 r2 into r228; + mul r227 r1 into r229; + div r229 10000u64 into r230; + add r227 r230 into r231; + ternary r228 r231 r227 into r232; + lt 46u64 r2 into r233; + mul r232 r1 into r234; + div r234 10000u64 into r235; + add r232 r235 into r236; + ternary r233 r236 r232 into r237; + lt 47u64 r2 into r238; + mul r237 r1 into r239; + div r239 10000u64 into r240; + add r237 r240 into r241; + ternary r238 r241 r237 into r242; + lt 48u64 r2 into r243; + mul r242 r1 into r244; + div r244 10000u64 into r245; + add r242 r245 into r246; + ternary r243 r246 r242 into r247; + lt 49u64 r2 into r248; + mul r247 r1 into r249; + div r249 10000u64 into r250; + add r247 r250 into r251; + ternary r248 r251 r247 into r252; + lt 50u64 r2 into r253; + mul r252 r1 into r254; + div r254 10000u64 into r255; + add r252 r255 into r256; + ternary r253 r256 r252 into r257; + lt 51u64 r2 into r258; + mul r257 r1 into r259; + div r259 10000u64 into r260; + add r257 r260 into r261; + ternary r258 r261 r257 into r262; + lt 52u64 r2 into r263; + mul r262 r1 into r264; + div r264 10000u64 into r265; + add r262 r265 into r266; + ternary r263 r266 r262 into r267; + lt 53u64 r2 into r268; + mul r267 r1 into r269; + div r269 10000u64 into r270; + add r267 r270 into r271; + ternary r268 r271 r267 into r272; + lt 54u64 r2 into r273; + mul r272 r1 into r274; + div r274 10000u64 into r275; + add r272 r275 into r276; + ternary r273 r276 r272 into r277; + lt 55u64 r2 into r278; + mul r277 r1 into r279; + div r279 10000u64 into r280; + add r277 r280 into r281; + ternary r278 r281 r277 into r282; + lt 56u64 r2 into r283; + mul r282 r1 into r284; + div r284 10000u64 into r285; + add r282 r285 into r286; + ternary r283 r286 r282 into r287; + lt 57u64 r2 into r288; + mul r287 r1 into r289; + div r289 10000u64 into r290; + add r287 r290 into r291; + ternary r288 r291 r287 into r292; + lt 58u64 r2 into r293; + mul r292 r1 into r294; + div r294 10000u64 into r295; + add r292 r295 into r296; + ternary r293 r296 r292 into r297; + lt 59u64 r2 into r298; + mul r297 r1 into r299; + div r299 10000u64 into r300; + add r297 r300 into r301; + ternary r298 r301 r297 into r302; + lt 60u64 r2 into r303; + mul r302 r1 into r304; + div r304 10000u64 into r305; + add r302 r305 into r306; + ternary r303 r306 r302 into r307; + lt 61u64 r2 into r308; + mul r307 r1 into r309; + div r309 10000u64 into r310; + add r307 r310 into r311; + ternary r308 r311 r307 into r312; + lt 62u64 r2 into r313; + mul r312 r1 into r314; + div r314 10000u64 into r315; + add r312 r315 into r316; + ternary r313 r316 r312 into r317; + lt 63u64 r2 into r318; + mul r317 r1 into r319; + div r319 10000u64 into r320; + add r317 r320 into r321; + ternary r318 r321 r317 into r322; + lt 64u64 r2 into r323; + mul r322 r1 into r324; + div r324 10000u64 into r325; + add r322 r325 into r326; + ternary r323 r326 r322 into r327; + lt 65u64 r2 into r328; + mul r327 r1 into r329; + div r329 10000u64 into r330; + add r327 r330 into r331; + ternary r328 r331 r327 into r332; + lt 66u64 r2 into r333; + mul r332 r1 into r334; + div r334 10000u64 into r335; + add r332 r335 into r336; + ternary r333 r336 r332 into r337; + lt 67u64 r2 into r338; + mul r337 r1 into r339; + div r339 10000u64 into r340; + add r337 r340 into r341; + ternary r338 r341 r337 into r342; + lt 68u64 r2 into r343; + mul r342 r1 into r344; + div r344 10000u64 into r345; + add r342 r345 into r346; + ternary r343 r346 r342 into r347; + lt 69u64 r2 into r348; + mul r347 r1 into r349; + div r349 10000u64 into r350; + add r347 r350 into r351; + ternary r348 r351 r347 into r352; + lt 70u64 r2 into r353; + mul r352 r1 into r354; + div r354 10000u64 into r355; + add r352 r355 into r356; + ternary r353 r356 r352 into r357; + lt 71u64 r2 into r358; + mul r357 r1 into r359; + div r359 10000u64 into r360; + add r357 r360 into r361; + ternary r358 r361 r357 into r362; + lt 72u64 r2 into r363; + mul r362 r1 into r364; + div r364 10000u64 into r365; + add r362 r365 into r366; + ternary r363 r366 r362 into r367; + lt 73u64 r2 into r368; + mul r367 r1 into r369; + div r369 10000u64 into r370; + add r367 r370 into r371; + ternary r368 r371 r367 into r372; + lt 74u64 r2 into r373; + mul r372 r1 into r374; + div r374 10000u64 into r375; + add r372 r375 into r376; + ternary r373 r376 r372 into r377; + lt 75u64 r2 into r378; + mul r377 r1 into r379; + div r379 10000u64 into r380; + add r377 r380 into r381; + ternary r378 r381 r377 into r382; + lt 76u64 r2 into r383; + mul r382 r1 into r384; + div r384 10000u64 into r385; + add r382 r385 into r386; + ternary r383 r386 r382 into r387; + lt 77u64 r2 into r388; + mul r387 r1 into r389; + div r389 10000u64 into r390; + add r387 r390 into r391; + ternary r388 r391 r387 into r392; + lt 78u64 r2 into r393; + mul r392 r1 into r394; + div r394 10000u64 into r395; + add r392 r395 into r396; + ternary r393 r396 r392 into r397; + lt 79u64 r2 into r398; + mul r397 r1 into r399; + div r399 10000u64 into r400; + add r397 r400 into r401; + ternary r398 r401 r397 into r402; + lt 80u64 r2 into r403; + mul r402 r1 into r404; + div r404 10000u64 into r405; + add r402 r405 into r406; + ternary r403 r406 r402 into r407; + lt 81u64 r2 into r408; + mul r407 r1 into r409; + div r409 10000u64 into r410; + add r407 r410 into r411; + ternary r408 r411 r407 into r412; + lt 82u64 r2 into r413; + mul r412 r1 into r414; + div r414 10000u64 into r415; + add r412 r415 into r416; + ternary r413 r416 r412 into r417; + lt 83u64 r2 into r418; + mul r417 r1 into r419; + div r419 10000u64 into r420; + add r417 r420 into r421; + ternary r418 r421 r417 into r422; + lt 84u64 r2 into r423; + mul r422 r1 into r424; + div r424 10000u64 into r425; + add r422 r425 into r426; + ternary r423 r426 r422 into r427; + lt 85u64 r2 into r428; + mul r427 r1 into r429; + div r429 10000u64 into r430; + add r427 r430 into r431; + ternary r428 r431 r427 into r432; + lt 86u64 r2 into r433; + mul r432 r1 into r434; + div r434 10000u64 into r435; + add r432 r435 into r436; + ternary r433 r436 r432 into r437; + lt 87u64 r2 into r438; + mul r437 r1 into r439; + div r439 10000u64 into r440; + add r437 r440 into r441; + ternary r438 r441 r437 into r442; + lt 88u64 r2 into r443; + mul r442 r1 into r444; + div r444 10000u64 into r445; + add r442 r445 into r446; + ternary r443 r446 r442 into r447; + lt 89u64 r2 into r448; + mul r447 r1 into r449; + div r449 10000u64 into r450; + add r447 r450 into r451; + ternary r448 r451 r447 into r452; + lt 90u64 r2 into r453; + mul r452 r1 into r454; + div r454 10000u64 into r455; + add r452 r455 into r456; + ternary r453 r456 r452 into r457; + lt 91u64 r2 into r458; + mul r457 r1 into r459; + div r459 10000u64 into r460; + add r457 r460 into r461; + ternary r458 r461 r457 into r462; + lt 92u64 r2 into r463; + mul r462 r1 into r464; + div r464 10000u64 into r465; + add r462 r465 into r466; + ternary r463 r466 r462 into r467; + lt 93u64 r2 into r468; + mul r467 r1 into r469; + div r469 10000u64 into r470; + add r467 r470 into r471; + ternary r468 r471 r467 into r472; + lt 94u64 r2 into r473; + mul r472 r1 into r474; + div r474 10000u64 into r475; + add r472 r475 into r476; + ternary r473 r476 r472 into r477; + lt 95u64 r2 into r478; + mul r477 r1 into r479; + div r479 10000u64 into r480; + add r477 r480 into r481; + ternary r478 r481 r477 into r482; + lt 96u64 r2 into r483; + mul r482 r1 into r484; + div r484 10000u64 into r485; + add r482 r485 into r486; + ternary r483 r486 r482 into r487; + lt 97u64 r2 into r488; + mul r487 r1 into r489; + div r489 10000u64 into r490; + add r487 r490 into r491; + ternary r488 r491 r487 into r492; + lt 98u64 r2 into r493; + mul r492 r1 into r494; + div r494 10000u64 into r495; + add r492 r495 into r496; + ternary r493 r496 r492 into r497; + lt 99u64 r2 into r498; + mul r497 r1 into r499; + div r499 10000u64 into r500; + add r497 r500 into r501; + ternary r498 r501 r497 into r502; + output r502 as u64; + + +function withdraw: + input r0 as address.private; + input r1 as u64.private; + input r2 as u64.private; + input r3 as u64.private; + assert.eq self.caller aleo1t0uer3jgtsgmx5tq6x6f9ecu8tr57rzzfnc2dgmcqldceal0ls9qf6st7a; + hash.bhp256 r0 into r4 as field; call calculate_interest r1 r2 r3 into r5; + cast r0 r5 into r6 as Token.record; + output r6 as Token.record; + + finalize r4 r1; + +finalize withdraw: + input r0 as field.public; + input r1 as u64.public; + get.or_use balances[r0] 0u64 into r2; + sub r2 r1 into r3; + set r3 into balances[r0]; diff --git a/examples/basic_bank/build/program.json b/examples/basic_bank/build/program.json new file mode 100644 index 0000000000..13c1bc036f --- /dev/null +++ b/examples/basic_bank/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "basic_bank.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/basic_bank/program.json b/examples/basic_bank/program.json index 8dc3119f71..13c1bc036f 100644 --- a/examples/basic_bank/program.json +++ b/examples/basic_bank/program.json @@ -2,9 +2,5 @@ "program": "basic_bank.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpHtqVWT6fSHgUMNxsuVf7eaR6id2cj7TieKY1Z8CP5rCD", - "address": "aleo1t0uer3jgtsgmx5tq6x6f9ecu8tr57rzzfnc2dgmcqldceal0ls9qf6st7a" - }, "license": "MIT" } diff --git a/examples/basic_bank/run.sh b/examples/basic_bank/run.sh index c45b81c8ac..4cbcf58220 100755 --- a/examples/basic_bank/run.sh +++ b/examples/basic_bank/run.sh @@ -8,17 +8,11 @@ # "private_key": "APrivateKey1zkp75cpr5NNQpVWc5mfsD9Uf2wg6XvHknf82iwB636q3rtc" # "address": "aleo1zeklp6dd8e764spe74xez6f8w27dlua3w7hl4z2uln03re52egpsv46ngg" -# Swap in the private key and address of the bank to program.json. -echo "{ - \"program\": \"basic_bank.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkpHtqVWT6fSHgUMNxsuVf7eaR6id2cj7TieKY1Z8CP5rCD\", - \"address\": \"aleo1t0uer3jgtsgmx5tq6x6f9ecu8tr57rzzfnc2dgmcqldceal0ls9qf6st7a\" - }, - \"license\": \"MIT\" -}" > program.json +# Swap in the private key and address of the bank to .env. +echo " +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpHtqVWT6fSHgUMNxsuVf7eaR6id2cj7TieKY1Z8CP5rCD +" > .env # Have the bank issue 100 tokens to the user. echo " @@ -63,17 +57,11 @@ echo " " leo run issue aleo1zeklp6dd8e764spe74xez6f8w27dlua3w7hl4z2uln03re52egpsv46ngg 100u64 || exit -# Swap in the private key and address of the user to program.json. -echo "{ - \"program\": \"basic_bank.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkp75cpr5NNQpVWc5mfsD9Uf2wg6XvHknf82iwB636q3rtc\", - \"address\": \"aleo1zeklp6dd8e764spe74xez6f8w27dlua3w7hl4z2uln03re52egpsv46ngg\" - }, - \"license\": \"MIT\" -}" > program.json +# Swap in the private key and address of the user to .env. +echo " +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkp75cpr5NNQpVWc5mfsD9Uf2wg6XvHknf82iwB636q3rtc +" > .env # Have the user deposit 50 tokens into the bank. echo " @@ -163,17 +151,11 @@ echo " ############################################################################### " -# Swap in the private key and address of the bank to program.json. -echo "{ - \"program\": \"basic_bank.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkpHtqVWT6fSHgUMNxsuVf7eaR6id2cj7TieKY1Z8CP5rCD\", - \"address\": \"aleo1t0uer3jgtsgmx5tq6x6f9ecu8tr57rzzfnc2dgmcqldceal0ls9qf6st7a\" - }, - \"license\": \"MIT\" -}" > program.json +# Swap in the private key and address of the bank to .env. +echo " +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpHtqVWT6fSHgUMNxsuVf7eaR6id2cj7TieKY1Z8CP5rCD +" > .env # Have the bank withdraw all of the user's tokens with compound interest over 15 periods at 12.34%. echo " diff --git a/examples/battleship/.env b/examples/battleship/.env new file mode 100644 index 0000000000..6cd3948e68 --- /dev/null +++ b/examples/battleship/.env @@ -0,0 +1,4 @@ + + NETWORK=testnet3 + PRIVATE_KEY=APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH + diff --git a/examples/battleship/.gitignore b/examples/battleship/.gitignore index b28696155d..750b56f237 100644 --- a/examples/battleship/.gitignore +++ b/examples/battleship/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/battleship/README.md b/examples/battleship/README.md index 1b22a8e208..604e695b38 100644 --- a/examples/battleship/README.md +++ b/examples/battleship/README.md @@ -34,7 +34,7 @@ This application was translated into Leo from the [zk-battleship](https://github To compile this Leo program, run: ```bash -leo build +leo run ``` ## How to Run diff --git a/examples/battleship/build/imports/board.aleo b/examples/battleship/build/imports/board.aleo new file mode 100644 index 0000000000..fac2e70af8 --- /dev/null +++ b/examples/battleship/build/imports/board.aleo @@ -0,0 +1,46 @@ +program board.aleo; + +record board_state: + owner as address.private; + hits_and_misses as u64.private; + played_tiles as u64.private; + ships as u64.private; + player_1 as address.private; + player_2 as address.private; + game_started as boolean.private; + + +function new_board_state: + input r0 as u64.private; + input r1 as address.private; + cast self.caller 0u64 0u64 r0 self.caller r1 false into r2 as board_state.record; + output r2 as board_state.record; + + +function start_board: + input r0 as board_state.record; + not r0.game_started into r1; + assert.eq r1 true; + cast r0.owner r0.hits_and_misses r0.played_tiles r0.ships r0.player_1 r0.player_2 true into r2 as board_state.record; + output r2 as board_state.record; + + +function update_played_tiles: + input r0 as board_state.record; + input r1 as u64.private; + sub r1 1u64 into r2; + and r1 r2 into r3; + assert.eq r3 0u64; + and r1 r0.played_tiles into r4; + assert.eq r4 0u64; + or r0.played_tiles r1 into r5; + cast r0.owner r0.hits_and_misses r5 r0.ships r0.player_1 r0.player_2 r0.game_started into r6 as board_state.record; + output r6 as board_state.record; + + +function update_hits_and_misses: + input r0 as board_state.record; + input r1 as u64.private; + or r0.hits_and_misses r1 into r2; + cast r0.owner r2 r0.played_tiles r0.ships r0.player_1 r0.player_2 r0.game_started into r3 as board_state.record; + output r3 as board_state.record; diff --git a/examples/battleship/build/imports/move.aleo b/examples/battleship/build/imports/move.aleo new file mode 100644 index 0000000000..ed5247d932 --- /dev/null +++ b/examples/battleship/build/imports/move.aleo @@ -0,0 +1,24 @@ +program move.aleo; + +record move: + owner as address.private; + incoming_fire_coordinate as u64.private; + player_1 as address.private; + player_2 as address.private; + prev_hit_or_miss as u64.private; + + +function create_move: + input r0 as move.record; + input r1 as u64.private; + input r2 as u64.private; + is.eq r0.player_1 r0.owner into r3; + ternary r3 r0.player_2 r0.player_1 into r4; + cast r4 r1 r0.player_2 r0.player_1 r2 into r5 as move.record; + output r5 as move.record; + + +function start_game: + input r0 as address.private; + cast r0 0u64 self.caller r0 0u64 into r1 as move.record; + output r1 as move.record; diff --git a/examples/battleship/build/imports/verify.aleo b/examples/battleship/build/imports/verify.aleo new file mode 100644 index 0000000000..804dcf2a0e --- /dev/null +++ b/examples/battleship/build/imports/verify.aleo @@ -0,0 +1,73 @@ +program verify.aleo; + + + +closure bitcount: + input r0 as u64; + div r0 2u64 into r1; + div r0 4u64 into r2; + div r0 8u64 into r3; + and r1 8608480567731124087u64 into r4; + and r2 3689348814741910323u64 into r5; + and r3 1229782938247303441u64 into r6; + sub r0 r4 into r7; + sub r7 r5 into r8; + sub r8 r6 into r9; + div r9 16u64 into r10; + add r9 r10 into r11; + and r11 1085102592571150095u64 into r12; + rem r12 255u64 into r13; + output r13 as u64; + + +closure adjacency_check: + input r0 as u64; + input r1 as u64; + div r0 r1 into r2; + is.eq r2 0u64 into r3; + ternary r3 3u64 r2 into r4; + sub r4 1u64 into r5; + and r5 r4 into r6; + is.eq r6 0u64 into r7; + output r7 as boolean; + + +closure horizontal_check: + input r0 as u64; + input r1 as u64; + rem r0 255u64 into r2; + div r2 r1 into r3; + is.eq r3 0u64 into r4; + ternary r4 3u64 r3 into r5; + sub r5 1u64 into r6; + and r6 r5 into r7; + is.eq r7 0u64 into r8; + output r8 as boolean; + + +function validate_ship: + input r0 as u64.private; + input r1 as u64.private; + input r2 as u64.private; + input r3 as u64.private; + call bitcount r0 into r4; + assert.eq r4 r1; + call adjacency_check r0 r2 into r5; + call horizontal_check r0 r2 into r6; + and r5 r6 into r7; + call adjacency_check r0 r3 into r8; + or r7 r8 into r9; + output r9 as boolean.private; + + +function create_board: + input r0 as u64.private; + input r1 as u64.private; + input r2 as u64.private; + input r3 as u64.private; + or r0 r1 into r4; + or r4 r2 into r5; + or r5 r3 into r6; + call bitcount r6 into r7; + assert.eq r7 14u64; + output r6 as u64.private; diff --git a/examples/battleship/build/main.aleo b/examples/battleship/build/main.aleo new file mode 100644 index 0000000000..5fe36f9fe6 --- /dev/null +++ b/examples/battleship/build/main.aleo @@ -0,0 +1,59 @@ +import board.aleo; +import move.aleo; +import verify.aleo; +program battleship.aleo; + + + + +function initialize_board: + input r0 as u64.private; + input r1 as u64.private; + input r2 as u64.private; + input r3 as u64.private; + input r4 as address.private; + call verify.aleo/validate_ship r0 5u64 31u64 4311810305u64 into r5; + assert.eq r5 true; + call verify.aleo/validate_ship r1 4u64 15u64 16843009u64 into r6; + assert.eq r6 true; + call verify.aleo/validate_ship r2 3u64 7u64 65793u64 into r7; + assert.eq r7 true; + call verify.aleo/validate_ship r3 2u64 3u64 257u64 into r8; + assert.eq r8 true; + call verify.aleo/create_board r0 r1 r2 r3 into r9; + call board.aleo/new_board_state r9 r4 into r10; + output r10 as board.aleo/board_state.record; + + +function offer_battleship: + input r0 as board.aleo/board_state.record; + call board.aleo/start_board r0 into r1; + call move.aleo/start_game r0.player_2 into r2; + output r1 as board.aleo/board_state.record; + output r2 as move.aleo/move.record; + + +function start_battleship: + input r0 as board.aleo/board_state.record; + input r1 as move.aleo/move.record; + assert.eq r0.player_1 r1.player_2; + assert.eq r0.player_2 r1.player_1; + call board.aleo/start_board r0 into r2; + call move.aleo/start_game r0.player_2 into r3; + output r2 as board.aleo/board_state.record; + output r3 as move.aleo/move.record; + + +function play: + input r0 as board.aleo/board_state.record; + input r1 as move.aleo/move.record; + input r2 as u64.private; + assert.eq r0.game_started true; + assert.eq r0.player_1 r1.player_2; + assert.eq r0.player_2 r1.player_1; + call board.aleo/update_played_tiles r0 r2 into r3; + call board.aleo/update_hits_and_misses r3 r1.prev_hit_or_miss into r4; + and r1.incoming_fire_coordinate r0.ships into r5; + call move.aleo/create_move r1 r2 r5 into r6; + output r4 as board.aleo/board_state.record; + output r6 as move.aleo/move.record; diff --git a/examples/battleship/build/program.json b/examples/battleship/build/program.json new file mode 100644 index 0000000000..1d0c6e88d6 --- /dev/null +++ b/examples/battleship/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "battleship.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/battleship/program.json b/examples/battleship/program.json index 1b41e64f37..1d0c6e88d6 100644 --- a/examples/battleship/program.json +++ b/examples/battleship/program.json @@ -2,10 +2,5 @@ "program": "battleship.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm", - "view_key": "AViewKey1fSyEPXxfPFVgjL6qcM9izWRGrhSHKXyN3c64BNsAjnA6", - "address": "aleo15g9c69urtdhvfml0vjl8px07txmxsy454urhgzk57szmcuttpqgq5cvcdy" - }, "license": "MIT" } diff --git a/examples/battleship/run.sh b/examples/battleship/run.sh index 6528cb36ae..1ecbd0fe93 100755 --- a/examples/battleship/run.sh +++ b/examples/battleship/run.sh @@ -8,17 +8,11 @@ echo " ######## ######## ############################################################################### " -echo "{ - \"program\": \"battleship.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm\", - \"view_key\": \"AViewKey1fSyEPXxfPFVgjL6qcM9izWRGrhSHKXyN3c64BNsAjnA6\", - \"address\": \"aleo15g9c69urtdhvfml0vjl8px07txmxsy454urhgzk57szmcuttpqgq5cvcdy\" - }, - \"license\": \"MIT\" -}" > program.json + +echo " +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm +" > .env echo "✅ Successfully initialized Player 1." @@ -65,17 +59,10 @@ echo " ############################################################################### " ( - echo "{ - \"program\": \"battleship.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH\", - \"view_key\": \"AViewKey1hh6dvSEgeMdfseP4hfdbNYjX4grETwCuTbKnCftkpMwE\", - \"address\": \"aleo1wyvu96dvv0auq9e4qme54kjuhzglyfcf576h0g3nrrmrmr0505pqd6wnry\" - }, - \"license\": \"MIT\" - }" > program.json + echo " + NETWORK=testnet3 + PRIVATE_KEY=APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH + " > .env leo run initialize_board 31u64 2207646875648u64 224u64 9042383626829824u64 aleo15g9c69urtdhvfml0vjl8px07txmxsy454urhgzk57szmcuttpqgq5cvcdy || exit ) @@ -120,17 +107,10 @@ echo " ############################################################################### " ( - echo "{ - \"program\": \"battleship.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm\", - \"view_key\": \"AViewKey1fSyEPXxfPFVgjL6qcM9izWRGrhSHKXyN3c64BNsAjnA6\", - \"address\": \"aleo15g9c69urtdhvfml0vjl8px07txmxsy454urhgzk57szmcuttpqgq5cvcdy\" - }, - \"license\": \"MIT\" - }" > program.json + echo " + NETWORK=testnet3 + PRIVATE_KEY=APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm + " > .env leo run play '{ owner: aleo15g9c69urtdhvfml0vjl8px07txmxsy454urhgzk57szmcuttpqgq5cvcdy.private, @@ -162,17 +142,11 @@ echo " ############################################################################### " ( - echo "{ - \"program\": \"battleship.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH\", - \"view_key\": \"AViewKey1hh6dvSEgeMdfseP4hfdbNYjX4grETwCuTbKnCftkpMwE\", - \"address\": \"aleo1wyvu96dvv0auq9e4qme54kjuhzglyfcf576h0g3nrrmrmr0505pqd6wnry\" - }, - \"license\": \"MIT\" - }" > program.json + + echo " + NETWORK=testnet3 + PRIVATE_KEY=APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH + " > .env leo run play '{ owner: aleo1wyvu96dvv0auq9e4qme54kjuhzglyfcf576h0g3nrrmrmr0505pqd6wnry.private, @@ -204,17 +178,10 @@ echo " ############################################################################### " ( - echo "{ - \"program\": \"battleship.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm\", - \"view_key\": \"AViewKey1fSyEPXxfPFVgjL6qcM9izWRGrhSHKXyN3c64BNsAjnA6\", - \"address\": \"aleo15g9c69urtdhvfml0vjl8px07txmxsy454urhgzk57szmcuttpqgq5cvcdy\" - }, - \"license\": \"MIT\" - }" > program.json + echo " + NETWORK=testnet3 + PRIVATE_KEY=APrivateKey1zkpGKaJY47BXb6knSqmT3JZnBUEGBDFAWz2nMVSsjwYpJmm + " > .env leo run play '{ owner: aleo15g9c69urtdhvfml0vjl8px07txmxsy454urhgzk57szmcuttpqgq5cvcdy.private, @@ -246,17 +213,11 @@ echo " ############################################################################### " ( - echo "{ - \"program\": \"battleship.aleo\", - \"version\": \"0.0.0\", - \"description\": \"\", - \"development\": { - \"private_key\": \"APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH\", - \"view_key\": \"AViewKey1hh6dvSEgeMdfseP4hfdbNYjX4grETwCuTbKnCftkpMwE\", - \"address\": \"aleo1wyvu96dvv0auq9e4qme54kjuhzglyfcf576h0g3nrrmrmr0505pqd6wnry\" - }, - \"license\": \"MIT\" - }" > program.json + + echo " + NETWORK=testnet3 + PRIVATE_KEY=APrivateKey1zkp86FNGdKxjgAdgQZ967bqBanjuHkAaoRe19RK24ZCGsHH + " > .env leo run play '{ owner: aleo1wyvu96dvv0auq9e4qme54kjuhzglyfcf576h0g3nrrmrmr0505pqd6wnry.private, diff --git a/examples/bubblesort/.env b/examples/bubblesort/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/bubblesort/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/bubblesort/.gitignore b/examples/bubblesort/.gitignore index b28696155d..74befa5ec9 100644 --- a/examples/bubblesort/.gitignore +++ b/examples/bubblesort/.gitignore @@ -1,2 +1,3 @@ outputs/ -build/ +*.prover +*.verifier \ No newline at end of file diff --git a/examples/bubblesort/README.md b/examples/bubblesort/README.md index cbffc77278..054a9a6739 100644 --- a/examples/bubblesort/README.md +++ b/examples/bubblesort/README.md @@ -1,17 +1,19 @@ # bubblesort -## Build Guide - -To compile this program, run: -```bash -leo build -``` +## Run Guide To run this program, run: ```bash leo run bubble_sort ``` +## Execute Guide + +To execute this program, run: +```bash +leo execute bubble_sort +``` + ## Overview This example shows how to sort an array. diff --git a/examples/bubblesort/build/build/main.avm b/examples/bubblesort/build/build/main.avm new file mode 100644 index 0000000000..8f1492528d Binary files /dev/null and b/examples/bubblesort/build/build/main.avm differ diff --git a/examples/bubblesort/build/main.aleo b/examples/bubblesort/build/main.aleo new file mode 100644 index 0000000000..7e05ffaa2b --- /dev/null +++ b/examples/bubblesort/build/main.aleo @@ -0,0 +1,105 @@ +program bubblesort.aleo; + + + +function bubble_sort: + input r0 as u32.private; + input r1 as u32.private; + input r2 as u32.private; + input r3 as u32.private; + input r4 as u32.private; + input r5 as u32.private; + input r6 as u32.private; + input r7 as u32.private; + lt r1 r0 into r8; + ternary r8 r1 r0 into r9; + ternary r8 r0 r1 into r10; + lt r2 r10 into r11; + ternary r11 r2 r10 into r12; + ternary r11 r10 r2 into r13; + lt r3 r13 into r14; + ternary r14 r3 r13 into r15; + ternary r14 r13 r3 into r16; + lt r4 r16 into r17; + ternary r17 r4 r16 into r18; + ternary r17 r16 r4 into r19; + lt r5 r19 into r20; + ternary r20 r5 r19 into r21; + ternary r20 r19 r5 into r22; + lt r6 r22 into r23; + ternary r23 r6 r22 into r24; + ternary r23 r22 r6 into r25; + lt r7 r25 into r26; + ternary r26 r7 r25 into r27; + ternary r26 r25 r7 into r28; + lt r12 r9 into r29; + ternary r29 r12 r9 into r30; + ternary r29 r9 r12 into r31; + lt r15 r31 into r32; + ternary r32 r15 r31 into r33; + ternary r32 r31 r15 into r34; + lt r18 r34 into r35; + ternary r35 r18 r34 into r36; + ternary r35 r34 r18 into r37; + lt r21 r37 into r38; + ternary r38 r21 r37 into r39; + ternary r38 r37 r21 into r40; + lt r24 r40 into r41; + ternary r41 r24 r40 into r42; + ternary r41 r40 r24 into r43; + lt r27 r43 into r44; + ternary r44 r27 r43 into r45; + ternary r44 r43 r27 into r46; + lt r33 r30 into r47; + ternary r47 r33 r30 into r48; + ternary r47 r30 r33 into r49; + lt r36 r49 into r50; + ternary r50 r36 r49 into r51; + ternary r50 r49 r36 into r52; + lt r39 r52 into r53; + ternary r53 r39 r52 into r54; + ternary r53 r52 r39 into r55; + lt r42 r55 into r56; + ternary r56 r42 r55 into r57; + ternary r56 r55 r42 into r58; + lt r45 r58 into r59; + ternary r59 r45 r58 into r60; + ternary r59 r58 r45 into r61; + lt r51 r48 into r62; + ternary r62 r51 r48 into r63; + ternary r62 r48 r51 into r64; + lt r54 r64 into r65; + ternary r65 r54 r64 into r66; + ternary r65 r64 r54 into r67; + lt r57 r67 into r68; + ternary r68 r57 r67 into r69; + ternary r68 r67 r57 into r70; + lt r60 r70 into r71; + ternary r71 r60 r70 into r72; + ternary r71 r70 r60 into r73; + lt r66 r63 into r74; + ternary r74 r66 r63 into r75; + ternary r74 r63 r66 into r76; + lt r69 r76 into r77; + ternary r77 r69 r76 into r78; + ternary r77 r76 r69 into r79; + lt r72 r79 into r80; + ternary r80 r72 r79 into r81; + ternary r80 r79 r72 into r82; + lt r78 r75 into r83; + ternary r83 r78 r75 into r84; + ternary r83 r75 r78 into r85; + lt r81 r85 into r86; + ternary r86 r81 r85 into r87; + ternary r86 r85 r81 into r88; + lt r87 r84 into r89; + ternary r89 r87 r84 into r90; + ternary r89 r84 r87 into r91; + output r90 as u32.private; + output r91 as u32.private; + output r88 as u32.private; + output r82 as u32.private; + output r73 as u32.private; + output r61 as u32.private; + output r46 as u32.private; + output r28 as u32.private; diff --git a/examples/bubblesort/build/program.json b/examples/bubblesort/build/program.json new file mode 100644 index 0000000000..6c04aa95ba --- /dev/null +++ b/examples/bubblesort/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "bubblesort.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} \ No newline at end of file diff --git a/examples/bubblesort/program.json b/examples/bubblesort/program.json index 3ea5152561..6c04aa95ba 100644 --- a/examples/bubblesort/program.json +++ b/examples/bubblesort/program.json @@ -2,9 +2,5 @@ "program": "bubblesort.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpBqRv2cwkSiR4hQ3Tb4AZFD3XzdwPqV9QsEykTKBV1YKT", - "address": "aleo1ht2a9q0gsd38j0se4t9lsfulxgqrens2vgzgry3pkvs93xrrzu8s892zn7" - }, "license": "MIT" } \ No newline at end of file diff --git a/examples/core/.env b/examples/core/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/core/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/core/.gitignore b/examples/core/.gitignore index b28696155d..750b56f237 100644 --- a/examples/core/.gitignore +++ b/examples/core/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/core/README.md b/examples/core/README.md index 4660673568..dd4657e1b6 100644 --- a/examples/core/README.md +++ b/examples/core/README.md @@ -1,13 +1,15 @@ # Leo core functions -## Build Guide - -To compile this program, run: -```bash -leo build -``` +## Run Guide To run this program, run: ```bash -leo run +leo run bubble_sort +``` + +## Execute Guide + +To execute this program, run: +```bash +leo execute bubble_sort ``` \ No newline at end of file diff --git a/examples/core/build/main.aleo b/examples/core/build/main.aleo new file mode 100644 index 0000000000..40adc53c98 --- /dev/null +++ b/examples/core/build/main.aleo @@ -0,0 +1,7 @@ +program core.aleo; + + + +function main: + input r0 as field.private; + hash.bhp256 r0 into r1 as field; hash.psd2 r1 into r2 as field; commit.bhp256 r2 1scalar into r3 as field; output r3 as field.private; diff --git a/examples/core/build/program.json b/examples/core/build/program.json new file mode 100644 index 0000000000..228340bc22 --- /dev/null +++ b/examples/core/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "core.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/core/program.json b/examples/core/program.json index 031777e9af..228340bc22 100644 --- a/examples/core/program.json +++ b/examples/core/program.json @@ -2,9 +2,5 @@ "program": "core.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkp71KCjd8jC21RJudasMhxsw7YwPbSdtpK7P6z1yWQPCLo", - "address": "aleo1pjmrd6jf4z7vhwmse3jpsk62a0223fceg54aa89p6dru9l0z4ugqe4w7xf" - }, "license": "MIT" } diff --git a/examples/fibonacci/.env b/examples/fibonacci/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/fibonacci/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/fibonacci/.gitignore b/examples/fibonacci/.gitignore new file mode 100644 index 0000000000..750b56f237 --- /dev/null +++ b/examples/fibonacci/.gitignore @@ -0,0 +1,4 @@ +outputs/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/fibonacci/README.md b/examples/fibonacci/README.md index 07beee8184..5c1a368bdb 100644 --- a/examples/fibonacci/README.md +++ b/examples/fibonacci/README.md @@ -1,12 +1,19 @@ # fibonacci.aleo -## Build Guide +## Run Guide To run this program, run: ```bash leo run fibonacci ``` +## Execute Guide + +To execute this program, run: +```bash +leo execute fibonacci +``` + ## Overview This example shows how to calculate Fibonacci number using the [fast-doubling method](https://math.stackexchange.com/questions/1124590/need-help-understanding-fibonacci-fast-doubling-proof). diff --git a/examples/fibonacci/program.json b/examples/fibonacci/program.json index c13efaf5c6..8c56cc42ac 100644 --- a/examples/fibonacci/program.json +++ b/examples/fibonacci/program.json @@ -2,9 +2,5 @@ "program": "fibonacci.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpFebmqLzRHMbtdwensSVNUPDWV6WnYw5JcNsYVLDuu8ig", - "address": "aleo1l0l25evjzxac3j4r5xf7uwv3jfnqwll2g9h8j0g5vvk0grnnmq8qexra3d" - }, "license": "MIT" } diff --git a/examples/groups/.env b/examples/groups/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/groups/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/groups/.gitignore b/examples/groups/.gitignore index b28696155d..750b56f237 100644 --- a/examples/groups/.gitignore +++ b/examples/groups/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/groups/README.md b/examples/groups/README.md index c262b06c54..150560f05a 100644 --- a/examples/groups/README.md +++ b/examples/groups/README.md @@ -1,15 +1,17 @@ # Leo group operations. -## Build Guide - -To compile this program, run: -```bash -leo build -``` +## Run Guide To run this program, run: ```bash -leo run main +leo run fibonacci +``` + +## Execute Guide + +To execute this program, run: +```bash +leo execute fibonacci ``` ## Overview @@ -28,11 +30,9 @@ Group elements are special since their values can be defined as coordinate pairs The `group` type keyword group must be used when specifying a pair of group coordinates since implicit syntax would collide with normal tuple `(a, b)` values. ``` -let b = 0group; // the zero of the group +let a = 0group; // the zero of the group -let a = 1group; // the group generator +let b = group::GEN; // the group generator -let c = 2group; // 2 * the group generator - -let d = (0, 1)group; // coordinate notation +let c = (0, 1)group; // coordinate notation ``` diff --git a/examples/groups/build/main.aleo b/examples/groups/build/main.aleo new file mode 100644 index 0000000000..d81be156ba --- /dev/null +++ b/examples/groups/build/main.aleo @@ -0,0 +1,12 @@ +program groups.aleo; + + + +function main: + input r0 as group.private; + double r0 into r1; + neg r1 into r2; + mul r0 2scalar into r3; + add r3 r2 into r4; + add r4 group::GEN into r5; + output r5 as group.private; diff --git a/examples/groups/build/program.json b/examples/groups/build/program.json new file mode 100644 index 0000000000..800606f89a --- /dev/null +++ b/examples/groups/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "groups.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/groups/program.json b/examples/groups/program.json index d4c6a691ea..800606f89a 100644 --- a/examples/groups/program.json +++ b/examples/groups/program.json @@ -2,9 +2,5 @@ "program": "groups.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpDfsRvWYGWihXv84dueeABvBUZMqBQbpW6k9AC4zeLpZ8", - "address": "aleo1cnzvtgdlyl3mrdm8cp80rl705ryjm65zs2gcny720d9dn3n2dvpsrfj4f0" - }, "license": "MIT" } diff --git a/examples/hackers-delight/ntzdebruijn/.env b/examples/hackers-delight/ntzdebruijn/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/hackers-delight/ntzdebruijn/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/hackers-delight/ntzdebruijn/.gitignore b/examples/hackers-delight/ntzdebruijn/.gitignore index b28696155d..750b56f237 100644 --- a/examples/hackers-delight/ntzdebruijn/.gitignore +++ b/examples/hackers-delight/ntzdebruijn/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/hackers-delight/ntzdebruijn/build/main.aleo b/examples/hackers-delight/ntzdebruijn/build/main.aleo new file mode 100644 index 0000000000..99d0722fdc --- /dev/null +++ b/examples/hackers-delight/ntzdebruijn/build/main.aleo @@ -0,0 +1,1075 @@ +program ntzdebruijn.aleo; + + + +closure deBruijnTableLookup: + input r0 as u32; + is.eq r0 0u32 into r1; + is.eq r0 1u32 into r2; + is.eq r0 2u32 into r3; + is.eq r0 3u32 into r4; + is.eq r0 4u32 into r5; + is.eq r0 5u32 into r6; + is.eq r0 6u32 into r7; + is.eq r0 7u32 into r8; + is.eq r0 8u32 into r9; + is.eq r0 9u32 into r10; + is.eq r0 10u32 into r11; + is.eq r0 11u32 into r12; + is.eq r0 12u32 into r13; + is.eq r0 13u32 into r14; + is.eq r0 14u32 into r15; + is.eq r0 15u32 into r16; + is.eq r0 16u32 into r17; + is.eq r0 17u32 into r18; + is.eq r0 18u32 into r19; + is.eq r0 19u32 into r20; + is.eq r0 20u32 into r21; + is.eq r0 21u32 into r22; + is.eq r0 22u32 into r23; + is.eq r0 23u32 into r24; + is.eq r0 24u32 into r25; + is.eq r0 25u32 into r26; + is.eq r0 26u32 into r27; + is.eq r0 27u32 into r28; + is.eq r0 28u32 into r29; + is.eq r0 29u32 into r30; + is.eq r0 30u32 into r31; + is.eq r0 31u32 into r32; + not r1 into r33; + not r2 into r34; + and r33 r34 into r35; + not r3 into r36; + and r35 r36 into r37; + not r4 into r38; + and r37 r38 into r39; + not r5 into r40; + and r39 r40 into r41; + not r6 into r42; + and r41 r42 into r43; + not r7 into r44; + and r43 r44 into r45; + not r8 into r46; + and r45 r46 into r47; + not r9 into r48; + and r47 r48 into r49; + not r10 into r50; + and r49 r50 into r51; + not r11 into r52; + and r51 r52 into r53; + not r12 into r54; + and r53 r54 into r55; + not r13 into r56; + and r55 r56 into r57; + not r14 into r58; + and r57 r58 into r59; + not r15 into r60; + and r59 r60 into r61; + not r16 into r62; + and r61 r62 into r63; + not r17 into r64; + and r63 r64 into r65; + not r18 into r66; + and r65 r66 into r67; + not r19 into r68; + and r67 r68 into r69; + not r20 into r70; + and r69 r70 into r71; + not r21 into r72; + and r71 r72 into r73; + not r22 into r74; + and r73 r74 into r75; + not r23 into r76; + and r75 r76 into r77; + not r24 into r78; + and r77 r78 into r79; + not r25 into r80; + and r79 r80 into r81; + not r26 into r82; + and r81 r82 into r83; + not r27 into r84; + and r83 r84 into r85; + not r28 into r86; + and r85 r86 into r87; + not r29 into r88; + and r87 r88 into r89; + not r30 into r90; + and r89 r90 into r91; + not r31 into r92; + and r91 r92 into r93; + and r93 r32 into r94; + ternary r94 27u8 0u8 into r95; + not r1 into r96; + not r2 into r97; + and r96 r97 into r98; + not r3 into r99; + and r98 r99 into r100; + not r4 into r101; + and r100 r101 into r102; + not r5 into r103; + and r102 r103 into r104; + not r6 into r105; + and r104 r105 into r106; + not r7 into r107; + and r106 r107 into r108; + not r8 into r109; + and r108 r109 into r110; + not r9 into r111; + and r110 r111 into r112; + not r10 into r113; + and r112 r113 into r114; + not r11 into r115; + and r114 r115 into r116; + not r12 into r117; + and r116 r117 into r118; + not r13 into r119; + and r118 r119 into r120; + not r14 into r121; + and r120 r121 into r122; + not r15 into r123; + and r122 r123 into r124; + not r16 into r125; + and r124 r125 into r126; + not r17 into r127; + and r126 r127 into r128; + not r18 into r129; + and r128 r129 into r130; + not r19 into r131; + and r130 r131 into r132; + not r20 into r133; + and r132 r133 into r134; + not r21 into r135; + and r134 r135 into r136; + not r22 into r137; + and r136 r137 into r138; + not r23 into r139; + and r138 r139 into r140; + not r24 into r141; + and r140 r141 into r142; + not r25 into r143; + and r142 r143 into r144; + not r26 into r145; + and r144 r145 into r146; + not r27 into r147; + and r146 r147 into r148; + not r28 into r149; + and r148 r149 into r150; + not r29 into r151; + and r150 r151 into r152; + not r30 into r153; + and r152 r153 into r154; + and r154 r31 into r155; + ternary r155 28u8 r95 into r156; + not r1 into r157; + not r2 into r158; + and r157 r158 into r159; + not r3 into r160; + and r159 r160 into r161; + not r4 into r162; + and r161 r162 into r163; + not r5 into r164; + and r163 r164 into r165; + not r6 into r166; + and r165 r166 into r167; + not r7 into r168; + and r167 r168 into r169; + not r8 into r170; + and r169 r170 into r171; + not r9 into r172; + and r171 r172 into r173; + not r10 into r174; + and r173 r174 into r175; + not r11 into r176; + and r175 r176 into r177; + not r12 into r178; + and r177 r178 into r179; + not r13 into r180; + and r179 r180 into r181; + not r14 into r182; + and r181 r182 into r183; + not r15 into r184; + and r183 r184 into r185; + not r16 into r186; + and r185 r186 into r187; + not r17 into r188; + and r187 r188 into r189; + not r18 into r190; + and r189 r190 into r191; + not r19 into r192; + and r191 r192 into r193; + not r20 into r194; + and r193 r194 into r195; + not r21 into r196; + and r195 r196 into r197; + not r22 into r198; + and r197 r198 into r199; + not r23 into r200; + and r199 r200 into r201; + not r24 into r202; + and r201 r202 into r203; + not r25 into r204; + and r203 r204 into r205; + not r26 into r206; + and r205 r206 into r207; + not r27 into r208; + and r207 r208 into r209; + not r28 into r210; + and r209 r210 into r211; + not r29 into r212; + and r211 r212 into r213; + and r213 r30 into r214; + ternary r214 13u8 r156 into r215; + not r1 into r216; + not r2 into r217; + and r216 r217 into r218; + not r3 into r219; + and r218 r219 into r220; + not r4 into r221; + and r220 r221 into r222; + not r5 into r223; + and r222 r223 into r224; + not r6 into r225; + and r224 r225 into r226; + not r7 into r227; + and r226 r227 into r228; + not r8 into r229; + and r228 r229 into r230; + not r9 into r231; + and r230 r231 into r232; + not r10 into r233; + and r232 r233 into r234; + not r11 into r235; + and r234 r235 into r236; + not r12 into r237; + and r236 r237 into r238; + not r13 into r239; + and r238 r239 into r240; + not r14 into r241; + and r240 r241 into r242; + not r15 into r243; + and r242 r243 into r244; + not r16 into r245; + and r244 r245 into r246; + not r17 into r247; + and r246 r247 into r248; + not r18 into r249; + and r248 r249 into r250; + not r19 into r251; + and r250 r251 into r252; + not r20 into r253; + and r252 r253 into r254; + not r21 into r255; + and r254 r255 into r256; + not r22 into r257; + and r256 r257 into r258; + not r23 into r259; + and r258 r259 into r260; + not r24 into r261; + and r260 r261 into r262; + not r25 into r263; + and r262 r263 into r264; + not r26 into r265; + and r264 r265 into r266; + not r27 into r267; + and r266 r267 into r268; + not r28 into r269; + and r268 r269 into r270; + and r270 r29 into r271; + ternary r271 29u8 r215 into r272; + not r1 into r273; + not r2 into r274; + and r273 r274 into r275; + not r3 into r276; + and r275 r276 into r277; + not r4 into r278; + and r277 r278 into r279; + not r5 into r280; + and r279 r280 into r281; + not r6 into r282; + and r281 r282 into r283; + not r7 into r284; + and r283 r284 into r285; + not r8 into r286; + and r285 r286 into r287; + not r9 into r288; + and r287 r288 into r289; + not r10 into r290; + and r289 r290 into r291; + not r11 into r292; + and r291 r292 into r293; + not r12 into r294; + and r293 r294 into r295; + not r13 into r296; + and r295 r296 into r297; + not r14 into r298; + and r297 r298 into r299; + not r15 into r300; + and r299 r300 into r301; + not r16 into r302; + and r301 r302 into r303; + not r17 into r304; + and r303 r304 into r305; + not r18 into r306; + and r305 r306 into r307; + not r19 into r308; + and r307 r308 into r309; + not r20 into r310; + and r309 r310 into r311; + not r21 into r312; + and r311 r312 into r313; + not r22 into r314; + and r313 r314 into r315; + not r23 into r316; + and r315 r316 into r317; + not r24 into r318; + and r317 r318 into r319; + not r25 into r320; + and r319 r320 into r321; + not r26 into r322; + and r321 r322 into r323; + not r27 into r324; + and r323 r324 into r325; + and r325 r28 into r326; + ternary r326 14u8 r272 into r327; + not r1 into r328; + not r2 into r329; + and r328 r329 into r330; + not r3 into r331; + and r330 r331 into r332; + not r4 into r333; + and r332 r333 into r334; + not r5 into r335; + and r334 r335 into r336; + not r6 into r337; + and r336 r337 into r338; + not r7 into r339; + and r338 r339 into r340; + not r8 into r341; + and r340 r341 into r342; + not r9 into r343; + and r342 r343 into r344; + not r10 into r345; + and r344 r345 into r346; + not r11 into r347; + and r346 r347 into r348; + not r12 into r349; + and r348 r349 into r350; + not r13 into r351; + and r350 r351 into r352; + not r14 into r353; + and r352 r353 into r354; + not r15 into r355; + and r354 r355 into r356; + not r16 into r357; + and r356 r357 into r358; + not r17 into r359; + and r358 r359 into r360; + not r18 into r361; + and r360 r361 into r362; + not r19 into r363; + and r362 r363 into r364; + not r20 into r365; + and r364 r365 into r366; + not r21 into r367; + and r366 r367 into r368; + not r22 into r369; + and r368 r369 into r370; + not r23 into r371; + and r370 r371 into r372; + not r24 into r373; + and r372 r373 into r374; + not r25 into r375; + and r374 r375 into r376; + not r26 into r377; + and r376 r377 into r378; + and r378 r27 into r379; + ternary r379 8u8 r327 into r380; + not r1 into r381; + not r2 into r382; + and r381 r382 into r383; + not r3 into r384; + and r383 r384 into r385; + not r4 into r386; + and r385 r386 into r387; + not r5 into r388; + and r387 r388 into r389; + not r6 into r390; + and r389 r390 into r391; + not r7 into r392; + and r391 r392 into r393; + not r8 into r394; + and r393 r394 into r395; + not r9 into r396; + and r395 r396 into r397; + not r10 into r398; + and r397 r398 into r399; + not r11 into r400; + and r399 r400 into r401; + not r12 into r402; + and r401 r402 into r403; + not r13 into r404; + and r403 r404 into r405; + not r14 into r406; + and r405 r406 into r407; + not r15 into r408; + and r407 r408 into r409; + not r16 into r410; + and r409 r410 into r411; + not r17 into r412; + and r411 r412 into r413; + not r18 into r414; + and r413 r414 into r415; + not r19 into r416; + and r415 r416 into r417; + not r20 into r418; + and r417 r418 into r419; + not r21 into r420; + and r419 r420 into r421; + not r22 into r422; + and r421 r422 into r423; + not r23 into r424; + and r423 r424 into r425; + not r24 into r426; + and r425 r426 into r427; + not r25 into r428; + and r427 r428 into r429; + and r429 r26 into r430; + ternary r430 17u8 r380 into r431; + not r1 into r432; + not r2 into r433; + and r432 r433 into r434; + not r3 into r435; + and r434 r435 into r436; + not r4 into r437; + and r436 r437 into r438; + not r5 into r439; + and r438 r439 into r440; + not r6 into r441; + and r440 r441 into r442; + not r7 into r443; + and r442 r443 into r444; + not r8 into r445; + and r444 r445 into r446; + not r9 into r447; + and r446 r447 into r448; + not r10 into r449; + and r448 r449 into r450; + not r11 into r451; + and r450 r451 into r452; + not r12 into r453; + and r452 r453 into r454; + not r13 into r455; + and r454 r455 into r456; + not r14 into r457; + and r456 r457 into r458; + not r15 into r459; + and r458 r459 into r460; + not r16 into r461; + and r460 r461 into r462; + not r17 into r463; + and r462 r463 into r464; + not r18 into r465; + and r464 r465 into r466; + not r19 into r467; + and r466 r467 into r468; + not r20 into r469; + and r468 r469 into r470; + not r21 into r471; + and r470 r471 into r472; + not r22 into r473; + and r472 r473 into r474; + not r23 into r475; + and r474 r475 into r476; + not r24 into r477; + and r476 r477 into r478; + and r478 r25 into r479; + ternary r479 30u8 r431 into r480; + not r1 into r481; + not r2 into r482; + and r481 r482 into r483; + not r3 into r484; + and r483 r484 into r485; + not r4 into r486; + and r485 r486 into r487; + not r5 into r488; + and r487 r488 into r489; + not r6 into r490; + and r489 r490 into r491; + not r7 into r492; + and r491 r492 into r493; + not r8 into r494; + and r493 r494 into r495; + not r9 into r496; + and r495 r496 into r497; + not r10 into r498; + and r497 r498 into r499; + not r11 into r500; + and r499 r500 into r501; + not r12 into r502; + and r501 r502 into r503; + not r13 into r504; + and r503 r504 into r505; + not r14 into r506; + and r505 r506 into r507; + not r15 into r508; + and r507 r508 into r509; + not r16 into r510; + and r509 r510 into r511; + not r17 into r512; + and r511 r512 into r513; + not r18 into r514; + and r513 r514 into r515; + not r19 into r516; + and r515 r516 into r517; + not r20 into r518; + and r517 r518 into r519; + not r21 into r520; + and r519 r520 into r521; + not r22 into r522; + and r521 r522 into r523; + not r23 into r524; + and r523 r524 into r525; + and r525 r24 into r526; + ternary r526 11u8 r480 into r527; + not r1 into r528; + not r2 into r529; + and r528 r529 into r530; + not r3 into r531; + and r530 r531 into r532; + not r4 into r533; + and r532 r533 into r534; + not r5 into r535; + and r534 r535 into r536; + not r6 into r537; + and r536 r537 into r538; + not r7 into r539; + and r538 r539 into r540; + not r8 into r541; + and r540 r541 into r542; + not r9 into r543; + and r542 r543 into r544; + not r10 into r545; + and r544 r545 into r546; + not r11 into r547; + and r546 r547 into r548; + not r12 into r549; + and r548 r549 into r550; + not r13 into r551; + and r550 r551 into r552; + not r14 into r553; + and r552 r553 into r554; + not r15 into r555; + and r554 r555 into r556; + not r16 into r557; + and r556 r557 into r558; + not r17 into r559; + and r558 r559 into r560; + not r18 into r561; + and r560 r561 into r562; + not r19 into r563; + and r562 r563 into r564; + not r20 into r565; + and r564 r565 into r566; + not r21 into r567; + and r566 r567 into r568; + not r22 into r569; + and r568 r569 into r570; + and r570 r23 into r571; + ternary r571 15u8 r527 into r572; + not r1 into r573; + not r2 into r574; + and r573 r574 into r575; + not r3 into r576; + and r575 r576 into r577; + not r4 into r578; + and r577 r578 into r579; + not r5 into r580; + and r579 r580 into r581; + not r6 into r582; + and r581 r582 into r583; + not r7 into r584; + and r583 r584 into r585; + not r8 into r586; + and r585 r586 into r587; + not r9 into r588; + and r587 r588 into r589; + not r10 into r590; + and r589 r590 into r591; + not r11 into r592; + and r591 r592 into r593; + not r12 into r594; + and r593 r594 into r595; + not r13 into r596; + and r595 r596 into r597; + not r14 into r598; + and r597 r598 into r599; + not r15 into r600; + and r599 r600 into r601; + not r16 into r602; + and r601 r602 into r603; + not r17 into r604; + and r603 r604 into r605; + not r18 into r606; + and r605 r606 into r607; + not r19 into r608; + and r607 r608 into r609; + not r20 into r610; + and r609 r610 into r611; + not r21 into r612; + and r611 r612 into r613; + and r613 r22 into r614; + ternary r614 9u8 r572 into r615; + not r1 into r616; + not r2 into r617; + and r616 r617 into r618; + not r3 into r619; + and r618 r619 into r620; + not r4 into r621; + and r620 r621 into r622; + not r5 into r623; + and r622 r623 into r624; + not r6 into r625; + and r624 r625 into r626; + not r7 into r627; + and r626 r627 into r628; + not r8 into r629; + and r628 r629 into r630; + not r9 into r631; + and r630 r631 into r632; + not r10 into r633; + and r632 r633 into r634; + not r11 into r635; + and r634 r635 into r636; + not r12 into r637; + and r636 r637 into r638; + not r13 into r639; + and r638 r639 into r640; + not r14 into r641; + and r640 r641 into r642; + not r15 into r643; + and r642 r643 into r644; + not r16 into r645; + and r644 r645 into r646; + not r17 into r647; + and r646 r647 into r648; + not r18 into r649; + and r648 r649 into r650; + not r19 into r651; + and r650 r651 into r652; + not r20 into r653; + and r652 r653 into r654; + and r654 r21 into r655; + ternary r655 21u8 r615 into r656; + not r1 into r657; + not r2 into r658; + and r657 r658 into r659; + not r3 into r660; + and r659 r660 into r661; + not r4 into r662; + and r661 r662 into r663; + not r5 into r664; + and r663 r664 into r665; + not r6 into r666; + and r665 r666 into r667; + not r7 into r668; + and r667 r668 into r669; + not r8 into r670; + and r669 r670 into r671; + not r9 into r672; + and r671 r672 into r673; + not r10 into r674; + and r673 r674 into r675; + not r11 into r676; + and r675 r676 into r677; + not r12 into r678; + and r677 r678 into r679; + not r13 into r680; + and r679 r680 into r681; + not r14 into r682; + and r681 r682 into r683; + not r15 into r684; + and r683 r684 into r685; + not r16 into r686; + and r685 r686 into r687; + not r17 into r688; + and r687 r688 into r689; + not r18 into r690; + and r689 r690 into r691; + not r19 into r692; + and r691 r692 into r693; + and r693 r20 into r694; + ternary r694 5u8 r656 into r695; + not r1 into r696; + not r2 into r697; + and r696 r697 into r698; + not r3 into r699; + and r698 r699 into r700; + not r4 into r701; + and r700 r701 into r702; + not r5 into r703; + and r702 r703 into r704; + not r6 into r705; + and r704 r705 into r706; + not r7 into r707; + and r706 r707 into r708; + not r8 into r709; + and r708 r709 into r710; + not r9 into r711; + and r710 r711 into r712; + not r10 into r713; + and r712 r713 into r714; + not r11 into r715; + and r714 r715 into r716; + not r12 into r717; + and r716 r717 into r718; + not r13 into r719; + and r718 r719 into r720; + not r14 into r721; + and r720 r721 into r722; + not r15 into r723; + and r722 r723 into r724; + not r16 into r725; + and r724 r725 into r726; + not r17 into r727; + and r726 r727 into r728; + not r18 into r729; + and r728 r729 into r730; + and r730 r19 into r731; + ternary r731 18u8 r695 into r732; + not r1 into r733; + not r2 into r734; + and r733 r734 into r735; + not r3 into r736; + and r735 r736 into r737; + not r4 into r738; + and r737 r738 into r739; + not r5 into r740; + and r739 r740 into r741; + not r6 into r742; + and r741 r742 into r743; + not r7 into r744; + and r743 r744 into r745; + not r8 into r746; + and r745 r746 into r747; + not r9 into r748; + and r747 r748 into r749; + not r10 into r750; + and r749 r750 into r751; + not r11 into r752; + and r751 r752 into r753; + not r12 into r754; + and r753 r754 into r755; + not r13 into r756; + and r755 r756 into r757; + not r14 into r758; + and r757 r758 into r759; + not r15 into r760; + and r759 r760 into r761; + not r16 into r762; + and r761 r762 into r763; + not r17 into r764; + and r763 r764 into r765; + and r765 r18 into r766; + ternary r766 23u8 r732 into r767; + not r1 into r768; + not r2 into r769; + and r768 r769 into r770; + not r3 into r771; + and r770 r771 into r772; + not r4 into r773; + and r772 r773 into r774; + not r5 into r775; + and r774 r775 into r776; + not r6 into r777; + and r776 r777 into r778; + not r7 into r779; + and r778 r779 into r780; + not r8 into r781; + and r780 r781 into r782; + not r9 into r783; + and r782 r783 into r784; + not r10 into r785; + and r784 r785 into r786; + not r11 into r787; + and r786 r787 into r788; + not r12 into r789; + and r788 r789 into r790; + not r13 into r791; + and r790 r791 into r792; + not r14 into r793; + and r792 r793 into r794; + not r15 into r795; + and r794 r795 into r796; + not r16 into r797; + and r796 r797 into r798; + and r798 r17 into r799; + ternary r799 31u8 r767 into r800; + not r1 into r801; + not r2 into r802; + and r801 r802 into r803; + not r3 into r804; + and r803 r804 into r805; + not r4 into r806; + and r805 r806 into r807; + not r5 into r808; + and r807 r808 into r809; + not r6 into r810; + and r809 r810 into r811; + not r7 into r812; + and r811 r812 into r813; + not r8 into r814; + and r813 r814 into r815; + not r9 into r816; + and r815 r816 into r817; + not r10 into r818; + and r817 r818 into r819; + not r11 into r820; + and r819 r820 into r821; + not r12 into r822; + and r821 r822 into r823; + not r13 into r824; + and r823 r824 into r825; + not r14 into r826; + and r825 r826 into r827; + not r15 into r828; + and r827 r828 into r829; + and r829 r16 into r830; + ternary r830 26u8 r800 into r831; + not r1 into r832; + not r2 into r833; + and r832 r833 into r834; + not r3 into r835; + and r834 r835 into r836; + not r4 into r837; + and r836 r837 into r838; + not r5 into r839; + and r838 r839 into r840; + not r6 into r841; + and r840 r841 into r842; + not r7 into r843; + and r842 r843 into r844; + not r8 into r845; + and r844 r845 into r846; + not r9 into r847; + and r846 r847 into r848; + not r10 into r849; + and r848 r849 into r850; + not r11 into r851; + and r850 r851 into r852; + not r12 into r853; + and r852 r853 into r854; + not r13 into r855; + and r854 r855 into r856; + not r14 into r857; + and r856 r857 into r858; + and r858 r15 into r859; + ternary r859 12u8 r831 into r860; + not r1 into r861; + not r2 into r862; + and r861 r862 into r863; + not r3 into r864; + and r863 r864 into r865; + not r4 into r866; + and r865 r866 into r867; + not r5 into r868; + and r867 r868 into r869; + not r6 into r870; + and r869 r870 into r871; + not r7 into r872; + and r871 r872 into r873; + not r8 into r874; + and r873 r874 into r875; + not r9 into r876; + and r875 r876 into r877; + not r10 into r878; + and r877 r878 into r879; + not r11 into r880; + and r879 r880 into r881; + not r12 into r882; + and r881 r882 into r883; + not r13 into r884; + and r883 r884 into r885; + and r885 r14 into r886; + ternary r886 7u8 r860 into r887; + not r1 into r888; + not r2 into r889; + and r888 r889 into r890; + not r3 into r891; + and r890 r891 into r892; + not r4 into r893; + and r892 r893 into r894; + not r5 into r895; + and r894 r895 into r896; + not r6 into r897; + and r896 r897 into r898; + not r7 into r899; + and r898 r899 into r900; + not r8 into r901; + and r900 r901 into r902; + not r9 into r903; + and r902 r903 into r904; + not r10 into r905; + and r904 r905 into r906; + not r11 into r907; + and r906 r907 into r908; + not r12 into r909; + and r908 r909 into r910; + and r910 r13 into r911; + ternary r911 16u8 r887 into r912; + not r1 into r913; + not r2 into r914; + and r913 r914 into r915; + not r3 into r916; + and r915 r916 into r917; + not r4 into r918; + and r917 r918 into r919; + not r5 into r920; + and r919 r920 into r921; + not r6 into r922; + and r921 r922 into r923; + not r7 into r924; + and r923 r924 into r925; + not r8 into r926; + and r925 r926 into r927; + not r9 into r928; + and r927 r928 into r929; + not r10 into r930; + and r929 r930 into r931; + not r11 into r932; + and r931 r932 into r933; + and r933 r12 into r934; + ternary r934 10u8 r912 into r935; + not r1 into r936; + not r2 into r937; + and r936 r937 into r938; + not r3 into r939; + and r938 r939 into r940; + not r4 into r941; + and r940 r941 into r942; + not r5 into r943; + and r942 r943 into r944; + not r6 into r945; + and r944 r945 into r946; + not r7 into r947; + and r946 r947 into r948; + not r8 into r949; + and r948 r949 into r950; + not r9 into r951; + and r950 r951 into r952; + not r10 into r953; + and r952 r953 into r954; + and r954 r11 into r955; + ternary r955 20u8 r935 into r956; + not r1 into r957; + not r2 into r958; + and r957 r958 into r959; + not r3 into r960; + and r959 r960 into r961; + not r4 into r962; + and r961 r962 into r963; + not r5 into r964; + and r963 r964 into r965; + not r6 into r966; + and r965 r966 into r967; + not r7 into r968; + and r967 r968 into r969; + not r8 into r970; + and r969 r970 into r971; + not r9 into r972; + and r971 r972 into r973; + and r973 r10 into r974; + ternary r974 4u8 r956 into r975; + not r1 into r976; + not r2 into r977; + and r976 r977 into r978; + not r3 into r979; + and r978 r979 into r980; + not r4 into r981; + and r980 r981 into r982; + not r5 into r983; + and r982 r983 into r984; + not r6 into r985; + and r984 r985 into r986; + not r7 into r987; + and r986 r987 into r988; + not r8 into r989; + and r988 r989 into r990; + and r990 r9 into r991; + ternary r991 22u8 r975 into r992; + not r1 into r993; + not r2 into r994; + and r993 r994 into r995; + not r3 into r996; + and r995 r996 into r997; + not r4 into r998; + and r997 r998 into r999; + not r5 into r1000; + and r999 r1000 into r1001; + not r6 into r1002; + and r1001 r1002 into r1003; + not r7 into r1004; + and r1003 r1004 into r1005; + and r1005 r8 into r1006; + ternary r1006 25u8 r992 into r1007; + not r1 into r1008; + not r2 into r1009; + and r1008 r1009 into r1010; + not r3 into r1011; + and r1010 r1011 into r1012; + not r4 into r1013; + and r1012 r1013 into r1014; + not r5 into r1015; + and r1014 r1015 into r1016; + not r6 into r1017; + and r1016 r1017 into r1018; + and r1018 r7 into r1019; + ternary r1019 6u8 r1007 into r1020; + not r1 into r1021; + not r2 into r1022; + and r1021 r1022 into r1023; + not r3 into r1024; + and r1023 r1024 into r1025; + not r4 into r1026; + and r1025 r1026 into r1027; + not r5 into r1028; + and r1027 r1028 into r1029; + and r1029 r6 into r1030; + ternary r1030 19u8 r1020 into r1031; + not r1 into r1032; + not r2 into r1033; + and r1032 r1033 into r1034; + not r3 into r1035; + and r1034 r1035 into r1036; + not r4 into r1037; + and r1036 r1037 into r1038; + and r1038 r5 into r1039; + ternary r1039 3u8 r1031 into r1040; + not r1 into r1041; + not r2 into r1042; + and r1041 r1042 into r1043; + not r3 into r1044; + and r1043 r1044 into r1045; + and r1045 r4 into r1046; + ternary r1046 24u8 r1040 into r1047; + not r1 into r1048; + not r2 into r1049; + and r1048 r1049 into r1050; + and r1050 r3 into r1051; + ternary r1051 2u8 r1047 into r1052; + not r1 into r1053; + and r1053 r2 into r1054; + ternary r1054 1u8 r1052 into r1055; + ternary r1 0u8 r1055 into r1056; + output r1056 as u8; + + +function main: + input r0 as u32.public; + is.eq r0 0u32 into r1; + sub.w 0u32 r0 into r2; + and r0 r2 into r3; + mul.w r3 81224991u32 into r4; + shr r4 27u8 into r5; + call deBruijnTableLookup r5 into r6; + ternary r1 32u8 r6 into r7; + output r7 as u8.private; diff --git a/examples/hackers-delight/ntzdebruijn/build/program.json b/examples/hackers-delight/ntzdebruijn/build/program.json new file mode 100644 index 0000000000..796eeafef9 --- /dev/null +++ b/examples/hackers-delight/ntzdebruijn/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "ntzdebruijn.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/hackers-delight/ntzdebruijn/program.json b/examples/hackers-delight/ntzdebruijn/program.json index a504a9e17c..796eeafef9 100644 --- a/examples/hackers-delight/ntzdebruijn/program.json +++ b/examples/hackers-delight/ntzdebruijn/program.json @@ -2,9 +2,5 @@ "program": "ntzdebruijn.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpBAYqv1Em7zjLNyQkGxfRQUtT4JNScLAznYfEDJeNJ8HJ", - "address": "aleo1a6gctkkkwu9fjlzvcfp6970rz2tskp8638x99stjqm3cs4889ufqtc3xg5" - }, "license": "MIT" } diff --git a/examples/hackers-delight/ntzgaudet/.env b/examples/hackers-delight/ntzgaudet/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/hackers-delight/ntzgaudet/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/hackers-delight/ntzgaudet/.gitignore b/examples/hackers-delight/ntzgaudet/.gitignore index b28696155d..750b56f237 100644 --- a/examples/hackers-delight/ntzgaudet/.gitignore +++ b/examples/hackers-delight/ntzgaudet/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/hackers-delight/ntzgaudet/build/main.aleo b/examples/hackers-delight/ntzgaudet/build/main.aleo new file mode 100644 index 0000000000..5d48412823 --- /dev/null +++ b/examples/hackers-delight/ntzgaudet/build/main.aleo @@ -0,0 +1,31 @@ +program ntzgaudet.aleo; + + + +function main: + input r0 as u32.public; + sub.w 0u32 r0 into r1; + and r0 r1 into r2; + is.neq r2 0u32 into r3; + ternary r3 0u8 1u8 into r4; + and r2 65535u32 into r5; + is.neq r5 0u32 into r6; + ternary r6 0u8 16u8 into r7; + and r2 16711935u32 into r8; + is.neq r8 0u32 into r9; + ternary r9 0u8 8u8 into r10; + and r2 252645135u32 into r11; + is.neq r11 0u32 into r12; + ternary r12 0u8 4u8 into r13; + and r2 858993459u32 into r14; + is.neq r14 0u32 into r15; + ternary r15 0u8 2u8 into r16; + and r2 1431655765u32 into r17; + is.neq r17 0u32 into r18; + ternary r18 0u8 1u8 into r19; + add r4 r7 into r20; + add r20 r10 into r21; + add r21 r13 into r22; + add r22 r16 into r23; + add r23 r19 into r24; + output r24 as u8.private; diff --git a/examples/hackers-delight/ntzgaudet/build/program.json b/examples/hackers-delight/ntzgaudet/build/program.json new file mode 100644 index 0000000000..505dd22947 --- /dev/null +++ b/examples/hackers-delight/ntzgaudet/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "ntzgaudet.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/hackers-delight/ntzgaudet/program.json b/examples/hackers-delight/ntzgaudet/program.json index e0ed21736e..505dd22947 100644 --- a/examples/hackers-delight/ntzgaudet/program.json +++ b/examples/hackers-delight/ntzgaudet/program.json @@ -2,9 +2,5 @@ "program": "ntzgaudet.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpE119vf79xTdab9GcybudCNwf86oiwZjSiLe1BWYdFNJq", - "address": "aleo1cukvzl26vv9ulwc26ugud3pgnxfhzzzhqaqeqdphhk3vnntvlqyq2uzg53" - }, "license": "MIT" } diff --git a/examples/hackers-delight/ntzloops/.env b/examples/hackers-delight/ntzloops/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/hackers-delight/ntzloops/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/hackers-delight/ntzloops/.gitignore b/examples/hackers-delight/ntzloops/.gitignore index b28696155d..750b56f237 100644 --- a/examples/hackers-delight/ntzloops/.gitignore +++ b/examples/hackers-delight/ntzloops/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/hackers-delight/ntzloops/build/main.aleo b/examples/hackers-delight/ntzloops/build/main.aleo new file mode 100644 index 0000000000..70a377e564 --- /dev/null +++ b/examples/hackers-delight/ntzloops/build/main.aleo @@ -0,0 +1,170 @@ +program ntzloops.aleo; + + + +function main: + input r0 as u32.public; + not r0 into r1; + sub.w r0 1u32 into r2; + and r1 r2 into r3; + is.neq r3 0u32 into r4; + add 0u8 1u8 into r5; + shr r3 1u8 into r6; + ternary r4 r5 0u8 into r7; + ternary r4 r6 r3 into r8; + is.neq r8 0u32 into r9; + add r7 1u8 into r10; + shr r8 1u8 into r11; + ternary r9 r10 r7 into r12; + ternary r9 r11 r8 into r13; + is.neq r13 0u32 into r14; + add r12 1u8 into r15; + shr r13 1u8 into r16; + ternary r14 r15 r12 into r17; + ternary r14 r16 r13 into r18; + is.neq r18 0u32 into r19; + add r17 1u8 into r20; + shr r18 1u8 into r21; + ternary r19 r20 r17 into r22; + ternary r19 r21 r18 into r23; + is.neq r23 0u32 into r24; + add r22 1u8 into r25; + shr r23 1u8 into r26; + ternary r24 r25 r22 into r27; + ternary r24 r26 r23 into r28; + is.neq r28 0u32 into r29; + add r27 1u8 into r30; + shr r28 1u8 into r31; + ternary r29 r30 r27 into r32; + ternary r29 r31 r28 into r33; + is.neq r33 0u32 into r34; + add r32 1u8 into r35; + shr r33 1u8 into r36; + ternary r34 r35 r32 into r37; + ternary r34 r36 r33 into r38; + is.neq r38 0u32 into r39; + add r37 1u8 into r40; + shr r38 1u8 into r41; + ternary r39 r40 r37 into r42; + ternary r39 r41 r38 into r43; + is.neq r43 0u32 into r44; + add r42 1u8 into r45; + shr r43 1u8 into r46; + ternary r44 r45 r42 into r47; + ternary r44 r46 r43 into r48; + is.neq r48 0u32 into r49; + add r47 1u8 into r50; + shr r48 1u8 into r51; + ternary r49 r50 r47 into r52; + ternary r49 r51 r48 into r53; + is.neq r53 0u32 into r54; + add r52 1u8 into r55; + shr r53 1u8 into r56; + ternary r54 r55 r52 into r57; + ternary r54 r56 r53 into r58; + is.neq r58 0u32 into r59; + add r57 1u8 into r60; + shr r58 1u8 into r61; + ternary r59 r60 r57 into r62; + ternary r59 r61 r58 into r63; + is.neq r63 0u32 into r64; + add r62 1u8 into r65; + shr r63 1u8 into r66; + ternary r64 r65 r62 into r67; + ternary r64 r66 r63 into r68; + is.neq r68 0u32 into r69; + add r67 1u8 into r70; + shr r68 1u8 into r71; + ternary r69 r70 r67 into r72; + ternary r69 r71 r68 into r73; + is.neq r73 0u32 into r74; + add r72 1u8 into r75; + shr r73 1u8 into r76; + ternary r74 r75 r72 into r77; + ternary r74 r76 r73 into r78; + is.neq r78 0u32 into r79; + add r77 1u8 into r80; + shr r78 1u8 into r81; + ternary r79 r80 r77 into r82; + ternary r79 r81 r78 into r83; + is.neq r83 0u32 into r84; + add r82 1u8 into r85; + shr r83 1u8 into r86; + ternary r84 r85 r82 into r87; + ternary r84 r86 r83 into r88; + is.neq r88 0u32 into r89; + add r87 1u8 into r90; + shr r88 1u8 into r91; + ternary r89 r90 r87 into r92; + ternary r89 r91 r88 into r93; + is.neq r93 0u32 into r94; + add r92 1u8 into r95; + shr r93 1u8 into r96; + ternary r94 r95 r92 into r97; + ternary r94 r96 r93 into r98; + is.neq r98 0u32 into r99; + add r97 1u8 into r100; + shr r98 1u8 into r101; + ternary r99 r100 r97 into r102; + ternary r99 r101 r98 into r103; + is.neq r103 0u32 into r104; + add r102 1u8 into r105; + shr r103 1u8 into r106; + ternary r104 r105 r102 into r107; + ternary r104 r106 r103 into r108; + is.neq r108 0u32 into r109; + add r107 1u8 into r110; + shr r108 1u8 into r111; + ternary r109 r110 r107 into r112; + ternary r109 r111 r108 into r113; + is.neq r113 0u32 into r114; + add r112 1u8 into r115; + shr r113 1u8 into r116; + ternary r114 r115 r112 into r117; + ternary r114 r116 r113 into r118; + is.neq r118 0u32 into r119; + add r117 1u8 into r120; + shr r118 1u8 into r121; + ternary r119 r120 r117 into r122; + ternary r119 r121 r118 into r123; + is.neq r123 0u32 into r124; + add r122 1u8 into r125; + shr r123 1u8 into r126; + ternary r124 r125 r122 into r127; + ternary r124 r126 r123 into r128; + is.neq r128 0u32 into r129; + add r127 1u8 into r130; + shr r128 1u8 into r131; + ternary r129 r130 r127 into r132; + ternary r129 r131 r128 into r133; + is.neq r133 0u32 into r134; + add r132 1u8 into r135; + shr r133 1u8 into r136; + ternary r134 r135 r132 into r137; + ternary r134 r136 r133 into r138; + is.neq r138 0u32 into r139; + add r137 1u8 into r140; + shr r138 1u8 into r141; + ternary r139 r140 r137 into r142; + ternary r139 r141 r138 into r143; + is.neq r143 0u32 into r144; + add r142 1u8 into r145; + shr r143 1u8 into r146; + ternary r144 r145 r142 into r147; + ternary r144 r146 r143 into r148; + is.neq r148 0u32 into r149; + add r147 1u8 into r150; + shr r148 1u8 into r151; + ternary r149 r150 r147 into r152; + ternary r149 r151 r148 into r153; + is.neq r153 0u32 into r154; + add r152 1u8 into r155; + shr r153 1u8 into r156; + ternary r154 r155 r152 into r157; + ternary r154 r156 r153 into r158; + is.neq r158 0u32 into r159; + add r157 1u8 into r160; + shr r158 1u8 into r161; + ternary r159 r160 r157 into r162; + ternary r159 r161 r158 into r163; + output r162 as u8.private; diff --git a/examples/hackers-delight/ntzloops/build/program.json b/examples/hackers-delight/ntzloops/build/program.json new file mode 100644 index 0000000000..056efb4693 --- /dev/null +++ b/examples/hackers-delight/ntzloops/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "ntzloops.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/hackers-delight/ntzloops/program.json b/examples/hackers-delight/ntzloops/program.json index 3c5d40d79a..056efb4693 100644 --- a/examples/hackers-delight/ntzloops/program.json +++ b/examples/hackers-delight/ntzloops/program.json @@ -2,9 +2,5 @@ "program": "ntzloops.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkp3T8ynGSS35DrhWE4nBuBTkuUtd3wkpiyiyJ7452MvYmB", - "address": "aleo14lva4hqc4tpw4elhxndthkwnjuak22kn9gukqmzy6x9xdrjcu5yqvqwak5" - }, "license": "MIT" } diff --git a/examples/hackers-delight/ntzmasks/.env b/examples/hackers-delight/ntzmasks/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/hackers-delight/ntzmasks/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/hackers-delight/ntzmasks/.gitignore b/examples/hackers-delight/ntzmasks/.gitignore index b28696155d..750b56f237 100644 --- a/examples/hackers-delight/ntzmasks/.gitignore +++ b/examples/hackers-delight/ntzmasks/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/hackers-delight/ntzmasks/build/main.aleo b/examples/hackers-delight/ntzmasks/build/main.aleo new file mode 100644 index 0000000000..26e4c6b07d --- /dev/null +++ b/examples/hackers-delight/ntzmasks/build/main.aleo @@ -0,0 +1,37 @@ +program ntzmasks.aleo; + + + +function main: + input r0 as u32.public; + is.eq r0 0u32 into r1; + and r0 65535u32 into r2; + is.eq r2 0u32 into r3; + add 1u8 16u8 into r4; + shr r0 16u8 into r5; + ternary r3 r4 1u8 into r6; + ternary r3 r5 r0 into r7; + and r7 255u32 into r8; + is.eq r8 0u32 into r9; + add r6 8u8 into r10; + shr r7 8u8 into r11; + ternary r9 r10 r6 into r12; + ternary r9 r11 r7 into r13; + and r13 15u32 into r14; + is.eq r14 0u32 into r15; + add r12 4u8 into r16; + shr r13 4u8 into r17; + ternary r15 r16 r12 into r18; + ternary r15 r17 r13 into r19; + and r19 3u32 into r20; + is.eq r20 0u32 into r21; + add r18 2u8 into r22; + shr r19 2u8 into r23; + ternary r21 r22 r18 into r24; + ternary r21 r23 r19 into r25; + and r25 1u32 into r26; + is.eq r26 1u32 into r27; + sub r24 1u8 into r28; + ternary r27 r28 r24 into r29; + ternary r1 32u8 r29 into r30; + output r30 as u8.private; diff --git a/examples/hackers-delight/ntzmasks/build/program.json b/examples/hackers-delight/ntzmasks/build/program.json new file mode 100644 index 0000000000..2a9855a387 --- /dev/null +++ b/examples/hackers-delight/ntzmasks/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "ntzmasks.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/hackers-delight/ntzmasks/program.json b/examples/hackers-delight/ntzmasks/program.json index 2465eb9796..2a9855a387 100644 --- a/examples/hackers-delight/ntzmasks/program.json +++ b/examples/hackers-delight/ntzmasks/program.json @@ -2,9 +2,5 @@ "program": "ntzmasks.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpJXjqFZijBq4tUsdtrqi5tQeUSfoXbw6JddCYE4mKnCsz", - "address": "aleo1qx4g8w2ju9mpr4hpvavh0gah556q7sxw6xltf98w9e9gjq5f6yysrya2xx" - }, "license": "MIT" } diff --git a/examples/hackers-delight/ntzreisers/.env b/examples/hackers-delight/ntzreisers/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/hackers-delight/ntzreisers/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/hackers-delight/ntzreisers/.gitignore b/examples/hackers-delight/ntzreisers/.gitignore index b28696155d..750b56f237 100644 --- a/examples/hackers-delight/ntzreisers/.gitignore +++ b/examples/hackers-delight/ntzreisers/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/hackers-delight/ntzreisers/build/main.aleo b/examples/hackers-delight/ntzreisers/build/main.aleo new file mode 100644 index 0000000000..e49ab7597d --- /dev/null +++ b/examples/hackers-delight/ntzreisers/build/main.aleo @@ -0,0 +1,1422 @@ +program ntzreisers.aleo; + + + +closure reisersTableLookup: + input r0 as u32; + is.eq r0 0u32 into r1; + is.eq r0 1u32 into r2; + is.eq r0 2u32 into r3; + is.eq r0 3u32 into r4; + is.eq r0 4u32 into r5; + is.eq r0 5u32 into r6; + is.eq r0 6u32 into r7; + is.eq r0 7u32 into r8; + is.eq r0 8u32 into r9; + is.eq r0 9u32 into r10; + is.eq r0 10u32 into r11; + is.eq r0 11u32 into r12; + is.eq r0 12u32 into r13; + is.eq r0 13u32 into r14; + is.eq r0 14u32 into r15; + is.eq r0 15u32 into r16; + is.eq r0 16u32 into r17; + is.eq r0 17u32 into r18; + is.eq r0 18u32 into r19; + is.eq r0 19u32 into r20; + is.eq r0 20u32 into r21; + is.eq r0 21u32 into r22; + is.eq r0 22u32 into r23; + is.eq r0 23u32 into r24; + is.eq r0 24u32 into r25; + is.eq r0 25u32 into r26; + is.eq r0 26u32 into r27; + is.eq r0 27u32 into r28; + is.eq r0 28u32 into r29; + is.eq r0 29u32 into r30; + is.eq r0 30u32 into r31; + is.eq r0 31u32 into r32; + is.eq r0 32u32 into r33; + is.eq r0 33u32 into r34; + is.eq r0 34u32 into r35; + is.eq r0 35u32 into r36; + is.eq r0 36u32 into r37; + not r1 into r38; + not r2 into r39; + and r38 r39 into r40; + not r3 into r41; + and r40 r41 into r42; + not r4 into r43; + and r42 r43 into r44; + not r5 into r45; + and r44 r45 into r46; + not r6 into r47; + and r46 r47 into r48; + not r7 into r49; + and r48 r49 into r50; + not r8 into r51; + and r50 r51 into r52; + not r9 into r53; + and r52 r53 into r54; + not r10 into r55; + and r54 r55 into r56; + not r11 into r57; + and r56 r57 into r58; + not r12 into r59; + and r58 r59 into r60; + not r13 into r61; + and r60 r61 into r62; + not r14 into r63; + and r62 r63 into r64; + not r15 into r65; + and r64 r65 into r66; + not r16 into r67; + and r66 r67 into r68; + not r17 into r69; + and r68 r69 into r70; + not r18 into r71; + and r70 r71 into r72; + not r19 into r73; + and r72 r73 into r74; + not r20 into r75; + and r74 r75 into r76; + not r21 into r77; + and r76 r77 into r78; + not r22 into r79; + and r78 r79 into r80; + not r23 into r81; + and r80 r81 into r82; + not r24 into r83; + and r82 r83 into r84; + not r25 into r85; + and r84 r85 into r86; + not r26 into r87; + and r86 r87 into r88; + not r27 into r89; + and r88 r89 into r90; + not r28 into r91; + and r90 r91 into r92; + not r29 into r93; + and r92 r93 into r94; + not r30 into r95; + and r94 r95 into r96; + not r31 into r97; + and r96 r97 into r98; + not r32 into r99; + and r98 r99 into r100; + not r33 into r101; + and r100 r101 into r102; + not r34 into r103; + and r102 r103 into r104; + not r35 into r105; + and r104 r105 into r106; + not r36 into r107; + and r106 r107 into r108; + and r108 r37 into r109; + ternary r109 18u8 0u8 into r110; + not r1 into r111; + not r2 into r112; + and r111 r112 into r113; + not r3 into r114; + and r113 r114 into r115; + not r4 into r116; + and r115 r116 into r117; + not r5 into r118; + and r117 r118 into r119; + not r6 into r120; + and r119 r120 into r121; + not r7 into r122; + and r121 r122 into r123; + not r8 into r124; + and r123 r124 into r125; + not r9 into r126; + and r125 r126 into r127; + not r10 into r128; + and r127 r128 into r129; + not r11 into r130; + and r129 r130 into r131; + not r12 into r132; + and r131 r132 into r133; + not r13 into r134; + and r133 r134 into r135; + not r14 into r136; + and r135 r136 into r137; + not r15 into r138; + and r137 r138 into r139; + not r16 into r140; + and r139 r140 into r141; + not r17 into r142; + and r141 r142 into r143; + not r18 into r144; + and r143 r144 into r145; + not r19 into r146; + and r145 r146 into r147; + not r20 into r148; + and r147 r148 into r149; + not r21 into r150; + and r149 r150 into r151; + not r22 into r152; + and r151 r152 into r153; + not r23 into r154; + and r153 r154 into r155; + not r24 into r156; + and r155 r156 into r157; + not r25 into r158; + and r157 r158 into r159; + not r26 into r160; + and r159 r160 into r161; + not r27 into r162; + and r161 r162 into r163; + not r28 into r164; + and r163 r164 into r165; + not r29 into r166; + and r165 r166 into r167; + not r30 into r168; + and r167 r168 into r169; + not r31 into r170; + and r169 r170 into r171; + not r32 into r172; + and r171 r172 into r173; + not r33 into r174; + and r173 r174 into r175; + not r34 into r176; + and r175 r176 into r177; + not r35 into r178; + and r177 r178 into r179; + and r179 r36 into r180; + ternary r180 19u8 r110 into r181; + not r1 into r182; + not r2 into r183; + and r182 r183 into r184; + not r3 into r185; + and r184 r185 into r186; + not r4 into r187; + and r186 r187 into r188; + not r5 into r189; + and r188 r189 into r190; + not r6 into r191; + and r190 r191 into r192; + not r7 into r193; + and r192 r193 into r194; + not r8 into r195; + and r194 r195 into r196; + not r9 into r197; + and r196 r197 into r198; + not r10 into r199; + and r198 r199 into r200; + not r11 into r201; + and r200 r201 into r202; + not r12 into r203; + and r202 r203 into r204; + not r13 into r205; + and r204 r205 into r206; + not r14 into r207; + and r206 r207 into r208; + not r15 into r209; + and r208 r209 into r210; + not r16 into r211; + and r210 r211 into r212; + not r17 into r213; + and r212 r213 into r214; + not r18 into r215; + and r214 r215 into r216; + not r19 into r217; + and r216 r217 into r218; + not r20 into r219; + and r218 r219 into r220; + not r21 into r221; + and r220 r221 into r222; + not r22 into r223; + and r222 r223 into r224; + not r23 into r225; + and r224 r225 into r226; + not r24 into r227; + and r226 r227 into r228; + not r25 into r229; + and r228 r229 into r230; + not r26 into r231; + and r230 r231 into r232; + not r27 into r233; + and r232 r233 into r234; + not r28 into r235; + and r234 r235 into r236; + not r29 into r237; + and r236 r237 into r238; + not r30 into r239; + and r238 r239 into r240; + not r31 into r241; + and r240 r241 into r242; + not r32 into r243; + and r242 r243 into r244; + not r33 into r245; + and r244 r245 into r246; + not r34 into r247; + and r246 r247 into r248; + and r248 r35 into r249; + ternary r249 8u8 r181 into r250; + not r1 into r251; + not r2 into r252; + and r251 r252 into r253; + not r3 into r254; + and r253 r254 into r255; + not r4 into r256; + and r255 r256 into r257; + not r5 into r258; + and r257 r258 into r259; + not r6 into r260; + and r259 r260 into r261; + not r7 into r262; + and r261 r262 into r263; + not r8 into r264; + and r263 r264 into r265; + not r9 into r266; + and r265 r266 into r267; + not r10 into r268; + and r267 r268 into r269; + not r11 into r270; + and r269 r270 into r271; + not r12 into r272; + and r271 r272 into r273; + not r13 into r274; + and r273 r274 into r275; + not r14 into r276; + and r275 r276 into r277; + not r15 into r278; + and r277 r278 into r279; + not r16 into r280; + and r279 r280 into r281; + not r17 into r282; + and r281 r282 into r283; + not r18 into r284; + and r283 r284 into r285; + not r19 into r286; + and r285 r286 into r287; + not r20 into r288; + and r287 r288 into r289; + not r21 into r290; + and r289 r290 into r291; + not r22 into r292; + and r291 r292 into r293; + not r23 into r294; + and r293 r294 into r295; + not r24 into r296; + and r295 r296 into r297; + not r25 into r298; + and r297 r298 into r299; + not r26 into r300; + and r299 r300 into r301; + not r27 into r302; + and r301 r302 into r303; + not r28 into r304; + and r303 r304 into r305; + not r29 into r306; + and r305 r306 into r307; + not r30 into r308; + and r307 r308 into r309; + not r31 into r310; + and r309 r310 into r311; + not r32 into r312; + and r311 r312 into r313; + not r33 into r314; + and r313 r314 into r315; + and r315 r34 into r316; + ternary r316 20u8 r250 into r317; + not r1 into r318; + not r2 into r319; + and r318 r319 into r320; + not r3 into r321; + and r320 r321 into r322; + not r4 into r323; + and r322 r323 into r324; + not r5 into r325; + and r324 r325 into r326; + not r6 into r327; + and r326 r327 into r328; + not r7 into r329; + and r328 r329 into r330; + not r8 into r331; + and r330 r331 into r332; + not r9 into r333; + and r332 r333 into r334; + not r10 into r335; + and r334 r335 into r336; + not r11 into r337; + and r336 r337 into r338; + not r12 into r339; + and r338 r339 into r340; + not r13 into r341; + and r340 r341 into r342; + not r14 into r343; + and r342 r343 into r344; + not r15 into r345; + and r344 r345 into r346; + not r16 into r347; + and r346 r347 into r348; + not r17 into r349; + and r348 r349 into r350; + not r18 into r351; + and r350 r351 into r352; + not r19 into r353; + and r352 r353 into r354; + not r20 into r355; + and r354 r355 into r356; + not r21 into r357; + and r356 r357 into r358; + not r22 into r359; + and r358 r359 into r360; + not r23 into r361; + and r360 r361 into r362; + not r24 into r363; + and r362 r363 into r364; + not r25 into r365; + and r364 r365 into r366; + not r26 into r367; + and r366 r367 into r368; + not r27 into r369; + and r368 r369 into r370; + not r28 into r371; + and r370 r371 into r372; + not r29 into r373; + and r372 r373 into r374; + not r30 into r375; + and r374 r375 into r376; + not r31 into r377; + and r376 r377 into r378; + not r32 into r379; + and r378 r379 into r380; + and r380 r33 into r381; + ternary r381 5u8 r317 into r382; + not r1 into r383; + not r2 into r384; + and r383 r384 into r385; + not r3 into r386; + and r385 r386 into r387; + not r4 into r388; + and r387 r388 into r389; + not r5 into r390; + and r389 r390 into r391; + not r6 into r392; + and r391 r392 into r393; + not r7 into r394; + and r393 r394 into r395; + not r8 into r396; + and r395 r396 into r397; + not r9 into r398; + and r397 r398 into r399; + not r10 into r400; + and r399 r400 into r401; + not r11 into r402; + and r401 r402 into r403; + not r12 into r404; + and r403 r404 into r405; + not r13 into r406; + and r405 r406 into r407; + not r14 into r408; + and r407 r408 into r409; + not r15 into r410; + and r409 r410 into r411; + not r16 into r412; + and r411 r412 into r413; + not r17 into r414; + and r413 r414 into r415; + not r18 into r416; + and r415 r416 into r417; + not r19 into r418; + and r417 r418 into r419; + not r20 into r420; + and r419 r420 into r421; + not r21 into r422; + and r421 r422 into r423; + not r22 into r424; + and r423 r424 into r425; + not r23 into r426; + and r425 r426 into r427; + not r24 into r428; + and r427 r428 into r429; + not r25 into r430; + and r429 r430 into r431; + not r26 into r432; + and r431 r432 into r433; + not r27 into r434; + and r433 r434 into r435; + not r28 into r436; + and r435 r436 into r437; + not r29 into r438; + and r437 r438 into r439; + not r30 into r440; + and r439 r440 into r441; + not r31 into r442; + and r441 r442 into r443; + and r443 r32 into r444; + ternary r444 9u8 r382 into r445; + not r1 into r446; + not r2 into r447; + and r446 r447 into r448; + not r3 into r449; + and r448 r449 into r450; + not r4 into r451; + and r450 r451 into r452; + not r5 into r453; + and r452 r453 into r454; + not r6 into r455; + and r454 r455 into r456; + not r7 into r457; + and r456 r457 into r458; + not r8 into r459; + and r458 r459 into r460; + not r9 into r461; + and r460 r461 into r462; + not r10 into r463; + and r462 r463 into r464; + not r11 into r465; + and r464 r465 into r466; + not r12 into r467; + and r466 r467 into r468; + not r13 into r469; + and r468 r469 into r470; + not r14 into r471; + and r470 r471 into r472; + not r15 into r473; + and r472 r473 into r474; + not r16 into r475; + and r474 r475 into r476; + not r17 into r477; + and r476 r477 into r478; + not r18 into r479; + and r478 r479 into r480; + not r19 into r481; + and r480 r481 into r482; + not r20 into r483; + and r482 r483 into r484; + not r21 into r485; + and r484 r485 into r486; + not r22 into r487; + and r486 r487 into r488; + not r23 into r489; + and r488 r489 into r490; + not r24 into r491; + and r490 r491 into r492; + not r25 into r493; + and r492 r493 into r494; + not r26 into r495; + and r494 r495 into r496; + not r27 into r497; + and r496 r497 into r498; + not r28 into r499; + and r498 r499 into r500; + not r29 into r501; + and r500 r501 into r502; + not r30 into r503; + and r502 r503 into r504; + and r504 r31 into r505; + ternary r505 14u8 r445 into r506; + not r1 into r507; + not r2 into r508; + and r507 r508 into r509; + not r3 into r510; + and r509 r510 into r511; + not r4 into r512; + and r511 r512 into r513; + not r5 into r514; + and r513 r514 into r515; + not r6 into r516; + and r515 r516 into r517; + not r7 into r518; + and r517 r518 into r519; + not r8 into r520; + and r519 r520 into r521; + not r9 into r522; + and r521 r522 into r523; + not r10 into r524; + and r523 r524 into r525; + not r11 into r526; + and r525 r526 into r527; + not r12 into r528; + and r527 r528 into r529; + not r13 into r530; + and r529 r530 into r531; + not r14 into r532; + and r531 r532 into r533; + not r15 into r534; + and r533 r534 into r535; + not r16 into r536; + and r535 r536 into r537; + not r17 into r538; + and r537 r538 into r539; + not r18 into r540; + and r539 r540 into r541; + not r19 into r542; + and r541 r542 into r543; + not r20 into r544; + and r543 r544 into r545; + not r21 into r546; + and r545 r546 into r547; + not r22 into r548; + and r547 r548 into r549; + not r23 into r550; + and r549 r550 into r551; + not r24 into r552; + and r551 r552 into r553; + not r25 into r554; + and r553 r554 into r555; + not r26 into r556; + and r555 r556 into r557; + not r27 into r558; + and r557 r558 into r559; + not r28 into r560; + and r559 r560 into r561; + not r29 into r562; + and r561 r562 into r563; + and r563 r30 into r564; + ternary r564 21u8 r506 into r565; + not r1 into r566; + not r2 into r567; + and r566 r567 into r568; + not r3 into r569; + and r568 r569 into r570; + not r4 into r571; + and r570 r571 into r572; + not r5 into r573; + and r572 r573 into r574; + not r6 into r575; + and r574 r575 into r576; + not r7 into r577; + and r576 r577 into r578; + not r8 into r579; + and r578 r579 into r580; + not r9 into r581; + and r580 r581 into r582; + not r10 into r583; + and r582 r583 into r584; + not r11 into r585; + and r584 r585 into r586; + not r12 into r587; + and r586 r587 into r588; + not r13 into r589; + and r588 r589 into r590; + not r14 into r591; + and r590 r591 into r592; + not r15 into r593; + and r592 r593 into r594; + not r16 into r595; + and r594 r595 into r596; + not r17 into r597; + and r596 r597 into r598; + not r18 into r599; + and r598 r599 into r600; + not r19 into r601; + and r600 r601 into r602; + not r20 into r603; + and r602 r603 into r604; + not r21 into r605; + and r604 r605 into r606; + not r22 into r607; + and r606 r607 into r608; + not r23 into r609; + and r608 r609 into r610; + not r24 into r611; + and r610 r611 into r612; + not r25 into r613; + and r612 r613 into r614; + not r26 into r615; + and r614 r615 into r616; + not r27 into r617; + and r616 r617 into r618; + not r28 into r619; + and r618 r619 into r620; + and r620 r29 into r621; + ternary r621 0u8 r565 into r622; + not r1 into r623; + not r2 into r624; + and r623 r624 into r625; + not r3 into r626; + and r625 r626 into r627; + not r4 into r628; + and r627 r628 into r629; + not r5 into r630; + and r629 r630 into r631; + not r6 into r632; + and r631 r632 into r633; + not r7 into r634; + and r633 r634 into r635; + not r8 into r636; + and r635 r636 into r637; + not r9 into r638; + and r637 r638 into r639; + not r10 into r640; + and r639 r640 into r641; + not r11 into r642; + and r641 r642 into r643; + not r12 into r644; + and r643 r644 into r645; + not r13 into r646; + and r645 r646 into r647; + not r14 into r648; + and r647 r648 into r649; + not r15 into r650; + and r649 r650 into r651; + not r16 into r652; + and r651 r652 into r653; + not r17 into r654; + and r653 r654 into r655; + not r18 into r656; + and r655 r656 into r657; + not r19 into r658; + and r657 r658 into r659; + not r20 into r660; + and r659 r660 into r661; + not r21 into r662; + and r661 r662 into r663; + not r22 into r664; + and r663 r664 into r665; + not r23 into r666; + and r665 r666 into r667; + not r24 into r668; + and r667 r668 into r669; + not r25 into r670; + and r669 r670 into r671; + not r26 into r672; + and r671 r672 into r673; + not r27 into r674; + and r673 r674 into r675; + and r675 r28 into r676; + ternary r676 6u8 r622 into r677; + not r1 into r678; + not r2 into r679; + and r678 r679 into r680; + not r3 into r681; + and r680 r681 into r682; + not r4 into r683; + and r682 r683 into r684; + not r5 into r685; + and r684 r685 into r686; + not r6 into r687; + and r686 r687 into r688; + not r7 into r689; + and r688 r689 into r690; + not r8 into r691; + and r690 r691 into r692; + not r9 into r693; + and r692 r693 into r694; + not r10 into r695; + and r694 r695 into r696; + not r11 into r697; + and r696 r697 into r698; + not r12 into r699; + and r698 r699 into r700; + not r13 into r701; + and r700 r701 into r702; + not r14 into r703; + and r702 r703 into r704; + not r15 into r705; + and r704 r705 into r706; + not r16 into r707; + and r706 r707 into r708; + not r17 into r709; + and r708 r709 into r710; + not r18 into r711; + and r710 r711 into r712; + not r19 into r713; + and r712 r713 into r714; + not r20 into r715; + and r714 r715 into r716; + not r21 into r717; + and r716 r717 into r718; + not r22 into r719; + and r718 r719 into r720; + not r23 into r721; + and r720 r721 into r722; + not r24 into r723; + and r722 r723 into r724; + not r25 into r725; + and r724 r725 into r726; + not r26 into r727; + and r726 r727 into r728; + and r728 r27 into r729; + ternary r729 12u8 r677 into r730; + not r1 into r731; + not r2 into r732; + and r731 r732 into r733; + not r3 into r734; + and r733 r734 into r735; + not r4 into r736; + and r735 r736 into r737; + not r5 into r738; + and r737 r738 into r739; + not r6 into r740; + and r739 r740 into r741; + not r7 into r742; + and r741 r742 into r743; + not r8 into r744; + and r743 r744 into r745; + not r9 into r746; + and r745 r746 into r747; + not r10 into r748; + and r747 r748 into r749; + not r11 into r750; + and r749 r750 into r751; + not r12 into r752; + and r751 r752 into r753; + not r13 into r754; + and r753 r754 into r755; + not r14 into r756; + and r755 r756 into r757; + not r15 into r758; + and r757 r758 into r759; + not r16 into r760; + and r759 r760 into r761; + not r17 into r762; + and r761 r762 into r763; + not r18 into r764; + and r763 r764 into r765; + not r19 into r766; + and r765 r766 into r767; + not r20 into r768; + and r767 r768 into r769; + not r21 into r770; + and r769 r770 into r771; + not r22 into r772; + and r771 r772 into r773; + not r23 into r774; + and r773 r774 into r775; + not r24 into r776; + and r775 r776 into r777; + not r25 into r778; + and r777 r778 into r779; + and r779 r26 into r780; + ternary r780 10u8 r730 into r781; + not r1 into r782; + not r2 into r783; + and r782 r783 into r784; + not r3 into r785; + and r784 r785 into r786; + not r4 into r787; + and r786 r787 into r788; + not r5 into r789; + and r788 r789 into r790; + not r6 into r791; + and r790 r791 into r792; + not r7 into r793; + and r792 r793 into r794; + not r8 into r795; + and r794 r795 into r796; + not r9 into r797; + and r796 r797 into r798; + not r10 into r799; + and r798 r799 into r800; + not r11 into r801; + and r800 r801 into r802; + not r12 into r803; + and r802 r803 into r804; + not r13 into r805; + and r804 r805 into r806; + not r14 into r807; + and r806 r807 into r808; + not r15 into r809; + and r808 r809 into r810; + not r16 into r811; + and r810 r811 into r812; + not r17 into r813; + and r812 r813 into r814; + not r18 into r815; + and r814 r815 into r816; + not r19 into r817; + and r816 r817 into r818; + not r20 into r819; + and r818 r819 into r820; + not r21 into r821; + and r820 r821 into r822; + not r22 into r823; + and r822 r823 into r824; + not r23 into r825; + and r824 r825 into r826; + not r24 into r827; + and r826 r827 into r828; + and r828 r25 into r829; + ternary r829 29u8 r781 into r830; + not r1 into r831; + not r2 into r832; + and r831 r832 into r833; + not r3 into r834; + and r833 r834 into r835; + not r4 into r836; + and r835 r836 into r837; + not r5 into r838; + and r837 r838 into r839; + not r6 into r840; + and r839 r840 into r841; + not r7 into r842; + and r841 r842 into r843; + not r8 into r844; + and r843 r844 into r845; + not r9 into r846; + and r845 r846 into r847; + not r10 into r848; + and r847 r848 into r849; + not r11 into r850; + and r849 r850 into r851; + not r12 into r852; + and r851 r852 into r853; + not r13 into r854; + and r853 r854 into r855; + not r14 into r856; + and r855 r856 into r857; + not r15 into r858; + and r857 r858 into r859; + not r16 into r860; + and r859 r860 into r861; + not r17 into r862; + and r861 r862 into r863; + not r18 into r864; + and r863 r864 into r865; + not r19 into r866; + and r865 r866 into r867; + not r20 into r868; + and r867 r868 into r869; + not r21 into r870; + and r869 r870 into r871; + not r22 into r872; + and r871 r872 into r873; + not r23 into r874; + and r873 r874 into r875; + and r875 r24 into r876; + ternary r876 15u8 r830 into r877; + not r1 into r878; + not r2 into r879; + and r878 r879 into r880; + not r3 into r881; + and r880 r881 into r882; + not r4 into r883; + and r882 r883 into r884; + not r5 into r885; + and r884 r885 into r886; + not r6 into r887; + and r886 r887 into r888; + not r7 into r889; + and r888 r889 into r890; + not r8 into r891; + and r890 r891 into r892; + not r9 into r893; + and r892 r893 into r894; + not r10 into r895; + and r894 r895 into r896; + not r11 into r897; + and r896 r897 into r898; + not r12 into r899; + and r898 r899 into r900; + not r13 into r901; + and r900 r901 into r902; + not r14 into r903; + and r902 r903 into r904; + not r15 into r905; + and r904 r905 into r906; + not r16 into r907; + and r906 r907 into r908; + not r17 into r909; + and r908 r909 into r910; + not r18 into r911; + and r910 r911 into r912; + not r19 into r913; + and r912 r913 into r914; + not r20 into r915; + and r914 r915 into r916; + not r21 into r917; + and r916 r917 into r918; + not r22 into r919; + and r918 r919 into r920; + and r920 r23 into r921; + ternary r921 31u8 r877 into r922; + not r1 into r923; + not r2 into r924; + and r923 r924 into r925; + not r3 into r926; + and r925 r926 into r927; + not r4 into r928; + and r927 r928 into r929; + not r5 into r930; + and r929 r930 into r931; + not r6 into r932; + and r931 r932 into r933; + not r7 into r934; + and r933 r934 into r935; + not r8 into r936; + and r935 r936 into r937; + not r9 into r938; + and r937 r938 into r939; + not r10 into r940; + and r939 r940 into r941; + not r11 into r942; + and r941 r942 into r943; + not r12 into r944; + and r943 r944 into r945; + not r13 into r946; + and r945 r946 into r947; + not r14 into r948; + and r947 r948 into r949; + not r15 into r950; + and r949 r950 into r951; + not r16 into r952; + and r951 r952 into r953; + not r17 into r954; + and r953 r954 into r955; + not r18 into r956; + and r955 r956 into r957; + not r19 into r958; + and r957 r958 into r959; + not r20 into r960; + and r959 r960 into r961; + not r21 into r962; + and r961 r962 into r963; + and r963 r22 into r964; + ternary r964 22u8 r922 into r965; + not r1 into r966; + not r2 into r967; + and r966 r967 into r968; + not r3 into r969; + and r968 r969 into r970; + not r4 into r971; + and r970 r971 into r972; + not r5 into r973; + and r972 r973 into r974; + not r6 into r975; + and r974 r975 into r976; + not r7 into r977; + and r976 r977 into r978; + not r8 into r979; + and r978 r979 into r980; + not r9 into r981; + and r980 r981 into r982; + not r10 into r983; + and r982 r983 into r984; + not r11 into r985; + and r984 r985 into r986; + not r12 into r987; + and r986 r987 into r988; + not r13 into r989; + and r988 r989 into r990; + not r14 into r991; + and r990 r991 into r992; + not r15 into r993; + and r992 r993 into r994; + not r16 into r995; + and r994 r995 into r996; + not r17 into r997; + and r996 r997 into r998; + not r18 into r999; + and r998 r999 into r1000; + not r19 into r1001; + and r1000 r1001 into r1002; + not r20 into r1003; + and r1002 r1003 into r1004; + and r1004 r21 into r1005; + ternary r1005 25u8 r965 into r1006; + not r1 into r1007; + not r2 into r1008; + and r1007 r1008 into r1009; + not r3 into r1010; + and r1009 r1010 into r1011; + not r4 into r1012; + and r1011 r1012 into r1013; + not r5 into r1014; + and r1013 r1014 into r1015; + not r6 into r1016; + and r1015 r1016 into r1017; + not r7 into r1018; + and r1017 r1018 into r1019; + not r8 into r1020; + and r1019 r1020 into r1021; + not r9 into r1022; + and r1021 r1022 into r1023; + not r10 into r1024; + and r1023 r1024 into r1025; + not r11 into r1026; + and r1025 r1026 into r1027; + not r12 into r1028; + and r1027 r1028 into r1029; + not r13 into r1030; + and r1029 r1030 into r1031; + not r14 into r1032; + and r1031 r1032 into r1033; + not r15 into r1034; + and r1033 r1034 into r1035; + not r16 into r1036; + and r1035 r1036 into r1037; + not r17 into r1038; + and r1037 r1038 into r1039; + not r18 into r1040; + and r1039 r1040 into r1041; + not r19 into r1042; + and r1041 r1042 into r1043; + and r1043 r20 into r1044; + ternary r1044 0u8 r1006 into r1045; + not r1 into r1046; + not r2 into r1047; + and r1046 r1047 into r1048; + not r3 into r1049; + and r1048 r1049 into r1050; + not r4 into r1051; + and r1050 r1051 into r1052; + not r5 into r1053; + and r1052 r1053 into r1054; + not r6 into r1055; + and r1054 r1055 into r1056; + not r7 into r1057; + and r1056 r1057 into r1058; + not r8 into r1059; + and r1058 r1059 into r1060; + not r9 into r1061; + and r1060 r1061 into r1062; + not r10 into r1063; + and r1062 r1063 into r1064; + not r11 into r1065; + and r1064 r1065 into r1066; + not r12 into r1067; + and r1066 r1067 into r1068; + not r13 into r1069; + and r1068 r1069 into r1070; + not r14 into r1071; + and r1070 r1071 into r1072; + not r15 into r1073; + and r1072 r1073 into r1074; + not r16 into r1075; + and r1074 r1075 into r1076; + not r17 into r1077; + and r1076 r1077 into r1078; + not r18 into r1079; + and r1078 r1079 into r1080; + and r1080 r19 into r1081; + ternary r1081 17u8 r1045 into r1082; + not r1 into r1083; + not r2 into r1084; + and r1083 r1084 into r1085; + not r3 into r1086; + and r1085 r1086 into r1087; + not r4 into r1088; + and r1087 r1088 into r1089; + not r5 into r1090; + and r1089 r1090 into r1091; + not r6 into r1092; + and r1091 r1092 into r1093; + not r7 into r1094; + and r1093 r1094 into r1095; + not r8 into r1096; + and r1095 r1096 into r1097; + not r9 into r1098; + and r1097 r1098 into r1099; + not r10 into r1100; + and r1099 r1100 into r1101; + not r11 into r1102; + and r1101 r1102 into r1103; + not r12 into r1104; + and r1103 r1104 into r1105; + not r13 into r1106; + and r1105 r1106 into r1107; + not r14 into r1108; + and r1107 r1108 into r1109; + not r15 into r1110; + and r1109 r1110 into r1111; + not r16 into r1112; + and r1111 r1112 into r1113; + not r17 into r1114; + and r1113 r1114 into r1115; + and r1115 r18 into r1116; + ternary r1116 7u8 r1082 into r1117; + not r1 into r1118; + not r2 into r1119; + and r1118 r1119 into r1120; + not r3 into r1121; + and r1120 r1121 into r1122; + not r4 into r1123; + and r1122 r1123 into r1124; + not r5 into r1125; + and r1124 r1125 into r1126; + not r6 into r1127; + and r1126 r1127 into r1128; + not r7 into r1129; + and r1128 r1129 into r1130; + not r8 into r1131; + and r1130 r1131 into r1132; + not r9 into r1133; + and r1132 r1133 into r1134; + not r10 into r1135; + and r1134 r1135 into r1136; + not r11 into r1137; + and r1136 r1137 into r1138; + not r12 into r1139; + and r1138 r1139 into r1140; + not r13 into r1141; + and r1140 r1141 into r1142; + not r14 into r1143; + and r1142 r1143 into r1144; + not r15 into r1145; + and r1144 r1145 into r1146; + not r16 into r1147; + and r1146 r1147 into r1148; + and r1148 r17 into r1149; + ternary r1149 4u8 r1117 into r1150; + not r1 into r1151; + not r2 into r1152; + and r1151 r1152 into r1153; + not r3 into r1154; + and r1153 r1154 into r1155; + not r4 into r1156; + and r1155 r1156 into r1157; + not r5 into r1158; + and r1157 r1158 into r1159; + not r6 into r1160; + and r1159 r1160 into r1161; + not r7 into r1162; + and r1161 r1162 into r1163; + not r8 into r1164; + and r1163 r1164 into r1165; + not r9 into r1166; + and r1165 r1166 into r1167; + not r10 into r1168; + and r1167 r1168 into r1169; + not r11 into r1170; + and r1169 r1170 into r1171; + not r12 into r1172; + and r1171 r1172 into r1173; + not r13 into r1174; + and r1173 r1174 into r1175; + not r14 into r1176; + and r1175 r1176 into r1177; + not r15 into r1178; + and r1177 r1178 into r1179; + and r1179 r16 into r1180; + ternary r1180 13u8 r1150 into r1181; + not r1 into r1182; + not r2 into r1183; + and r1182 r1183 into r1184; + not r3 into r1185; + and r1184 r1185 into r1186; + not r4 into r1187; + and r1186 r1187 into r1188; + not r5 into r1189; + and r1188 r1189 into r1190; + not r6 into r1191; + and r1190 r1191 into r1192; + not r7 into r1193; + and r1192 r1193 into r1194; + not r8 into r1195; + and r1194 r1195 into r1196; + not r9 into r1197; + and r1196 r1197 into r1198; + not r10 into r1199; + and r1198 r1199 into r1200; + not r11 into r1201; + and r1200 r1201 into r1202; + not r12 into r1203; + and r1202 r1203 into r1204; + not r13 into r1205; + and r1204 r1205 into r1206; + not r14 into r1207; + and r1206 r1207 into r1208; + and r1208 r15 into r1209; + ternary r1209 0u8 r1181 into r1210; + not r1 into r1211; + not r2 into r1212; + and r1211 r1212 into r1213; + not r3 into r1214; + and r1213 r1214 into r1215; + not r4 into r1216; + and r1215 r1216 into r1217; + not r5 into r1218; + and r1217 r1218 into r1219; + not r6 into r1220; + and r1219 r1220 into r1221; + not r7 into r1222; + and r1221 r1222 into r1223; + not r8 into r1224; + and r1223 r1224 into r1225; + not r9 into r1226; + and r1225 r1226 into r1227; + not r10 into r1228; + and r1227 r1228 into r1229; + not r11 into r1230; + and r1229 r1230 into r1231; + not r12 into r1232; + and r1231 r1232 into r1233; + not r13 into r1234; + and r1233 r1234 into r1235; + and r1235 r14 into r1236; + ternary r1236 11u8 r1210 into r1237; + not r1 into r1238; + not r2 into r1239; + and r1238 r1239 into r1240; + not r3 into r1241; + and r1240 r1241 into r1242; + not r4 into r1243; + and r1242 r1243 into r1244; + not r5 into r1245; + and r1244 r1245 into r1246; + not r6 into r1247; + and r1246 r1247 into r1248; + not r7 into r1249; + and r1248 r1249 into r1250; + not r8 into r1251; + and r1250 r1251 into r1252; + not r9 into r1253; + and r1252 r1253 into r1254; + not r10 into r1255; + and r1254 r1255 into r1256; + not r11 into r1257; + and r1256 r1257 into r1258; + not r12 into r1259; + and r1258 r1259 into r1260; + and r1260 r13 into r1261; + ternary r1261 28u8 r1237 into r1262; + not r1 into r1263; + not r2 into r1264; + and r1263 r1264 into r1265; + not r3 into r1266; + and r1265 r1266 into r1267; + not r4 into r1268; + and r1267 r1268 into r1269; + not r5 into r1270; + and r1269 r1270 into r1271; + not r6 into r1272; + and r1271 r1272 into r1273; + not r7 into r1274; + and r1273 r1274 into r1275; + not r8 into r1276; + and r1275 r1276 into r1277; + not r9 into r1278; + and r1277 r1278 into r1279; + not r10 into r1280; + and r1279 r1280 into r1281; + not r11 into r1282; + and r1281 r1282 into r1283; + and r1283 r12 into r1284; + ternary r1284 30u8 r1262 into r1285; + not r1 into r1286; + not r2 into r1287; + and r1286 r1287 into r1288; + not r3 into r1289; + and r1288 r1289 into r1290; + not r4 into r1291; + and r1290 r1291 into r1292; + not r5 into r1293; + and r1292 r1293 into r1294; + not r6 into r1295; + and r1294 r1295 into r1296; + not r7 into r1297; + and r1296 r1297 into r1298; + not r8 into r1299; + and r1298 r1299 into r1300; + not r9 into r1301; + and r1300 r1301 into r1302; + not r10 into r1303; + and r1302 r1303 into r1304; + and r1304 r11 into r1305; + ternary r1305 24u8 r1285 into r1306; + not r1 into r1307; + not r2 into r1308; + and r1307 r1308 into r1309; + not r3 into r1310; + and r1309 r1310 into r1311; + not r4 into r1312; + and r1311 r1312 into r1313; + not r5 into r1314; + and r1313 r1314 into r1315; + not r6 into r1316; + and r1315 r1316 into r1317; + not r7 into r1318; + and r1317 r1318 into r1319; + not r8 into r1320; + and r1319 r1320 into r1321; + not r9 into r1322; + and r1321 r1322 into r1323; + and r1323 r10 into r1324; + ternary r1324 16u8 r1306 into r1325; + not r1 into r1326; + not r2 into r1327; + and r1326 r1327 into r1328; + not r3 into r1329; + and r1328 r1329 into r1330; + not r4 into r1331; + and r1330 r1331 into r1332; + not r5 into r1333; + and r1332 r1333 into r1334; + not r6 into r1335; + and r1334 r1335 into r1336; + not r7 into r1337; + and r1336 r1337 into r1338; + not r8 into r1339; + and r1338 r1339 into r1340; + and r1340 r9 into r1341; + ternary r1341 3u8 r1325 into r1342; + not r1 into r1343; + not r2 into r1344; + and r1343 r1344 into r1345; + not r3 into r1346; + and r1345 r1346 into r1347; + not r4 into r1348; + and r1347 r1348 into r1349; + not r5 into r1350; + and r1349 r1350 into r1351; + not r6 into r1352; + and r1351 r1352 into r1353; + not r7 into r1354; + and r1353 r1354 into r1355; + and r1355 r8 into r1356; + ternary r1356 0u8 r1342 into r1357; + not r1 into r1358; + not r2 into r1359; + and r1358 r1359 into r1360; + not r3 into r1361; + and r1360 r1361 into r1362; + not r4 into r1363; + and r1362 r1363 into r1364; + not r5 into r1365; + and r1364 r1365 into r1366; + not r6 into r1367; + and r1366 r1367 into r1368; + and r1368 r7 into r1369; + ternary r1369 27u8 r1357 into r1370; + not r1 into r1371; + not r2 into r1372; + and r1371 r1372 into r1373; + not r3 into r1374; + and r1373 r1374 into r1375; + not r4 into r1376; + and r1375 r1376 into r1377; + not r5 into r1378; + and r1377 r1378 into r1379; + and r1379 r6 into r1380; + ternary r1380 23u8 r1370 into r1381; + not r1 into r1382; + not r2 into r1383; + and r1382 r1383 into r1384; + not r3 into r1385; + and r1384 r1385 into r1386; + not r4 into r1387; + and r1386 r1387 into r1388; + and r1388 r5 into r1389; + ternary r1389 2u8 r1381 into r1390; + not r1 into r1391; + not r2 into r1392; + and r1391 r1392 into r1393; + not r3 into r1394; + and r1393 r1394 into r1395; + and r1395 r4 into r1396; + ternary r1396 26u8 r1390 into r1397; + not r1 into r1398; + not r2 into r1399; + and r1398 r1399 into r1400; + and r1400 r3 into r1401; + ternary r1401 1u8 r1397 into r1402; + not r1 into r1403; + and r1403 r2 into r1404; + ternary r1404 0u8 r1402 into r1405; + ternary r1 32u8 r1405 into r1406; + output r1406 as u8; + + +function main: + input r0 as u32.public; + sub.w 0u32 r0 into r1; + and r0 r1 into r2; + rem.w r2 37u32 into r3; + call reisersTableLookup r3 into r4; + output r4 as u8.private; diff --git a/examples/hackers-delight/ntzreisers/build/program.json b/examples/hackers-delight/ntzreisers/build/program.json new file mode 100644 index 0000000000..8fe238723f --- /dev/null +++ b/examples/hackers-delight/ntzreisers/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "ntzreisers.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/hackers-delight/ntzreisers/program.json b/examples/hackers-delight/ntzreisers/program.json index ca7015e084..8fe238723f 100644 --- a/examples/hackers-delight/ntzreisers/program.json +++ b/examples/hackers-delight/ntzreisers/program.json @@ -2,9 +2,5 @@ "program": "ntzreisers.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkp8vHN4i62UxNKK9pqPZNYpWwUXdXayAzoLfFJQrQtEBFM", - "address": "aleo1wkd43twmdc95qag68rt6wyuhdvws9ux2rzjszm3eazz7wkhp75zsjazdcs" - }, "license": "MIT" } diff --git a/examples/hackers-delight/ntzseals/.env b/examples/hackers-delight/ntzseals/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/hackers-delight/ntzseals/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/hackers-delight/ntzseals/.gitignore b/examples/hackers-delight/ntzseals/.gitignore index b28696155d..750b56f237 100644 --- a/examples/hackers-delight/ntzseals/.gitignore +++ b/examples/hackers-delight/ntzseals/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/hackers-delight/ntzseals/build/main.aleo b/examples/hackers-delight/ntzseals/build/main.aleo new file mode 100644 index 0000000000..6d2c99f90f --- /dev/null +++ b/examples/hackers-delight/ntzseals/build/main.aleo @@ -0,0 +1,4177 @@ +program ntzseals.aleo; + + + +closure sealsTableLookup: + input r0 as u32; + is.eq r0 0u32 into r1; + is.eq r0 1u32 into r2; + is.eq r0 2u32 into r3; + is.eq r0 3u32 into r4; + is.eq r0 4u32 into r5; + is.eq r0 5u32 into r6; + is.eq r0 6u32 into r7; + is.eq r0 7u32 into r8; + is.eq r0 8u32 into r9; + is.eq r0 9u32 into r10; + is.eq r0 10u32 into r11; + is.eq r0 11u32 into r12; + is.eq r0 12u32 into r13; + is.eq r0 13u32 into r14; + is.eq r0 14u32 into r15; + is.eq r0 15u32 into r16; + is.eq r0 16u32 into r17; + is.eq r0 17u32 into r18; + is.eq r0 18u32 into r19; + is.eq r0 19u32 into r20; + is.eq r0 20u32 into r21; + is.eq r0 21u32 into r22; + is.eq r0 22u32 into r23; + is.eq r0 23u32 into r24; + is.eq r0 24u32 into r25; + is.eq r0 25u32 into r26; + is.eq r0 26u32 into r27; + is.eq r0 27u32 into r28; + is.eq r0 28u32 into r29; + is.eq r0 29u32 into r30; + is.eq r0 30u32 into r31; + is.eq r0 31u32 into r32; + is.eq r0 32u32 into r33; + is.eq r0 33u32 into r34; + is.eq r0 34u32 into r35; + is.eq r0 35u32 into r36; + is.eq r0 36u32 into r37; + is.eq r0 37u32 into r38; + is.eq r0 38u32 into r39; + is.eq r0 39u32 into r40; + is.eq r0 40u32 into r41; + is.eq r0 41u32 into r42; + is.eq r0 42u32 into r43; + is.eq r0 43u32 into r44; + is.eq r0 44u32 into r45; + is.eq r0 45u32 into r46; + is.eq r0 46u32 into r47; + is.eq r0 47u32 into r48; + is.eq r0 48u32 into r49; + is.eq r0 49u32 into r50; + is.eq r0 50u32 into r51; + is.eq r0 51u32 into r52; + is.eq r0 52u32 into r53; + is.eq r0 53u32 into r54; + is.eq r0 54u32 into r55; + is.eq r0 55u32 into r56; + is.eq r0 56u32 into r57; + is.eq r0 57u32 into r58; + is.eq r0 58u32 into r59; + is.eq r0 59u32 into r60; + is.eq r0 60u32 into r61; + is.eq r0 61u32 into r62; + is.eq r0 62u32 into r63; + is.eq r0 63u32 into r64; + not r1 into r65; + not r2 into r66; + and r65 r66 into r67; + not r3 into r68; + and r67 r68 into r69; + not r4 into r70; + and r69 r70 into r71; + not r5 into r72; + and r71 r72 into r73; + not r6 into r74; + and r73 r74 into r75; + not r7 into r76; + and r75 r76 into r77; + not r8 into r78; + and r77 r78 into r79; + not r9 into r80; + and r79 r80 into r81; + not r10 into r82; + and r81 r82 into r83; + not r11 into r84; + and r83 r84 into r85; + not r12 into r86; + and r85 r86 into r87; + not r13 into r88; + and r87 r88 into r89; + not r14 into r90; + and r89 r90 into r91; + not r15 into r92; + and r91 r92 into r93; + not r16 into r94; + and r93 r94 into r95; + not r17 into r96; + and r95 r96 into r97; + not r18 into r98; + and r97 r98 into r99; + not r19 into r100; + and r99 r100 into r101; + not r20 into r102; + and r101 r102 into r103; + not r21 into r104; + and r103 r104 into r105; + not r22 into r106; + and r105 r106 into r107; + not r23 into r108; + and r107 r108 into r109; + not r24 into r110; + and r109 r110 into r111; + not r25 into r112; + and r111 r112 into r113; + not r26 into r114; + and r113 r114 into r115; + not r27 into r116; + and r115 r116 into r117; + not r28 into r118; + and r117 r118 into r119; + not r29 into r120; + and r119 r120 into r121; + not r30 into r122; + and r121 r122 into r123; + not r31 into r124; + and r123 r124 into r125; + not r32 into r126; + and r125 r126 into r127; + not r33 into r128; + and r127 r128 into r129; + not r34 into r130; + and r129 r130 into r131; + not r35 into r132; + and r131 r132 into r133; + not r36 into r134; + and r133 r134 into r135; + not r37 into r136; + and r135 r136 into r137; + not r38 into r138; + and r137 r138 into r139; + not r39 into r140; + and r139 r140 into r141; + not r40 into r142; + and r141 r142 into r143; + not r41 into r144; + and r143 r144 into r145; + not r42 into r146; + and r145 r146 into r147; + not r43 into r148; + and r147 r148 into r149; + not r44 into r150; + and r149 r150 into r151; + not r45 into r152; + and r151 r152 into r153; + not r46 into r154; + and r153 r154 into r155; + not r47 into r156; + and r155 r156 into r157; + not r48 into r158; + and r157 r158 into r159; + not r49 into r160; + and r159 r160 into r161; + not r50 into r162; + and r161 r162 into r163; + not r51 into r164; + and r163 r164 into r165; + not r52 into r166; + and r165 r166 into r167; + not r53 into r168; + and r167 r168 into r169; + not r54 into r170; + and r169 r170 into r171; + not r55 into r172; + and r171 r172 into r173; + not r56 into r174; + and r173 r174 into r175; + not r57 into r176; + and r175 r176 into r177; + not r58 into r178; + and r177 r178 into r179; + not r59 into r180; + and r179 r180 into r181; + not r60 into r182; + and r181 r182 into r183; + not r61 into r184; + and r183 r184 into r185; + not r62 into r186; + and r185 r186 into r187; + not r63 into r188; + and r187 r188 into r189; + and r189 r64 into r190; + ternary r190 0u8 0u8 into r191; + not r1 into r192; + not r2 into r193; + and r192 r193 into r194; + not r3 into r195; + and r194 r195 into r196; + not r4 into r197; + and r196 r197 into r198; + not r5 into r199; + and r198 r199 into r200; + not r6 into r201; + and r200 r201 into r202; + not r7 into r203; + and r202 r203 into r204; + not r8 into r205; + and r204 r205 into r206; + not r9 into r207; + and r206 r207 into r208; + not r10 into r209; + and r208 r209 into r210; + not r11 into r211; + and r210 r211 into r212; + not r12 into r213; + and r212 r213 into r214; + not r13 into r215; + and r214 r215 into r216; + not r14 into r217; + and r216 r217 into r218; + not r15 into r219; + and r218 r219 into r220; + not r16 into r221; + and r220 r221 into r222; + not r17 into r223; + and r222 r223 into r224; + not r18 into r225; + and r224 r225 into r226; + not r19 into r227; + and r226 r227 into r228; + not r20 into r229; + and r228 r229 into r230; + not r21 into r231; + and r230 r231 into r232; + not r22 into r233; + and r232 r233 into r234; + not r23 into r235; + and r234 r235 into r236; + not r24 into r237; + and r236 r237 into r238; + not r25 into r239; + and r238 r239 into r240; + not r26 into r241; + and r240 r241 into r242; + not r27 into r243; + and r242 r243 into r244; + not r28 into r245; + and r244 r245 into r246; + not r29 into r247; + and r246 r247 into r248; + not r30 into r249; + and r248 r249 into r250; + not r31 into r251; + and r250 r251 into r252; + not r32 into r253; + and r252 r253 into r254; + not r33 into r255; + and r254 r255 into r256; + not r34 into r257; + and r256 r257 into r258; + not r35 into r259; + and r258 r259 into r260; + not r36 into r261; + and r260 r261 into r262; + not r37 into r263; + and r262 r263 into r264; + not r38 into r265; + and r264 r265 into r266; + not r39 into r267; + and r266 r267 into r268; + not r40 into r269; + and r268 r269 into r270; + not r41 into r271; + and r270 r271 into r272; + not r42 into r273; + and r272 r273 into r274; + not r43 into r275; + and r274 r275 into r276; + not r44 into r277; + and r276 r277 into r278; + not r45 into r279; + and r278 r279 into r280; + not r46 into r281; + and r280 r281 into r282; + not r47 into r283; + and r282 r283 into r284; + not r48 into r285; + and r284 r285 into r286; + not r49 into r287; + and r286 r287 into r288; + not r50 into r289; + and r288 r289 into r290; + not r51 into r291; + and r290 r291 into r292; + not r52 into r293; + and r292 r293 into r294; + not r53 into r295; + and r294 r295 into r296; + not r54 into r297; + and r296 r297 into r298; + not r55 into r299; + and r298 r299 into r300; + not r56 into r301; + and r300 r301 into r302; + not r57 into r303; + and r302 r303 into r304; + not r58 into r305; + and r304 r305 into r306; + not r59 into r307; + and r306 r307 into r308; + not r60 into r309; + and r308 r309 into r310; + not r61 into r311; + and r310 r311 into r312; + not r62 into r313; + and r312 r313 into r314; + and r314 r63 into r315; + ternary r315 16u8 r191 into r316; + not r1 into r317; + not r2 into r318; + and r317 r318 into r319; + not r3 into r320; + and r319 r320 into r321; + not r4 into r322; + and r321 r322 into r323; + not r5 into r324; + and r323 r324 into r325; + not r6 into r326; + and r325 r326 into r327; + not r7 into r328; + and r327 r328 into r329; + not r8 into r330; + and r329 r330 into r331; + not r9 into r332; + and r331 r332 into r333; + not r10 into r334; + and r333 r334 into r335; + not r11 into r336; + and r335 r336 into r337; + not r12 into r338; + and r337 r338 into r339; + not r13 into r340; + and r339 r340 into r341; + not r14 into r342; + and r341 r342 into r343; + not r15 into r344; + and r343 r344 into r345; + not r16 into r346; + and r345 r346 into r347; + not r17 into r348; + and r347 r348 into r349; + not r18 into r350; + and r349 r350 into r351; + not r19 into r352; + and r351 r352 into r353; + not r20 into r354; + and r353 r354 into r355; + not r21 into r356; + and r355 r356 into r357; + not r22 into r358; + and r357 r358 into r359; + not r23 into r360; + and r359 r360 into r361; + not r24 into r362; + and r361 r362 into r363; + not r25 into r364; + and r363 r364 into r365; + not r26 into r366; + and r365 r366 into r367; + not r27 into r368; + and r367 r368 into r369; + not r28 into r370; + and r369 r370 into r371; + not r29 into r372; + and r371 r372 into r373; + not r30 into r374; + and r373 r374 into r375; + not r31 into r376; + and r375 r376 into r377; + not r32 into r378; + and r377 r378 into r379; + not r33 into r380; + and r379 r380 into r381; + not r34 into r382; + and r381 r382 into r383; + not r35 into r384; + and r383 r384 into r385; + not r36 into r386; + and r385 r386 into r387; + not r37 into r388; + and r387 r388 into r389; + not r38 into r390; + and r389 r390 into r391; + not r39 into r392; + and r391 r392 into r393; + not r40 into r394; + and r393 r394 into r395; + not r41 into r396; + and r395 r396 into r397; + not r42 into r398; + and r397 r398 into r399; + not r43 into r400; + and r399 r400 into r401; + not r44 into r402; + and r401 r402 into r403; + not r45 into r404; + and r403 r404 into r405; + not r46 into r406; + and r405 r406 into r407; + not r47 into r408; + and r407 r408 into r409; + not r48 into r410; + and r409 r410 into r411; + not r49 into r412; + and r411 r412 into r413; + not r50 into r414; + and r413 r414 into r415; + not r51 into r416; + and r415 r416 into r417; + not r52 into r418; + and r417 r418 into r419; + not r53 into r420; + and r419 r420 into r421; + not r54 into r422; + and r421 r422 into r423; + not r55 into r424; + and r423 r424 into r425; + not r56 into r426; + and r425 r426 into r427; + not r57 into r428; + and r427 r428 into r429; + not r58 into r430; + and r429 r430 into r431; + not r59 into r432; + and r431 r432 into r433; + not r60 into r434; + and r433 r434 into r435; + not r61 into r436; + and r435 r436 into r437; + and r437 r62 into r438; + ternary r438 17u8 r316 into r439; + not r1 into r440; + not r2 into r441; + and r440 r441 into r442; + not r3 into r443; + and r442 r443 into r444; + not r4 into r445; + and r444 r445 into r446; + not r5 into r447; + and r446 r447 into r448; + not r6 into r449; + and r448 r449 into r450; + not r7 into r451; + and r450 r451 into r452; + not r8 into r453; + and r452 r453 into r454; + not r9 into r455; + and r454 r455 into r456; + not r10 into r457; + and r456 r457 into r458; + not r11 into r459; + and r458 r459 into r460; + not r12 into r461; + and r460 r461 into r462; + not r13 into r463; + and r462 r463 into r464; + not r14 into r465; + and r464 r465 into r466; + not r15 into r467; + and r466 r467 into r468; + not r16 into r469; + and r468 r469 into r470; + not r17 into r471; + and r470 r471 into r472; + not r18 into r473; + and r472 r473 into r474; + not r19 into r475; + and r474 r475 into r476; + not r20 into r477; + and r476 r477 into r478; + not r21 into r479; + and r478 r479 into r480; + not r22 into r481; + and r480 r481 into r482; + not r23 into r483; + and r482 r483 into r484; + not r24 into r485; + and r484 r485 into r486; + not r25 into r487; + and r486 r487 into r488; + not r26 into r489; + and r488 r489 into r490; + not r27 into r491; + and r490 r491 into r492; + not r28 into r493; + and r492 r493 into r494; + not r29 into r495; + and r494 r495 into r496; + not r30 into r497; + and r496 r497 into r498; + not r31 into r499; + and r498 r499 into r500; + not r32 into r501; + and r500 r501 into r502; + not r33 into r503; + and r502 r503 into r504; + not r34 into r505; + and r504 r505 into r506; + not r35 into r507; + and r506 r507 into r508; + not r36 into r509; + and r508 r509 into r510; + not r37 into r511; + and r510 r511 into r512; + not r38 into r513; + and r512 r513 into r514; + not r39 into r515; + and r514 r515 into r516; + not r40 into r517; + and r516 r517 into r518; + not r41 into r519; + and r518 r519 into r520; + not r42 into r521; + and r520 r521 into r522; + not r43 into r523; + and r522 r523 into r524; + not r44 into r525; + and r524 r525 into r526; + not r45 into r527; + and r526 r527 into r528; + not r46 into r529; + and r528 r529 into r530; + not r47 into r531; + and r530 r531 into r532; + not r48 into r533; + and r532 r533 into r534; + not r49 into r535; + and r534 r535 into r536; + not r50 into r537; + and r536 r537 into r538; + not r51 into r539; + and r538 r539 into r540; + not r52 into r541; + and r540 r541 into r542; + not r53 into r543; + and r542 r543 into r544; + not r54 into r545; + and r544 r545 into r546; + not r55 into r547; + and r546 r547 into r548; + not r56 into r549; + and r548 r549 into r550; + not r57 into r551; + and r550 r551 into r552; + not r58 into r553; + and r552 r553 into r554; + not r59 into r555; + and r554 r555 into r556; + not r60 into r557; + and r556 r557 into r558; + and r558 r61 into r559; + ternary r559 28u8 r439 into r560; + not r1 into r561; + not r2 into r562; + and r561 r562 into r563; + not r3 into r564; + and r563 r564 into r565; + not r4 into r566; + and r565 r566 into r567; + not r5 into r568; + and r567 r568 into r569; + not r6 into r570; + and r569 r570 into r571; + not r7 into r572; + and r571 r572 into r573; + not r8 into r574; + and r573 r574 into r575; + not r9 into r576; + and r575 r576 into r577; + not r10 into r578; + and r577 r578 into r579; + not r11 into r580; + and r579 r580 into r581; + not r12 into r582; + and r581 r582 into r583; + not r13 into r584; + and r583 r584 into r585; + not r14 into r586; + and r585 r586 into r587; + not r15 into r588; + and r587 r588 into r589; + not r16 into r590; + and r589 r590 into r591; + not r17 into r592; + and r591 r592 into r593; + not r18 into r594; + and r593 r594 into r595; + not r19 into r596; + and r595 r596 into r597; + not r20 into r598; + and r597 r598 into r599; + not r21 into r600; + and r599 r600 into r601; + not r22 into r602; + and r601 r602 into r603; + not r23 into r604; + and r603 r604 into r605; + not r24 into r606; + and r605 r606 into r607; + not r25 into r608; + and r607 r608 into r609; + not r26 into r610; + and r609 r610 into r611; + not r27 into r612; + and r611 r612 into r613; + not r28 into r614; + and r613 r614 into r615; + not r29 into r616; + and r615 r616 into r617; + not r30 into r618; + and r617 r618 into r619; + not r31 into r620; + and r619 r620 into r621; + not r32 into r622; + and r621 r622 into r623; + not r33 into r624; + and r623 r624 into r625; + not r34 into r626; + and r625 r626 into r627; + not r35 into r628; + and r627 r628 into r629; + not r36 into r630; + and r629 r630 into r631; + not r37 into r632; + and r631 r632 into r633; + not r38 into r634; + and r633 r634 into r635; + not r39 into r636; + and r635 r636 into r637; + not r40 into r638; + and r637 r638 into r639; + not r41 into r640; + and r639 r640 into r641; + not r42 into r642; + and r641 r642 into r643; + not r43 into r644; + and r643 r644 into r645; + not r44 into r646; + and r645 r646 into r647; + not r45 into r648; + and r647 r648 into r649; + not r46 into r650; + and r649 r650 into r651; + not r47 into r652; + and r651 r652 into r653; + not r48 into r654; + and r653 r654 into r655; + not r49 into r656; + and r655 r656 into r657; + not r50 into r658; + and r657 r658 into r659; + not r51 into r660; + and r659 r660 into r661; + not r52 into r662; + and r661 r662 into r663; + not r53 into r664; + and r663 r664 into r665; + not r54 into r666; + and r665 r666 into r667; + not r55 into r668; + and r667 r668 into r669; + not r56 into r670; + and r669 r670 into r671; + not r57 into r672; + and r671 r672 into r673; + not r58 into r674; + and r673 r674 into r675; + not r59 into r676; + and r675 r676 into r677; + and r677 r60 into r678; + ternary r678 18u8 r560 into r679; + not r1 into r680; + not r2 into r681; + and r680 r681 into r682; + not r3 into r683; + and r682 r683 into r684; + not r4 into r685; + and r684 r685 into r686; + not r5 into r687; + and r686 r687 into r688; + not r6 into r689; + and r688 r689 into r690; + not r7 into r691; + and r690 r691 into r692; + not r8 into r693; + and r692 r693 into r694; + not r9 into r695; + and r694 r695 into r696; + not r10 into r697; + and r696 r697 into r698; + not r11 into r699; + and r698 r699 into r700; + not r12 into r701; + and r700 r701 into r702; + not r13 into r703; + and r702 r703 into r704; + not r14 into r705; + and r704 r705 into r706; + not r15 into r707; + and r706 r707 into r708; + not r16 into r709; + and r708 r709 into r710; + not r17 into r711; + and r710 r711 into r712; + not r18 into r713; + and r712 r713 into r714; + not r19 into r715; + and r714 r715 into r716; + not r20 into r717; + and r716 r717 into r718; + not r21 into r719; + and r718 r719 into r720; + not r22 into r721; + and r720 r721 into r722; + not r23 into r723; + and r722 r723 into r724; + not r24 into r725; + and r724 r725 into r726; + not r25 into r727; + and r726 r727 into r728; + not r26 into r729; + and r728 r729 into r730; + not r27 into r731; + and r730 r731 into r732; + not r28 into r733; + and r732 r733 into r734; + not r29 into r735; + and r734 r735 into r736; + not r30 into r737; + and r736 r737 into r738; + not r31 into r739; + and r738 r739 into r740; + not r32 into r741; + and r740 r741 into r742; + not r33 into r743; + and r742 r743 into r744; + not r34 into r745; + and r744 r745 into r746; + not r35 into r747; + and r746 r747 into r748; + not r36 into r749; + and r748 r749 into r750; + not r37 into r751; + and r750 r751 into r752; + not r38 into r753; + and r752 r753 into r754; + not r39 into r755; + and r754 r755 into r756; + not r40 into r757; + and r756 r757 into r758; + not r41 into r759; + and r758 r759 into r760; + not r42 into r761; + and r760 r761 into r762; + not r43 into r763; + and r762 r763 into r764; + not r44 into r765; + and r764 r765 into r766; + not r45 into r767; + and r766 r767 into r768; + not r46 into r769; + and r768 r769 into r770; + not r47 into r771; + and r770 r771 into r772; + not r48 into r773; + and r772 r773 into r774; + not r49 into r775; + and r774 r775 into r776; + not r50 into r777; + and r776 r777 into r778; + not r51 into r779; + and r778 r779 into r780; + not r52 into r781; + and r780 r781 into r782; + not r53 into r783; + and r782 r783 into r784; + not r54 into r785; + and r784 r785 into r786; + not r55 into r787; + and r786 r787 into r788; + not r56 into r789; + and r788 r789 into r790; + not r57 into r791; + and r790 r791 into r792; + not r58 into r793; + and r792 r793 into r794; + and r794 r59 into r795; + ternary r795 22u8 r679 into r796; + not r1 into r797; + not r2 into r798; + and r797 r798 into r799; + not r3 into r800; + and r799 r800 into r801; + not r4 into r802; + and r801 r802 into r803; + not r5 into r804; + and r803 r804 into r805; + not r6 into r806; + and r805 r806 into r807; + not r7 into r808; + and r807 r808 into r809; + not r8 into r810; + and r809 r810 into r811; + not r9 into r812; + and r811 r812 into r813; + not r10 into r814; + and r813 r814 into r815; + not r11 into r816; + and r815 r816 into r817; + not r12 into r818; + and r817 r818 into r819; + not r13 into r820; + and r819 r820 into r821; + not r14 into r822; + and r821 r822 into r823; + not r15 into r824; + and r823 r824 into r825; + not r16 into r826; + and r825 r826 into r827; + not r17 into r828; + and r827 r828 into r829; + not r18 into r830; + and r829 r830 into r831; + not r19 into r832; + and r831 r832 into r833; + not r20 into r834; + and r833 r834 into r835; + not r21 into r836; + and r835 r836 into r837; + not r22 into r838; + and r837 r838 into r839; + not r23 into r840; + and r839 r840 into r841; + not r24 into r842; + and r841 r842 into r843; + not r25 into r844; + and r843 r844 into r845; + not r26 into r846; + and r845 r846 into r847; + not r27 into r848; + and r847 r848 into r849; + not r28 into r850; + and r849 r850 into r851; + not r29 into r852; + and r851 r852 into r853; + not r30 into r854; + and r853 r854 into r855; + not r31 into r856; + and r855 r856 into r857; + not r32 into r858; + and r857 r858 into r859; + not r33 into r860; + and r859 r860 into r861; + not r34 into r862; + and r861 r862 into r863; + not r35 into r864; + and r863 r864 into r865; + not r36 into r866; + and r865 r866 into r867; + not r37 into r868; + and r867 r868 into r869; + not r38 into r870; + and r869 r870 into r871; + not r39 into r872; + and r871 r872 into r873; + not r40 into r874; + and r873 r874 into r875; + not r41 into r876; + and r875 r876 into r877; + not r42 into r878; + and r877 r878 into r879; + not r43 into r880; + and r879 r880 into r881; + not r44 into r882; + and r881 r882 into r883; + not r45 into r884; + and r883 r884 into r885; + not r46 into r886; + and r885 r886 into r887; + not r47 into r888; + and r887 r888 into r889; + not r48 into r890; + and r889 r890 into r891; + not r49 into r892; + and r891 r892 into r893; + not r50 into r894; + and r893 r894 into r895; + not r51 into r896; + and r895 r896 into r897; + not r52 into r898; + and r897 r898 into r899; + not r53 into r900; + and r899 r900 into r901; + not r54 into r902; + and r901 r902 into r903; + not r55 into r904; + and r903 r904 into r905; + not r56 into r906; + and r905 r906 into r907; + not r57 into r908; + and r907 r908 into r909; + and r909 r58 into r910; + ternary r910 0u8 r796 into r911; + not r1 into r912; + not r2 into r913; + and r912 r913 into r914; + not r3 into r915; + and r914 r915 into r916; + not r4 into r917; + and r916 r917 into r918; + not r5 into r919; + and r918 r919 into r920; + not r6 into r921; + and r920 r921 into r922; + not r7 into r923; + and r922 r923 into r924; + not r8 into r925; + and r924 r925 into r926; + not r9 into r927; + and r926 r927 into r928; + not r10 into r929; + and r928 r929 into r930; + not r11 into r931; + and r930 r931 into r932; + not r12 into r933; + and r932 r933 into r934; + not r13 into r935; + and r934 r935 into r936; + not r14 into r937; + and r936 r937 into r938; + not r15 into r939; + and r938 r939 into r940; + not r16 into r941; + and r940 r941 into r942; + not r17 into r943; + and r942 r943 into r944; + not r18 into r945; + and r944 r945 into r946; + not r19 into r947; + and r946 r947 into r948; + not r20 into r949; + and r948 r949 into r950; + not r21 into r951; + and r950 r951 into r952; + not r22 into r953; + and r952 r953 into r954; + not r23 into r955; + and r954 r955 into r956; + not r24 into r957; + and r956 r957 into r958; + not r25 into r959; + and r958 r959 into r960; + not r26 into r961; + and r960 r961 into r962; + not r27 into r963; + and r962 r963 into r964; + not r28 into r965; + and r964 r965 into r966; + not r29 into r967; + and r966 r967 into r968; + not r30 into r969; + and r968 r969 into r970; + not r31 into r971; + and r970 r971 into r972; + not r32 into r973; + and r972 r973 into r974; + not r33 into r975; + and r974 r975 into r976; + not r34 into r977; + and r976 r977 into r978; + not r35 into r979; + and r978 r979 into r980; + not r36 into r981; + and r980 r981 into r982; + not r37 into r983; + and r982 r983 into r984; + not r38 into r985; + and r984 r985 into r986; + not r39 into r987; + and r986 r987 into r988; + not r40 into r989; + and r988 r989 into r990; + not r41 into r991; + and r990 r991 into r992; + not r42 into r993; + and r992 r993 into r994; + not r43 into r995; + and r994 r995 into r996; + not r44 into r997; + and r996 r997 into r998; + not r45 into r999; + and r998 r999 into r1000; + not r46 into r1001; + and r1000 r1001 into r1002; + not r47 into r1003; + and r1002 r1003 into r1004; + not r48 into r1005; + and r1004 r1005 into r1006; + not r49 into r1007; + and r1006 r1007 into r1008; + not r50 into r1009; + and r1008 r1009 into r1010; + not r51 into r1011; + and r1010 r1011 into r1012; + not r52 into r1013; + and r1012 r1013 into r1014; + not r53 into r1015; + and r1014 r1015 into r1016; + not r54 into r1017; + and r1016 r1017 into r1018; + not r55 into r1019; + and r1018 r1019 into r1020; + not r56 into r1021; + and r1020 r1021 into r1022; + and r1022 r57 into r1023; + ternary r1023 29u8 r911 into r1024; + not r1 into r1025; + not r2 into r1026; + and r1025 r1026 into r1027; + not r3 into r1028; + and r1027 r1028 into r1029; + not r4 into r1030; + and r1029 r1030 into r1031; + not r5 into r1032; + and r1031 r1032 into r1033; + not r6 into r1034; + and r1033 r1034 into r1035; + not r7 into r1036; + and r1035 r1036 into r1037; + not r8 into r1038; + and r1037 r1038 into r1039; + not r9 into r1040; + and r1039 r1040 into r1041; + not r10 into r1042; + and r1041 r1042 into r1043; + not r11 into r1044; + and r1043 r1044 into r1045; + not r12 into r1046; + and r1045 r1046 into r1047; + not r13 into r1048; + and r1047 r1048 into r1049; + not r14 into r1050; + and r1049 r1050 into r1051; + not r15 into r1052; + and r1051 r1052 into r1053; + not r16 into r1054; + and r1053 r1054 into r1055; + not r17 into r1056; + and r1055 r1056 into r1057; + not r18 into r1058; + and r1057 r1058 into r1059; + not r19 into r1060; + and r1059 r1060 into r1061; + not r20 into r1062; + and r1061 r1062 into r1063; + not r21 into r1064; + and r1063 r1064 into r1065; + not r22 into r1066; + and r1065 r1066 into r1067; + not r23 into r1068; + and r1067 r1068 into r1069; + not r24 into r1070; + and r1069 r1070 into r1071; + not r25 into r1072; + and r1071 r1072 into r1073; + not r26 into r1074; + and r1073 r1074 into r1075; + not r27 into r1076; + and r1075 r1076 into r1077; + not r28 into r1078; + and r1077 r1078 into r1079; + not r29 into r1080; + and r1079 r1080 into r1081; + not r30 into r1082; + and r1081 r1082 into r1083; + not r31 into r1084; + and r1083 r1084 into r1085; + not r32 into r1086; + and r1085 r1086 into r1087; + not r33 into r1088; + and r1087 r1088 into r1089; + not r34 into r1090; + and r1089 r1090 into r1091; + not r35 into r1092; + and r1091 r1092 into r1093; + not r36 into r1094; + and r1093 r1094 into r1095; + not r37 into r1096; + and r1095 r1096 into r1097; + not r38 into r1098; + and r1097 r1098 into r1099; + not r39 into r1100; + and r1099 r1100 into r1101; + not r40 into r1102; + and r1101 r1102 into r1103; + not r41 into r1104; + and r1103 r1104 into r1105; + not r42 into r1106; + and r1105 r1106 into r1107; + not r43 into r1108; + and r1107 r1108 into r1109; + not r44 into r1110; + and r1109 r1110 into r1111; + not r45 into r1112; + and r1111 r1112 into r1113; + not r46 into r1114; + and r1113 r1114 into r1115; + not r47 into r1116; + and r1115 r1116 into r1117; + not r48 into r1118; + and r1117 r1118 into r1119; + not r49 into r1120; + and r1119 r1120 into r1121; + not r50 into r1122; + and r1121 r1122 into r1123; + not r51 into r1124; + and r1123 r1124 into r1125; + not r52 into r1126; + and r1125 r1126 into r1127; + not r53 into r1128; + and r1127 r1128 into r1129; + not r54 into r1130; + and r1129 r1130 into r1131; + not r55 into r1132; + and r1131 r1132 into r1133; + and r1133 r56 into r1134; + ternary r1134 19u8 r1024 into r1135; + not r1 into r1136; + not r2 into r1137; + and r1136 r1137 into r1138; + not r3 into r1139; + and r1138 r1139 into r1140; + not r4 into r1141; + and r1140 r1141 into r1142; + not r5 into r1143; + and r1142 r1143 into r1144; + not r6 into r1145; + and r1144 r1145 into r1146; + not r7 into r1147; + and r1146 r1147 into r1148; + not r8 into r1149; + and r1148 r1149 into r1150; + not r9 into r1151; + and r1150 r1151 into r1152; + not r10 into r1153; + and r1152 r1153 into r1154; + not r11 into r1155; + and r1154 r1155 into r1156; + not r12 into r1157; + and r1156 r1157 into r1158; + not r13 into r1159; + and r1158 r1159 into r1160; + not r14 into r1161; + and r1160 r1161 into r1162; + not r15 into r1163; + and r1162 r1163 into r1164; + not r16 into r1165; + and r1164 r1165 into r1166; + not r17 into r1167; + and r1166 r1167 into r1168; + not r18 into r1169; + and r1168 r1169 into r1170; + not r19 into r1171; + and r1170 r1171 into r1172; + not r20 into r1173; + and r1172 r1173 into r1174; + not r21 into r1175; + and r1174 r1175 into r1176; + not r22 into r1177; + and r1176 r1177 into r1178; + not r23 into r1179; + and r1178 r1179 into r1180; + not r24 into r1181; + and r1180 r1181 into r1182; + not r25 into r1183; + and r1182 r1183 into r1184; + not r26 into r1185; + and r1184 r1185 into r1186; + not r27 into r1187; + and r1186 r1187 into r1188; + not r28 into r1189; + and r1188 r1189 into r1190; + not r29 into r1191; + and r1190 r1191 into r1192; + not r30 into r1193; + and r1192 r1193 into r1194; + not r31 into r1195; + and r1194 r1195 into r1196; + not r32 into r1197; + and r1196 r1197 into r1198; + not r33 into r1199; + and r1198 r1199 into r1200; + not r34 into r1201; + and r1200 r1201 into r1202; + not r35 into r1203; + and r1202 r1203 into r1204; + not r36 into r1205; + and r1204 r1205 into r1206; + not r37 into r1207; + and r1206 r1207 into r1208; + not r38 into r1209; + and r1208 r1209 into r1210; + not r39 into r1211; + and r1210 r1211 into r1212; + not r40 into r1213; + and r1212 r1213 into r1214; + not r41 into r1215; + and r1214 r1215 into r1216; + not r42 into r1217; + and r1216 r1217 into r1218; + not r43 into r1219; + and r1218 r1219 into r1220; + not r44 into r1221; + and r1220 r1221 into r1222; + not r45 into r1223; + and r1222 r1223 into r1224; + not r46 into r1225; + and r1224 r1225 into r1226; + not r47 into r1227; + and r1226 r1227 into r1228; + not r48 into r1229; + and r1228 r1229 into r1230; + not r49 into r1231; + and r1230 r1231 into r1232; + not r50 into r1233; + and r1232 r1233 into r1234; + not r51 into r1235; + and r1234 r1235 into r1236; + not r52 into r1237; + and r1236 r1237 into r1238; + not r53 into r1239; + and r1238 r1239 into r1240; + not r54 into r1241; + and r1240 r1241 into r1242; + and r1242 r55 into r1243; + ternary r1243 0u8 r1135 into r1244; + not r1 into r1245; + not r2 into r1246; + and r1245 r1246 into r1247; + not r3 into r1248; + and r1247 r1248 into r1249; + not r4 into r1250; + and r1249 r1250 into r1251; + not r5 into r1252; + and r1251 r1252 into r1253; + not r6 into r1254; + and r1253 r1254 into r1255; + not r7 into r1256; + and r1255 r1256 into r1257; + not r8 into r1258; + and r1257 r1258 into r1259; + not r9 into r1260; + and r1259 r1260 into r1261; + not r10 into r1262; + and r1261 r1262 into r1263; + not r11 into r1264; + and r1263 r1264 into r1265; + not r12 into r1266; + and r1265 r1266 into r1267; + not r13 into r1268; + and r1267 r1268 into r1269; + not r14 into r1270; + and r1269 r1270 into r1271; + not r15 into r1272; + and r1271 r1272 into r1273; + not r16 into r1274; + and r1273 r1274 into r1275; + not r17 into r1276; + and r1275 r1276 into r1277; + not r18 into r1278; + and r1277 r1278 into r1279; + not r19 into r1280; + and r1279 r1280 into r1281; + not r20 into r1282; + and r1281 r1282 into r1283; + not r21 into r1284; + and r1283 r1284 into r1285; + not r22 into r1286; + and r1285 r1286 into r1287; + not r23 into r1288; + and r1287 r1288 into r1289; + not r24 into r1290; + and r1289 r1290 into r1291; + not r25 into r1292; + and r1291 r1292 into r1293; + not r26 into r1294; + and r1293 r1294 into r1295; + not r27 into r1296; + and r1295 r1296 into r1297; + not r28 into r1298; + and r1297 r1298 into r1299; + not r29 into r1300; + and r1299 r1300 into r1301; + not r30 into r1302; + and r1301 r1302 into r1303; + not r31 into r1304; + and r1303 r1304 into r1305; + not r32 into r1306; + and r1305 r1306 into r1307; + not r33 into r1308; + and r1307 r1308 into r1309; + not r34 into r1310; + and r1309 r1310 into r1311; + not r35 into r1312; + and r1311 r1312 into r1313; + not r36 into r1314; + and r1313 r1314 into r1315; + not r37 into r1316; + and r1315 r1316 into r1317; + not r38 into r1318; + and r1317 r1318 into r1319; + not r39 into r1320; + and r1319 r1320 into r1321; + not r40 into r1322; + and r1321 r1322 into r1323; + not r41 into r1324; + and r1323 r1324 into r1325; + not r42 into r1326; + and r1325 r1326 into r1327; + not r43 into r1328; + and r1327 r1328 into r1329; + not r44 into r1330; + and r1329 r1330 into r1331; + not r45 into r1332; + and r1331 r1332 into r1333; + not r46 into r1334; + and r1333 r1334 into r1335; + not r47 into r1336; + and r1335 r1336 into r1337; + not r48 into r1338; + and r1337 r1338 into r1339; + not r49 into r1340; + and r1339 r1340 into r1341; + not r50 into r1342; + and r1341 r1342 into r1343; + not r51 into r1344; + and r1343 r1344 into r1345; + not r52 into r1346; + and r1345 r1346 into r1347; + not r53 into r1348; + and r1347 r1348 into r1349; + and r1349 r54 into r1350; + ternary r1350 23u8 r1244 into r1351; + not r1 into r1352; + not r2 into r1353; + and r1352 r1353 into r1354; + not r3 into r1355; + and r1354 r1355 into r1356; + not r4 into r1357; + and r1356 r1357 into r1358; + not r5 into r1359; + and r1358 r1359 into r1360; + not r6 into r1361; + and r1360 r1361 into r1362; + not r7 into r1363; + and r1362 r1363 into r1364; + not r8 into r1365; + and r1364 r1365 into r1366; + not r9 into r1367; + and r1366 r1367 into r1368; + not r10 into r1369; + and r1368 r1369 into r1370; + not r11 into r1371; + and r1370 r1371 into r1372; + not r12 into r1373; + and r1372 r1373 into r1374; + not r13 into r1375; + and r1374 r1375 into r1376; + not r14 into r1377; + and r1376 r1377 into r1378; + not r15 into r1379; + and r1378 r1379 into r1380; + not r16 into r1381; + and r1380 r1381 into r1382; + not r17 into r1383; + and r1382 r1383 into r1384; + not r18 into r1385; + and r1384 r1385 into r1386; + not r19 into r1387; + and r1386 r1387 into r1388; + not r20 into r1389; + and r1388 r1389 into r1390; + not r21 into r1391; + and r1390 r1391 into r1392; + not r22 into r1393; + and r1392 r1393 into r1394; + not r23 into r1395; + and r1394 r1395 into r1396; + not r24 into r1397; + and r1396 r1397 into r1398; + not r25 into r1399; + and r1398 r1399 into r1400; + not r26 into r1401; + and r1400 r1401 into r1402; + not r27 into r1403; + and r1402 r1403 into r1404; + not r28 into r1405; + and r1404 r1405 into r1406; + not r29 into r1407; + and r1406 r1407 into r1408; + not r30 into r1409; + and r1408 r1409 into r1410; + not r31 into r1411; + and r1410 r1411 into r1412; + not r32 into r1413; + and r1412 r1413 into r1414; + not r33 into r1415; + and r1414 r1415 into r1416; + not r34 into r1417; + and r1416 r1417 into r1418; + not r35 into r1419; + and r1418 r1419 into r1420; + not r36 into r1421; + and r1420 r1421 into r1422; + not r37 into r1423; + and r1422 r1423 into r1424; + not r38 into r1425; + and r1424 r1425 into r1426; + not r39 into r1427; + and r1426 r1427 into r1428; + not r40 into r1429; + and r1428 r1429 into r1430; + not r41 into r1431; + and r1430 r1431 into r1432; + not r42 into r1433; + and r1432 r1433 into r1434; + not r43 into r1435; + and r1434 r1435 into r1436; + not r44 into r1437; + and r1436 r1437 into r1438; + not r45 into r1439; + and r1438 r1439 into r1440; + not r46 into r1441; + and r1440 r1441 into r1442; + not r47 into r1443; + and r1442 r1443 into r1444; + not r48 into r1445; + and r1444 r1445 into r1446; + not r49 into r1447; + and r1446 r1447 into r1448; + not r50 into r1449; + and r1448 r1449 into r1450; + not r51 into r1451; + and r1450 r1451 into r1452; + not r52 into r1453; + and r1452 r1453 into r1454; + and r1454 r53 into r1455; + ternary r1455 0u8 r1351 into r1456; + not r1 into r1457; + not r2 into r1458; + and r1457 r1458 into r1459; + not r3 into r1460; + and r1459 r1460 into r1461; + not r4 into r1462; + and r1461 r1462 into r1463; + not r5 into r1464; + and r1463 r1464 into r1465; + not r6 into r1466; + and r1465 r1466 into r1467; + not r7 into r1468; + and r1467 r1468 into r1469; + not r8 into r1470; + and r1469 r1470 into r1471; + not r9 into r1472; + and r1471 r1472 into r1473; + not r10 into r1474; + and r1473 r1474 into r1475; + not r11 into r1476; + and r1475 r1476 into r1477; + not r12 into r1478; + and r1477 r1478 into r1479; + not r13 into r1480; + and r1479 r1480 into r1481; + not r14 into r1482; + and r1481 r1482 into r1483; + not r15 into r1484; + and r1483 r1484 into r1485; + not r16 into r1486; + and r1485 r1486 into r1487; + not r17 into r1488; + and r1487 r1488 into r1489; + not r18 into r1490; + and r1489 r1490 into r1491; + not r19 into r1492; + and r1491 r1492 into r1493; + not r20 into r1494; + and r1493 r1494 into r1495; + not r21 into r1496; + and r1495 r1496 into r1497; + not r22 into r1498; + and r1497 r1498 into r1499; + not r23 into r1500; + and r1499 r1500 into r1501; + not r24 into r1502; + and r1501 r1502 into r1503; + not r25 into r1504; + and r1503 r1504 into r1505; + not r26 into r1506; + and r1505 r1506 into r1507; + not r27 into r1508; + and r1507 r1508 into r1509; + not r28 into r1510; + and r1509 r1510 into r1511; + not r29 into r1512; + and r1511 r1512 into r1513; + not r30 into r1514; + and r1513 r1514 into r1515; + not r31 into r1516; + and r1515 r1516 into r1517; + not r32 into r1518; + and r1517 r1518 into r1519; + not r33 into r1520; + and r1519 r1520 into r1521; + not r34 into r1522; + and r1521 r1522 into r1523; + not r35 into r1524; + and r1523 r1524 into r1525; + not r36 into r1526; + and r1525 r1526 into r1527; + not r37 into r1528; + and r1527 r1528 into r1529; + not r38 into r1530; + and r1529 r1530 into r1531; + not r39 into r1532; + and r1531 r1532 into r1533; + not r40 into r1534; + and r1533 r1534 into r1535; + not r41 into r1536; + and r1535 r1536 into r1537; + not r42 into r1538; + and r1537 r1538 into r1539; + not r43 into r1540; + and r1539 r1540 into r1541; + not r44 into r1542; + and r1541 r1542 into r1543; + not r45 into r1544; + and r1543 r1544 into r1545; + not r46 into r1546; + and r1545 r1546 into r1547; + not r47 into r1548; + and r1547 r1548 into r1549; + not r48 into r1550; + and r1549 r1550 into r1551; + not r49 into r1552; + and r1551 r1552 into r1553; + not r50 into r1554; + and r1553 r1554 into r1555; + not r51 into r1556; + and r1555 r1556 into r1557; + and r1557 r52 into r1558; + ternary r1558 0u8 r1456 into r1559; + not r1 into r1560; + not r2 into r1561; + and r1560 r1561 into r1562; + not r3 into r1563; + and r1562 r1563 into r1564; + not r4 into r1565; + and r1564 r1565 into r1566; + not r5 into r1567; + and r1566 r1567 into r1568; + not r6 into r1569; + and r1568 r1569 into r1570; + not r7 into r1571; + and r1570 r1571 into r1572; + not r8 into r1573; + and r1572 r1573 into r1574; + not r9 into r1575; + and r1574 r1575 into r1576; + not r10 into r1577; + and r1576 r1577 into r1578; + not r11 into r1579; + and r1578 r1579 into r1580; + not r12 into r1581; + and r1580 r1581 into r1582; + not r13 into r1583; + and r1582 r1583 into r1584; + not r14 into r1585; + and r1584 r1585 into r1586; + not r15 into r1587; + and r1586 r1587 into r1588; + not r16 into r1589; + and r1588 r1589 into r1590; + not r17 into r1591; + and r1590 r1591 into r1592; + not r18 into r1593; + and r1592 r1593 into r1594; + not r19 into r1595; + and r1594 r1595 into r1596; + not r20 into r1597; + and r1596 r1597 into r1598; + not r21 into r1599; + and r1598 r1599 into r1600; + not r22 into r1601; + and r1600 r1601 into r1602; + not r23 into r1603; + and r1602 r1603 into r1604; + not r24 into r1605; + and r1604 r1605 into r1606; + not r25 into r1607; + and r1606 r1607 into r1608; + not r26 into r1609; + and r1608 r1609 into r1610; + not r27 into r1611; + and r1610 r1611 into r1612; + not r28 into r1613; + and r1612 r1613 into r1614; + not r29 into r1615; + and r1614 r1615 into r1616; + not r30 into r1617; + and r1616 r1617 into r1618; + not r31 into r1619; + and r1618 r1619 into r1620; + not r32 into r1621; + and r1620 r1621 into r1622; + not r33 into r1623; + and r1622 r1623 into r1624; + not r34 into r1625; + and r1624 r1625 into r1626; + not r35 into r1627; + and r1626 r1627 into r1628; + not r36 into r1629; + and r1628 r1629 into r1630; + not r37 into r1631; + and r1630 r1631 into r1632; + not r38 into r1633; + and r1632 r1633 into r1634; + not r39 into r1635; + and r1634 r1635 into r1636; + not r40 into r1637; + and r1636 r1637 into r1638; + not r41 into r1639; + and r1638 r1639 into r1640; + not r42 into r1641; + and r1640 r1641 into r1642; + not r43 into r1643; + and r1642 r1643 into r1644; + not r44 into r1645; + and r1644 r1645 into r1646; + not r45 into r1647; + and r1646 r1647 into r1648; + not r46 into r1649; + and r1648 r1649 into r1650; + not r47 into r1651; + and r1650 r1651 into r1652; + not r48 into r1653; + and r1652 r1653 into r1654; + not r49 into r1655; + and r1654 r1655 into r1656; + not r50 into r1657; + and r1656 r1657 into r1658; + and r1658 r51 into r1659; + ternary r1659 0u8 r1559 into r1660; + not r1 into r1661; + not r2 into r1662; + and r1661 r1662 into r1663; + not r3 into r1664; + and r1663 r1664 into r1665; + not r4 into r1666; + and r1665 r1666 into r1667; + not r5 into r1668; + and r1667 r1668 into r1669; + not r6 into r1670; + and r1669 r1670 into r1671; + not r7 into r1672; + and r1671 r1672 into r1673; + not r8 into r1674; + and r1673 r1674 into r1675; + not r9 into r1676; + and r1675 r1676 into r1677; + not r10 into r1678; + and r1677 r1678 into r1679; + not r11 into r1680; + and r1679 r1680 into r1681; + not r12 into r1682; + and r1681 r1682 into r1683; + not r13 into r1684; + and r1683 r1684 into r1685; + not r14 into r1686; + and r1685 r1686 into r1687; + not r15 into r1688; + and r1687 r1688 into r1689; + not r16 into r1690; + and r1689 r1690 into r1691; + not r17 into r1692; + and r1691 r1692 into r1693; + not r18 into r1694; + and r1693 r1694 into r1695; + not r19 into r1696; + and r1695 r1696 into r1697; + not r20 into r1698; + and r1697 r1698 into r1699; + not r21 into r1700; + and r1699 r1700 into r1701; + not r22 into r1702; + and r1701 r1702 into r1703; + not r23 into r1704; + and r1703 r1704 into r1705; + not r24 into r1706; + and r1705 r1706 into r1707; + not r25 into r1708; + and r1707 r1708 into r1709; + not r26 into r1710; + and r1709 r1710 into r1711; + not r27 into r1712; + and r1711 r1712 into r1713; + not r28 into r1714; + and r1713 r1714 into r1715; + not r29 into r1716; + and r1715 r1716 into r1717; + not r30 into r1718; + and r1717 r1718 into r1719; + not r31 into r1720; + and r1719 r1720 into r1721; + not r32 into r1722; + and r1721 r1722 into r1723; + not r33 into r1724; + and r1723 r1724 into r1725; + not r34 into r1726; + and r1725 r1726 into r1727; + not r35 into r1728; + and r1727 r1728 into r1729; + not r36 into r1730; + and r1729 r1730 into r1731; + not r37 into r1732; + and r1731 r1732 into r1733; + not r38 into r1734; + and r1733 r1734 into r1735; + not r39 into r1736; + and r1735 r1736 into r1737; + not r40 into r1738; + and r1737 r1738 into r1739; + not r41 into r1740; + and r1739 r1740 into r1741; + not r42 into r1742; + and r1741 r1742 into r1743; + not r43 into r1744; + and r1743 r1744 into r1745; + not r44 into r1746; + and r1745 r1746 into r1747; + not r45 into r1748; + and r1747 r1748 into r1749; + not r46 into r1750; + and r1749 r1750 into r1751; + not r47 into r1752; + and r1751 r1752 into r1753; + not r48 into r1754; + and r1753 r1754 into r1755; + not r49 into r1756; + and r1755 r1756 into r1757; + and r1757 r50 into r1758; + ternary r1758 0u8 r1660 into r1759; + not r1 into r1760; + not r2 into r1761; + and r1760 r1761 into r1762; + not r3 into r1763; + and r1762 r1763 into r1764; + not r4 into r1765; + and r1764 r1765 into r1766; + not r5 into r1767; + and r1766 r1767 into r1768; + not r6 into r1769; + and r1768 r1769 into r1770; + not r7 into r1771; + and r1770 r1771 into r1772; + not r8 into r1773; + and r1772 r1773 into r1774; + not r9 into r1775; + and r1774 r1775 into r1776; + not r10 into r1777; + and r1776 r1777 into r1778; + not r11 into r1779; + and r1778 r1779 into r1780; + not r12 into r1781; + and r1780 r1781 into r1782; + not r13 into r1783; + and r1782 r1783 into r1784; + not r14 into r1785; + and r1784 r1785 into r1786; + not r15 into r1787; + and r1786 r1787 into r1788; + not r16 into r1789; + and r1788 r1789 into r1790; + not r17 into r1791; + and r1790 r1791 into r1792; + not r18 into r1793; + and r1792 r1793 into r1794; + not r19 into r1795; + and r1794 r1795 into r1796; + not r20 into r1797; + and r1796 r1797 into r1798; + not r21 into r1799; + and r1798 r1799 into r1800; + not r22 into r1801; + and r1800 r1801 into r1802; + not r23 into r1803; + and r1802 r1803 into r1804; + not r24 into r1805; + and r1804 r1805 into r1806; + not r25 into r1807; + and r1806 r1807 into r1808; + not r26 into r1809; + and r1808 r1809 into r1810; + not r27 into r1811; + and r1810 r1811 into r1812; + not r28 into r1813; + and r1812 r1813 into r1814; + not r29 into r1815; + and r1814 r1815 into r1816; + not r30 into r1817; + and r1816 r1817 into r1818; + not r31 into r1819; + and r1818 r1819 into r1820; + not r32 into r1821; + and r1820 r1821 into r1822; + not r33 into r1823; + and r1822 r1823 into r1824; + not r34 into r1825; + and r1824 r1825 into r1826; + not r35 into r1827; + and r1826 r1827 into r1828; + not r36 into r1829; + and r1828 r1829 into r1830; + not r37 into r1831; + and r1830 r1831 into r1832; + not r38 into r1833; + and r1832 r1833 into r1834; + not r39 into r1835; + and r1834 r1835 into r1836; + not r40 into r1837; + and r1836 r1837 into r1838; + not r41 into r1839; + and r1838 r1839 into r1840; + not r42 into r1841; + and r1840 r1841 into r1842; + not r43 into r1843; + and r1842 r1843 into r1844; + not r44 into r1845; + and r1844 r1845 into r1846; + not r45 into r1847; + and r1846 r1847 into r1848; + not r46 into r1849; + and r1848 r1849 into r1850; + not r47 into r1851; + and r1850 r1851 into r1852; + not r48 into r1853; + and r1852 r1853 into r1854; + and r1854 r49 into r1855; + ternary r1855 30u8 r1759 into r1856; + not r1 into r1857; + not r2 into r1858; + and r1857 r1858 into r1859; + not r3 into r1860; + and r1859 r1860 into r1861; + not r4 into r1862; + and r1861 r1862 into r1863; + not r5 into r1864; + and r1863 r1864 into r1865; + not r6 into r1866; + and r1865 r1866 into r1867; + not r7 into r1868; + and r1867 r1868 into r1869; + not r8 into r1870; + and r1869 r1870 into r1871; + not r9 into r1872; + and r1871 r1872 into r1873; + not r10 into r1874; + and r1873 r1874 into r1875; + not r11 into r1876; + and r1875 r1876 into r1877; + not r12 into r1878; + and r1877 r1878 into r1879; + not r13 into r1880; + and r1879 r1880 into r1881; + not r14 into r1882; + and r1881 r1882 into r1883; + not r15 into r1884; + and r1883 r1884 into r1885; + not r16 into r1886; + and r1885 r1886 into r1887; + not r17 into r1888; + and r1887 r1888 into r1889; + not r18 into r1890; + and r1889 r1890 into r1891; + not r19 into r1892; + and r1891 r1892 into r1893; + not r20 into r1894; + and r1893 r1894 into r1895; + not r21 into r1896; + and r1895 r1896 into r1897; + not r22 into r1898; + and r1897 r1898 into r1899; + not r23 into r1900; + and r1899 r1900 into r1901; + not r24 into r1902; + and r1901 r1902 into r1903; + not r25 into r1904; + and r1903 r1904 into r1905; + not r26 into r1906; + and r1905 r1906 into r1907; + not r27 into r1908; + and r1907 r1908 into r1909; + not r28 into r1910; + and r1909 r1910 into r1911; + not r29 into r1912; + and r1911 r1912 into r1913; + not r30 into r1914; + and r1913 r1914 into r1915; + not r31 into r1916; + and r1915 r1916 into r1917; + not r32 into r1918; + and r1917 r1918 into r1919; + not r33 into r1920; + and r1919 r1920 into r1921; + not r34 into r1922; + and r1921 r1922 into r1923; + not r35 into r1924; + and r1923 r1924 into r1925; + not r36 into r1926; + and r1925 r1926 into r1927; + not r37 into r1928; + and r1927 r1928 into r1929; + not r38 into r1930; + and r1929 r1930 into r1931; + not r39 into r1932; + and r1931 r1932 into r1933; + not r40 into r1934; + and r1933 r1934 into r1935; + not r41 into r1936; + and r1935 r1936 into r1937; + not r42 into r1938; + and r1937 r1938 into r1939; + not r43 into r1940; + and r1939 r1940 into r1941; + not r44 into r1942; + and r1941 r1942 into r1943; + not r45 into r1944; + and r1943 r1944 into r1945; + not r46 into r1946; + and r1945 r1946 into r1947; + not r47 into r1948; + and r1947 r1948 into r1949; + and r1949 r48 into r1950; + ternary r1950 26u8 r1856 into r1951; + not r1 into r1952; + not r2 into r1953; + and r1952 r1953 into r1954; + not r3 into r1955; + and r1954 r1955 into r1956; + not r4 into r1957; + and r1956 r1957 into r1958; + not r5 into r1959; + and r1958 r1959 into r1960; + not r6 into r1961; + and r1960 r1961 into r1962; + not r7 into r1963; + and r1962 r1963 into r1964; + not r8 into r1965; + and r1964 r1965 into r1966; + not r9 into r1967; + and r1966 r1967 into r1968; + not r10 into r1969; + and r1968 r1969 into r1970; + not r11 into r1971; + and r1970 r1971 into r1972; + not r12 into r1973; + and r1972 r1973 into r1974; + not r13 into r1975; + and r1974 r1975 into r1976; + not r14 into r1977; + and r1976 r1977 into r1978; + not r15 into r1979; + and r1978 r1979 into r1980; + not r16 into r1981; + and r1980 r1981 into r1982; + not r17 into r1983; + and r1982 r1983 into r1984; + not r18 into r1985; + and r1984 r1985 into r1986; + not r19 into r1987; + and r1986 r1987 into r1988; + not r20 into r1989; + and r1988 r1989 into r1990; + not r21 into r1991; + and r1990 r1991 into r1992; + not r22 into r1993; + and r1992 r1993 into r1994; + not r23 into r1995; + and r1994 r1995 into r1996; + not r24 into r1997; + and r1996 r1997 into r1998; + not r25 into r1999; + and r1998 r1999 into r2000; + not r26 into r2001; + and r2000 r2001 into r2002; + not r27 into r2003; + and r2002 r2003 into r2004; + not r28 into r2005; + and r2004 r2005 into r2006; + not r29 into r2007; + and r2006 r2007 into r2008; + not r30 into r2009; + and r2008 r2009 into r2010; + not r31 into r2011; + and r2010 r2011 into r2012; + not r32 into r2013; + and r2012 r2013 into r2014; + not r33 into r2015; + and r2014 r2015 into r2016; + not r34 into r2017; + and r2016 r2017 into r2018; + not r35 into r2019; + and r2018 r2019 into r2020; + not r36 into r2021; + and r2020 r2021 into r2022; + not r37 into r2023; + and r2022 r2023 into r2024; + not r38 into r2025; + and r2024 r2025 into r2026; + not r39 into r2027; + and r2026 r2027 into r2028; + not r40 into r2029; + and r2028 r2029 into r2030; + not r41 into r2031; + and r2030 r2031 into r2032; + not r42 into r2033; + and r2032 r2033 into r2034; + not r43 into r2035; + and r2034 r2035 into r2036; + not r44 into r2037; + and r2036 r2037 into r2038; + not r45 into r2039; + and r2038 r2039 into r2040; + not r46 into r2041; + and r2040 r2041 into r2042; + and r2042 r47 into r2043; + ternary r2043 20u8 r1951 into r2044; + not r1 into r2045; + not r2 into r2046; + and r2045 r2046 into r2047; + not r3 into r2048; + and r2047 r2048 into r2049; + not r4 into r2050; + and r2049 r2050 into r2051; + not r5 into r2052; + and r2051 r2052 into r2053; + not r6 into r2054; + and r2053 r2054 into r2055; + not r7 into r2056; + and r2055 r2056 into r2057; + not r8 into r2058; + and r2057 r2058 into r2059; + not r9 into r2060; + and r2059 r2060 into r2061; + not r10 into r2062; + and r2061 r2062 into r2063; + not r11 into r2064; + and r2063 r2064 into r2065; + not r12 into r2066; + and r2065 r2066 into r2067; + not r13 into r2068; + and r2067 r2068 into r2069; + not r14 into r2070; + and r2069 r2070 into r2071; + not r15 into r2072; + and r2071 r2072 into r2073; + not r16 into r2074; + and r2073 r2074 into r2075; + not r17 into r2076; + and r2075 r2076 into r2077; + not r18 into r2078; + and r2077 r2078 into r2079; + not r19 into r2080; + and r2079 r2080 into r2081; + not r20 into r2082; + and r2081 r2082 into r2083; + not r21 into r2084; + and r2083 r2084 into r2085; + not r22 into r2086; + and r2085 r2086 into r2087; + not r23 into r2088; + and r2087 r2088 into r2089; + not r24 into r2090; + and r2089 r2090 into r2091; + not r25 into r2092; + and r2091 r2092 into r2093; + not r26 into r2094; + and r2093 r2094 into r2095; + not r27 into r2096; + and r2095 r2096 into r2097; + not r28 into r2098; + and r2097 r2098 into r2099; + not r29 into r2100; + and r2099 r2100 into r2101; + not r30 into r2102; + and r2101 r2102 into r2103; + not r31 into r2104; + and r2103 r2104 into r2105; + not r32 into r2106; + and r2105 r2106 into r2107; + not r33 into r2108; + and r2107 r2108 into r2109; + not r34 into r2110; + and r2109 r2110 into r2111; + not r35 into r2112; + and r2111 r2112 into r2113; + not r36 into r2114; + and r2113 r2114 into r2115; + not r37 into r2116; + and r2115 r2116 into r2117; + not r38 into r2118; + and r2117 r2118 into r2119; + not r39 into r2120; + and r2119 r2120 into r2121; + not r40 into r2122; + and r2121 r2122 into r2123; + not r41 into r2124; + and r2123 r2124 into r2125; + not r42 into r2126; + and r2125 r2126 into r2127; + not r43 into r2128; + and r2127 r2128 into r2129; + not r44 into r2130; + and r2129 r2130 into r2131; + not r45 into r2132; + and r2131 r2132 into r2133; + and r2133 r46 into r2134; + ternary r2134 0u8 r2044 into r2135; + not r1 into r2136; + not r2 into r2137; + and r2136 r2137 into r2138; + not r3 into r2139; + and r2138 r2139 into r2140; + not r4 into r2141; + and r2140 r2141 into r2142; + not r5 into r2143; + and r2142 r2143 into r2144; + not r6 into r2145; + and r2144 r2145 into r2146; + not r7 into r2147; + and r2146 r2147 into r2148; + not r8 into r2149; + and r2148 r2149 into r2150; + not r9 into r2151; + and r2150 r2151 into r2152; + not r10 into r2153; + and r2152 r2153 into r2154; + not r11 into r2155; + and r2154 r2155 into r2156; + not r12 into r2157; + and r2156 r2157 into r2158; + not r13 into r2159; + and r2158 r2159 into r2160; + not r14 into r2161; + and r2160 r2161 into r2162; + not r15 into r2163; + and r2162 r2163 into r2164; + not r16 into r2165; + and r2164 r2165 into r2166; + not r17 into r2167; + and r2166 r2167 into r2168; + not r18 into r2169; + and r2168 r2169 into r2170; + not r19 into r2171; + and r2170 r2171 into r2172; + not r20 into r2173; + and r2172 r2173 into r2174; + not r21 into r2175; + and r2174 r2175 into r2176; + not r22 into r2177; + and r2176 r2177 into r2178; + not r23 into r2179; + and r2178 r2179 into r2180; + not r24 into r2181; + and r2180 r2181 into r2182; + not r25 into r2183; + and r2182 r2183 into r2184; + not r26 into r2185; + and r2184 r2185 into r2186; + not r27 into r2187; + and r2186 r2187 into r2188; + not r28 into r2189; + and r2188 r2189 into r2190; + not r29 into r2191; + and r2190 r2191 into r2192; + not r30 into r2193; + and r2192 r2193 into r2194; + not r31 into r2195; + and r2194 r2195 into r2196; + not r32 into r2197; + and r2196 r2197 into r2198; + not r33 into r2199; + and r2198 r2199 into r2200; + not r34 into r2201; + and r2200 r2201 into r2202; + not r35 into r2203; + and r2202 r2203 into r2204; + not r36 into r2205; + and r2204 r2205 into r2206; + not r37 into r2207; + and r2206 r2207 into r2208; + not r38 into r2209; + and r2208 r2209 into r2210; + not r39 into r2211; + and r2210 r2211 into r2212; + not r40 into r2213; + and r2212 r2213 into r2214; + not r41 into r2215; + and r2214 r2215 into r2216; + not r42 into r2217; + and r2216 r2217 into r2218; + not r43 into r2219; + and r2218 r2219 into r2220; + not r44 into r2221; + and r2220 r2221 into r2222; + and r2222 r45 into r2223; + ternary r2223 0u8 r2135 into r2224; + not r1 into r2225; + not r2 into r2226; + and r2225 r2226 into r2227; + not r3 into r2228; + and r2227 r2228 into r2229; + not r4 into r2230; + and r2229 r2230 into r2231; + not r5 into r2232; + and r2231 r2232 into r2233; + not r6 into r2234; + and r2233 r2234 into r2235; + not r7 into r2236; + and r2235 r2236 into r2237; + not r8 into r2238; + and r2237 r2238 into r2239; + not r9 into r2240; + and r2239 r2240 into r2241; + not r10 into r2242; + and r2241 r2242 into r2243; + not r11 into r2244; + and r2243 r2244 into r2245; + not r12 into r2246; + and r2245 r2246 into r2247; + not r13 into r2248; + and r2247 r2248 into r2249; + not r14 into r2250; + and r2249 r2250 into r2251; + not r15 into r2252; + and r2251 r2252 into r2253; + not r16 into r2254; + and r2253 r2254 into r2255; + not r17 into r2256; + and r2255 r2256 into r2257; + not r18 into r2258; + and r2257 r2258 into r2259; + not r19 into r2260; + and r2259 r2260 into r2261; + not r20 into r2262; + and r2261 r2262 into r2263; + not r21 into r2264; + and r2263 r2264 into r2265; + not r22 into r2266; + and r2265 r2266 into r2267; + not r23 into r2268; + and r2267 r2268 into r2269; + not r24 into r2270; + and r2269 r2270 into r2271; + not r25 into r2272; + and r2271 r2272 into r2273; + not r26 into r2274; + and r2273 r2274 into r2275; + not r27 into r2276; + and r2275 r2276 into r2277; + not r28 into r2278; + and r2277 r2278 into r2279; + not r29 into r2280; + and r2279 r2280 into r2281; + not r30 into r2282; + and r2281 r2282 into r2283; + not r31 into r2284; + and r2283 r2284 into r2285; + not r32 into r2286; + and r2285 r2286 into r2287; + not r33 into r2288; + and r2287 r2288 into r2289; + not r34 into r2290; + and r2289 r2290 into r2291; + not r35 into r2292; + and r2291 r2292 into r2293; + not r36 into r2294; + and r2293 r2294 into r2295; + not r37 into r2296; + and r2295 r2296 into r2297; + not r38 into r2298; + and r2297 r2298 into r2299; + not r39 into r2300; + and r2299 r2300 into r2301; + not r40 into r2302; + and r2301 r2302 into r2303; + not r41 into r2304; + and r2303 r2304 into r2305; + not r42 into r2306; + and r2305 r2306 into r2307; + not r43 into r2308; + and r2307 r2308 into r2309; + and r2309 r44 into r2310; + ternary r2310 24u8 r2224 into r2311; + not r1 into r2312; + not r2 into r2313; + and r2312 r2313 into r2314; + not r3 into r2315; + and r2314 r2315 into r2316; + not r4 into r2317; + and r2316 r2317 into r2318; + not r5 into r2319; + and r2318 r2319 into r2320; + not r6 into r2321; + and r2320 r2321 into r2322; + not r7 into r2323; + and r2322 r2323 into r2324; + not r8 into r2325; + and r2324 r2325 into r2326; + not r9 into r2327; + and r2326 r2327 into r2328; + not r10 into r2329; + and r2328 r2329 into r2330; + not r11 into r2331; + and r2330 r2331 into r2332; + not r12 into r2333; + and r2332 r2333 into r2334; + not r13 into r2335; + and r2334 r2335 into r2336; + not r14 into r2337; + and r2336 r2337 into r2338; + not r15 into r2339; + and r2338 r2339 into r2340; + not r16 into r2341; + and r2340 r2341 into r2342; + not r17 into r2343; + and r2342 r2343 into r2344; + not r18 into r2345; + and r2344 r2345 into r2346; + not r19 into r2347; + and r2346 r2347 into r2348; + not r20 into r2349; + and r2348 r2349 into r2350; + not r21 into r2351; + and r2350 r2351 into r2352; + not r22 into r2353; + and r2352 r2353 into r2354; + not r23 into r2355; + and r2354 r2355 into r2356; + not r24 into r2357; + and r2356 r2357 into r2358; + not r25 into r2359; + and r2358 r2359 into r2360; + not r26 into r2361; + and r2360 r2361 into r2362; + not r27 into r2363; + and r2362 r2363 into r2364; + not r28 into r2365; + and r2364 r2365 into r2366; + not r29 into r2367; + and r2366 r2367 into r2368; + not r30 into r2369; + and r2368 r2369 into r2370; + not r31 into r2371; + and r2370 r2371 into r2372; + not r32 into r2373; + and r2372 r2373 into r2374; + not r33 into r2375; + and r2374 r2375 into r2376; + not r34 into r2377; + and r2376 r2377 into r2378; + not r35 into r2379; + and r2378 r2379 into r2380; + not r36 into r2381; + and r2380 r2381 into r2382; + not r37 into r2383; + and r2382 r2383 into r2384; + not r38 into r2385; + and r2384 r2385 into r2386; + not r39 into r2387; + and r2386 r2387 into r2388; + not r40 into r2389; + and r2388 r2389 into r2390; + not r41 into r2391; + and r2390 r2391 into r2392; + not r42 into r2393; + and r2392 r2393 into r2394; + and r2394 r43 into r2395; + ternary r2395 0u8 r2311 into r2396; + not r1 into r2397; + not r2 into r2398; + and r2397 r2398 into r2399; + not r3 into r2400; + and r2399 r2400 into r2401; + not r4 into r2402; + and r2401 r2402 into r2403; + not r5 into r2404; + and r2403 r2404 into r2405; + not r6 into r2406; + and r2405 r2406 into r2407; + not r7 into r2408; + and r2407 r2408 into r2409; + not r8 into r2410; + and r2409 r2410 into r2411; + not r9 into r2412; + and r2411 r2412 into r2413; + not r10 into r2414; + and r2413 r2414 into r2415; + not r11 into r2416; + and r2415 r2416 into r2417; + not r12 into r2418; + and r2417 r2418 into r2419; + not r13 into r2420; + and r2419 r2420 into r2421; + not r14 into r2422; + and r2421 r2422 into r2423; + not r15 into r2424; + and r2423 r2424 into r2425; + not r16 into r2426; + and r2425 r2426 into r2427; + not r17 into r2428; + and r2427 r2428 into r2429; + not r18 into r2430; + and r2429 r2430 into r2431; + not r19 into r2432; + and r2431 r2432 into r2433; + not r20 into r2434; + and r2433 r2434 into r2435; + not r21 into r2436; + and r2435 r2436 into r2437; + not r22 into r2438; + and r2437 r2438 into r2439; + not r23 into r2440; + and r2439 r2440 into r2441; + not r24 into r2442; + and r2441 r2442 into r2443; + not r25 into r2444; + and r2443 r2444 into r2445; + not r26 into r2446; + and r2445 r2446 into r2447; + not r27 into r2448; + and r2447 r2448 into r2449; + not r28 into r2450; + and r2449 r2450 into r2451; + not r29 into r2452; + and r2451 r2452 into r2453; + not r30 into r2454; + and r2453 r2454 into r2455; + not r31 into r2456; + and r2455 r2456 into r2457; + not r32 into r2458; + and r2457 r2458 into r2459; + not r33 into r2460; + and r2459 r2460 into r2461; + not r34 into r2462; + and r2461 r2462 into r2463; + not r35 into r2464; + and r2463 r2464 into r2465; + not r36 into r2466; + and r2465 r2466 into r2467; + not r37 into r2468; + and r2467 r2468 into r2469; + not r38 into r2470; + and r2469 r2470 into r2471; + not r39 into r2472; + and r2471 r2472 into r2473; + not r40 into r2474; + and r2473 r2474 into r2475; + not r41 into r2476; + and r2475 r2476 into r2477; + and r2477 r42 into r2478; + ternary r2478 0u8 r2396 into r2479; + not r1 into r2480; + not r2 into r2481; + and r2480 r2481 into r2482; + not r3 into r2483; + and r2482 r2483 into r2484; + not r4 into r2485; + and r2484 r2485 into r2486; + not r5 into r2487; + and r2486 r2487 into r2488; + not r6 into r2489; + and r2488 r2489 into r2490; + not r7 into r2491; + and r2490 r2491 into r2492; + not r8 into r2493; + and r2492 r2493 into r2494; + not r9 into r2495; + and r2494 r2495 into r2496; + not r10 into r2497; + and r2496 r2497 into r2498; + not r11 into r2499; + and r2498 r2499 into r2500; + not r12 into r2501; + and r2500 r2501 into r2502; + not r13 into r2503; + and r2502 r2503 into r2504; + not r14 into r2505; + and r2504 r2505 into r2506; + not r15 into r2507; + and r2506 r2507 into r2508; + not r16 into r2509; + and r2508 r2509 into r2510; + not r17 into r2511; + and r2510 r2511 into r2512; + not r18 into r2513; + and r2512 r2513 into r2514; + not r19 into r2515; + and r2514 r2515 into r2516; + not r20 into r2517; + and r2516 r2517 into r2518; + not r21 into r2519; + and r2518 r2519 into r2520; + not r22 into r2521; + and r2520 r2521 into r2522; + not r23 into r2523; + and r2522 r2523 into r2524; + not r24 into r2525; + and r2524 r2525 into r2526; + not r25 into r2527; + and r2526 r2527 into r2528; + not r26 into r2529; + and r2528 r2529 into r2530; + not r27 into r2531; + and r2530 r2531 into r2532; + not r28 into r2533; + and r2532 r2533 into r2534; + not r29 into r2535; + and r2534 r2535 into r2536; + not r30 into r2537; + and r2536 r2537 into r2538; + not r31 into r2539; + and r2538 r2539 into r2540; + not r32 into r2541; + and r2540 r2541 into r2542; + not r33 into r2543; + and r2542 r2543 into r2544; + not r34 into r2545; + and r2544 r2545 into r2546; + not r35 into r2547; + and r2546 r2547 into r2548; + not r36 into r2549; + and r2548 r2549 into r2550; + not r37 into r2551; + and r2550 r2551 into r2552; + not r38 into r2553; + and r2552 r2553 into r2554; + not r39 into r2555; + and r2554 r2555 into r2556; + not r40 into r2557; + and r2556 r2557 into r2558; + and r2558 r41 into r2559; + ternary r2559 9u8 r2479 into r2560; + not r1 into r2561; + not r2 into r2562; + and r2561 r2562 into r2563; + not r3 into r2564; + and r2563 r2564 into r2565; + not r4 into r2566; + and r2565 r2566 into r2567; + not r5 into r2568; + and r2567 r2568 into r2569; + not r6 into r2570; + and r2569 r2570 into r2571; + not r7 into r2572; + and r2571 r2572 into r2573; + not r8 into r2574; + and r2573 r2574 into r2575; + not r9 into r2576; + and r2575 r2576 into r2577; + not r10 into r2578; + and r2577 r2578 into r2579; + not r11 into r2580; + and r2579 r2580 into r2581; + not r12 into r2582; + and r2581 r2582 into r2583; + not r13 into r2584; + and r2583 r2584 into r2585; + not r14 into r2586; + and r2585 r2586 into r2587; + not r15 into r2588; + and r2587 r2588 into r2589; + not r16 into r2590; + and r2589 r2590 into r2591; + not r17 into r2592; + and r2591 r2592 into r2593; + not r18 into r2594; + and r2593 r2594 into r2595; + not r19 into r2596; + and r2595 r2596 into r2597; + not r20 into r2598; + and r2597 r2598 into r2599; + not r21 into r2600; + and r2599 r2600 into r2601; + not r22 into r2602; + and r2601 r2602 into r2603; + not r23 into r2604; + and r2603 r2604 into r2605; + not r24 into r2606; + and r2605 r2606 into r2607; + not r25 into r2608; + and r2607 r2608 into r2609; + not r26 into r2610; + and r2609 r2610 into r2611; + not r27 into r2612; + and r2611 r2612 into r2613; + not r28 into r2614; + and r2613 r2614 into r2615; + not r29 into r2616; + and r2615 r2616 into r2617; + not r30 into r2618; + and r2617 r2618 into r2619; + not r31 into r2620; + and r2619 r2620 into r2621; + not r32 into r2622; + and r2621 r2622 into r2623; + not r33 into r2624; + and r2623 r2624 into r2625; + not r34 into r2626; + and r2625 r2626 into r2627; + not r35 into r2628; + and r2627 r2628 into r2629; + not r36 into r2630; + and r2629 r2630 into r2631; + not r37 into r2632; + and r2631 r2632 into r2633; + not r38 into r2634; + and r2633 r2634 into r2635; + not r39 into r2636; + and r2635 r2636 into r2637; + and r2637 r40 into r2638; + ternary r2638 0u8 r2560 into r2639; + not r1 into r2640; + not r2 into r2641; + and r2640 r2641 into r2642; + not r3 into r2643; + and r2642 r2643 into r2644; + not r4 into r2645; + and r2644 r2645 into r2646; + not r5 into r2647; + and r2646 r2647 into r2648; + not r6 into r2649; + and r2648 r2649 into r2650; + not r7 into r2651; + and r2650 r2651 into r2652; + not r8 into r2653; + and r2652 r2653 into r2654; + not r9 into r2655; + and r2654 r2655 into r2656; + not r10 into r2657; + and r2656 r2657 into r2658; + not r11 into r2659; + and r2658 r2659 into r2660; + not r12 into r2661; + and r2660 r2661 into r2662; + not r13 into r2663; + and r2662 r2663 into r2664; + not r14 into r2665; + and r2664 r2665 into r2666; + not r15 into r2667; + and r2666 r2667 into r2668; + not r16 into r2669; + and r2668 r2669 into r2670; + not r17 into r2671; + and r2670 r2671 into r2672; + not r18 into r2673; + and r2672 r2673 into r2674; + not r19 into r2675; + and r2674 r2675 into r2676; + not r20 into r2677; + and r2676 r2677 into r2678; + not r21 into r2679; + and r2678 r2679 into r2680; + not r22 into r2681; + and r2680 r2681 into r2682; + not r23 into r2683; + and r2682 r2683 into r2684; + not r24 into r2685; + and r2684 r2685 into r2686; + not r25 into r2687; + and r2686 r2687 into r2688; + not r26 into r2689; + and r2688 r2689 into r2690; + not r27 into r2691; + and r2690 r2691 into r2692; + not r28 into r2693; + and r2692 r2693 into r2694; + not r29 into r2695; + and r2694 r2695 into r2696; + not r30 into r2697; + and r2696 r2697 into r2698; + not r31 into r2699; + and r2698 r2699 into r2700; + not r32 into r2701; + and r2700 r2701 into r2702; + not r33 into r2703; + and r2702 r2703 into r2704; + not r34 into r2705; + and r2704 r2705 into r2706; + not r35 into r2707; + and r2706 r2707 into r2708; + not r36 into r2709; + and r2708 r2709 into r2710; + not r37 into r2711; + and r2710 r2711 into r2712; + not r38 into r2713; + and r2712 r2713 into r2714; + and r2714 r39 into r2715; + ternary r2715 0u8 r2639 into r2716; + not r1 into r2717; + not r2 into r2718; + and r2717 r2718 into r2719; + not r3 into r2720; + and r2719 r2720 into r2721; + not r4 into r2722; + and r2721 r2722 into r2723; + not r5 into r2724; + and r2723 r2724 into r2725; + not r6 into r2726; + and r2725 r2726 into r2727; + not r7 into r2728; + and r2727 r2728 into r2729; + not r8 into r2730; + and r2729 r2730 into r2731; + not r9 into r2732; + and r2731 r2732 into r2733; + not r10 into r2734; + and r2733 r2734 into r2735; + not r11 into r2736; + and r2735 r2736 into r2737; + not r12 into r2738; + and r2737 r2738 into r2739; + not r13 into r2740; + and r2739 r2740 into r2741; + not r14 into r2742; + and r2741 r2742 into r2743; + not r15 into r2744; + and r2743 r2744 into r2745; + not r16 into r2746; + and r2745 r2746 into r2747; + not r17 into r2748; + and r2747 r2748 into r2749; + not r18 into r2750; + and r2749 r2750 into r2751; + not r19 into r2752; + and r2751 r2752 into r2753; + not r20 into r2754; + and r2753 r2754 into r2755; + not r21 into r2756; + and r2755 r2756 into r2757; + not r22 into r2758; + and r2757 r2758 into r2759; + not r23 into r2760; + and r2759 r2760 into r2761; + not r24 into r2762; + and r2761 r2762 into r2763; + not r25 into r2764; + and r2763 r2764 into r2765; + not r26 into r2766; + and r2765 r2766 into r2767; + not r27 into r2768; + and r2767 r2768 into r2769; + not r28 into r2770; + and r2769 r2770 into r2771; + not r29 into r2772; + and r2771 r2772 into r2773; + not r30 into r2774; + and r2773 r2774 into r2775; + not r31 into r2776; + and r2775 r2776 into r2777; + not r32 into r2778; + and r2777 r2778 into r2779; + not r33 into r2780; + and r2779 r2780 into r2781; + not r34 into r2782; + and r2781 r2782 into r2783; + not r35 into r2784; + and r2783 r2784 into r2785; + not r36 into r2786; + and r2785 r2786 into r2787; + not r37 into r2788; + and r2787 r2788 into r2789; + and r2789 r38 into r2790; + ternary r2790 0u8 r2716 into r2791; + not r1 into r2792; + not r2 into r2793; + and r2792 r2793 into r2794; + not r3 into r2795; + and r2794 r2795 into r2796; + not r4 into r2797; + and r2796 r2797 into r2798; + not r5 into r2799; + and r2798 r2799 into r2800; + not r6 into r2801; + and r2800 r2801 into r2802; + not r7 into r2803; + and r2802 r2803 into r2804; + not r8 into r2805; + and r2804 r2805 into r2806; + not r9 into r2807; + and r2806 r2807 into r2808; + not r10 into r2809; + and r2808 r2809 into r2810; + not r11 into r2811; + and r2810 r2811 into r2812; + not r12 into r2813; + and r2812 r2813 into r2814; + not r13 into r2815; + and r2814 r2815 into r2816; + not r14 into r2817; + and r2816 r2817 into r2818; + not r15 into r2819; + and r2818 r2819 into r2820; + not r16 into r2821; + and r2820 r2821 into r2822; + not r17 into r2823; + and r2822 r2823 into r2824; + not r18 into r2825; + and r2824 r2825 into r2826; + not r19 into r2827; + and r2826 r2827 into r2828; + not r20 into r2829; + and r2828 r2829 into r2830; + not r21 into r2831; + and r2830 r2831 into r2832; + not r22 into r2833; + and r2832 r2833 into r2834; + not r23 into r2835; + and r2834 r2835 into r2836; + not r24 into r2837; + and r2836 r2837 into r2838; + not r25 into r2839; + and r2838 r2839 into r2840; + not r26 into r2841; + and r2840 r2841 into r2842; + not r27 into r2843; + and r2842 r2843 into r2844; + not r28 into r2845; + and r2844 r2845 into r2846; + not r29 into r2847; + and r2846 r2847 into r2848; + not r30 into r2849; + and r2848 r2849 into r2850; + not r31 into r2851; + and r2850 r2851 into r2852; + not r32 into r2853; + and r2852 r2853 into r2854; + not r33 into r2855; + and r2854 r2855 into r2856; + not r34 into r2857; + and r2856 r2857 into r2858; + not r35 into r2859; + and r2858 r2859 into r2860; + not r36 into r2861; + and r2860 r2861 into r2862; + and r2862 r37 into r2863; + ternary r2863 0u8 r2791 into r2864; + not r1 into r2865; + not r2 into r2866; + and r2865 r2866 into r2867; + not r3 into r2868; + and r2867 r2868 into r2869; + not r4 into r2870; + and r2869 r2870 into r2871; + not r5 into r2872; + and r2871 r2872 into r2873; + not r6 into r2874; + and r2873 r2874 into r2875; + not r7 into r2876; + and r2875 r2876 into r2877; + not r8 into r2878; + and r2877 r2878 into r2879; + not r9 into r2880; + and r2879 r2880 into r2881; + not r10 into r2882; + and r2881 r2882 into r2883; + not r11 into r2884; + and r2883 r2884 into r2885; + not r12 into r2886; + and r2885 r2886 into r2887; + not r13 into r2888; + and r2887 r2888 into r2889; + not r14 into r2890; + and r2889 r2890 into r2891; + not r15 into r2892; + and r2891 r2892 into r2893; + not r16 into r2894; + and r2893 r2894 into r2895; + not r17 into r2896; + and r2895 r2896 into r2897; + not r18 into r2898; + and r2897 r2898 into r2899; + not r19 into r2900; + and r2899 r2900 into r2901; + not r20 into r2902; + and r2901 r2902 into r2903; + not r21 into r2904; + and r2903 r2904 into r2905; + not r22 into r2906; + and r2905 r2906 into r2907; + not r23 into r2908; + and r2907 r2908 into r2909; + not r24 into r2910; + and r2909 r2910 into r2911; + not r25 into r2912; + and r2911 r2912 into r2913; + not r26 into r2914; + and r2913 r2914 into r2915; + not r27 into r2916; + and r2915 r2916 into r2917; + not r28 into r2918; + and r2917 r2918 into r2919; + not r29 into r2920; + and r2919 r2920 into r2921; + not r30 into r2922; + and r2921 r2922 into r2923; + not r31 into r2924; + and r2923 r2924 into r2925; + not r32 into r2926; + and r2925 r2926 into r2927; + not r33 into r2928; + and r2927 r2928 into r2929; + not r34 into r2930; + and r2929 r2930 into r2931; + not r35 into r2932; + and r2931 r2932 into r2933; + and r2933 r36 into r2934; + ternary r2934 0u8 r2864 into r2935; + not r1 into r2936; + not r2 into r2937; + and r2936 r2937 into r2938; + not r3 into r2939; + and r2938 r2939 into r2940; + not r4 into r2941; + and r2940 r2941 into r2942; + not r5 into r2943; + and r2942 r2943 into r2944; + not r6 into r2945; + and r2944 r2945 into r2946; + not r7 into r2947; + and r2946 r2947 into r2948; + not r8 into r2949; + and r2948 r2949 into r2950; + not r9 into r2951; + and r2950 r2951 into r2952; + not r10 into r2953; + and r2952 r2953 into r2954; + not r11 into r2955; + and r2954 r2955 into r2956; + not r12 into r2957; + and r2956 r2957 into r2958; + not r13 into r2959; + and r2958 r2959 into r2960; + not r14 into r2961; + and r2960 r2961 into r2962; + not r15 into r2963; + and r2962 r2963 into r2964; + not r16 into r2965; + and r2964 r2965 into r2966; + not r17 into r2967; + and r2966 r2967 into r2968; + not r18 into r2969; + and r2968 r2969 into r2970; + not r19 into r2971; + and r2970 r2971 into r2972; + not r20 into r2973; + and r2972 r2973 into r2974; + not r21 into r2975; + and r2974 r2975 into r2976; + not r22 into r2977; + and r2976 r2977 into r2978; + not r23 into r2979; + and r2978 r2979 into r2980; + not r24 into r2981; + and r2980 r2981 into r2982; + not r25 into r2983; + and r2982 r2983 into r2984; + not r26 into r2985; + and r2984 r2985 into r2986; + not r27 into r2987; + and r2986 r2987 into r2988; + not r28 into r2989; + and r2988 r2989 into r2990; + not r29 into r2991; + and r2990 r2991 into r2992; + not r30 into r2993; + and r2992 r2993 into r2994; + not r31 into r2995; + and r2994 r2995 into r2996; + not r32 into r2997; + and r2996 r2997 into r2998; + not r33 into r2999; + and r2998 r2999 into r3000; + not r34 into r3001; + and r3000 r3001 into r3002; + and r3002 r35 into r3003; + ternary r3003 5u8 r2935 into r3004; + not r1 into r3005; + not r2 into r3006; + and r3005 r3006 into r3007; + not r3 into r3008; + and r3007 r3008 into r3009; + not r4 into r3010; + and r3009 r3010 into r3011; + not r5 into r3012; + and r3011 r3012 into r3013; + not r6 into r3014; + and r3013 r3014 into r3015; + not r7 into r3016; + and r3015 r3016 into r3017; + not r8 into r3018; + and r3017 r3018 into r3019; + not r9 into r3020; + and r3019 r3020 into r3021; + not r10 into r3022; + and r3021 r3022 into r3023; + not r11 into r3024; + and r3023 r3024 into r3025; + not r12 into r3026; + and r3025 r3026 into r3027; + not r13 into r3028; + and r3027 r3028 into r3029; + not r14 into r3030; + and r3029 r3030 into r3031; + not r15 into r3032; + and r3031 r3032 into r3033; + not r16 into r3034; + and r3033 r3034 into r3035; + not r17 into r3036; + and r3035 r3036 into r3037; + not r18 into r3038; + and r3037 r3038 into r3039; + not r19 into r3040; + and r3039 r3040 into r3041; + not r20 into r3042; + and r3041 r3042 into r3043; + not r21 into r3044; + and r3043 r3044 into r3045; + not r22 into r3046; + and r3045 r3046 into r3047; + not r23 into r3048; + and r3047 r3048 into r3049; + not r24 into r3050; + and r3049 r3050 into r3051; + not r25 into r3052; + and r3051 r3052 into r3053; + not r26 into r3054; + and r3053 r3054 into r3055; + not r27 into r3056; + and r3055 r3056 into r3057; + not r28 into r3058; + and r3057 r3058 into r3059; + not r29 into r3060; + and r3059 r3060 into r3061; + not r30 into r3062; + and r3061 r3062 into r3063; + not r31 into r3064; + and r3063 r3064 into r3065; + not r32 into r3066; + and r3065 r3066 into r3067; + not r33 into r3068; + and r3067 r3068 into r3069; + and r3069 r34 into r3070; + ternary r3070 11u8 r3004 into r3071; + not r1 into r3072; + not r2 into r3073; + and r3072 r3073 into r3074; + not r3 into r3075; + and r3074 r3075 into r3076; + not r4 into r3077; + and r3076 r3077 into r3078; + not r5 into r3079; + and r3078 r3079 into r3080; + not r6 into r3081; + and r3080 r3081 into r3082; + not r7 into r3083; + and r3082 r3083 into r3084; + not r8 into r3085; + and r3084 r3085 into r3086; + not r9 into r3087; + and r3086 r3087 into r3088; + not r10 into r3089; + and r3088 r3089 into r3090; + not r11 into r3091; + and r3090 r3091 into r3092; + not r12 into r3093; + and r3092 r3093 into r3094; + not r13 into r3095; + and r3094 r3095 into r3096; + not r14 into r3097; + and r3096 r3097 into r3098; + not r15 into r3099; + and r3098 r3099 into r3100; + not r16 into r3101; + and r3100 r3101 into r3102; + not r17 into r3103; + and r3102 r3103 into r3104; + not r18 into r3105; + and r3104 r3105 into r3106; + not r19 into r3107; + and r3106 r3107 into r3108; + not r20 into r3109; + and r3108 r3109 into r3110; + not r21 into r3111; + and r3110 r3111 into r3112; + not r22 into r3113; + and r3112 r3113 into r3114; + not r23 into r3115; + and r3114 r3115 into r3116; + not r24 into r3117; + and r3116 r3117 into r3118; + not r25 into r3119; + and r3118 r3119 into r3120; + not r26 into r3121; + and r3120 r3121 into r3122; + not r27 into r3123; + and r3122 r3123 into r3124; + not r28 into r3125; + and r3124 r3125 into r3126; + not r29 into r3127; + and r3126 r3127 into r3128; + not r30 into r3129; + and r3128 r3129 into r3130; + not r31 into r3131; + and r3130 r3131 into r3132; + not r32 into r3133; + and r3132 r3133 into r3134; + and r3134 r33 into r3135; + ternary r3135 31u8 r3071 into r3136; + not r1 into r3137; + not r2 into r3138; + and r3137 r3138 into r3139; + not r3 into r3140; + and r3139 r3140 into r3141; + not r4 into r3142; + and r3141 r3142 into r3143; + not r5 into r3144; + and r3143 r3144 into r3145; + not r6 into r3146; + and r3145 r3146 into r3147; + not r7 into r3148; + and r3147 r3148 into r3149; + not r8 into r3150; + and r3149 r3150 into r3151; + not r9 into r3152; + and r3151 r3152 into r3153; + not r10 into r3154; + and r3153 r3154 into r3155; + not r11 into r3156; + and r3155 r3156 into r3157; + not r12 into r3158; + and r3157 r3158 into r3159; + not r13 into r3160; + and r3159 r3160 into r3161; + not r14 into r3162; + and r3161 r3162 into r3163; + not r15 into r3164; + and r3163 r3164 into r3165; + not r16 into r3166; + and r3165 r3166 into r3167; + not r17 into r3168; + and r3167 r3168 into r3169; + not r18 into r3170; + and r3169 r3170 into r3171; + not r19 into r3172; + and r3171 r3172 into r3173; + not r20 into r3174; + and r3173 r3174 into r3175; + not r21 into r3176; + and r3175 r3176 into r3177; + not r22 into r3178; + and r3177 r3178 into r3179; + not r23 into r3180; + and r3179 r3180 into r3181; + not r24 into r3182; + and r3181 r3182 into r3183; + not r25 into r3184; + and r3183 r3184 into r3185; + not r26 into r3186; + and r3185 r3186 into r3187; + not r27 into r3188; + and r3187 r3188 into r3189; + not r28 into r3190; + and r3189 r3190 into r3191; + not r29 into r3192; + and r3191 r3192 into r3193; + not r30 into r3194; + and r3193 r3194 into r3195; + not r31 into r3196; + and r3195 r3196 into r3197; + and r3197 r32 into r3198; + ternary r3198 15u8 r3136 into r3199; + not r1 into r3200; + not r2 into r3201; + and r3200 r3201 into r3202; + not r3 into r3203; + and r3202 r3203 into r3204; + not r4 into r3205; + and r3204 r3205 into r3206; + not r5 into r3207; + and r3206 r3207 into r3208; + not r6 into r3209; + and r3208 r3209 into r3210; + not r7 into r3211; + and r3210 r3211 into r3212; + not r8 into r3213; + and r3212 r3213 into r3214; + not r9 into r3215; + and r3214 r3215 into r3216; + not r10 into r3217; + and r3216 r3217 into r3218; + not r11 into r3219; + and r3218 r3219 into r3220; + not r12 into r3221; + and r3220 r3221 into r3222; + not r13 into r3223; + and r3222 r3223 into r3224; + not r14 into r3225; + and r3224 r3225 into r3226; + not r15 into r3227; + and r3226 r3227 into r3228; + not r16 into r3229; + and r3228 r3229 into r3230; + not r17 into r3231; + and r3230 r3231 into r3232; + not r18 into r3233; + and r3232 r3233 into r3234; + not r19 into r3235; + and r3234 r3235 into r3236; + not r20 into r3237; + and r3236 r3237 into r3238; + not r21 into r3239; + and r3238 r3239 into r3240; + not r22 into r3241; + and r3240 r3241 into r3242; + not r23 into r3243; + and r3242 r3243 into r3244; + not r24 into r3245; + and r3244 r3245 into r3246; + not r25 into r3247; + and r3246 r3247 into r3248; + not r26 into r3249; + and r3248 r3249 into r3250; + not r27 into r3251; + and r3250 r3251 into r3252; + not r28 into r3253; + and r3252 r3253 into r3254; + not r29 into r3255; + and r3254 r3255 into r3256; + not r30 into r3257; + and r3256 r3257 into r3258; + and r3258 r31 into r3259; + ternary r3259 27u8 r3199 into r3260; + not r1 into r3261; + not r2 into r3262; + and r3261 r3262 into r3263; + not r3 into r3264; + and r3263 r3264 into r3265; + not r4 into r3266; + and r3265 r3266 into r3267; + not r5 into r3268; + and r3267 r3268 into r3269; + not r6 into r3270; + and r3269 r3270 into r3271; + not r7 into r3272; + and r3271 r3272 into r3273; + not r8 into r3274; + and r3273 r3274 into r3275; + not r9 into r3276; + and r3275 r3276 into r3277; + not r10 into r3278; + and r3277 r3278 into r3279; + not r11 into r3280; + and r3279 r3280 into r3281; + not r12 into r3282; + and r3281 r3282 into r3283; + not r13 into r3284; + and r3283 r3284 into r3285; + not r14 into r3286; + and r3285 r3286 into r3287; + not r15 into r3288; + and r3287 r3288 into r3289; + not r16 into r3290; + and r3289 r3290 into r3291; + not r17 into r3292; + and r3291 r3292 into r3293; + not r18 into r3294; + and r3293 r3294 into r3295; + not r19 into r3296; + and r3295 r3296 into r3297; + not r20 into r3298; + and r3297 r3298 into r3299; + not r21 into r3300; + and r3299 r3300 into r3301; + not r22 into r3302; + and r3301 r3302 into r3303; + not r23 into r3304; + and r3303 r3304 into r3305; + not r24 into r3306; + and r3305 r3306 into r3307; + not r25 into r3308; + and r3307 r3308 into r3309; + not r26 into r3310; + and r3309 r3310 into r3311; + not r27 into r3312; + and r3311 r3312 into r3313; + not r28 into r3314; + and r3313 r3314 into r3315; + not r29 into r3316; + and r3315 r3316 into r3317; + and r3317 r30 into r3318; + ternary r3318 21u8 r3260 into r3319; + not r1 into r3320; + not r2 into r3321; + and r3320 r3321 into r3322; + not r3 into r3323; + and r3322 r3323 into r3324; + not r4 into r3325; + and r3324 r3325 into r3326; + not r5 into r3327; + and r3326 r3327 into r3328; + not r6 into r3329; + and r3328 r3329 into r3330; + not r7 into r3331; + and r3330 r3331 into r3332; + not r8 into r3333; + and r3332 r3333 into r3334; + not r9 into r3335; + and r3334 r3335 into r3336; + not r10 into r3337; + and r3336 r3337 into r3338; + not r11 into r3339; + and r3338 r3339 into r3340; + not r12 into r3341; + and r3340 r3341 into r3342; + not r13 into r3343; + and r3342 r3343 into r3344; + not r14 into r3345; + and r3344 r3345 into r3346; + not r15 into r3347; + and r3346 r3347 into r3348; + not r16 into r3349; + and r3348 r3349 into r3350; + not r17 into r3351; + and r3350 r3351 into r3352; + not r18 into r3353; + and r3352 r3353 into r3354; + not r19 into r3355; + and r3354 r3355 into r3356; + not r20 into r3357; + and r3356 r3357 into r3358; + not r21 into r3359; + and r3358 r3359 into r3360; + not r22 into r3361; + and r3360 r3361 into r3362; + not r23 into r3363; + and r3362 r3363 into r3364; + not r24 into r3365; + and r3364 r3365 into r3366; + not r25 into r3367; + and r3366 r3367 into r3368; + not r26 into r3369; + and r3368 r3369 into r3370; + not r27 into r3371; + and r3370 r3371 into r3372; + not r28 into r3373; + and r3372 r3373 into r3374; + and r3374 r29 into r3375; + ternary r3375 0u8 r3319 into r3376; + not r1 into r3377; + not r2 into r3378; + and r3377 r3378 into r3379; + not r3 into r3380; + and r3379 r3380 into r3381; + not r4 into r3382; + and r3381 r3382 into r3383; + not r5 into r3384; + and r3383 r3384 into r3385; + not r6 into r3386; + and r3385 r3386 into r3387; + not r7 into r3388; + and r3387 r3388 into r3389; + not r8 into r3390; + and r3389 r3390 into r3391; + not r9 into r3392; + and r3391 r3392 into r3393; + not r10 into r3394; + and r3393 r3394 into r3395; + not r11 into r3396; + and r3395 r3396 into r3397; + not r12 into r3398; + and r3397 r3398 into r3399; + not r13 into r3400; + and r3399 r3400 into r3401; + not r14 into r3402; + and r3401 r3402 into r3403; + not r15 into r3404; + and r3403 r3404 into r3405; + not r16 into r3406; + and r3405 r3406 into r3407; + not r17 into r3408; + and r3407 r3408 into r3409; + not r18 into r3410; + and r3409 r3410 into r3411; + not r19 into r3412; + and r3411 r3412 into r3413; + not r20 into r3414; + and r3413 r3414 into r3415; + not r21 into r3416; + and r3415 r3416 into r3417; + not r22 into r3418; + and r3417 r3418 into r3419; + not r23 into r3420; + and r3419 r3420 into r3421; + not r24 into r3422; + and r3421 r3422 into r3423; + not r25 into r3424; + and r3423 r3424 into r3425; + not r26 into r3426; + and r3425 r3426 into r3427; + not r27 into r3428; + and r3427 r3428 into r3429; + and r3429 r28 into r3430; + ternary r3430 0u8 r3376 into r3431; + not r1 into r3432; + not r2 into r3433; + and r3432 r3433 into r3434; + not r3 into r3435; + and r3434 r3435 into r3436; + not r4 into r3437; + and r3436 r3437 into r3438; + not r5 into r3439; + and r3438 r3439 into r3440; + not r6 into r3441; + and r3440 r3441 into r3442; + not r7 into r3443; + and r3442 r3443 into r3444; + not r8 into r3445; + and r3444 r3445 into r3446; + not r9 into r3447; + and r3446 r3447 into r3448; + not r10 into r3449; + and r3448 r3449 into r3450; + not r11 into r3451; + and r3450 r3451 into r3452; + not r12 into r3453; + and r3452 r3453 into r3454; + not r13 into r3455; + and r3454 r3455 into r3456; + not r14 into r3457; + and r3456 r3457 into r3458; + not r15 into r3459; + and r3458 r3459 into r3460; + not r16 into r3461; + and r3460 r3461 into r3462; + not r17 into r3463; + and r3462 r3463 into r3464; + not r18 into r3465; + and r3464 r3465 into r3466; + not r19 into r3467; + and r3466 r3467 into r3468; + not r20 into r3469; + and r3468 r3469 into r3470; + not r21 into r3471; + and r3470 r3471 into r3472; + not r22 into r3473; + and r3472 r3473 into r3474; + not r23 into r3475; + and r3474 r3475 into r3476; + not r24 into r3477; + and r3476 r3477 into r3478; + not r25 into r3479; + and r3478 r3479 into r3480; + not r26 into r3481; + and r3480 r3481 into r3482; + and r3482 r27 into r3483; + ternary r3483 0u8 r3431 into r3484; + not r1 into r3485; + not r2 into r3486; + and r3485 r3486 into r3487; + not r3 into r3488; + and r3487 r3488 into r3489; + not r4 into r3490; + and r3489 r3490 into r3491; + not r5 into r3492; + and r3491 r3492 into r3493; + not r6 into r3494; + and r3493 r3494 into r3495; + not r7 into r3496; + and r3495 r3496 into r3497; + not r8 into r3498; + and r3497 r3498 into r3499; + not r9 into r3500; + and r3499 r3500 into r3501; + not r10 into r3502; + and r3501 r3502 into r3503; + not r11 into r3504; + and r3503 r3504 into r3505; + not r12 into r3506; + and r3505 r3506 into r3507; + not r13 into r3508; + and r3507 r3508 into r3509; + not r14 into r3510; + and r3509 r3510 into r3511; + not r15 into r3512; + and r3511 r3512 into r3513; + not r16 into r3514; + and r3513 r3514 into r3515; + not r17 into r3516; + and r3515 r3516 into r3517; + not r18 into r3518; + and r3517 r3518 into r3519; + not r19 into r3520; + and r3519 r3520 into r3521; + not r20 into r3522; + and r3521 r3522 into r3523; + not r21 into r3524; + and r3523 r3524 into r3525; + not r22 into r3526; + and r3525 r3526 into r3527; + not r23 into r3528; + and r3527 r3528 into r3529; + not r24 into r3530; + and r3529 r3530 into r3531; + not r25 into r3532; + and r3531 r3532 into r3533; + and r3533 r26 into r3534; + ternary r3534 0u8 r3484 into r3535; + not r1 into r3536; + not r2 into r3537; + and r3536 r3537 into r3538; + not r3 into r3539; + and r3538 r3539 into r3540; + not r4 into r3541; + and r3540 r3541 into r3542; + not r5 into r3543; + and r3542 r3543 into r3544; + not r6 into r3545; + and r3544 r3545 into r3546; + not r7 into r3547; + and r3546 r3547 into r3548; + not r8 into r3549; + and r3548 r3549 into r3550; + not r9 into r3551; + and r3550 r3551 into r3552; + not r10 into r3553; + and r3552 r3553 into r3554; + not r11 into r3555; + and r3554 r3555 into r3556; + not r12 into r3557; + and r3556 r3557 into r3558; + not r13 into r3559; + and r3558 r3559 into r3560; + not r14 into r3561; + and r3560 r3561 into r3562; + not r15 into r3563; + and r3562 r3563 into r3564; + not r16 into r3565; + and r3564 r3565 into r3566; + not r17 into r3567; + and r3566 r3567 into r3568; + not r18 into r3569; + and r3568 r3569 into r3570; + not r19 into r3571; + and r3570 r3571 into r3572; + not r20 into r3573; + and r3572 r3573 into r3574; + not r21 into r3575; + and r3574 r3575 into r3576; + not r22 into r3577; + and r3576 r3577 into r3578; + not r23 into r3579; + and r3578 r3579 into r3580; + not r24 into r3581; + and r3580 r3581 into r3582; + and r3582 r25 into r3583; + ternary r3583 0u8 r3535 into r3584; + not r1 into r3585; + not r2 into r3586; + and r3585 r3586 into r3587; + not r3 into r3588; + and r3587 r3588 into r3589; + not r4 into r3590; + and r3589 r3590 into r3591; + not r5 into r3592; + and r3591 r3592 into r3593; + not r6 into r3594; + and r3593 r3594 into r3595; + not r7 into r3596; + and r3595 r3596 into r3597; + not r8 into r3598; + and r3597 r3598 into r3599; + not r9 into r3600; + and r3599 r3600 into r3601; + not r10 into r3602; + and r3601 r3602 into r3603; + not r11 into r3604; + and r3603 r3604 into r3605; + not r12 into r3606; + and r3605 r3606 into r3607; + not r13 into r3608; + and r3607 r3608 into r3609; + not r14 into r3610; + and r3609 r3610 into r3611; + not r15 into r3612; + and r3611 r3612 into r3613; + not r16 into r3614; + and r3613 r3614 into r3615; + not r17 into r3616; + and r3615 r3616 into r3617; + not r18 into r3618; + and r3617 r3618 into r3619; + not r19 into r3620; + and r3619 r3620 into r3621; + not r20 into r3622; + and r3621 r3622 into r3623; + not r21 into r3624; + and r3623 r3624 into r3625; + not r22 into r3626; + and r3625 r3626 into r3627; + not r23 into r3628; + and r3627 r3628 into r3629; + and r3629 r24 into r3630; + ternary r3630 25u8 r3584 into r3631; + not r1 into r3632; + not r2 into r3633; + and r3632 r3633 into r3634; + not r3 into r3635; + and r3634 r3635 into r3636; + not r4 into r3637; + and r3636 r3637 into r3638; + not r5 into r3639; + and r3638 r3639 into r3640; + not r6 into r3641; + and r3640 r3641 into r3642; + not r7 into r3643; + and r3642 r3643 into r3644; + not r8 into r3645; + and r3644 r3645 into r3646; + not r9 into r3647; + and r3646 r3647 into r3648; + not r10 into r3649; + and r3648 r3649 into r3650; + not r11 into r3651; + and r3650 r3651 into r3652; + not r12 into r3653; + and r3652 r3653 into r3654; + not r13 into r3655; + and r3654 r3655 into r3656; + not r14 into r3657; + and r3656 r3657 into r3658; + not r15 into r3659; + and r3658 r3659 into r3660; + not r16 into r3661; + and r3660 r3661 into r3662; + not r17 into r3663; + and r3662 r3663 into r3664; + not r18 into r3665; + and r3664 r3665 into r3666; + not r19 into r3667; + and r3666 r3667 into r3668; + not r20 into r3669; + and r3668 r3669 into r3670; + not r21 into r3671; + and r3670 r3671 into r3672; + not r22 into r3673; + and r3672 r3673 into r3674; + and r3674 r23 into r3675; + ternary r3675 0u8 r3631 into r3676; + not r1 into r3677; + not r2 into r3678; + and r3677 r3678 into r3679; + not r3 into r3680; + and r3679 r3680 into r3681; + not r4 into r3682; + and r3681 r3682 into r3683; + not r5 into r3684; + and r3683 r3684 into r3685; + not r6 into r3686; + and r3685 r3686 into r3687; + not r7 into r3688; + and r3687 r3688 into r3689; + not r8 into r3690; + and r3689 r3690 into r3691; + not r9 into r3692; + and r3691 r3692 into r3693; + not r10 into r3694; + and r3693 r3694 into r3695; + not r11 into r3696; + and r3695 r3696 into r3697; + not r12 into r3698; + and r3697 r3698 into r3699; + not r13 into r3700; + and r3699 r3700 into r3701; + not r14 into r3702; + and r3701 r3702 into r3703; + not r15 into r3704; + and r3703 r3704 into r3705; + not r16 into r3706; + and r3705 r3706 into r3707; + not r17 into r3708; + and r3707 r3708 into r3709; + not r18 into r3710; + and r3709 r3710 into r3711; + not r19 into r3712; + and r3711 r3712 into r3713; + not r20 into r3714; + and r3713 r3714 into r3715; + not r21 into r3716; + and r3715 r3716 into r3717; + and r3717 r22 into r3718; + ternary r3718 0u8 r3676 into r3719; + not r1 into r3720; + not r2 into r3721; + and r3720 r3721 into r3722; + not r3 into r3723; + and r3722 r3723 into r3724; + not r4 into r3725; + and r3724 r3725 into r3726; + not r5 into r3727; + and r3726 r3727 into r3728; + not r6 into r3729; + and r3728 r3729 into r3730; + not r7 into r3731; + and r3730 r3731 into r3732; + not r8 into r3733; + and r3732 r3733 into r3734; + not r9 into r3735; + and r3734 r3735 into r3736; + not r10 into r3737; + and r3736 r3737 into r3738; + not r11 into r3739; + and r3738 r3739 into r3740; + not r12 into r3741; + and r3740 r3741 into r3742; + not r13 into r3743; + and r3742 r3743 into r3744; + not r14 into r3745; + and r3744 r3745 into r3746; + not r15 into r3747; + and r3746 r3747 into r3748; + not r16 into r3749; + and r3748 r3749 into r3750; + not r17 into r3751; + and r3750 r3751 into r3752; + not r18 into r3753; + and r3752 r3753 into r3754; + not r19 into r3755; + and r3754 r3755 into r3756; + not r20 into r3757; + and r3756 r3757 into r3758; + and r3758 r21 into r3759; + ternary r3759 8u8 r3719 into r3760; + not r1 into r3761; + not r2 into r3762; + and r3761 r3762 into r3763; + not r3 into r3764; + and r3763 r3764 into r3765; + not r4 into r3766; + and r3765 r3766 into r3767; + not r5 into r3768; + and r3767 r3768 into r3769; + not r6 into r3770; + and r3769 r3770 into r3771; + not r7 into r3772; + and r3771 r3772 into r3773; + not r8 into r3774; + and r3773 r3774 into r3775; + not r9 into r3776; + and r3775 r3776 into r3777; + not r10 into r3778; + and r3777 r3778 into r3779; + not r11 into r3780; + and r3779 r3780 into r3781; + not r12 into r3782; + and r3781 r3782 into r3783; + not r13 into r3784; + and r3783 r3784 into r3785; + not r14 into r3786; + and r3785 r3786 into r3787; + not r15 into r3788; + and r3787 r3788 into r3789; + not r16 into r3790; + and r3789 r3790 into r3791; + not r17 into r3792; + and r3791 r3792 into r3793; + not r18 into r3794; + and r3793 r3794 into r3795; + not r19 into r3796; + and r3795 r3796 into r3797; + and r3797 r20 into r3798; + ternary r3798 0u8 r3760 into r3799; + not r1 into r3800; + not r2 into r3801; + and r3800 r3801 into r3802; + not r3 into r3803; + and r3802 r3803 into r3804; + not r4 into r3805; + and r3804 r3805 into r3806; + not r5 into r3807; + and r3806 r3807 into r3808; + not r6 into r3809; + and r3808 r3809 into r3810; + not r7 into r3811; + and r3810 r3811 into r3812; + not r8 into r3813; + and r3812 r3813 into r3814; + not r9 into r3815; + and r3814 r3815 into r3816; + not r10 into r3817; + and r3816 r3817 into r3818; + not r11 into r3819; + and r3818 r3819 into r3820; + not r12 into r3821; + and r3820 r3821 into r3822; + not r13 into r3823; + and r3822 r3823 into r3824; + not r14 into r3825; + and r3824 r3825 into r3826; + not r15 into r3827; + and r3826 r3827 into r3828; + not r16 into r3829; + and r3828 r3829 into r3830; + not r17 into r3831; + and r3830 r3831 into r3832; + not r18 into r3833; + and r3832 r3833 into r3834; + and r3834 r19 into r3835; + ternary r3835 0u8 r3799 into r3836; + not r1 into r3837; + not r2 into r3838; + and r3837 r3838 into r3839; + not r3 into r3840; + and r3839 r3840 into r3841; + not r4 into r3842; + and r3841 r3842 into r3843; + not r5 into r3844; + and r3843 r3844 into r3845; + not r6 into r3846; + and r3845 r3846 into r3847; + not r7 into r3848; + and r3847 r3848 into r3849; + not r8 into r3850; + and r3849 r3850 into r3851; + not r9 into r3852; + and r3851 r3852 into r3853; + not r10 into r3854; + and r3853 r3854 into r3855; + not r11 into r3856; + and r3855 r3856 into r3857; + not r12 into r3858; + and r3857 r3858 into r3859; + not r13 into r3860; + and r3859 r3860 into r3861; + not r14 into r3862; + and r3861 r3862 into r3863; + not r15 into r3864; + and r3863 r3864 into r3865; + not r16 into r3866; + and r3865 r3866 into r3867; + not r17 into r3868; + and r3867 r3868 into r3869; + and r3869 r18 into r3870; + ternary r3870 4u8 r3836 into r3871; + not r1 into r3872; + not r2 into r3873; + and r3872 r3873 into r3874; + not r3 into r3875; + and r3874 r3875 into r3876; + not r4 into r3877; + and r3876 r3877 into r3878; + not r5 into r3879; + and r3878 r3879 into r3880; + not r6 into r3881; + and r3880 r3881 into r3882; + not r7 into r3883; + and r3882 r3883 into r3884; + not r8 into r3885; + and r3884 r3885 into r3886; + not r9 into r3887; + and r3886 r3887 into r3888; + not r10 into r3889; + and r3888 r3889 into r3890; + not r11 into r3891; + and r3890 r3891 into r3892; + not r12 into r3893; + and r3892 r3893 into r3894; + not r13 into r3895; + and r3894 r3895 into r3896; + not r14 into r3897; + and r3896 r3897 into r3898; + not r15 into r3899; + and r3898 r3899 into r3900; + not r16 into r3901; + and r3900 r3901 into r3902; + and r3902 r17 into r3903; + ternary r3903 10u8 r3871 into r3904; + not r1 into r3905; + not r2 into r3906; + and r3905 r3906 into r3907; + not r3 into r3908; + and r3907 r3908 into r3909; + not r4 into r3910; + and r3909 r3910 into r3911; + not r5 into r3912; + and r3911 r3912 into r3913; + not r6 into r3914; + and r3913 r3914 into r3915; + not r7 into r3916; + and r3915 r3916 into r3917; + not r8 into r3918; + and r3917 r3918 into r3919; + not r9 into r3920; + and r3919 r3920 into r3921; + not r10 into r3922; + and r3921 r3922 into r3923; + not r11 into r3924; + and r3923 r3924 into r3925; + not r12 into r3926; + and r3925 r3926 into r3927; + not r13 into r3928; + and r3927 r3928 into r3929; + not r14 into r3930; + and r3929 r3930 into r3931; + not r15 into r3932; + and r3931 r3932 into r3933; + and r3933 r16 into r3934; + ternary r3934 14u8 r3904 into r3935; + not r1 into r3936; + not r2 into r3937; + and r3936 r3937 into r3938; + not r3 into r3939; + and r3938 r3939 into r3940; + not r4 into r3941; + and r3940 r3941 into r3942; + not r5 into r3943; + and r3942 r3943 into r3944; + not r6 into r3945; + and r3944 r3945 into r3946; + not r7 into r3947; + and r3946 r3947 into r3948; + not r8 into r3949; + and r3948 r3949 into r3950; + not r9 into r3951; + and r3950 r3951 into r3952; + not r10 into r3953; + and r3952 r3953 into r3954; + not r11 into r3955; + and r3954 r3955 into r3956; + not r12 into r3957; + and r3956 r3957 into r3958; + not r13 into r3959; + and r3958 r3959 into r3960; + not r14 into r3961; + and r3960 r3961 into r3962; + and r3962 r15 into r3963; + ternary r3963 0u8 r3935 into r3964; + not r1 into r3965; + not r2 into r3966; + and r3965 r3966 into r3967; + not r3 into r3968; + and r3967 r3968 into r3969; + not r4 into r3970; + and r3969 r3970 into r3971; + not r5 into r3972; + and r3971 r3972 into r3973; + not r6 into r3974; + and r3973 r3974 into r3975; + not r7 into r3976; + and r3975 r3976 into r3977; + not r8 into r3978; + and r3977 r3978 into r3979; + not r9 into r3980; + and r3979 r3980 into r3981; + not r10 into r3982; + and r3981 r3982 into r3983; + not r11 into r3984; + and r3983 r3984 into r3985; + not r12 into r3986; + and r3985 r3986 into r3987; + not r13 into r3988; + and r3987 r3988 into r3989; + and r3989 r14 into r3990; + ternary r3990 0u8 r3964 into r3991; + not r1 into r3992; + not r2 into r3993; + and r3992 r3993 into r3994; + not r3 into r3995; + and r3994 r3995 into r3996; + not r4 into r3997; + and r3996 r3997 into r3998; + not r5 into r3999; + and r3998 r3999 into r4000; + not r6 into r4001; + and r4000 r4001 into r4002; + not r7 into r4003; + and r4002 r4003 into r4004; + not r8 into r4005; + and r4004 r4005 into r4006; + not r9 into r4007; + and r4006 r4007 into r4008; + not r10 into r4009; + and r4008 r4009 into r4010; + not r11 into r4011; + and r4010 r4011 into r4012; + not r12 into r4013; + and r4012 r4013 into r4014; + and r4014 r13 into r4015; + ternary r4015 0u8 r3991 into r4016; + not r1 into r4017; + not r2 into r4018; + and r4017 r4018 into r4019; + not r3 into r4020; + and r4019 r4020 into r4021; + not r4 into r4022; + and r4021 r4022 into r4023; + not r5 into r4024; + and r4023 r4024 into r4025; + not r6 into r4026; + and r4025 r4026 into r4027; + not r7 into r4028; + and r4027 r4028 into r4029; + not r8 into r4030; + and r4029 r4030 into r4031; + not r9 into r4032; + and r4031 r4032 into r4033; + not r10 into r4034; + and r4033 r4034 into r4035; + not r11 into r4036; + and r4035 r4036 into r4037; + and r4037 r12 into r4038; + ternary r4038 0u8 r4016 into r4039; + not r1 into r4040; + not r2 into r4041; + and r4040 r4041 into r4042; + not r3 into r4043; + and r4042 r4043 into r4044; + not r4 into r4045; + and r4044 r4045 into r4046; + not r5 into r4047; + and r4046 r4047 into r4048; + not r6 into r4049; + and r4048 r4049 into r4050; + not r7 into r4051; + and r4050 r4051 into r4052; + not r8 into r4053; + and r4052 r4053 into r4054; + not r9 into r4055; + and r4054 r4055 into r4056; + not r10 into r4057; + and r4056 r4057 into r4058; + and r4058 r11 into r4059; + ternary r4059 7u8 r4039 into r4060; + not r1 into r4061; + not r2 into r4062; + and r4061 r4062 into r4063; + not r3 into r4064; + and r4063 r4064 into r4065; + not r4 into r4066; + and r4065 r4066 into r4067; + not r5 into r4068; + and r4067 r4068 into r4069; + not r6 into r4070; + and r4069 r4070 into r4071; + not r7 into r4072; + and r4071 r4072 into r4073; + not r8 into r4074; + and r4073 r4074 into r4075; + not r9 into r4076; + and r4075 r4076 into r4077; + and r4077 r10 into r4078; + ternary r4078 0u8 r4060 into r4079; + not r1 into r4080; + not r2 into r4081; + and r4080 r4081 into r4082; + not r3 into r4083; + and r4082 r4083 into r4084; + not r4 into r4085; + and r4084 r4085 into r4086; + not r5 into r4087; + and r4086 r4087 into r4088; + not r6 into r4089; + and r4088 r4089 into r4090; + not r7 into r4091; + and r4090 r4091 into r4092; + not r8 into r4093; + and r4092 r4093 into r4094; + and r4094 r9 into r4095; + ternary r4095 3u8 r4079 into r4096; + not r1 into r4097; + not r2 into r4098; + and r4097 r4098 into r4099; + not r3 into r4100; + and r4099 r4100 into r4101; + not r4 into r4102; + and r4101 r4102 into r4103; + not r5 into r4104; + and r4103 r4104 into r4105; + not r6 into r4106; + and r4105 r4106 into r4107; + not r7 into r4108; + and r4107 r4108 into r4109; + and r4109 r8 into r4110; + ternary r4110 13u8 r4096 into r4111; + not r1 into r4112; + not r2 into r4113; + and r4112 r4113 into r4114; + not r3 into r4115; + and r4114 r4115 into r4116; + not r4 into r4117; + and r4116 r4117 into r4118; + not r5 into r4119; + and r4118 r4119 into r4120; + not r6 into r4121; + and r4120 r4121 into r4122; + and r4122 r7 into r4123; + ternary r4123 0u8 r4111 into r4124; + not r1 into r4125; + not r2 into r4126; + and r4125 r4126 into r4127; + not r3 into r4128; + and r4127 r4128 into r4129; + not r4 into r4130; + and r4129 r4130 into r4131; + not r5 into r4132; + and r4131 r4132 into r4133; + and r4133 r6 into r4134; + ternary r4134 6u8 r4124 into r4135; + not r1 into r4136; + not r2 into r4137; + and r4136 r4137 into r4138; + not r3 into r4139; + and r4138 r4139 into r4140; + not r4 into r4141; + and r4140 r4141 into r4142; + and r4142 r5 into r4143; + ternary r4143 2u8 r4135 into r4144; + not r1 into r4145; + not r2 into r4146; + and r4145 r4146 into r4147; + not r3 into r4148; + and r4147 r4148 into r4149; + and r4149 r4 into r4150; + ternary r4150 12u8 r4144 into r4151; + not r1 into r4152; + not r2 into r4153; + and r4152 r4153 into r4154; + and r4154 r3 into r4155; + ternary r4155 1u8 r4151 into r4156; + not r1 into r4157; + and r4157 r2 into r4158; + ternary r4158 0u8 r4156 into r4159; + ternary r1 32u8 r4159 into r4160; + output r4160 as u8; + + +function main: + input r0 as u32.public; + sub.w 0u32 r0 into r1; + and r0 r1 into r2; + mul.w r2 72416175u32 into r3; + shr r3 26u8 into r4; + call sealsTableLookup r4 into r5; + output r5 as u8.private; diff --git a/examples/hackers-delight/ntzseals/build/program.json b/examples/hackers-delight/ntzseals/build/program.json new file mode 100644 index 0000000000..86c375804d --- /dev/null +++ b/examples/hackers-delight/ntzseals/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "ntzseals.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/hackers-delight/ntzseals/program.json b/examples/hackers-delight/ntzseals/program.json index 241d7eda9f..86c375804d 100644 --- a/examples/hackers-delight/ntzseals/program.json +++ b/examples/hackers-delight/ntzseals/program.json @@ -2,9 +2,5 @@ "program": "ntzseals.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpG6G5iLouRcupzPXVKpapbwq4AVEmU4tTSQGCe1JGE75h", - "address": "aleo1uds398s2cuju0uc9x6ggcvvrhdlmu682gjj4zdhgflwu0z3htcrsf40cfa" - }, "license": "MIT" } diff --git a/examples/hackers-delight/ntzsearchtree/.env b/examples/hackers-delight/ntzsearchtree/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/hackers-delight/ntzsearchtree/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/hackers-delight/ntzsearchtree/.gitignore b/examples/hackers-delight/ntzsearchtree/.gitignore index b28696155d..750b56f237 100644 --- a/examples/hackers-delight/ntzsearchtree/.gitignore +++ b/examples/hackers-delight/ntzsearchtree/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/hackers-delight/ntzsearchtree/build/main.aleo b/examples/hackers-delight/ntzsearchtree/build/main.aleo new file mode 100644 index 0000000000..d8d62bfef3 --- /dev/null +++ b/examples/hackers-delight/ntzsearchtree/build/main.aleo @@ -0,0 +1,326 @@ +program ntzsearchtree.aleo; + + + +function main: + input r0 as u32.public; + and r0 65535u32 into r1; + is.neq r1 0u32 into r2; + and r0 255u32 into r3; + is.neq r3 0u32 into r4; + and r0 15u32 into r5; + is.neq r5 0u32 into r6; + and r0 3u32 into r7; + is.neq r7 0u32 into r8; + and r0 1u32 into r9; + is.neq r9 0u32 into r10; + and r0 4u32 into r11; + is.neq r11 0u32 into r12; + and r0 48u32 into r13; + is.neq r13 0u32 into r14; + and r0 16u32 into r15; + is.neq r15 0u32 into r16; + and r0 64u32 into r17; + is.neq r17 0u32 into r18; + and r0 3840u32 into r19; + is.neq r19 0u32 into r20; + and r0 768u32 into r21; + is.neq r21 0u32 into r22; + and r0 256u32 into r23; + is.neq r23 0u32 into r24; + and r0 1024u32 into r25; + is.neq r25 0u32 into r26; + and r0 12288u32 into r27; + is.neq r27 0u32 into r28; + and r0 4096u32 into r29; + is.neq r29 0u32 into r30; + and r0 16384u32 into r31; + is.neq r31 0u32 into r32; + mul 255u32 65536u32 into r33; + and r0 r33 into r34; + is.neq r34 0u32 into r35; + mul 15u32 65536u32 into r36; + and r0 r36 into r37; + is.neq r37 0u32 into r38; + mul 3u32 65536u32 into r39; + and r0 r39 into r40; + is.neq r40 0u32 into r41; + mul 1u32 65536u32 into r42; + and r0 r42 into r43; + is.neq r43 0u32 into r44; + mul 4u32 65536u32 into r45; + and r0 r45 into r46; + is.neq r46 0u32 into r47; + mul 48u32 65536u32 into r48; + and r0 r48 into r49; + is.neq r49 0u32 into r50; + mul 16u32 65536u32 into r51; + and r0 r51 into r52; + is.neq r52 0u32 into r53; + mul 64u32 65536u32 into r54; + and r0 r54 into r55; + is.neq r55 0u32 into r56; + mul 3840u32 65536u32 into r57; + and r0 r57 into r58; + is.neq r58 0u32 into r59; + mul 768u32 65536u32 into r60; + and r0 r60 into r61; + is.neq r61 0u32 into r62; + mul 256u32 65536u32 into r63; + and r0 r63 into r64; + is.neq r64 0u32 into r65; + mul 1024u32 65536u32 into r66; + and r0 r66 into r67; + is.neq r67 0u32 into r68; + mul 12288u32 65536u32 into r69; + and r0 r69 into r70; + is.neq r70 0u32 into r71; + mul 4096u32 65536u32 into r72; + and r0 r72 into r73; + is.neq r73 0u32 into r74; + mul 16384u32 65536u32 into r75; + and r0 r75 into r76; + is.neq r76 0u32 into r77; + is.neq r0 0u32 into r78; + not r2 into r79; + not r35 into r80; + and r79 r80 into r81; + not r59 into r82; + and r81 r82 into r83; + not r71 into r84; + and r83 r84 into r85; + not r77 into r86; + and r85 r86 into r87; + and r87 r78 into r88; + ternary r88 31u8 32u8 into r89; + not r2 into r90; + not r35 into r91; + and r90 r91 into r92; + not r59 into r93; + and r92 r93 into r94; + not r71 into r95; + and r94 r95 into r96; + and r96 r77 into r97; + ternary r97 30u8 r89 into r98; + not r2 into r99; + not r35 into r100; + and r99 r100 into r101; + not r59 into r102; + and r101 r102 into r103; + and r103 r71 into r104; + not r74 into r105; + and r104 r105 into r106; + ternary r106 29u8 r98 into r107; + not r2 into r108; + not r35 into r109; + and r108 r109 into r110; + not r59 into r111; + and r110 r111 into r112; + and r112 r71 into r113; + and r113 r74 into r114; + ternary r114 28u8 r107 into r115; + not r2 into r116; + not r35 into r117; + and r116 r117 into r118; + and r118 r59 into r119; + not r62 into r120; + and r119 r120 into r121; + not r68 into r122; + and r121 r122 into r123; + ternary r123 27u8 r115 into r124; + not r2 into r125; + not r35 into r126; + and r125 r126 into r127; + and r127 r59 into r128; + not r62 into r129; + and r128 r129 into r130; + and r130 r68 into r131; + ternary r131 26u8 r124 into r132; + not r2 into r133; + not r35 into r134; + and r133 r134 into r135; + and r135 r59 into r136; + and r136 r62 into r137; + not r65 into r138; + and r137 r138 into r139; + ternary r139 25u8 r132 into r140; + not r2 into r141; + not r35 into r142; + and r141 r142 into r143; + and r143 r59 into r144; + and r144 r62 into r145; + and r145 r65 into r146; + ternary r146 24u8 r140 into r147; + not r2 into r148; + and r148 r35 into r149; + not r38 into r150; + and r149 r150 into r151; + not r50 into r152; + and r151 r152 into r153; + not r56 into r154; + and r153 r154 into r155; + ternary r155 23u8 r147 into r156; + not r2 into r157; + and r157 r35 into r158; + not r38 into r159; + and r158 r159 into r160; + not r50 into r161; + and r160 r161 into r162; + and r162 r56 into r163; + ternary r163 22u8 r156 into r164; + not r2 into r165; + and r165 r35 into r166; + not r38 into r167; + and r166 r167 into r168; + and r168 r50 into r169; + not r53 into r170; + and r169 r170 into r171; + ternary r171 21u8 r164 into r172; + not r2 into r173; + and r173 r35 into r174; + not r38 into r175; + and r174 r175 into r176; + and r176 r50 into r177; + and r177 r53 into r178; + ternary r178 20u8 r172 into r179; + not r2 into r180; + and r180 r35 into r181; + and r181 r38 into r182; + not r41 into r183; + and r182 r183 into r184; + not r47 into r185; + and r184 r185 into r186; + ternary r186 19u8 r179 into r187; + not r2 into r188; + and r188 r35 into r189; + and r189 r38 into r190; + not r41 into r191; + and r190 r191 into r192; + and r192 r47 into r193; + ternary r193 18u8 r187 into r194; + not r2 into r195; + and r195 r35 into r196; + and r196 r38 into r197; + and r197 r41 into r198; + not r44 into r199; + and r198 r199 into r200; + ternary r200 17u8 r194 into r201; + not r2 into r202; + and r202 r35 into r203; + and r203 r38 into r204; + and r204 r41 into r205; + and r205 r44 into r206; + ternary r206 16u8 r201 into r207; + not r4 into r208; + and r2 r208 into r209; + not r20 into r210; + and r209 r210 into r211; + not r28 into r212; + and r211 r212 into r213; + not r32 into r214; + and r213 r214 into r215; + ternary r215 15u8 r207 into r216; + not r4 into r217; + and r2 r217 into r218; + not r20 into r219; + and r218 r219 into r220; + not r28 into r221; + and r220 r221 into r222; + and r222 r32 into r223; + ternary r223 14u8 r216 into r224; + not r4 into r225; + and r2 r225 into r226; + not r20 into r227; + and r226 r227 into r228; + and r228 r28 into r229; + not r30 into r230; + and r229 r230 into r231; + ternary r231 13u8 r224 into r232; + not r4 into r233; + and r2 r233 into r234; + not r20 into r235; + and r234 r235 into r236; + and r236 r28 into r237; + and r237 r30 into r238; + ternary r238 12u8 r232 into r239; + not r4 into r240; + and r2 r240 into r241; + and r241 r20 into r242; + not r22 into r243; + and r242 r243 into r244; + not r26 into r245; + and r244 r245 into r246; + ternary r246 11u8 r239 into r247; + not r4 into r248; + and r2 r248 into r249; + and r249 r20 into r250; + not r22 into r251; + and r250 r251 into r252; + and r252 r26 into r253; + ternary r253 10u8 r247 into r254; + not r4 into r255; + and r2 r255 into r256; + and r256 r20 into r257; + and r257 r22 into r258; + not r24 into r259; + and r258 r259 into r260; + ternary r260 9u8 r254 into r261; + not r4 into r262; + and r2 r262 into r263; + and r263 r20 into r264; + and r264 r22 into r265; + and r265 r24 into r266; + ternary r266 8u8 r261 into r267; + and r2 r4 into r268; + not r6 into r269; + and r268 r269 into r270; + not r14 into r271; + and r270 r271 into r272; + not r18 into r273; + and r272 r273 into r274; + ternary r274 7u8 r267 into r275; + and r2 r4 into r276; + not r6 into r277; + and r276 r277 into r278; + not r14 into r279; + and r278 r279 into r280; + and r280 r18 into r281; + ternary r281 6u8 r275 into r282; + and r2 r4 into r283; + not r6 into r284; + and r283 r284 into r285; + and r285 r14 into r286; + not r16 into r287; + and r286 r287 into r288; + ternary r288 5u8 r282 into r289; + and r2 r4 into r290; + not r6 into r291; + and r290 r291 into r292; + and r292 r14 into r293; + and r293 r16 into r294; + ternary r294 4u8 r289 into r295; + and r2 r4 into r296; + and r296 r6 into r297; + not r8 into r298; + and r297 r298 into r299; + not r12 into r300; + and r299 r300 into r301; + ternary r301 3u8 r295 into r302; + and r2 r4 into r303; + and r303 r6 into r304; + not r8 into r305; + and r304 r305 into r306; + and r306 r12 into r307; + ternary r307 2u8 r302 into r308; + and r2 r4 into r309; + and r309 r6 into r310; + and r310 r8 into r311; + not r10 into r312; + and r311 r312 into r313; + ternary r313 1u8 r308 into r314; + and r2 r4 into r315; + and r315 r6 into r316; + and r316 r8 into r317; + and r317 r10 into r318; + ternary r318 0u8 r314 into r319; + output r319 as u8.private; diff --git a/examples/hackers-delight/ntzsearchtree/build/program.json b/examples/hackers-delight/ntzsearchtree/build/program.json new file mode 100644 index 0000000000..0137aac8db --- /dev/null +++ b/examples/hackers-delight/ntzsearchtree/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "ntzsearchtree.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/hackers-delight/ntzsearchtree/program.json b/examples/hackers-delight/ntzsearchtree/program.json index 172317b430..0137aac8db 100644 --- a/examples/hackers-delight/ntzsearchtree/program.json +++ b/examples/hackers-delight/ntzsearchtree/program.json @@ -2,9 +2,5 @@ "program": "ntzsearchtree.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkp6FAfhh6Ka5a1Y7pExtTbbxhTbNsYW3BLEu6MN8MR2rMy", - "address": "aleo143kzqw88fcjm74s8tnj3f30ntf9gv6sy7f8d6djxseydkjfjh5ys5khzcs" - }, "license": "MIT" } diff --git a/examples/hackers-delight/ntzsmallvals/.env b/examples/hackers-delight/ntzsmallvals/.env new file mode 100644 index 0000000000..69ded9e8c4 --- /dev/null +++ b/examples/hackers-delight/ntzsmallvals/.env @@ -0,0 +1,3 @@ + +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/hackers-delight/ntzsmallvals/.gitignore b/examples/hackers-delight/ntzsmallvals/.gitignore index b28696155d..750b56f237 100644 --- a/examples/hackers-delight/ntzsmallvals/.gitignore +++ b/examples/hackers-delight/ntzsmallvals/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/hackers-delight/ntzsmallvals/build/main.aleo b/examples/hackers-delight/ntzsmallvals/build/main.aleo new file mode 100644 index 0000000000..6cfca114cd --- /dev/null +++ b/examples/hackers-delight/ntzsmallvals/build/main.aleo @@ -0,0 +1,33 @@ +program ntzsmallvals.aleo; + + + +function main: + input r0 as u32.public; + is.eq r0 0u32 into r1; + shl.w r0 16u8 into r2; + is.neq r2 0u32 into r3; + sub 31u8 16u8 into r4; + ternary r3 r4 31u8 into r5; + ternary r3 r2 r0 into r6; + shl.w r6 8u8 into r7; + is.neq r7 0u32 into r8; + sub r5 8u8 into r9; + ternary r8 r9 r5 into r10; + ternary r8 r7 r6 into r11; + shl.w r11 4u8 into r12; + is.neq r12 0u32 into r13; + sub r10 4u8 into r14; + ternary r13 r14 r10 into r15; + ternary r13 r12 r11 into r16; + shl.w r16 2u8 into r17; + is.neq r17 0u32 into r18; + sub r15 2u8 into r19; + ternary r18 r19 r15 into r20; + ternary r18 r17 r16 into r21; + shl.w r21 1u8 into r22; + is.neq r22 0u32 into r23; + sub r20 1u8 into r24; + ternary r23 r24 r20 into r25; + ternary r1 32u8 r25 into r26; + output r26 as u8.private; diff --git a/examples/hackers-delight/ntzsmallvals/build/program.json b/examples/hackers-delight/ntzsmallvals/build/program.json new file mode 100644 index 0000000000..1f9bebd3ef --- /dev/null +++ b/examples/hackers-delight/ntzsmallvals/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "ntzsmallvals.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/hackers-delight/ntzsmallvals/program.json b/examples/hackers-delight/ntzsmallvals/program.json index 97c8f59d60..1f9bebd3ef 100644 --- a/examples/hackers-delight/ntzsmallvals/program.json +++ b/examples/hackers-delight/ntzsmallvals/program.json @@ -2,9 +2,5 @@ "program": "ntzsmallvals.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpHnXXtt92EZ16W2bb7oF8t263qNHagg6apVVV6nJqbFiL", - "address": "aleo1jzancywu7pksrmj2r9ydzqfds49dehzyrxtvvqu0djrcw6ysrszq8c8rgz" - }, "license": "MIT" } diff --git a/examples/helloworld/.env b/examples/helloworld/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/helloworld/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/helloworld/.gitignore b/examples/helloworld/.gitignore index b28696155d..750b56f237 100644 --- a/examples/helloworld/.gitignore +++ b/examples/helloworld/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/helloworld/README.md b/examples/helloworld/README.md index 0a9324edb5..df05077cb9 100644 --- a/examples/helloworld/README.md +++ b/examples/helloworld/README.md @@ -1,16 +1,19 @@ # Leo helloworld -## Build Guide - -To compile this program, run: -```bash -leo build -``` +## Run Guide To run this program, run: ```bash leo run main ``` + +## Execute Guide + +To execute this program, run: +```bash +leo execute main +``` + ## Overview This example shows how to sum two u32 numbers. diff --git a/examples/helloworld/build/main.aleo b/examples/helloworld/build/main.aleo new file mode 100644 index 0000000000..5c4658f7a2 --- /dev/null +++ b/examples/helloworld/build/main.aleo @@ -0,0 +1,9 @@ +program helloworld.aleo; + + + +function main: + input r0 as u32.public; + input r1 as u32.private; + add r0 r1 into r2; + output r2 as u32.private; diff --git a/examples/helloworld/build/program.json b/examples/helloworld/build/program.json new file mode 100644 index 0000000000..df13181a2c --- /dev/null +++ b/examples/helloworld/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "helloworld.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/helloworld/program.json b/examples/helloworld/program.json index 5ab6425df6..df13181a2c 100644 --- a/examples/helloworld/program.json +++ b/examples/helloworld/program.json @@ -2,9 +2,5 @@ "program": "helloworld.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx", - "address": "aleo1mgfq6g40l6zkhsm063n3uhr43qk5e0zsua5aszeq5080dsvlcvxsn0rrau" - }, "license": "MIT" } diff --git a/examples/interest/.env b/examples/interest/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/interest/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/interest/.gitignore b/examples/interest/.gitignore index b28696155d..750b56f237 100644 --- a/examples/interest/.gitignore +++ b/examples/interest/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/interest/README.md b/examples/interest/README.md index dfecd2d6eb..eff9b9e799 100644 --- a/examples/interest/README.md +++ b/examples/interest/README.md @@ -2,13 +2,6 @@ This program provides utilities for calculating interest over a fixed or bounded number of iterations. -## Building the Program - -To compile this program, run: -```bash -leo build -``` - ## Running the Program To run this program, run: @@ -20,3 +13,15 @@ where `` is one of the following: * `bounded_iteration_interest` Be sure to update `inputs/interest.in` with the desired inputs. + +## Executing the Program + +To execute this program, run: +```bash +leo execute +``` +where `` is one of the following: +* `fixed_iteration_interest` +* `bounded_iteration_interest` + +Be sure to update `inputs/interest.in` with the desired inputs. \ No newline at end of file diff --git a/examples/interest/build/main.aleo b/examples/interest/build/main.aleo new file mode 100644 index 0000000000..4fd7f9a479 --- /dev/null +++ b/examples/interest/build/main.aleo @@ -0,0 +1,397 @@ +program interest.aleo; + + + +function fixed_iteration_interest: + input r0 as u32.private; + input r1 as u32.public; + mul r0 r1 into r2; + div r2 100u32 into r3; + add r0 r3 into r4; + mul r4 r1 into r5; + div r5 100u32 into r6; + add r4 r6 into r7; + mul r7 r1 into r8; + div r8 100u32 into r9; + add r7 r9 into r10; + mul r10 r1 into r11; + div r11 100u32 into r12; + add r10 r12 into r13; + mul r13 r1 into r14; + div r14 100u32 into r15; + add r13 r15 into r16; + mul r16 r1 into r17; + div r17 100u32 into r18; + add r16 r18 into r19; + mul r19 r1 into r20; + div r20 100u32 into r21; + add r19 r21 into r22; + mul r22 r1 into r23; + div r23 100u32 into r24; + add r22 r24 into r25; + mul r25 r1 into r26; + div r26 100u32 into r27; + add r25 r27 into r28; + mul r28 r1 into r29; + div r29 100u32 into r30; + add r28 r30 into r31; + output r31 as u32.private; + + +function bounded_iteration_interest: + input r0 as u32.private; + input r1 as u32.public; + input r2 as u8.private; + lte r2 50u8 into r3; + assert.eq r3 true; + lt 0u8 r2 into r4; + mul r0 r1 into r5; + div r5 100u32 into r6; + add r0 r6 into r7; + ternary r4 r7 r0 into r8; + is.eq 0u8 40u8 into r9; + lt 1u8 r2 into r10; + mul r8 r1 into r11; + div r11 100u32 into r12; + add r8 r12 into r13; + ternary r10 r13 r8 into r14; + is.eq 1u8 40u8 into r15; + lt 2u8 r2 into r16; + mul r14 r1 into r17; + div r17 100u32 into r18; + add r14 r18 into r19; + ternary r16 r19 r14 into r20; + is.eq 2u8 40u8 into r21; + lt 3u8 r2 into r22; + mul r20 r1 into r23; + div r23 100u32 into r24; + add r20 r24 into r25; + ternary r22 r25 r20 into r26; + is.eq 3u8 40u8 into r27; + lt 4u8 r2 into r28; + mul r26 r1 into r29; + div r29 100u32 into r30; + add r26 r30 into r31; + ternary r28 r31 r26 into r32; + is.eq 4u8 40u8 into r33; + lt 5u8 r2 into r34; + mul r32 r1 into r35; + div r35 100u32 into r36; + add r32 r36 into r37; + ternary r34 r37 r32 into r38; + is.eq 5u8 40u8 into r39; + lt 6u8 r2 into r40; + mul r38 r1 into r41; + div r41 100u32 into r42; + add r38 r42 into r43; + ternary r40 r43 r38 into r44; + is.eq 6u8 40u8 into r45; + lt 7u8 r2 into r46; + mul r44 r1 into r47; + div r47 100u32 into r48; + add r44 r48 into r49; + ternary r46 r49 r44 into r50; + is.eq 7u8 40u8 into r51; + lt 8u8 r2 into r52; + mul r50 r1 into r53; + div r53 100u32 into r54; + add r50 r54 into r55; + ternary r52 r55 r50 into r56; + is.eq 8u8 40u8 into r57; + lt 9u8 r2 into r58; + mul r56 r1 into r59; + div r59 100u32 into r60; + add r56 r60 into r61; + ternary r58 r61 r56 into r62; + is.eq 9u8 40u8 into r63; + lt 10u8 r2 into r64; + mul r62 r1 into r65; + div r65 100u32 into r66; + add r62 r66 into r67; + ternary r64 r67 r62 into r68; + is.eq 10u8 40u8 into r69; + lt 11u8 r2 into r70; + mul r68 r1 into r71; + div r71 100u32 into r72; + add r68 r72 into r73; + ternary r70 r73 r68 into r74; + is.eq 11u8 40u8 into r75; + lt 12u8 r2 into r76; + mul r74 r1 into r77; + div r77 100u32 into r78; + add r74 r78 into r79; + ternary r76 r79 r74 into r80; + is.eq 12u8 40u8 into r81; + lt 13u8 r2 into r82; + mul r80 r1 into r83; + div r83 100u32 into r84; + add r80 r84 into r85; + ternary r82 r85 r80 into r86; + is.eq 13u8 40u8 into r87; + lt 14u8 r2 into r88; + mul r86 r1 into r89; + div r89 100u32 into r90; + add r86 r90 into r91; + ternary r88 r91 r86 into r92; + is.eq 14u8 40u8 into r93; + lt 15u8 r2 into r94; + mul r92 r1 into r95; + div r95 100u32 into r96; + add r92 r96 into r97; + ternary r94 r97 r92 into r98; + is.eq 15u8 40u8 into r99; + lt 16u8 r2 into r100; + mul r98 r1 into r101; + div r101 100u32 into r102; + add r98 r102 into r103; + ternary r100 r103 r98 into r104; + is.eq 16u8 40u8 into r105; + lt 17u8 r2 into r106; + mul r104 r1 into r107; + div r107 100u32 into r108; + add r104 r108 into r109; + ternary r106 r109 r104 into r110; + is.eq 17u8 40u8 into r111; + lt 18u8 r2 into r112; + mul r110 r1 into r113; + div r113 100u32 into r114; + add r110 r114 into r115; + ternary r112 r115 r110 into r116; + is.eq 18u8 40u8 into r117; + lt 19u8 r2 into r118; + mul r116 r1 into r119; + div r119 100u32 into r120; + add r116 r120 into r121; + ternary r118 r121 r116 into r122; + is.eq 19u8 40u8 into r123; + lt 20u8 r2 into r124; + mul r122 r1 into r125; + div r125 100u32 into r126; + add r122 r126 into r127; + ternary r124 r127 r122 into r128; + is.eq 20u8 40u8 into r129; + lt 21u8 r2 into r130; + mul r128 r1 into r131; + div r131 100u32 into r132; + add r128 r132 into r133; + ternary r130 r133 r128 into r134; + is.eq 21u8 40u8 into r135; + lt 22u8 r2 into r136; + mul r134 r1 into r137; + div r137 100u32 into r138; + add r134 r138 into r139; + ternary r136 r139 r134 into r140; + is.eq 22u8 40u8 into r141; + lt 23u8 r2 into r142; + mul r140 r1 into r143; + div r143 100u32 into r144; + add r140 r144 into r145; + ternary r142 r145 r140 into r146; + is.eq 23u8 40u8 into r147; + lt 24u8 r2 into r148; + mul r146 r1 into r149; + div r149 100u32 into r150; + add r146 r150 into r151; + ternary r148 r151 r146 into r152; + is.eq 24u8 40u8 into r153; + lt 25u8 r2 into r154; + mul r152 r1 into r155; + div r155 100u32 into r156; + add r152 r156 into r157; + ternary r154 r157 r152 into r158; + is.eq 25u8 40u8 into r159; + lt 26u8 r2 into r160; + mul r158 r1 into r161; + div r161 100u32 into r162; + add r158 r162 into r163; + ternary r160 r163 r158 into r164; + is.eq 26u8 40u8 into r165; + lt 27u8 r2 into r166; + mul r164 r1 into r167; + div r167 100u32 into r168; + add r164 r168 into r169; + ternary r166 r169 r164 into r170; + is.eq 27u8 40u8 into r171; + lt 28u8 r2 into r172; + mul r170 r1 into r173; + div r173 100u32 into r174; + add r170 r174 into r175; + ternary r172 r175 r170 into r176; + is.eq 28u8 40u8 into r177; + lt 29u8 r2 into r178; + mul r176 r1 into r179; + div r179 100u32 into r180; + add r176 r180 into r181; + ternary r178 r181 r176 into r182; + is.eq 29u8 40u8 into r183; + lt 30u8 r2 into r184; + mul r182 r1 into r185; + div r185 100u32 into r186; + add r182 r186 into r187; + ternary r184 r187 r182 into r188; + is.eq 30u8 40u8 into r189; + lt 31u8 r2 into r190; + mul r188 r1 into r191; + div r191 100u32 into r192; + add r188 r192 into r193; + ternary r190 r193 r188 into r194; + is.eq 31u8 40u8 into r195; + lt 32u8 r2 into r196; + mul r194 r1 into r197; + div r197 100u32 into r198; + add r194 r198 into r199; + ternary r196 r199 r194 into r200; + is.eq 32u8 40u8 into r201; + lt 33u8 r2 into r202; + mul r200 r1 into r203; + div r203 100u32 into r204; + add r200 r204 into r205; + ternary r202 r205 r200 into r206; + is.eq 33u8 40u8 into r207; + lt 34u8 r2 into r208; + mul r206 r1 into r209; + div r209 100u32 into r210; + add r206 r210 into r211; + ternary r208 r211 r206 into r212; + is.eq 34u8 40u8 into r213; + lt 35u8 r2 into r214; + mul r212 r1 into r215; + div r215 100u32 into r216; + add r212 r216 into r217; + ternary r214 r217 r212 into r218; + is.eq 35u8 40u8 into r219; + lt 36u8 r2 into r220; + mul r218 r1 into r221; + div r221 100u32 into r222; + add r218 r222 into r223; + ternary r220 r223 r218 into r224; + is.eq 36u8 40u8 into r225; + lt 37u8 r2 into r226; + mul r224 r1 into r227; + div r227 100u32 into r228; + add r224 r228 into r229; + ternary r226 r229 r224 into r230; + is.eq 37u8 40u8 into r231; + lt 38u8 r2 into r232; + mul r230 r1 into r233; + div r233 100u32 into r234; + add r230 r234 into r235; + ternary r232 r235 r230 into r236; + is.eq 38u8 40u8 into r237; + lt 39u8 r2 into r238; + mul r236 r1 into r239; + div r239 100u32 into r240; + add r236 r240 into r241; + ternary r238 r241 r236 into r242; + is.eq 39u8 40u8 into r243; + lt 40u8 r2 into r244; + mul r242 r1 into r245; + div r245 100u32 into r246; + add r242 r246 into r247; + ternary r244 r247 r242 into r248; + is.eq 40u8 40u8 into r249; + lt 41u8 r2 into r250; + mul r248 r1 into r251; + div r251 100u32 into r252; + add r248 r252 into r253; + ternary r250 r253 r248 into r254; + is.eq 41u8 40u8 into r255; + lt 42u8 r2 into r256; + mul r254 r1 into r257; + div r257 100u32 into r258; + add r254 r258 into r259; + ternary r256 r259 r254 into r260; + is.eq 42u8 40u8 into r261; + lt 43u8 r2 into r262; + mul r260 r1 into r263; + div r263 100u32 into r264; + add r260 r264 into r265; + ternary r262 r265 r260 into r266; + is.eq 43u8 40u8 into r267; + lt 44u8 r2 into r268; + mul r266 r1 into r269; + div r269 100u32 into r270; + add r266 r270 into r271; + ternary r268 r271 r266 into r272; + is.eq 44u8 40u8 into r273; + lt 45u8 r2 into r274; + mul r272 r1 into r275; + div r275 100u32 into r276; + add r272 r276 into r277; + ternary r274 r277 r272 into r278; + is.eq 45u8 40u8 into r279; + lt 46u8 r2 into r280; + mul r278 r1 into r281; + div r281 100u32 into r282; + add r278 r282 into r283; + ternary r280 r283 r278 into r284; + is.eq 46u8 40u8 into r285; + lt 47u8 r2 into r286; + mul r284 r1 into r287; + div r287 100u32 into r288; + add r284 r288 into r289; + ternary r286 r289 r284 into r290; + is.eq 47u8 40u8 into r291; + lt 48u8 r2 into r292; + mul r290 r1 into r293; + div r293 100u32 into r294; + add r290 r294 into r295; + ternary r292 r295 r290 into r296; + is.eq 48u8 40u8 into r297; + lt 49u8 r2 into r298; + mul r296 r1 into r299; + div r299 100u32 into r300; + add r296 r300 into r301; + ternary r298 r301 r296 into r302; + is.eq 49u8 40u8 into r303; + ternary r303 r302 r302 into r304; + ternary r297 r296 r304 into r305; + ternary r291 r290 r305 into r306; + ternary r285 r284 r306 into r307; + ternary r279 r278 r307 into r308; + ternary r273 r272 r308 into r309; + ternary r267 r266 r309 into r310; + ternary r261 r260 r310 into r311; + ternary r255 r254 r311 into r312; + ternary r249 r248 r312 into r313; + ternary r243 r242 r313 into r314; + ternary r237 r236 r314 into r315; + ternary r231 r230 r315 into r316; + ternary r225 r224 r316 into r317; + ternary r219 r218 r317 into r318; + ternary r213 r212 r318 into r319; + ternary r207 r206 r319 into r320; + ternary r201 r200 r320 into r321; + ternary r195 r194 r321 into r322; + ternary r189 r188 r322 into r323; + ternary r183 r182 r323 into r324; + ternary r177 r176 r324 into r325; + ternary r171 r170 r325 into r326; + ternary r165 r164 r326 into r327; + ternary r159 r158 r327 into r328; + ternary r153 r152 r328 into r329; + ternary r147 r146 r329 into r330; + ternary r141 r140 r330 into r331; + ternary r135 r134 r331 into r332; + ternary r129 r128 r332 into r333; + ternary r123 r122 r333 into r334; + ternary r117 r116 r334 into r335; + ternary r111 r110 r335 into r336; + ternary r105 r104 r336 into r337; + ternary r99 r98 r337 into r338; + ternary r93 r92 r338 into r339; + ternary r87 r86 r339 into r340; + ternary r81 r80 r340 into r341; + ternary r75 r74 r341 into r342; + ternary r69 r68 r342 into r343; + ternary r63 r62 r343 into r344; + ternary r57 r56 r344 into r345; + ternary r51 r50 r345 into r346; + ternary r45 r44 r346 into r347; + ternary r39 r38 r347 into r348; + ternary r33 r32 r348 into r349; + ternary r27 r26 r349 into r350; + ternary r21 r20 r350 into r351; + ternary r15 r14 r351 into r352; + ternary r9 r8 r352 into r353; + output r353 as u32.private; diff --git a/examples/interest/build/program.json b/examples/interest/build/program.json new file mode 100644 index 0000000000..1724ffab2b --- /dev/null +++ b/examples/interest/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "interest.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/interest/program.json b/examples/interest/program.json index 90056fcb88..1724ffab2b 100644 --- a/examples/interest/program.json +++ b/examples/interest/program.json @@ -2,9 +2,5 @@ "program": "interest.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkp6QSDYHfL4Tr54dKXXxSwZWVpm1Ro3feYgpvAampgNmKu", - "address": "aleo1lwxu6nluvjt6hu0gurjsph23wlvyxkut59r757szma2s9mrljggsvue3n4" - }, "license": "MIT" } diff --git a/examples/lottery/.env b/examples/lottery/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/lottery/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/lottery/.gitignore b/examples/lottery/.gitignore index b28696155d..750b56f237 100644 --- a/examples/lottery/.gitignore +++ b/examples/lottery/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/lottery/README.md b/examples/lottery/README.md index 897dae6206..5a35692c06 100644 --- a/examples/lottery/README.md +++ b/examples/lottery/README.md @@ -1,8 +1,15 @@ # lottery.aleo -## Build Guide +## Run Guide -To compile this Aleo program, run: +To run this program, run: ```bash -aleo build +leo run main +``` + +## Execute Guide + +To execute this program, run: +```bash +leo execute main ``` diff --git a/examples/lottery/build/main.aleo b/examples/lottery/build/main.aleo new file mode 100644 index 0000000000..73941df8de --- /dev/null +++ b/examples/lottery/build/main.aleo @@ -0,0 +1,26 @@ +program lottery.aleo; + +record Ticket: + owner as address.private; + + +mapping num_winners: + key left as u8.public; + value right as u8.public; + +function play: + cast self.caller into r0 as Ticket.record; + output r0 as Ticket.record; + + finalize; + +finalize play: + lte block.height 1000u32 into r0; + assert.eq r0 true; + rand.chacha into r1 as boolean; + assert.eq r1 true; + get.or_use num_winners[0u8] 0u8 into r2; + lt r2 5u8 into r3; + assert.eq r3 true; + add r2 1u8 into r4; + set r4 into num_winners[0u8]; diff --git a/examples/lottery/build/program.json b/examples/lottery/build/program.json new file mode 100644 index 0000000000..45f0f3399a --- /dev/null +++ b/examples/lottery/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "lottery.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/lottery/program.json b/examples/lottery/program.json index b66b29cf1f..45f0f3399a 100644 --- a/examples/lottery/program.json +++ b/examples/lottery/program.json @@ -2,9 +2,5 @@ "program": "lottery.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpJrHD9orEuTpL8dDnSBZo6VyKWdbrk3VJfcwEv9SsQBN2", - "address": "aleo1dvx603addv7c2uqj6ksm9hccaypzn0ngus4n2vygvdlhqvkcyyfqvh4zdz" - }, "license": "MIT" } diff --git a/examples/message/.env b/examples/message/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/message/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/message/.gitignore b/examples/message/.gitignore index b28696155d..750b56f237 100644 --- a/examples/message/.gitignore +++ b/examples/message/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/message/README.md b/examples/message/README.md index aaf0b0110d..91c4fb8fdf 100644 --- a/examples/message/README.md +++ b/examples/message/README.md @@ -1,14 +1,16 @@ # Leo message struct A basic example showing how to declare a struct in the Leo language. -## Build Guide - -To compile this program, run: -```bash -leo build -``` +## Run Guide To run this program, run: ```bash -leo run -``` \ No newline at end of file +leo run main +``` + +## Execute Guide + +To execute this program, run: +```bash +leo execute main +``` diff --git a/examples/message/build/main.aleo b/examples/message/build/main.aleo new file mode 100644 index 0000000000..488da209d5 --- /dev/null +++ b/examples/message/build/main.aleo @@ -0,0 +1,12 @@ +program message.aleo; + +struct Message: + first as field; + second as field; + + +function main: + input r0 as Message.private; + cast r0.first r0.second into r1 as Message; + add r1.first r1.second into r2; + output r2 as field.private; diff --git a/examples/message/build/program.json b/examples/message/build/program.json new file mode 100644 index 0000000000..cf32514fed --- /dev/null +++ b/examples/message/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "message.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/message/program.json b/examples/message/program.json index 86a7c50158..cf32514fed 100644 --- a/examples/message/program.json +++ b/examples/message/program.json @@ -2,9 +2,5 @@ "program": "message.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkp4YvAU9D17zZDxrt6WKE2wVrNGgfqheLVXqJ6WZADtKS1", - "address": "aleo1fw4xmr8yv88scg20gmzqn2t7ye22wqk2rq22d2ayq6j952v0n5psw7ztqp" - }, "license": "MIT" } diff --git a/examples/simple_token/.env b/examples/simple_token/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/simple_token/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/simple_token/.gitignore b/examples/simple_token/.gitignore index 63c92f940d..750b56f237 100644 --- a/examples/simple_token/.gitignore +++ b/examples/simple_token/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ \ No newline at end of file +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/simple_token/README.md b/examples/simple_token/README.md index dc20c3d7db..70ff0a5fa1 100644 --- a/examples/simple_token/README.md +++ b/examples/simple_token/README.md @@ -1,13 +1,15 @@ # token -## Build Guide - -To compile this program, run: -```bash -leo build -``` +## Run Guide To run this program, run: ```bash -leo run -``` \ No newline at end of file +leo run main +``` + +## Execute Guide + +To execute this program, run: +```bash +leo execute main +``` diff --git a/examples/simple_token/build/main.aleo b/examples/simple_token/build/main.aleo new file mode 100644 index 0000000000..ff7355e27f --- /dev/null +++ b/examples/simple_token/build/main.aleo @@ -0,0 +1,23 @@ +program simple_token.aleo; + +record Token: + owner as address.private; + amount as u64.private; + + +function mint: + input r0 as address.private; + input r1 as u64.private; + cast r0 r1 into r2 as Token.record; + output r2 as Token.record; + + +function transfer: + input r0 as Token.record; + input r1 as address.private; + input r2 as u64.private; + sub r0.amount r2 into r3; + cast r0.owner r3 into r4 as Token.record; + cast r1 r2 into r5 as Token.record; + output r4 as Token.record; + output r5 as Token.record; diff --git a/examples/simple_token/build/program.json b/examples/simple_token/build/program.json new file mode 100644 index 0000000000..2e05c74d43 --- /dev/null +++ b/examples/simple_token/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "simple_token.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/simple_token/inputs/simple_token.in b/examples/simple_token/inputs/simple_token.in index 1d12e9dcc2..6110325743 100644 --- a/examples/simple_token/inputs/simple_token.in +++ b/examples/simple_token/inputs/simple_token.in @@ -1,11 +1,11 @@ // The program input for simple_token/src/main.leo [mint] -owner: address = aleo1ht2a9q0gsd38j0se4t9lsfulxgqrens2vgzgry3pkvs93xrrzu8s892zn7; +owner: address = aleo1mgfq6g40l6zkhsm063n3uhr43qk5e0zsua5aszeq5080dsvlcvxsn0rrau; amount: u64 = 100u64; [transfer] token: Token = Token { - owner: aleo1ht2a9q0gsd38j0se4t9lsfulxgqrens2vgzgry3pkvs93xrrzu8s892zn7, + owner: aleo1mgfq6g40l6zkhsm063n3uhr43qk5e0zsua5aszeq5080dsvlcvxsn0rrau, amount: 100u64, _nonce: 0group, }; diff --git a/examples/simple_token/program.json b/examples/simple_token/program.json index 4b11ef97b9..2e05c74d43 100644 --- a/examples/simple_token/program.json +++ b/examples/simple_token/program.json @@ -2,9 +2,5 @@ "program": "simple_token.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpBqRv2cwkSiR4hQ3Tb4AZFD3XzdwPqV9QsEykTKBV1YKT", - "address": "aleo1ht2a9q0gsd38j0se4t9lsfulxgqrens2vgzgry3pkvs93xrrzu8s892zn7" - }, "license": "MIT" } diff --git a/examples/tictactoe/.env b/examples/tictactoe/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/tictactoe/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/tictactoe/.gitignore b/examples/tictactoe/.gitignore index b28696155d..750b56f237 100644 --- a/examples/tictactoe/.gitignore +++ b/examples/tictactoe/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/tictactoe/README.md b/examples/tictactoe/README.md index 2f425d6f1c..b28412db66 100644 --- a/examples/tictactoe/README.md +++ b/examples/tictactoe/README.md @@ -42,3 +42,8 @@ See `./run.sh` for an example. ```bash leo run ``` + +## Executing the Program +```bash +leo execute ... +``` diff --git a/examples/tictactoe/build/main.aleo b/examples/tictactoe/build/main.aleo new file mode 100644 index 0000000000..c6aa9f0a9c --- /dev/null +++ b/examples/tictactoe/build/main.aleo @@ -0,0 +1,237 @@ +program tictactoe.aleo; + +struct Row: + c1 as u8; + c2 as u8; + c3 as u8; + +struct Board: + r1 as Row; + r2 as Row; + r3 as Row; + + +function new: + cast 0u8 0u8 0u8 into r0 as Row; + cast 0u8 0u8 0u8 into r1 as Row; + cast 0u8 0u8 0u8 into r2 as Row; + cast r0 r1 r2 into r3 as Board; + output r3 as Board.private; + + +closure check_for_win: + input r0 as Board; + input r1 as u8; + is.eq r0.r1.c1 r1 into r2; + is.eq r0.r1.c2 r1 into r3; + and r2 r3 into r4; + is.eq r0.r1.c3 r1 into r5; + and r4 r5 into r6; + is.eq r0.r2.c1 r1 into r7; + is.eq r0.r2.c2 r1 into r8; + and r7 r8 into r9; + is.eq r0.r2.c3 r1 into r10; + and r9 r10 into r11; + or r6 r11 into r12; + is.eq r0.r3.c1 r1 into r13; + is.eq r0.r3.c3 r1 into r14; + and r13 r14 into r15; + is.eq r0.r3.c3 r1 into r16; + and r15 r16 into r17; + or r12 r17 into r18; + is.eq r0.r1.c1 r1 into r19; + is.eq r0.r2.c1 r1 into r20; + and r19 r20 into r21; + is.eq r0.r3.c1 r1 into r22; + and r21 r22 into r23; + or r18 r23 into r24; + is.eq r0.r1.c2 r1 into r25; + is.eq r0.r2.c3 r1 into r26; + and r25 r26 into r27; + is.eq r0.r3.c2 r1 into r28; + and r27 r28 into r29; + or r24 r29 into r30; + is.eq r0.r1.c3 r1 into r31; + is.eq r0.r2.c3 r1 into r32; + and r31 r32 into r33; + is.eq r0.r3.c3 r1 into r34; + and r33 r34 into r35; + or r30 r35 into r36; + is.eq r0.r1.c1 r1 into r37; + is.eq r0.r2.c2 r1 into r38; + and r37 r38 into r39; + is.eq r0.r3.c3 r1 into r40; + and r39 r40 into r41; + or r36 r41 into r42; + is.eq r0.r1.c3 r1 into r43; + is.eq r0.r2.c2 r1 into r44; + and r43 r44 into r45; + is.eq r0.r3.c1 r1 into r46; + and r45 r46 into r47; + or r42 r47 into r48; + output r48 as boolean; + + +function make_move: + input r0 as u8.private; + input r1 as u8.private; + input r2 as u8.private; + input r3 as Board.private; + is.eq r0 1u8 into r4; + is.eq r0 2u8 into r5; + or r4 r5 into r6; + assert.eq r6 true; + lte 1u8 r1 into r7; + lte r1 3u8 into r8; + and r7 r8 into r9; + assert.eq r9 true; + lte 1u8 r2 into r10; + lte r2 3u8 into r11; + and r10 r11 into r12; + assert.eq r12 true; + is.eq r1 1u8 into r13; + is.eq r2 1u8 into r14; + and r13 r14 into r15; + is.eq r3.r1.c1 0u8 into r16; + and r15 r16 into r17; + is.eq r1 1u8 into r18; + is.eq r2 2u8 into r19; + and r18 r19 into r20; + is.eq r3.r1.c2 0u8 into r21; + and r20 r21 into r22; + is.eq r1 1u8 into r23; + is.eq r2 3u8 into r24; + and r23 r24 into r25; + is.eq r3.r1.c3 0u8 into r26; + and r25 r26 into r27; + is.eq r1 2u8 into r28; + is.eq r2 1u8 into r29; + and r28 r29 into r30; + is.eq r3.r2.c1 0u8 into r31; + and r30 r31 into r32; + is.eq r1 2u8 into r33; + is.eq r2 2u8 into r34; + and r33 r34 into r35; + is.eq r3.r2.c2 0u8 into r36; + and r35 r36 into r37; + is.eq r1 2u8 into r38; + is.eq r2 3u8 into r39; + and r38 r39 into r40; + is.eq r3.r2.c3 0u8 into r41; + and r40 r41 into r42; + is.eq r1 3u8 into r43; + is.eq r2 1u8 into r44; + and r43 r44 into r45; + is.eq r3.r3.c1 0u8 into r46; + and r45 r46 into r47; + is.eq r1 3u8 into r48; + is.eq r2 2u8 into r49; + and r48 r49 into r50; + is.eq r3.r3.c2 0u8 into r51; + and r50 r51 into r52; + is.eq r1 3u8 into r53; + is.eq r2 3u8 into r54; + and r53 r54 into r55; + is.eq r3.r3.c3 0u8 into r56; + and r55 r56 into r57; + ternary r57 r0 r3.r3.c3 into r58; + ternary r52 r0 r3.r3.c2 into r59; + ternary r52 r3.r3.c3 r58 into r60; + ternary r47 r0 r3.r3.c1 into r61; + ternary r47 r3.r3.c2 r59 into r62; + ternary r47 r3.r3.c3 r60 into r63; + ternary r42 r0 r3.r2.c3 into r64; + ternary r42 r3.r3.c1 r61 into r65; + ternary r42 r3.r3.c2 r62 into r66; + ternary r42 r3.r3.c3 r63 into r67; + ternary r37 r0 r3.r2.c2 into r68; + ternary r37 r3.r2.c3 r64 into r69; + ternary r37 r3.r3.c1 r65 into r70; + ternary r37 r3.r3.c2 r66 into r71; + ternary r37 r3.r3.c3 r67 into r72; + ternary r32 r0 r3.r2.c1 into r73; + ternary r32 r3.r2.c2 r68 into r74; + ternary r32 r3.r2.c3 r69 into r75; + ternary r32 r3.r3.c1 r70 into r76; + ternary r32 r3.r3.c2 r71 into r77; + ternary r32 r3.r3.c3 r72 into r78; + ternary r27 r0 r3.r1.c3 into r79; + ternary r27 r3.r2.c1 r73 into r80; + ternary r27 r3.r2.c2 r74 into r81; + ternary r27 r3.r2.c3 r75 into r82; + ternary r27 r3.r3.c1 r76 into r83; + ternary r27 r3.r3.c2 r77 into r84; + ternary r27 r3.r3.c3 r78 into r85; + ternary r22 r0 r3.r1.c2 into r86; + ternary r22 r3.r1.c3 r79 into r87; + ternary r22 r3.r2.c1 r80 into r88; + ternary r22 r3.r2.c2 r81 into r89; + ternary r22 r3.r2.c3 r82 into r90; + ternary r22 r3.r3.c1 r83 into r91; + ternary r22 r3.r3.c2 r84 into r92; + ternary r22 r3.r3.c3 r85 into r93; + ternary r17 r0 r3.r1.c1 into r94; + ternary r17 r3.r1.c2 r86 into r95; + ternary r17 r3.r1.c3 r87 into r96; + ternary r17 r3.r2.c1 r88 into r97; + ternary r17 r3.r2.c2 r89 into r98; + ternary r17 r3.r2.c3 r90 into r99; + ternary r17 r3.r3.c1 r91 into r100; + ternary r17 r3.r3.c2 r92 into r101; + ternary r17 r3.r3.c3 r93 into r102; + cast r94 r95 r96 into r103 as Row; + cast r97 r98 r99 into r104 as Row; + cast r100 r98 r99 into r105 as Row; + cast r103 r104 r105 into r106 as Board; + call check_for_win r106 1u8 into r107; + call check_for_win r106 2u8 into r108; + not r107 into r109; + and r109 r108 into r110; + ternary r110 r106.r1.c1 r106.r1.c1 into r111; + not r107 into r112; + and r112 r108 into r113; + ternary r113 r106.r1.c2 r106.r1.c2 into r114; + not r107 into r115; + and r115 r108 into r116; + ternary r116 r106.r1.c3 r106.r1.c3 into r117; + cast r111 r114 r117 into r118 as Row; + not r107 into r119; + and r119 r108 into r120; + ternary r120 r106.r2.c1 r106.r2.c1 into r121; + not r107 into r122; + and r122 r108 into r123; + ternary r123 r106.r2.c2 r106.r2.c2 into r124; + not r107 into r125; + and r125 r108 into r126; + ternary r126 r106.r2.c3 r106.r2.c3 into r127; + cast r121 r124 r127 into r128 as Row; + not r107 into r129; + and r129 r108 into r130; + ternary r130 r106.r3.c1 r106.r3.c1 into r131; + not r107 into r132; + and r132 r108 into r133; + ternary r133 r106.r3.c2 r106.r3.c2 into r134; + not r107 into r135; + and r135 r108 into r136; + ternary r136 r106.r3.c3 r106.r3.c3 into r137; + cast r131 r134 r137 into r138 as Row; + cast r118 r128 r138 into r139 as Board; + not r107 into r140; + and r140 r108 into r141; + ternary r141 2u8 0u8 into r142; + ternary r107 r106.r1.c1 r139.r1.c1 into r143; + ternary r107 r106.r1.c2 r139.r1.c2 into r144; + ternary r107 r106.r1.c3 r139.r1.c3 into r145; + cast r143 r144 r145 into r146 as Row; + ternary r107 r106.r2.c1 r139.r2.c1 into r147; + ternary r107 r106.r2.c2 r139.r2.c2 into r148; + ternary r107 r106.r2.c3 r139.r2.c3 into r149; + cast r147 r148 r149 into r150 as Row; + ternary r107 r106.r3.c1 r139.r3.c1 into r151; + ternary r107 r106.r3.c2 r139.r3.c2 into r152; + ternary r107 r106.r3.c3 r139.r3.c3 into r153; + cast r151 r152 r153 into r154 as Row; + cast r146 r150 r154 into r155 as Board; + ternary r107 1u8 r142 into r156; + output r155 as Board.private; + output r156 as u8.private; diff --git a/examples/tictactoe/build/program.json b/examples/tictactoe/build/program.json new file mode 100644 index 0000000000..a2f5a13696 --- /dev/null +++ b/examples/tictactoe/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "tictactoe.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/tictactoe/program.json b/examples/tictactoe/program.json index 6098a92d9b..a2f5a13696 100644 --- a/examples/tictactoe/program.json +++ b/examples/tictactoe/program.json @@ -2,9 +2,5 @@ "program": "tictactoe.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpCrrZGovkDfjnhhniPrrEaFb98QjxaxGsBScx2SvXJe7S", - "address": "aleo13upju26f9xnsxz77rs7cs6hffz8d6hpvuvu3xqwmh7trrh65mqpsz4xrl9" - }, "license": "MIT" } diff --git a/examples/token/.env b/examples/token/.env new file mode 100644 index 0000000000..2c5429aaed --- /dev/null +++ b/examples/token/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpGZsYM8WQJMDDrzeAhB2SB3N9WcGt9Ks6NLBKCWyiMKv8 diff --git a/examples/token/.gitignore b/examples/token/.gitignore index b28696155d..750b56f237 100644 --- a/examples/token/.gitignore +++ b/examples/token/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/token/README.md b/examples/token/README.md index 1eb9ef205e..cd91e70678 100644 --- a/examples/token/README.md +++ b/examples/token/README.md @@ -3,9 +3,16 @@ A transparent & shielded custom token in Leo. -## How to Build +## Run Guide -To compile this Leo program, run: +To run this program, run: ```bash -leo build +leo run main +``` + +## Execute Guide + +To execute this program, run: +```bash +leo execute main ``` diff --git a/examples/token/build/main.aleo b/examples/token/build/main.aleo new file mode 100644 index 0000000000..ec32c954b3 --- /dev/null +++ b/examples/token/build/main.aleo @@ -0,0 +1,93 @@ +program token.aleo; + +record token: + owner as address.private; + amount as u64.private; + + +mapping account: + key left as address.public; + value right as u64.public; + +function mint_public: + input r0 as address.public; + input r1 as u64.public; + + finalize r0 r1; + +finalize mint_public: + input r0 as address.public; + input r1 as u64.public; + get.or_use account[r0] 0u64 into r2; + add r2 r1 into r3; + set r3 into account[r0]; + + +function mint_private: + input r0 as address.private; + input r1 as u64.private; + cast r0 r1 into r2 as token.record; + output r2 as token.record; + + +function transfer_public: + input r0 as address.public; + input r1 as u64.public; + + finalize self.caller r0 r1; + +finalize transfer_public: + input r0 as address.public; + input r1 as address.public; + input r2 as u64.public; + get.or_use account[r0] 0u64 into r3; + sub r3 r2 into r4; + set r4 into account[r0]; + get.or_use account[r1] 0u64 into r5; + add r5 r2 into r6; + set r6 into account[r1]; + + +function transfer_private: + input r0 as token.record; + input r1 as address.private; + input r2 as u64.private; + sub r0.amount r2 into r3; + cast r0.owner r3 into r4 as token.record; + cast r1 r2 into r5 as token.record; + output r4 as token.record; + output r5 as token.record; + + +function transfer_private_to_public: + input r0 as token.record; + input r1 as address.public; + input r2 as u64.public; + sub r0.amount r2 into r3; + cast r0.owner r3 into r4 as token.record; + output r4 as token.record; + + finalize r1 r2; + +finalize transfer_private_to_public: + input r0 as address.public; + input r1 as u64.public; + get.or_use account[r0] 0u64 into r2; + add r2 r1 into r3; + set r3 into account[r0]; + + +function transfer_public_to_private: + input r0 as address.public; + input r1 as u64.public; + cast r0 r1 into r2 as token.record; + output r2 as token.record; + + finalize self.caller r1; + +finalize transfer_public_to_private: + input r0 as address.public; + input r1 as u64.public; + get.or_use account[r0] 0u64 into r2; + sub r2 r1 into r3; + set r3 into account[r0]; diff --git a/examples/token/build/program.json b/examples/token/build/program.json new file mode 100644 index 0000000000..94d9bc9824 --- /dev/null +++ b/examples/token/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "token.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/token/inputs/token.in b/examples/token/inputs/token.in index 54269295fb..fd1d929747 100644 --- a/examples/token/inputs/token.in +++ b/examples/token/inputs/token.in @@ -1,10 +1,10 @@ // The program input for token/src/main.leo [mint_public] -receiver: address = aleo1ht2a9q0gsd38j0se4t9lsfulxgqrens2vgzgry3pkvs93xrrzu8s892zn7; +receiver: address = aleo1ptqvxu4gjfge8tuhgq2pqap0u5pms4p97gwhu7dwngxshpfzcszsswzpzd; amount: u64 = 100u64; [mint_private] -receiver: address = aleo1ht2a9q0gsd38j0se4t9lsfulxgqrens2vgzgry3pkvs93xrrzu8s892zn7; +receiver: address = aleo1ptqvxu4gjfge8tuhgq2pqap0u5pms4p97gwhu7dwngxshpfzcszsswzpzd; amount: u64 = 100u64; [transfer_public] @@ -13,7 +13,7 @@ amount: u64 = 50u64; [transfer_private] sender: token = token { - owner: aleo1pvmhrzm5tevxg7rrj65z6txpvm9stfgex05v4lfs05677n7e0cxqdk46jr, + owner: aleo1ptqvxu4gjfge8tuhgq2pqap0u5pms4p97gwhu7dwngxshpfzcszsswzpzd, amount: 100u64, _nonce: 0group, }; @@ -22,7 +22,7 @@ amount: u64 = 50u64; [transfer_private_to_public] sender: token = token { - owner: aleo1pvmhrzm5tevxg7rrj65z6txpvm9stfgex05v4lfs05677n7e0cxqdk46jr, + owner: aleo1ptqvxu4gjfge8tuhgq2pqap0u5pms4p97gwhu7dwngxshpfzcszsswzpzd, amount: 100u64, _nonce: 0group, }; diff --git a/examples/token/program.json b/examples/token/program.json index b0e2cf8fd9..94d9bc9824 100644 --- a/examples/token/program.json +++ b/examples/token/program.json @@ -2,9 +2,5 @@ "program": "token.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpBdMNxDsVVK1nHykGg6tKCpuqN6f1QqbKSMvL22BnmjGA", - "address": "aleo1pvmhrzm5tevxg7rrj65z6txpvm9stfgex05v4lfs05677n7e0cxqdk46jr" - }, "license": "MIT" } diff --git a/examples/twoadicity/.env b/examples/twoadicity/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/twoadicity/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/twoadicity/.gitignore b/examples/twoadicity/.gitignore index b28696155d..750b56f237 100644 --- a/examples/twoadicity/.gitignore +++ b/examples/twoadicity/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/twoadicity/README.md b/examples/twoadicity/README.md index a30617b8aa..5742b59e43 100644 --- a/examples/twoadicity/README.md +++ b/examples/twoadicity/README.md @@ -1,8 +1,15 @@ # src/twoadicity.leo -## Build Guide +## Run Guide -To compile and run this Leo program, run: +To run this program, run: ```bash -leo run +leo run main +``` + +## Execute Guide + +To execute this program, run: +```bash +leo execute main ``` diff --git a/examples/twoadicity/build/main.aleo b/examples/twoadicity/build/main.aleo new file mode 100644 index 0000000000..9486ba36d5 --- /dev/null +++ b/examples/twoadicity/build/main.aleo @@ -0,0 +1,1274 @@ +program twoadicity.aleo; + + + +closure is_even_and_nonzero: + input r0 as field; + div r0 2field into r1; + lt r1 r0 into r2; + output r2 as boolean; + + +function main: + input r0 as field.public; + call is_even_and_nonzero r0 into r1; + div r0 2field into r2; + add 0u8 1u8 into r3; + ternary r1 r2 r0 into r4; + ternary r1 r3 0u8 into r5; + call is_even_and_nonzero r4 into r6; + div r4 2field into r7; + add r5 1u8 into r8; + ternary r6 r7 r4 into r9; + ternary r6 r8 r5 into r10; + call is_even_and_nonzero r9 into r11; + div r9 2field into r12; + add r10 1u8 into r13; + ternary r11 r12 r9 into r14; + ternary r11 r13 r10 into r15; + call is_even_and_nonzero r14 into r16; + div r14 2field into r17; + add r15 1u8 into r18; + ternary r16 r17 r14 into r19; + ternary r16 r18 r15 into r20; + call is_even_and_nonzero r19 into r21; + div r19 2field into r22; + add r20 1u8 into r23; + ternary r21 r22 r19 into r24; + ternary r21 r23 r20 into r25; + call is_even_and_nonzero r24 into r26; + div r24 2field into r27; + add r25 1u8 into r28; + ternary r26 r27 r24 into r29; + ternary r26 r28 r25 into r30; + call is_even_and_nonzero r29 into r31; + div r29 2field into r32; + add r30 1u8 into r33; + ternary r31 r32 r29 into r34; + ternary r31 r33 r30 into r35; + call is_even_and_nonzero r34 into r36; + div r34 2field into r37; + add r35 1u8 into r38; + ternary r36 r37 r34 into r39; + ternary r36 r38 r35 into r40; + call is_even_and_nonzero r39 into r41; + div r39 2field into r42; + add r40 1u8 into r43; + ternary r41 r42 r39 into r44; + ternary r41 r43 r40 into r45; + call is_even_and_nonzero r44 into r46; + div r44 2field into r47; + add r45 1u8 into r48; + ternary r46 r47 r44 into r49; + ternary r46 r48 r45 into r50; + call is_even_and_nonzero r49 into r51; + div r49 2field into r52; + add r50 1u8 into r53; + ternary r51 r52 r49 into r54; + ternary r51 r53 r50 into r55; + call is_even_and_nonzero r54 into r56; + div r54 2field into r57; + add r55 1u8 into r58; + ternary r56 r57 r54 into r59; + ternary r56 r58 r55 into r60; + call is_even_and_nonzero r59 into r61; + div r59 2field into r62; + add r60 1u8 into r63; + ternary r61 r62 r59 into r64; + ternary r61 r63 r60 into r65; + call is_even_and_nonzero r64 into r66; + div r64 2field into r67; + add r65 1u8 into r68; + ternary r66 r67 r64 into r69; + ternary r66 r68 r65 into r70; + call is_even_and_nonzero r69 into r71; + div r69 2field into r72; + add r70 1u8 into r73; + ternary r71 r72 r69 into r74; + ternary r71 r73 r70 into r75; + call is_even_and_nonzero r74 into r76; + div r74 2field into r77; + add r75 1u8 into r78; + ternary r76 r77 r74 into r79; + ternary r76 r78 r75 into r80; + call is_even_and_nonzero r79 into r81; + div r79 2field into r82; + add r80 1u8 into r83; + ternary r81 r82 r79 into r84; + ternary r81 r83 r80 into r85; + call is_even_and_nonzero r84 into r86; + div r84 2field into r87; + add r85 1u8 into r88; + ternary r86 r87 r84 into r89; + ternary r86 r88 r85 into r90; + call is_even_and_nonzero r89 into r91; + div r89 2field into r92; + add r90 1u8 into r93; + ternary r91 r92 r89 into r94; + ternary r91 r93 r90 into r95; + call is_even_and_nonzero r94 into r96; + div r94 2field into r97; + add r95 1u8 into r98; + ternary r96 r97 r94 into r99; + ternary r96 r98 r95 into r100; + call is_even_and_nonzero r99 into r101; + div r99 2field into r102; + add r100 1u8 into r103; + ternary r101 r102 r99 into r104; + ternary r101 r103 r100 into r105; + call is_even_and_nonzero r104 into r106; + div r104 2field into r107; + add r105 1u8 into r108; + ternary r106 r107 r104 into r109; + ternary r106 r108 r105 into r110; + call is_even_and_nonzero r109 into r111; + div r109 2field into r112; + add r110 1u8 into r113; + ternary r111 r112 r109 into r114; + ternary r111 r113 r110 into r115; + call is_even_and_nonzero r114 into r116; + div r114 2field into r117; + add r115 1u8 into r118; + ternary r116 r117 r114 into r119; + ternary r116 r118 r115 into r120; + call is_even_and_nonzero r119 into r121; + div r119 2field into r122; + add r120 1u8 into r123; + ternary r121 r122 r119 into r124; + ternary r121 r123 r120 into r125; + call is_even_and_nonzero r124 into r126; + div r124 2field into r127; + add r125 1u8 into r128; + ternary r126 r127 r124 into r129; + ternary r126 r128 r125 into r130; + call is_even_and_nonzero r129 into r131; + div r129 2field into r132; + add r130 1u8 into r133; + ternary r131 r132 r129 into r134; + ternary r131 r133 r130 into r135; + call is_even_and_nonzero r134 into r136; + div r134 2field into r137; + add r135 1u8 into r138; + ternary r136 r137 r134 into r139; + ternary r136 r138 r135 into r140; + call is_even_and_nonzero r139 into r141; + div r139 2field into r142; + add r140 1u8 into r143; + ternary r141 r142 r139 into r144; + ternary r141 r143 r140 into r145; + call is_even_and_nonzero r144 into r146; + div r144 2field into r147; + add r145 1u8 into r148; + ternary r146 r147 r144 into r149; + ternary r146 r148 r145 into r150; + call is_even_and_nonzero r149 into r151; + div r149 2field into r152; + add r150 1u8 into r153; + ternary r151 r152 r149 into r154; + ternary r151 r153 r150 into r155; + call is_even_and_nonzero r154 into r156; + div r154 2field into r157; + add r155 1u8 into r158; + ternary r156 r157 r154 into r159; + ternary r156 r158 r155 into r160; + call is_even_and_nonzero r159 into r161; + div r159 2field into r162; + add r160 1u8 into r163; + ternary r161 r162 r159 into r164; + ternary r161 r163 r160 into r165; + call is_even_and_nonzero r164 into r166; + div r164 2field into r167; + add r165 1u8 into r168; + ternary r166 r167 r164 into r169; + ternary r166 r168 r165 into r170; + call is_even_and_nonzero r169 into r171; + div r169 2field into r172; + add r170 1u8 into r173; + ternary r171 r172 r169 into r174; + ternary r171 r173 r170 into r175; + call is_even_and_nonzero r174 into r176; + div r174 2field into r177; + add r175 1u8 into r178; + ternary r176 r177 r174 into r179; + ternary r176 r178 r175 into r180; + call is_even_and_nonzero r179 into r181; + div r179 2field into r182; + add r180 1u8 into r183; + ternary r181 r182 r179 into r184; + ternary r181 r183 r180 into r185; + call is_even_and_nonzero r184 into r186; + div r184 2field into r187; + add r185 1u8 into r188; + ternary r186 r187 r184 into r189; + ternary r186 r188 r185 into r190; + call is_even_and_nonzero r189 into r191; + div r189 2field into r192; + add r190 1u8 into r193; + ternary r191 r192 r189 into r194; + ternary r191 r193 r190 into r195; + call is_even_and_nonzero r194 into r196; + div r194 2field into r197; + add r195 1u8 into r198; + ternary r196 r197 r194 into r199; + ternary r196 r198 r195 into r200; + call is_even_and_nonzero r199 into r201; + div r199 2field into r202; + add r200 1u8 into r203; + ternary r201 r202 r199 into r204; + ternary r201 r203 r200 into r205; + call is_even_and_nonzero r204 into r206; + div r204 2field into r207; + add r205 1u8 into r208; + ternary r206 r207 r204 into r209; + ternary r206 r208 r205 into r210; + call is_even_and_nonzero r209 into r211; + div r209 2field into r212; + add r210 1u8 into r213; + ternary r211 r212 r209 into r214; + ternary r211 r213 r210 into r215; + call is_even_and_nonzero r214 into r216; + div r214 2field into r217; + add r215 1u8 into r218; + ternary r216 r217 r214 into r219; + ternary r216 r218 r215 into r220; + call is_even_and_nonzero r219 into r221; + div r219 2field into r222; + add r220 1u8 into r223; + ternary r221 r222 r219 into r224; + ternary r221 r223 r220 into r225; + call is_even_and_nonzero r224 into r226; + div r224 2field into r227; + add r225 1u8 into r228; + ternary r226 r227 r224 into r229; + ternary r226 r228 r225 into r230; + call is_even_and_nonzero r229 into r231; + div r229 2field into r232; + add r230 1u8 into r233; + ternary r231 r232 r229 into r234; + ternary r231 r233 r230 into r235; + call is_even_and_nonzero r234 into r236; + div r234 2field into r237; + add r235 1u8 into r238; + ternary r236 r237 r234 into r239; + ternary r236 r238 r235 into r240; + call is_even_and_nonzero r239 into r241; + div r239 2field into r242; + add r240 1u8 into r243; + ternary r241 r242 r239 into r244; + ternary r241 r243 r240 into r245; + call is_even_and_nonzero r244 into r246; + div r244 2field into r247; + add r245 1u8 into r248; + ternary r246 r247 r244 into r249; + ternary r246 r248 r245 into r250; + call is_even_and_nonzero r249 into r251; + div r249 2field into r252; + add r250 1u8 into r253; + ternary r251 r252 r249 into r254; + ternary r251 r253 r250 into r255; + call is_even_and_nonzero r254 into r256; + div r254 2field into r257; + add r255 1u8 into r258; + ternary r256 r257 r254 into r259; + ternary r256 r258 r255 into r260; + call is_even_and_nonzero r259 into r261; + div r259 2field into r262; + add r260 1u8 into r263; + ternary r261 r262 r259 into r264; + ternary r261 r263 r260 into r265; + call is_even_and_nonzero r264 into r266; + div r264 2field into r267; + add r265 1u8 into r268; + ternary r266 r267 r264 into r269; + ternary r266 r268 r265 into r270; + call is_even_and_nonzero r269 into r271; + div r269 2field into r272; + add r270 1u8 into r273; + ternary r271 r272 r269 into r274; + ternary r271 r273 r270 into r275; + call is_even_and_nonzero r274 into r276; + div r274 2field into r277; + add r275 1u8 into r278; + ternary r276 r277 r274 into r279; + ternary r276 r278 r275 into r280; + call is_even_and_nonzero r279 into r281; + div r279 2field into r282; + add r280 1u8 into r283; + ternary r281 r282 r279 into r284; + ternary r281 r283 r280 into r285; + call is_even_and_nonzero r284 into r286; + div r284 2field into r287; + add r285 1u8 into r288; + ternary r286 r287 r284 into r289; + ternary r286 r288 r285 into r290; + call is_even_and_nonzero r289 into r291; + div r289 2field into r292; + add r290 1u8 into r293; + ternary r291 r292 r289 into r294; + ternary r291 r293 r290 into r295; + call is_even_and_nonzero r294 into r296; + div r294 2field into r297; + add r295 1u8 into r298; + ternary r296 r297 r294 into r299; + ternary r296 r298 r295 into r300; + call is_even_and_nonzero r299 into r301; + div r299 2field into r302; + add r300 1u8 into r303; + ternary r301 r302 r299 into r304; + ternary r301 r303 r300 into r305; + call is_even_and_nonzero r304 into r306; + div r304 2field into r307; + add r305 1u8 into r308; + ternary r306 r307 r304 into r309; + ternary r306 r308 r305 into r310; + call is_even_and_nonzero r309 into r311; + div r309 2field into r312; + add r310 1u8 into r313; + ternary r311 r312 r309 into r314; + ternary r311 r313 r310 into r315; + call is_even_and_nonzero r314 into r316; + div r314 2field into r317; + add r315 1u8 into r318; + ternary r316 r317 r314 into r319; + ternary r316 r318 r315 into r320; + call is_even_and_nonzero r319 into r321; + div r319 2field into r322; + add r320 1u8 into r323; + ternary r321 r322 r319 into r324; + ternary r321 r323 r320 into r325; + call is_even_and_nonzero r324 into r326; + div r324 2field into r327; + add r325 1u8 into r328; + ternary r326 r327 r324 into r329; + ternary r326 r328 r325 into r330; + call is_even_and_nonzero r329 into r331; + div r329 2field into r332; + add r330 1u8 into r333; + ternary r331 r332 r329 into r334; + ternary r331 r333 r330 into r335; + call is_even_and_nonzero r334 into r336; + div r334 2field into r337; + add r335 1u8 into r338; + ternary r336 r337 r334 into r339; + ternary r336 r338 r335 into r340; + call is_even_and_nonzero r339 into r341; + div r339 2field into r342; + add r340 1u8 into r343; + ternary r341 r342 r339 into r344; + ternary r341 r343 r340 into r345; + call is_even_and_nonzero r344 into r346; + div r344 2field into r347; + add r345 1u8 into r348; + ternary r346 r347 r344 into r349; + ternary r346 r348 r345 into r350; + call is_even_and_nonzero r349 into r351; + div r349 2field into r352; + add r350 1u8 into r353; + ternary r351 r352 r349 into r354; + ternary r351 r353 r350 into r355; + call is_even_and_nonzero r354 into r356; + div r354 2field into r357; + add r355 1u8 into r358; + ternary r356 r357 r354 into r359; + ternary r356 r358 r355 into r360; + call is_even_and_nonzero r359 into r361; + div r359 2field into r362; + add r360 1u8 into r363; + ternary r361 r362 r359 into r364; + ternary r361 r363 r360 into r365; + call is_even_and_nonzero r364 into r366; + div r364 2field into r367; + add r365 1u8 into r368; + ternary r366 r367 r364 into r369; + ternary r366 r368 r365 into r370; + call is_even_and_nonzero r369 into r371; + div r369 2field into r372; + add r370 1u8 into r373; + ternary r371 r372 r369 into r374; + ternary r371 r373 r370 into r375; + call is_even_and_nonzero r374 into r376; + div r374 2field into r377; + add r375 1u8 into r378; + ternary r376 r377 r374 into r379; + ternary r376 r378 r375 into r380; + call is_even_and_nonzero r379 into r381; + div r379 2field into r382; + add r380 1u8 into r383; + ternary r381 r382 r379 into r384; + ternary r381 r383 r380 into r385; + call is_even_and_nonzero r384 into r386; + div r384 2field into r387; + add r385 1u8 into r388; + ternary r386 r387 r384 into r389; + ternary r386 r388 r385 into r390; + call is_even_and_nonzero r389 into r391; + div r389 2field into r392; + add r390 1u8 into r393; + ternary r391 r392 r389 into r394; + ternary r391 r393 r390 into r395; + call is_even_and_nonzero r394 into r396; + div r394 2field into r397; + add r395 1u8 into r398; + ternary r396 r397 r394 into r399; + ternary r396 r398 r395 into r400; + call is_even_and_nonzero r399 into r401; + div r399 2field into r402; + add r400 1u8 into r403; + ternary r401 r402 r399 into r404; + ternary r401 r403 r400 into r405; + call is_even_and_nonzero r404 into r406; + div r404 2field into r407; + add r405 1u8 into r408; + ternary r406 r407 r404 into r409; + ternary r406 r408 r405 into r410; + call is_even_and_nonzero r409 into r411; + div r409 2field into r412; + add r410 1u8 into r413; + ternary r411 r412 r409 into r414; + ternary r411 r413 r410 into r415; + call is_even_and_nonzero r414 into r416; + div r414 2field into r417; + add r415 1u8 into r418; + ternary r416 r417 r414 into r419; + ternary r416 r418 r415 into r420; + call is_even_and_nonzero r419 into r421; + div r419 2field into r422; + add r420 1u8 into r423; + ternary r421 r422 r419 into r424; + ternary r421 r423 r420 into r425; + call is_even_and_nonzero r424 into r426; + div r424 2field into r427; + add r425 1u8 into r428; + ternary r426 r427 r424 into r429; + ternary r426 r428 r425 into r430; + call is_even_and_nonzero r429 into r431; + div r429 2field into r432; + add r430 1u8 into r433; + ternary r431 r432 r429 into r434; + ternary r431 r433 r430 into r435; + call is_even_and_nonzero r434 into r436; + div r434 2field into r437; + add r435 1u8 into r438; + ternary r436 r437 r434 into r439; + ternary r436 r438 r435 into r440; + call is_even_and_nonzero r439 into r441; + div r439 2field into r442; + add r440 1u8 into r443; + ternary r441 r442 r439 into r444; + ternary r441 r443 r440 into r445; + call is_even_and_nonzero r444 into r446; + div r444 2field into r447; + add r445 1u8 into r448; + ternary r446 r447 r444 into r449; + ternary r446 r448 r445 into r450; + call is_even_and_nonzero r449 into r451; + div r449 2field into r452; + add r450 1u8 into r453; + ternary r451 r452 r449 into r454; + ternary r451 r453 r450 into r455; + call is_even_and_nonzero r454 into r456; + div r454 2field into r457; + add r455 1u8 into r458; + ternary r456 r457 r454 into r459; + ternary r456 r458 r455 into r460; + call is_even_and_nonzero r459 into r461; + div r459 2field into r462; + add r460 1u8 into r463; + ternary r461 r462 r459 into r464; + ternary r461 r463 r460 into r465; + call is_even_and_nonzero r464 into r466; + div r464 2field into r467; + add r465 1u8 into r468; + ternary r466 r467 r464 into r469; + ternary r466 r468 r465 into r470; + call is_even_and_nonzero r469 into r471; + div r469 2field into r472; + add r470 1u8 into r473; + ternary r471 r472 r469 into r474; + ternary r471 r473 r470 into r475; + call is_even_and_nonzero r474 into r476; + div r474 2field into r477; + add r475 1u8 into r478; + ternary r476 r477 r474 into r479; + ternary r476 r478 r475 into r480; + call is_even_and_nonzero r479 into r481; + div r479 2field into r482; + add r480 1u8 into r483; + ternary r481 r482 r479 into r484; + ternary r481 r483 r480 into r485; + call is_even_and_nonzero r484 into r486; + div r484 2field into r487; + add r485 1u8 into r488; + ternary r486 r487 r484 into r489; + ternary r486 r488 r485 into r490; + call is_even_and_nonzero r489 into r491; + div r489 2field into r492; + add r490 1u8 into r493; + ternary r491 r492 r489 into r494; + ternary r491 r493 r490 into r495; + call is_even_and_nonzero r494 into r496; + div r494 2field into r497; + add r495 1u8 into r498; + ternary r496 r497 r494 into r499; + ternary r496 r498 r495 into r500; + call is_even_and_nonzero r499 into r501; + div r499 2field into r502; + add r500 1u8 into r503; + ternary r501 r502 r499 into r504; + ternary r501 r503 r500 into r505; + call is_even_and_nonzero r504 into r506; + div r504 2field into r507; + add r505 1u8 into r508; + ternary r506 r507 r504 into r509; + ternary r506 r508 r505 into r510; + call is_even_and_nonzero r509 into r511; + div r509 2field into r512; + add r510 1u8 into r513; + ternary r511 r512 r509 into r514; + ternary r511 r513 r510 into r515; + call is_even_and_nonzero r514 into r516; + div r514 2field into r517; + add r515 1u8 into r518; + ternary r516 r517 r514 into r519; + ternary r516 r518 r515 into r520; + call is_even_and_nonzero r519 into r521; + div r519 2field into r522; + add r520 1u8 into r523; + ternary r521 r522 r519 into r524; + ternary r521 r523 r520 into r525; + call is_even_and_nonzero r524 into r526; + div r524 2field into r527; + add r525 1u8 into r528; + ternary r526 r527 r524 into r529; + ternary r526 r528 r525 into r530; + call is_even_and_nonzero r529 into r531; + div r529 2field into r532; + add r530 1u8 into r533; + ternary r531 r532 r529 into r534; + ternary r531 r533 r530 into r535; + call is_even_and_nonzero r534 into r536; + div r534 2field into r537; + add r535 1u8 into r538; + ternary r536 r537 r534 into r539; + ternary r536 r538 r535 into r540; + call is_even_and_nonzero r539 into r541; + div r539 2field into r542; + add r540 1u8 into r543; + ternary r541 r542 r539 into r544; + ternary r541 r543 r540 into r545; + call is_even_and_nonzero r544 into r546; + div r544 2field into r547; + add r545 1u8 into r548; + ternary r546 r547 r544 into r549; + ternary r546 r548 r545 into r550; + call is_even_and_nonzero r549 into r551; + div r549 2field into r552; + add r550 1u8 into r553; + ternary r551 r552 r549 into r554; + ternary r551 r553 r550 into r555; + call is_even_and_nonzero r554 into r556; + div r554 2field into r557; + add r555 1u8 into r558; + ternary r556 r557 r554 into r559; + ternary r556 r558 r555 into r560; + call is_even_and_nonzero r559 into r561; + div r559 2field into r562; + add r560 1u8 into r563; + ternary r561 r562 r559 into r564; + ternary r561 r563 r560 into r565; + call is_even_and_nonzero r564 into r566; + div r564 2field into r567; + add r565 1u8 into r568; + ternary r566 r567 r564 into r569; + ternary r566 r568 r565 into r570; + call is_even_and_nonzero r569 into r571; + div r569 2field into r572; + add r570 1u8 into r573; + ternary r571 r572 r569 into r574; + ternary r571 r573 r570 into r575; + call is_even_and_nonzero r574 into r576; + div r574 2field into r577; + add r575 1u8 into r578; + ternary r576 r577 r574 into r579; + ternary r576 r578 r575 into r580; + call is_even_and_nonzero r579 into r581; + div r579 2field into r582; + add r580 1u8 into r583; + ternary r581 r582 r579 into r584; + ternary r581 r583 r580 into r585; + call is_even_and_nonzero r584 into r586; + div r584 2field into r587; + add r585 1u8 into r588; + ternary r586 r587 r584 into r589; + ternary r586 r588 r585 into r590; + call is_even_and_nonzero r589 into r591; + div r589 2field into r592; + add r590 1u8 into r593; + ternary r591 r592 r589 into r594; + ternary r591 r593 r590 into r595; + call is_even_and_nonzero r594 into r596; + div r594 2field into r597; + add r595 1u8 into r598; + ternary r596 r597 r594 into r599; + ternary r596 r598 r595 into r600; + call is_even_and_nonzero r599 into r601; + div r599 2field into r602; + add r600 1u8 into r603; + ternary r601 r602 r599 into r604; + ternary r601 r603 r600 into r605; + call is_even_and_nonzero r604 into r606; + div r604 2field into r607; + add r605 1u8 into r608; + ternary r606 r607 r604 into r609; + ternary r606 r608 r605 into r610; + call is_even_and_nonzero r609 into r611; + div r609 2field into r612; + add r610 1u8 into r613; + ternary r611 r612 r609 into r614; + ternary r611 r613 r610 into r615; + call is_even_and_nonzero r614 into r616; + div r614 2field into r617; + add r615 1u8 into r618; + ternary r616 r617 r614 into r619; + ternary r616 r618 r615 into r620; + call is_even_and_nonzero r619 into r621; + div r619 2field into r622; + add r620 1u8 into r623; + ternary r621 r622 r619 into r624; + ternary r621 r623 r620 into r625; + call is_even_and_nonzero r624 into r626; + div r624 2field into r627; + add r625 1u8 into r628; + ternary r626 r627 r624 into r629; + ternary r626 r628 r625 into r630; + call is_even_and_nonzero r629 into r631; + div r629 2field into r632; + add r630 1u8 into r633; + ternary r631 r632 r629 into r634; + ternary r631 r633 r630 into r635; + call is_even_and_nonzero r634 into r636; + div r634 2field into r637; + add r635 1u8 into r638; + ternary r636 r637 r634 into r639; + ternary r636 r638 r635 into r640; + call is_even_and_nonzero r639 into r641; + div r639 2field into r642; + add r640 1u8 into r643; + ternary r641 r642 r639 into r644; + ternary r641 r643 r640 into r645; + call is_even_and_nonzero r644 into r646; + div r644 2field into r647; + add r645 1u8 into r648; + ternary r646 r647 r644 into r649; + ternary r646 r648 r645 into r650; + call is_even_and_nonzero r649 into r651; + div r649 2field into r652; + add r650 1u8 into r653; + ternary r651 r652 r649 into r654; + ternary r651 r653 r650 into r655; + call is_even_and_nonzero r654 into r656; + div r654 2field into r657; + add r655 1u8 into r658; + ternary r656 r657 r654 into r659; + ternary r656 r658 r655 into r660; + call is_even_and_nonzero r659 into r661; + div r659 2field into r662; + add r660 1u8 into r663; + ternary r661 r662 r659 into r664; + ternary r661 r663 r660 into r665; + call is_even_and_nonzero r664 into r666; + div r664 2field into r667; + add r665 1u8 into r668; + ternary r666 r667 r664 into r669; + ternary r666 r668 r665 into r670; + call is_even_and_nonzero r669 into r671; + div r669 2field into r672; + add r670 1u8 into r673; + ternary r671 r672 r669 into r674; + ternary r671 r673 r670 into r675; + call is_even_and_nonzero r674 into r676; + div r674 2field into r677; + add r675 1u8 into r678; + ternary r676 r677 r674 into r679; + ternary r676 r678 r675 into r680; + call is_even_and_nonzero r679 into r681; + div r679 2field into r682; + add r680 1u8 into r683; + ternary r681 r682 r679 into r684; + ternary r681 r683 r680 into r685; + call is_even_and_nonzero r684 into r686; + div r684 2field into r687; + add r685 1u8 into r688; + ternary r686 r687 r684 into r689; + ternary r686 r688 r685 into r690; + call is_even_and_nonzero r689 into r691; + div r689 2field into r692; + add r690 1u8 into r693; + ternary r691 r692 r689 into r694; + ternary r691 r693 r690 into r695; + call is_even_and_nonzero r694 into r696; + div r694 2field into r697; + add r695 1u8 into r698; + ternary r696 r697 r694 into r699; + ternary r696 r698 r695 into r700; + call is_even_and_nonzero r699 into r701; + div r699 2field into r702; + add r700 1u8 into r703; + ternary r701 r702 r699 into r704; + ternary r701 r703 r700 into r705; + call is_even_and_nonzero r704 into r706; + div r704 2field into r707; + add r705 1u8 into r708; + ternary r706 r707 r704 into r709; + ternary r706 r708 r705 into r710; + call is_even_and_nonzero r709 into r711; + div r709 2field into r712; + add r710 1u8 into r713; + ternary r711 r712 r709 into r714; + ternary r711 r713 r710 into r715; + call is_even_and_nonzero r714 into r716; + div r714 2field into r717; + add r715 1u8 into r718; + ternary r716 r717 r714 into r719; + ternary r716 r718 r715 into r720; + call is_even_and_nonzero r719 into r721; + div r719 2field into r722; + add r720 1u8 into r723; + ternary r721 r722 r719 into r724; + ternary r721 r723 r720 into r725; + call is_even_and_nonzero r724 into r726; + div r724 2field into r727; + add r725 1u8 into r728; + ternary r726 r727 r724 into r729; + ternary r726 r728 r725 into r730; + call is_even_and_nonzero r729 into r731; + div r729 2field into r732; + add r730 1u8 into r733; + ternary r731 r732 r729 into r734; + ternary r731 r733 r730 into r735; + call is_even_and_nonzero r734 into r736; + div r734 2field into r737; + add r735 1u8 into r738; + ternary r736 r737 r734 into r739; + ternary r736 r738 r735 into r740; + call is_even_and_nonzero r739 into r741; + div r739 2field into r742; + add r740 1u8 into r743; + ternary r741 r742 r739 into r744; + ternary r741 r743 r740 into r745; + call is_even_and_nonzero r744 into r746; + div r744 2field into r747; + add r745 1u8 into r748; + ternary r746 r747 r744 into r749; + ternary r746 r748 r745 into r750; + call is_even_and_nonzero r749 into r751; + div r749 2field into r752; + add r750 1u8 into r753; + ternary r751 r752 r749 into r754; + ternary r751 r753 r750 into r755; + call is_even_and_nonzero r754 into r756; + div r754 2field into r757; + add r755 1u8 into r758; + ternary r756 r757 r754 into r759; + ternary r756 r758 r755 into r760; + call is_even_and_nonzero r759 into r761; + div r759 2field into r762; + add r760 1u8 into r763; + ternary r761 r762 r759 into r764; + ternary r761 r763 r760 into r765; + call is_even_and_nonzero r764 into r766; + div r764 2field into r767; + add r765 1u8 into r768; + ternary r766 r767 r764 into r769; + ternary r766 r768 r765 into r770; + call is_even_and_nonzero r769 into r771; + div r769 2field into r772; + add r770 1u8 into r773; + ternary r771 r772 r769 into r774; + ternary r771 r773 r770 into r775; + call is_even_and_nonzero r774 into r776; + div r774 2field into r777; + add r775 1u8 into r778; + ternary r776 r777 r774 into r779; + ternary r776 r778 r775 into r780; + call is_even_and_nonzero r779 into r781; + div r779 2field into r782; + add r780 1u8 into r783; + ternary r781 r782 r779 into r784; + ternary r781 r783 r780 into r785; + call is_even_and_nonzero r784 into r786; + div r784 2field into r787; + add r785 1u8 into r788; + ternary r786 r787 r784 into r789; + ternary r786 r788 r785 into r790; + call is_even_and_nonzero r789 into r791; + div r789 2field into r792; + add r790 1u8 into r793; + ternary r791 r792 r789 into r794; + ternary r791 r793 r790 into r795; + call is_even_and_nonzero r794 into r796; + div r794 2field into r797; + add r795 1u8 into r798; + ternary r796 r797 r794 into r799; + ternary r796 r798 r795 into r800; + call is_even_and_nonzero r799 into r801; + div r799 2field into r802; + add r800 1u8 into r803; + ternary r801 r802 r799 into r804; + ternary r801 r803 r800 into r805; + call is_even_and_nonzero r804 into r806; + div r804 2field into r807; + add r805 1u8 into r808; + ternary r806 r807 r804 into r809; + ternary r806 r808 r805 into r810; + call is_even_and_nonzero r809 into r811; + div r809 2field into r812; + add r810 1u8 into r813; + ternary r811 r812 r809 into r814; + ternary r811 r813 r810 into r815; + call is_even_and_nonzero r814 into r816; + div r814 2field into r817; + add r815 1u8 into r818; + ternary r816 r817 r814 into r819; + ternary r816 r818 r815 into r820; + call is_even_and_nonzero r819 into r821; + div r819 2field into r822; + add r820 1u8 into r823; + ternary r821 r822 r819 into r824; + ternary r821 r823 r820 into r825; + call is_even_and_nonzero r824 into r826; + div r824 2field into r827; + add r825 1u8 into r828; + ternary r826 r827 r824 into r829; + ternary r826 r828 r825 into r830; + call is_even_and_nonzero r829 into r831; + div r829 2field into r832; + add r830 1u8 into r833; + ternary r831 r832 r829 into r834; + ternary r831 r833 r830 into r835; + call is_even_and_nonzero r834 into r836; + div r834 2field into r837; + add r835 1u8 into r838; + ternary r836 r837 r834 into r839; + ternary r836 r838 r835 into r840; + call is_even_and_nonzero r839 into r841; + div r839 2field into r842; + add r840 1u8 into r843; + ternary r841 r842 r839 into r844; + ternary r841 r843 r840 into r845; + call is_even_and_nonzero r844 into r846; + div r844 2field into r847; + add r845 1u8 into r848; + ternary r846 r847 r844 into r849; + ternary r846 r848 r845 into r850; + call is_even_and_nonzero r849 into r851; + div r849 2field into r852; + add r850 1u8 into r853; + ternary r851 r852 r849 into r854; + ternary r851 r853 r850 into r855; + call is_even_and_nonzero r854 into r856; + div r854 2field into r857; + add r855 1u8 into r858; + ternary r856 r857 r854 into r859; + ternary r856 r858 r855 into r860; + call is_even_and_nonzero r859 into r861; + div r859 2field into r862; + add r860 1u8 into r863; + ternary r861 r862 r859 into r864; + ternary r861 r863 r860 into r865; + call is_even_and_nonzero r864 into r866; + div r864 2field into r867; + add r865 1u8 into r868; + ternary r866 r867 r864 into r869; + ternary r866 r868 r865 into r870; + call is_even_and_nonzero r869 into r871; + div r869 2field into r872; + add r870 1u8 into r873; + ternary r871 r872 r869 into r874; + ternary r871 r873 r870 into r875; + call is_even_and_nonzero r874 into r876; + div r874 2field into r877; + add r875 1u8 into r878; + ternary r876 r877 r874 into r879; + ternary r876 r878 r875 into r880; + call is_even_and_nonzero r879 into r881; + div r879 2field into r882; + add r880 1u8 into r883; + ternary r881 r882 r879 into r884; + ternary r881 r883 r880 into r885; + call is_even_and_nonzero r884 into r886; + div r884 2field into r887; + add r885 1u8 into r888; + ternary r886 r887 r884 into r889; + ternary r886 r888 r885 into r890; + call is_even_and_nonzero r889 into r891; + div r889 2field into r892; + add r890 1u8 into r893; + ternary r891 r892 r889 into r894; + ternary r891 r893 r890 into r895; + call is_even_and_nonzero r894 into r896; + div r894 2field into r897; + add r895 1u8 into r898; + ternary r896 r897 r894 into r899; + ternary r896 r898 r895 into r900; + call is_even_and_nonzero r899 into r901; + div r899 2field into r902; + add r900 1u8 into r903; + ternary r901 r902 r899 into r904; + ternary r901 r903 r900 into r905; + call is_even_and_nonzero r904 into r906; + div r904 2field into r907; + add r905 1u8 into r908; + ternary r906 r907 r904 into r909; + ternary r906 r908 r905 into r910; + call is_even_and_nonzero r909 into r911; + div r909 2field into r912; + add r910 1u8 into r913; + ternary r911 r912 r909 into r914; + ternary r911 r913 r910 into r915; + call is_even_and_nonzero r914 into r916; + div r914 2field into r917; + add r915 1u8 into r918; + ternary r916 r917 r914 into r919; + ternary r916 r918 r915 into r920; + call is_even_and_nonzero r919 into r921; + div r919 2field into r922; + add r920 1u8 into r923; + ternary r921 r922 r919 into r924; + ternary r921 r923 r920 into r925; + call is_even_and_nonzero r924 into r926; + div r924 2field into r927; + add r925 1u8 into r928; + ternary r926 r927 r924 into r929; + ternary r926 r928 r925 into r930; + call is_even_and_nonzero r929 into r931; + div r929 2field into r932; + add r930 1u8 into r933; + ternary r931 r932 r929 into r934; + ternary r931 r933 r930 into r935; + call is_even_and_nonzero r934 into r936; + div r934 2field into r937; + add r935 1u8 into r938; + ternary r936 r937 r934 into r939; + ternary r936 r938 r935 into r940; + call is_even_and_nonzero r939 into r941; + div r939 2field into r942; + add r940 1u8 into r943; + ternary r941 r942 r939 into r944; + ternary r941 r943 r940 into r945; + call is_even_and_nonzero r944 into r946; + div r944 2field into r947; + add r945 1u8 into r948; + ternary r946 r947 r944 into r949; + ternary r946 r948 r945 into r950; + call is_even_and_nonzero r949 into r951; + div r949 2field into r952; + add r950 1u8 into r953; + ternary r951 r952 r949 into r954; + ternary r951 r953 r950 into r955; + call is_even_and_nonzero r954 into r956; + div r954 2field into r957; + add r955 1u8 into r958; + ternary r956 r957 r954 into r959; + ternary r956 r958 r955 into r960; + call is_even_and_nonzero r959 into r961; + div r959 2field into r962; + add r960 1u8 into r963; + ternary r961 r962 r959 into r964; + ternary r961 r963 r960 into r965; + call is_even_and_nonzero r964 into r966; + div r964 2field into r967; + add r965 1u8 into r968; + ternary r966 r967 r964 into r969; + ternary r966 r968 r965 into r970; + call is_even_and_nonzero r969 into r971; + div r969 2field into r972; + add r970 1u8 into r973; + ternary r971 r972 r969 into r974; + ternary r971 r973 r970 into r975; + call is_even_and_nonzero r974 into r976; + div r974 2field into r977; + add r975 1u8 into r978; + ternary r976 r977 r974 into r979; + ternary r976 r978 r975 into r980; + call is_even_and_nonzero r979 into r981; + div r979 2field into r982; + add r980 1u8 into r983; + ternary r981 r982 r979 into r984; + ternary r981 r983 r980 into r985; + call is_even_and_nonzero r984 into r986; + div r984 2field into r987; + add r985 1u8 into r988; + ternary r986 r987 r984 into r989; + ternary r986 r988 r985 into r990; + call is_even_and_nonzero r989 into r991; + div r989 2field into r992; + add r990 1u8 into r993; + ternary r991 r992 r989 into r994; + ternary r991 r993 r990 into r995; + call is_even_and_nonzero r994 into r996; + div r994 2field into r997; + add r995 1u8 into r998; + ternary r996 r997 r994 into r999; + ternary r996 r998 r995 into r1000; + call is_even_and_nonzero r999 into r1001; + div r999 2field into r1002; + add r1000 1u8 into r1003; + ternary r1001 r1002 r999 into r1004; + ternary r1001 r1003 r1000 into r1005; + call is_even_and_nonzero r1004 into r1006; + div r1004 2field into r1007; + add r1005 1u8 into r1008; + ternary r1006 r1007 r1004 into r1009; + ternary r1006 r1008 r1005 into r1010; + call is_even_and_nonzero r1009 into r1011; + div r1009 2field into r1012; + add r1010 1u8 into r1013; + ternary r1011 r1012 r1009 into r1014; + ternary r1011 r1013 r1010 into r1015; + call is_even_and_nonzero r1014 into r1016; + div r1014 2field into r1017; + add r1015 1u8 into r1018; + ternary r1016 r1017 r1014 into r1019; + ternary r1016 r1018 r1015 into r1020; + call is_even_and_nonzero r1019 into r1021; + div r1019 2field into r1022; + add r1020 1u8 into r1023; + ternary r1021 r1022 r1019 into r1024; + ternary r1021 r1023 r1020 into r1025; + call is_even_and_nonzero r1024 into r1026; + div r1024 2field into r1027; + add r1025 1u8 into r1028; + ternary r1026 r1027 r1024 into r1029; + ternary r1026 r1028 r1025 into r1030; + call is_even_and_nonzero r1029 into r1031; + div r1029 2field into r1032; + add r1030 1u8 into r1033; + ternary r1031 r1032 r1029 into r1034; + ternary r1031 r1033 r1030 into r1035; + call is_even_and_nonzero r1034 into r1036; + div r1034 2field into r1037; + add r1035 1u8 into r1038; + ternary r1036 r1037 r1034 into r1039; + ternary r1036 r1038 r1035 into r1040; + call is_even_and_nonzero r1039 into r1041; + div r1039 2field into r1042; + add r1040 1u8 into r1043; + ternary r1041 r1042 r1039 into r1044; + ternary r1041 r1043 r1040 into r1045; + call is_even_and_nonzero r1044 into r1046; + div r1044 2field into r1047; + add r1045 1u8 into r1048; + ternary r1046 r1047 r1044 into r1049; + ternary r1046 r1048 r1045 into r1050; + call is_even_and_nonzero r1049 into r1051; + div r1049 2field into r1052; + add r1050 1u8 into r1053; + ternary r1051 r1052 r1049 into r1054; + ternary r1051 r1053 r1050 into r1055; + call is_even_and_nonzero r1054 into r1056; + div r1054 2field into r1057; + add r1055 1u8 into r1058; + ternary r1056 r1057 r1054 into r1059; + ternary r1056 r1058 r1055 into r1060; + call is_even_and_nonzero r1059 into r1061; + div r1059 2field into r1062; + add r1060 1u8 into r1063; + ternary r1061 r1062 r1059 into r1064; + ternary r1061 r1063 r1060 into r1065; + call is_even_and_nonzero r1064 into r1066; + div r1064 2field into r1067; + add r1065 1u8 into r1068; + ternary r1066 r1067 r1064 into r1069; + ternary r1066 r1068 r1065 into r1070; + call is_even_and_nonzero r1069 into r1071; + div r1069 2field into r1072; + add r1070 1u8 into r1073; + ternary r1071 r1072 r1069 into r1074; + ternary r1071 r1073 r1070 into r1075; + call is_even_and_nonzero r1074 into r1076; + div r1074 2field into r1077; + add r1075 1u8 into r1078; + ternary r1076 r1077 r1074 into r1079; + ternary r1076 r1078 r1075 into r1080; + call is_even_and_nonzero r1079 into r1081; + div r1079 2field into r1082; + add r1080 1u8 into r1083; + ternary r1081 r1082 r1079 into r1084; + ternary r1081 r1083 r1080 into r1085; + call is_even_and_nonzero r1084 into r1086; + div r1084 2field into r1087; + add r1085 1u8 into r1088; + ternary r1086 r1087 r1084 into r1089; + ternary r1086 r1088 r1085 into r1090; + call is_even_and_nonzero r1089 into r1091; + div r1089 2field into r1092; + add r1090 1u8 into r1093; + ternary r1091 r1092 r1089 into r1094; + ternary r1091 r1093 r1090 into r1095; + call is_even_and_nonzero r1094 into r1096; + div r1094 2field into r1097; + add r1095 1u8 into r1098; + ternary r1096 r1097 r1094 into r1099; + ternary r1096 r1098 r1095 into r1100; + call is_even_and_nonzero r1099 into r1101; + div r1099 2field into r1102; + add r1100 1u8 into r1103; + ternary r1101 r1102 r1099 into r1104; + ternary r1101 r1103 r1100 into r1105; + call is_even_and_nonzero r1104 into r1106; + div r1104 2field into r1107; + add r1105 1u8 into r1108; + ternary r1106 r1107 r1104 into r1109; + ternary r1106 r1108 r1105 into r1110; + call is_even_and_nonzero r1109 into r1111; + div r1109 2field into r1112; + add r1110 1u8 into r1113; + ternary r1111 r1112 r1109 into r1114; + ternary r1111 r1113 r1110 into r1115; + call is_even_and_nonzero r1114 into r1116; + div r1114 2field into r1117; + add r1115 1u8 into r1118; + ternary r1116 r1117 r1114 into r1119; + ternary r1116 r1118 r1115 into r1120; + call is_even_and_nonzero r1119 into r1121; + div r1119 2field into r1122; + add r1120 1u8 into r1123; + ternary r1121 r1122 r1119 into r1124; + ternary r1121 r1123 r1120 into r1125; + call is_even_and_nonzero r1124 into r1126; + div r1124 2field into r1127; + add r1125 1u8 into r1128; + ternary r1126 r1127 r1124 into r1129; + ternary r1126 r1128 r1125 into r1130; + call is_even_and_nonzero r1129 into r1131; + div r1129 2field into r1132; + add r1130 1u8 into r1133; + ternary r1131 r1132 r1129 into r1134; + ternary r1131 r1133 r1130 into r1135; + call is_even_and_nonzero r1134 into r1136; + div r1134 2field into r1137; + add r1135 1u8 into r1138; + ternary r1136 r1137 r1134 into r1139; + ternary r1136 r1138 r1135 into r1140; + call is_even_and_nonzero r1139 into r1141; + div r1139 2field into r1142; + add r1140 1u8 into r1143; + ternary r1141 r1142 r1139 into r1144; + ternary r1141 r1143 r1140 into r1145; + call is_even_and_nonzero r1144 into r1146; + div r1144 2field into r1147; + add r1145 1u8 into r1148; + ternary r1146 r1147 r1144 into r1149; + ternary r1146 r1148 r1145 into r1150; + call is_even_and_nonzero r1149 into r1151; + div r1149 2field into r1152; + add r1150 1u8 into r1153; + ternary r1151 r1152 r1149 into r1154; + ternary r1151 r1153 r1150 into r1155; + call is_even_and_nonzero r1154 into r1156; + div r1154 2field into r1157; + add r1155 1u8 into r1158; + ternary r1156 r1157 r1154 into r1159; + ternary r1156 r1158 r1155 into r1160; + call is_even_and_nonzero r1159 into r1161; + div r1159 2field into r1162; + add r1160 1u8 into r1163; + ternary r1161 r1162 r1159 into r1164; + ternary r1161 r1163 r1160 into r1165; + call is_even_and_nonzero r1164 into r1166; + div r1164 2field into r1167; + add r1165 1u8 into r1168; + ternary r1166 r1167 r1164 into r1169; + ternary r1166 r1168 r1165 into r1170; + call is_even_and_nonzero r1169 into r1171; + div r1169 2field into r1172; + add r1170 1u8 into r1173; + ternary r1171 r1172 r1169 into r1174; + ternary r1171 r1173 r1170 into r1175; + call is_even_and_nonzero r1174 into r1176; + div r1174 2field into r1177; + add r1175 1u8 into r1178; + ternary r1176 r1177 r1174 into r1179; + ternary r1176 r1178 r1175 into r1180; + call is_even_and_nonzero r1179 into r1181; + div r1179 2field into r1182; + add r1180 1u8 into r1183; + ternary r1181 r1182 r1179 into r1184; + ternary r1181 r1183 r1180 into r1185; + call is_even_and_nonzero r1184 into r1186; + div r1184 2field into r1187; + add r1185 1u8 into r1188; + ternary r1186 r1187 r1184 into r1189; + ternary r1186 r1188 r1185 into r1190; + call is_even_and_nonzero r1189 into r1191; + div r1189 2field into r1192; + add r1190 1u8 into r1193; + ternary r1191 r1192 r1189 into r1194; + ternary r1191 r1193 r1190 into r1195; + call is_even_and_nonzero r1194 into r1196; + div r1194 2field into r1197; + add r1195 1u8 into r1198; + ternary r1196 r1197 r1194 into r1199; + ternary r1196 r1198 r1195 into r1200; + call is_even_and_nonzero r1199 into r1201; + div r1199 2field into r1202; + add r1200 1u8 into r1203; + ternary r1201 r1202 r1199 into r1204; + ternary r1201 r1203 r1200 into r1205; + call is_even_and_nonzero r1204 into r1206; + div r1204 2field into r1207; + add r1205 1u8 into r1208; + ternary r1206 r1207 r1204 into r1209; + ternary r1206 r1208 r1205 into r1210; + call is_even_and_nonzero r1209 into r1211; + div r1209 2field into r1212; + add r1210 1u8 into r1213; + ternary r1211 r1212 r1209 into r1214; + ternary r1211 r1213 r1210 into r1215; + call is_even_and_nonzero r1214 into r1216; + div r1214 2field into r1217; + add r1215 1u8 into r1218; + ternary r1216 r1217 r1214 into r1219; + ternary r1216 r1218 r1215 into r1220; + call is_even_and_nonzero r1219 into r1221; + div r1219 2field into r1222; + add r1220 1u8 into r1223; + ternary r1221 r1222 r1219 into r1224; + ternary r1221 r1223 r1220 into r1225; + call is_even_and_nonzero r1224 into r1226; + div r1224 2field into r1227; + add r1225 1u8 into r1228; + ternary r1226 r1227 r1224 into r1229; + ternary r1226 r1228 r1225 into r1230; + call is_even_and_nonzero r1229 into r1231; + div r1229 2field into r1232; + add r1230 1u8 into r1233; + ternary r1231 r1232 r1229 into r1234; + ternary r1231 r1233 r1230 into r1235; + call is_even_and_nonzero r1234 into r1236; + div r1234 2field into r1237; + add r1235 1u8 into r1238; + ternary r1236 r1237 r1234 into r1239; + ternary r1236 r1238 r1235 into r1240; + call is_even_and_nonzero r1239 into r1241; + div r1239 2field into r1242; + add r1240 1u8 into r1243; + ternary r1241 r1242 r1239 into r1244; + ternary r1241 r1243 r1240 into r1245; + call is_even_and_nonzero r1244 into r1246; + div r1244 2field into r1247; + add r1245 1u8 into r1248; + ternary r1246 r1247 r1244 into r1249; + ternary r1246 r1248 r1245 into r1250; + call is_even_and_nonzero r1249 into r1251; + div r1249 2field into r1252; + add r1250 1u8 into r1253; + ternary r1251 r1252 r1249 into r1254; + ternary r1251 r1253 r1250 into r1255; + call is_even_and_nonzero r1254 into r1256; + div r1254 2field into r1257; + add r1255 1u8 into r1258; + ternary r1256 r1257 r1254 into r1259; + ternary r1256 r1258 r1255 into r1260; + output r1260 as u8.private; diff --git a/examples/twoadicity/build/program.json b/examples/twoadicity/build/program.json new file mode 100644 index 0000000000..088f14957d --- /dev/null +++ b/examples/twoadicity/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "twoadicity.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/twoadicity/program.json b/examples/twoadicity/program.json index 33f8524efa..088f14957d 100644 --- a/examples/twoadicity/program.json +++ b/examples/twoadicity/program.json @@ -2,9 +2,5 @@ "program": "twoadicity.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkp3JKK9YGWZYbPUVShFurexLMqRp1JHuvub9fnZwNW7XsW", - "address": "aleo1cagy225kufzj3fs2jvf8mk84dvx7umq53u4rana2ukp5d68kjy8s0t24sh" - }, "license": "MIT" } diff --git a/examples/vote/.env b/examples/vote/.env new file mode 100644 index 0000000000..8e588d2d11 --- /dev/null +++ b/examples/vote/.env @@ -0,0 +1,2 @@ +NETWORK=testnet3 +PRIVATE_KEY=APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx \ No newline at end of file diff --git a/examples/vote/.gitignore b/examples/vote/.gitignore index b28696155d..750b56f237 100644 --- a/examples/vote/.gitignore +++ b/examples/vote/.gitignore @@ -1,2 +1,4 @@ outputs/ -build/ +*.avm +*.prover +*.verifier \ No newline at end of file diff --git a/examples/vote/README.md b/examples/vote/README.md index dedf9e1c39..1b470c54cd 100644 --- a/examples/vote/README.md +++ b/examples/vote/README.md @@ -20,7 +20,7 @@ Proposal information and voting results are revealed using the public `mapping` To compile this Leo program, run: ```bash -leo build +leo run ``` Make changes to `vote/inputs/vote.in` before running each command. diff --git a/examples/vote/build/main.aleo b/examples/vote/build/main.aleo new file mode 100644 index 0000000000..fdaafdbfdf --- /dev/null +++ b/examples/vote/build/main.aleo @@ -0,0 +1,86 @@ +program vote.aleo; + +struct ProposalInfo: + title as field; + content as field; + proposer as address; + +record Proposal: + owner as address.private; + id as field.private; + info as ProposalInfo.private; + +record Ticket: + owner as address.private; + pid as field.private; + + +mapping proposals: + key left as field.public; + value right as ProposalInfo.public; + + +mapping tickets: + key left as field.public; + value right as u64.public; + + +mapping agree_votes: + key left as field.public; + value right as u64.public; + + +mapping disagree_votes: + key left as field.public; + value right as u64.public; + +function propose: + input r0 as ProposalInfo.public; + assert.eq self.caller r0.proposer; + hash.bhp256 r0.title into r1 as field; cast self.caller r1 r0 into r2 as Proposal.record; + output r2 as Proposal.record; + + finalize r1; + +finalize propose: + input r0 as field.public; + set 0u64 into tickets[r0]; + + +function new_ticket: + input r0 as field.public; + input r1 as address.public; + cast r1 r0 into r2 as Ticket.record; + output r2 as Ticket.record; + + finalize r0; + +finalize new_ticket: + input r0 as field.public; + get.or_use tickets[r0] 0u64 into r1; + add r1 1u64 into r2; + set r2 into tickets[r0]; + + +function agree: + input r0 as Ticket.record; + + finalize r0.pid; + +finalize agree: + input r0 as field.public; + get.or_use agree_votes[r0] 0u64 into r1; + add r1 1u64 into r2; + set r2 into agree_votes[r0]; + + +function disagree: + input r0 as Ticket.record; + + finalize r0.pid; + +finalize disagree: + input r0 as field.public; + get.or_use disagree_votes[r0] 0u64 into r1; + add r1 1u64 into r2; + set r2 into disagree_votes[r0]; diff --git a/examples/vote/build/program.json b/examples/vote/build/program.json new file mode 100644 index 0000000000..8a46439caf --- /dev/null +++ b/examples/vote/build/program.json @@ -0,0 +1,6 @@ +{ + "program": "vote.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/examples/vote/inputs/vote.in b/examples/vote/inputs/vote.in index bebf867d4c..ac94c9b3f2 100644 --- a/examples/vote/inputs/vote.in +++ b/examples/vote/inputs/vote.in @@ -8,18 +8,18 @@ info: ProposalInfo = ProposalInfo { [new_ticket] pid: field = 2264670486490520844857553240576860973319410481267184439818180411609250173817field; -voter: address = aleo1kkk52quhnxgn2nfrcd9jqk7c9x27c23f2wvw7fyzcze56yahvcgszgttu2; +voter: address = aleo1mgfq6g40l6zkhsm063n3uhr43qk5e0zsua5aszeq5080dsvlcvxsn0rrau; [agree] ticket: Ticket = Ticket { - owner: aleo1kkk52quhnxgn2nfrcd9jqk7c9x27c23f2wvw7fyzcze56yahvcgszgttu2, + owner: aleo1mgfq6g40l6zkhsm063n3uhr43qk5e0zsua5aszeq5080dsvlcvxsn0rrau, pid: 2264670486490520844857553240576860973319410481267184439818180411609250173817field, _nonce: 1637267040221574073903539416642641433705357302885235345311606754421919550724group }; [disagree] ticket: Ticket = Ticket { - owner: aleo1kkk52quhnxgn2nfrcd9jqk7c9x27c23f2wvw7fyzcze56yahvcgszgttu2, + owner: aleo1mgfq6g40l6zkhsm063n3uhr43qk5e0zsua5aszeq5080dsvlcvxsn0rrau, pid: 2264670486490520844857553240576860973319410481267184439818180411609250173817field, _nonce: 1637267040221574073903539416642641433705357302885235345311606754421919550724group }; diff --git a/examples/vote/program.json b/examples/vote/program.json index 81ef8504d2..8a46439caf 100644 --- a/examples/vote/program.json +++ b/examples/vote/program.json @@ -2,9 +2,5 @@ "program": "vote.aleo", "version": "0.0.0", "description": "", - "development": { - "private_key": "APrivateKey1zkpBDEpwdFWqxe1NdB9fxZxiX9LahJ3CdqchSs7FGZVggNw", - "address": "aleo1kkk52quhnxgn2nfrcd9jqk7c9x27c23f2wvw7fyzcze56yahvcgszgttu2" - }, "license": "MIT" } diff --git a/leo/cli/cli.rs b/leo/cli/cli.rs index 5751abd9b7..943b5a4436 100644 --- a/leo/cli/cli.rs +++ b/leo/cli/cli.rs @@ -69,6 +69,11 @@ enum Commands { #[clap(flatten)] command: Run, }, + #[clap(about = "Execute a program with input variables")] + Execute { + #[clap(flatten)] + command: Execute, + }, #[clap(about = "Update the Leo CLI")] Update { #[clap(flatten)] @@ -112,6 +117,7 @@ pub fn run_with_args(cli: CLI) -> Result<()> { Commands::Build { command } => command.try_execute(context), Commands::Clean { command } => command.try_execute(context), Commands::Run { command } => command.try_execute(context), + Commands::Execute { command } => command.try_execute(context), Commands::Update { command } => command.try_execute(context), // Commands::Node(command) => command.try_execute(context), // Commands::Deploy { command } => command.try_execute(context), diff --git a/leo/cli/commands/build.rs b/leo/cli/commands/build.rs index cb9f6f123f..314cb99651 100644 --- a/leo/cli/commands/build.rs +++ b/leo/cli/commands/build.rs @@ -28,7 +28,7 @@ use leo_package::{ use leo_span::{symbol::with_session_globals, Symbol}; use snarkvm::{ - cli::Build as AleoBuild, + package::Package, prelude::{ProgramID, Testnet3}, }; @@ -165,23 +165,24 @@ impl Command for Build { None }; - // Unset the Leo panic hook. - let _ = std::panic::take_hook(); - - // Change the cwd to the build directory to compile aleo files. - std::env::set_current_dir(&build_directory) - .map_err(|err| PackageError::failed_to_set_cwd(build_directory.display(), err))?; - - // Call the `aleo build` command with the appropriate from the Aleo SDK. - let mut args = vec![ALEO_CLI_COMMAND]; - if self.options.offline { - args.push("--offline"); - } - let command = AleoBuild::try_parse_from(&args).map_err(CliError::failed_to_execute_aleo_build)?; - let result = command.parse().map_err(CliError::failed_to_execute_aleo_build)?; - - // Log the result of the build - tracing::info!("{}", result); + // Leo build is deprecated in version 1.9.0 + // // Unset the Leo panic hook. + // let _ = std::panic::take_hook(); + // + // // Change the cwd to the build directory to compile aleo files. + // std::env::set_current_dir(&build_directory) + // .map_err(|err| PackageError::failed_to_set_cwd(build_directory.display(), err))?; + // + // // Call the `build` command. + // let mut args = vec![SNARKVM_COMMAND]; + // if self.options.offline { + // args.push("--offline"); + // } + // let command = AleoBuild::try_parse_from(&args).map_err(CliError::failed_to_execute_aleo_build)?; + // let result = command.parse().map_err(CliError::failed_to_execute_aleo_build)?; + // + // // Log the result of the build + // tracing::info!("{}", result); Ok((input_ast, structs)) } @@ -236,11 +237,13 @@ fn compile_leo_file( .write_all(instructions.as_bytes()) .map_err(CliError::failed_to_load_instructions)?; - // Prepare the path string. - let _path_string = format!("(in \"{}\")", aleo_file_path.display()); - - // Log the build as successful. - tracing::info!("Compiled '{}' into Aleo instructions", file_name,); + // `Package::open` checks that the build directory and that `main.aleo` is well-formed. + match Package::::open(build) { + // Log the build as successful. + Ok(_) => tracing::info!("Compiled '{}' into Aleo instructions", file_name), + // Log the error. + Err(e) => tracing::info!("{}", CliError::failed_to_execute_build(e)), + }; Ok(symbol_table.structs) } diff --git a/leo/cli/commands/deploy.rs b/leo/cli/commands/deploy.rs index 6a679fe2b9..19e82419c8 100644 --- a/leo/cli/commands/deploy.rs +++ b/leo/cli/commands/deploy.rs @@ -16,8 +16,6 @@ use super::*; -use aleo::commands::Deploy as AleoDeploy; - /// Deploys an Aleo program. #[derive(Parser, Debug)] pub struct Deploy; @@ -46,12 +44,12 @@ impl Command for Deploy { // Unset the Leo panic hook. let _ = std::panic::take_hook(); - // Call the `aleo node` command from the Aleo SDK. + // Call the `node` command. println!(); - let command = AleoDeploy::try_parse_from([ALEO_CLI_COMMAND]).map_err(CliError::failed_to_parse_aleo_node)?; + let command = SnarkVMDeploy::try_parse_from([ALEO_CLI_COMMAND]).map_err(CliError::failed_to_parse_aleo_node)?; let res = command.parse().map_err(CliError::failed_to_execute_aleo_node)?; - // Log the output of the `aleo node` command. + // Log the output of the `node` command. tracing::info!("{}", res); Ok(()) diff --git a/leo/cli/commands/execute.rs b/leo/cli/commands/execute.rs new file mode 100644 index 0000000000..10fc152c6f --- /dev/null +++ b/leo/cli/commands/execute.rs @@ -0,0 +1,94 @@ +// Copyright (C) 2019-2023 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use super::*; + +use snarkvm::cli::Execute as SnarkVMExecute; + +/// Build, Prove and Run Leo program with inputs +#[derive(Parser, Debug)] +pub struct Execute { + #[clap(name = "NAME", help = "The name of the program to execute.", default_value = "main")] + name: String, + + #[clap(name = "INPUTS", help = "The inputs to the program. If none are provided, the input file is used.")] + inputs: Vec, + + #[clap(name = "ENDPOINT", help = "The specified network endpoint")] + endpoint: Option, + + #[clap(flatten)] + pub(crate) compiler_options: BuildOptions, +} + +impl Command for Execute { + type Input = ::Output; + type Output = (); + + fn log_span(&self) -> Span { + tracing::span!(tracing::Level::INFO, "Leo") + } + + fn prelude(&self, context: Context) -> Result { + (Build { options: self.compiler_options.clone() }).execute(context) + } + + fn apply(self, context: Context, input: Self::Input) -> Result { + // If input values are provided, then run the program with those inputs. + // Otherwise, use the input file. + let mut inputs = match self.inputs.is_empty() { + true => match input { + (Some(input_ast), circuits) => input_ast.program_inputs(&self.name, circuits), + _ => Vec::new(), + }, + false => self.inputs, + }; + + // Compose the `execute` command. + let mut arguments = vec![SNARKVM_COMMAND.to_string(), self.name]; + arguments.append(&mut inputs); + + // Open the Leo build/ directory + let path = context.dir()?; + let build_directory = BuildDirectory::open(&path)?; + + // Change the cwd to the Leo build/ directory to compile aleo files. + std::env::set_current_dir(&build_directory) + .map_err(|err| PackageError::failed_to_set_cwd(build_directory.display(), err))?; + + // Call the `execute` command. + if self.compiler_options.offline { + arguments.push(String::from("--offline")); + } + + if self.endpoint.is_some() { + arguments.push(String::from("--endpoint")); + arguments.push(self.endpoint.unwrap()); + } + + // Unset the Leo panic hook + let _ = std::panic::take_hook(); + + println!(); + let command = SnarkVMExecute::try_parse_from(&arguments).map_err(CliError::failed_to_parse_execute)?; + let res = command.parse().map_err(CliError::failed_to_execute_execute)?; + + // Log the output of the `execute` command. + tracing::info!("{}", res); + + Ok(()) + } +} diff --git a/leo/cli/commands/mod.rs b/leo/cli/commands/mod.rs index fe2222e1c7..38fcbcc81a 100644 --- a/leo/cli/commands/mod.rs +++ b/leo/cli/commands/mod.rs @@ -20,6 +20,9 @@ pub use build::Build; pub mod clean; pub use clean::Clean; +pub mod execute; +pub use execute::Execute; + // pub mod deploy; // pub use deploy::Deploy; diff --git a/leo/cli/commands/new.rs b/leo/cli/commands/new.rs index 56faf5d846..c5c23ad379 100644 --- a/leo/cli/commands/new.rs +++ b/leo/cli/commands/new.rs @@ -16,7 +16,7 @@ use super::*; -use snarkvm::{cli::New as AleoNew, file::AleoFile}; +use snarkvm::{cli::New as SnarkVMNew, file::AleoFile}; /// Create new Leo project #[derive(Parser, Debug)] @@ -40,8 +40,8 @@ impl Command for New { fn apply(self, context: Context, _: Self::Input) -> Result { // Call the `aleo new` command from the Aleo SDK. let command = - AleoNew::try_parse_from([ALEO_CLI_COMMAND, &self.name]).map_err(CliError::failed_to_parse_aleo_new)?; - let result = command.parse().map_err(CliError::failed_to_execute_aleo_new)?; + SnarkVMNew::try_parse_from([SNARKVM_COMMAND, &self.name]).map_err(CliError::failed_to_parse_new)?; + let result = command.parse().map_err(CliError::failed_to_execute_new)?; // todo: modify the readme file to recommend building with `leo build`. @@ -53,7 +53,7 @@ impl Command for New { package_path.push(&self.name); // Initialize the Leo package in the directory created by `aleo new`. - Package::initialize(&self.name, &package_path)?; + Package::::initialize(&self.name, &package_path)?; // Change the cwd to the Leo package directory to compile aleo files. std::env::set_current_dir(&package_path) @@ -83,7 +83,7 @@ impl Command for New { .map_err(PackageError::failed_to_open_aleo_file)?; let mut aleo_file_path = package_path.clone(); - aleo_file_path.push(AleoFile::::main_file_name()); + aleo_file_path.push(AleoFile::::main_file_name()); // Remove the Aleo file from the package directory. aleo_file.remove(&aleo_file_path).map_err(PackageError::failed_to_remove_aleo_file)?; diff --git a/leo/cli/commands/run.rs b/leo/cli/commands/run.rs index 9f64a32ab8..b993d87c85 100644 --- a/leo/cli/commands/run.rs +++ b/leo/cli/commands/run.rs @@ -16,7 +16,7 @@ use super::*; -use snarkvm::cli::Run as AleoRun; +use snarkvm::cli::Run as SnarkVMRun; /// Build, Prove and Run Leo program with inputs #[derive(Parser, Debug)] @@ -54,8 +54,8 @@ impl Command for Run { false => self.inputs, }; - // Compose the `aleo run` command. - let mut arguments = vec![ALEO_CLI_COMMAND.to_string(), self.name]; + // Compose the `run` command. + let mut arguments = vec![SNARKVM_COMMAND.to_string(), self.name]; arguments.append(&mut inputs); // Open the Leo build/ directory @@ -66,19 +66,15 @@ impl Command for Run { std::env::set_current_dir(&build_directory) .map_err(|err| PackageError::failed_to_set_cwd(build_directory.display(), err))?; - // Call the `aleo run` command from the Aleo SDK. - if self.compiler_options.offline { - arguments.push(String::from("--offline")); - } - // Unset the Leo panic hook let _ = std::panic::take_hook(); + // Call the `run` command. println!(); - let command = AleoRun::try_parse_from(&arguments).map_err(CliError::failed_to_parse_aleo_run)?; - let res = command.parse().map_err(CliError::failed_to_execute_aleo_run)?; + let command = SnarkVMRun::try_parse_from(&arguments).map_err(CliError::failed_to_parse_run)?; + let res = command.parse().map_err(CliError::failed_to_execute_run)?; - // Log the output of the `aleo run` command. + // Log the output of the `run` command. tracing::info!("{}", res); Ok(()) diff --git a/leo/cli/helpers/context.rs b/leo/cli/helpers/context.rs index ef7291ac3a..acdf9afe96 100644 --- a/leo/cli/helpers/context.rs +++ b/leo/cli/helpers/context.rs @@ -50,10 +50,10 @@ impl Context { /// Returns the package name as a String. /// Opens the manifest file `program.json` and creates the build directory if it doesn't exist. - pub fn open_manifest(&self) -> Result> { + pub fn open_manifest(&self) -> Result> { // Open the manifest file. let path = self.dir()?; - let manifest = Manifest::::open(&path).map_err(PackageError::failed_to_open_manifest)?; + let manifest = Manifest::::open(&path).map_err(PackageError::failed_to_open_manifest)?; // Lookup the program id. // let program_id = manifest.program_id(); @@ -71,7 +71,7 @@ impl Context { std::fs::read_to_string(manifest.path()).map_err(PackageError::failed_to_open_manifest)?; // Construct the file path. - let build_manifest_path = build_path.join(Manifest::::file_name()); + let build_manifest_path = build_path.join(Manifest::::file_name()); // Write the file. File::create(build_manifest_path) diff --git a/leo/cli/mod.rs b/leo/cli/mod.rs index cfa2720779..c8abde021e 100644 --- a/leo/cli/mod.rs +++ b/leo/cli/mod.rs @@ -23,8 +23,8 @@ pub use commands::*; mod helpers; pub use helpers::*; -pub(crate) type Network = snarkvm::prelude::Testnet3; -pub(crate) const ALEO_CLI_COMMAND: &str = "snarkvm"; +pub(crate) type CurrentNetwork = snarkvm::prelude::Testnet3; +pub(crate) const SNARKVM_COMMAND: &str = "snarkvm"; #[cfg(test)] mod tests; diff --git a/leo/package/Cargo.toml b/leo/package/Cargo.toml index 0e4ccbf3dd..ae1a2f118e 100644 --- a/leo/package/Cargo.toml +++ b/leo/package/Cargo.toml @@ -18,6 +18,10 @@ license = "GPL-3.0" edition = "2021" rust-version = "1.69" +[dependencies.snarkvm-console] +workspace = true +features = [ "account" ] + [dependencies.leo-errors] path = "../../errors" version = "1.8.3" @@ -26,6 +30,9 @@ version = "1.8.3" version = "1.9" features = [ "serde" ] +[dependencies.rand] +version = "0.8" + [dependencies.serde] version = "1.0" features = [ "derive" ] @@ -39,6 +46,9 @@ version = "0.1" [dev-dependencies.lazy_static] version = "1.3.0" +[dev-dependencies.snarkvm] +workspace = true + [features] default = [ "manifest_refactors" ] manifest_refactors = [ "manifest_refactor_project", "manifest_refactor_remote" ] diff --git a/leo/package/src/package.rs b/leo/package/src/package.rs index b867dacea9..898b2584c8 100644 --- a/leo/package/src/package.rs +++ b/leo/package/src/package.rs @@ -15,33 +15,40 @@ // along with the Leo library. If not, see . use crate::{ + build::BuildDirectory, inputs::{InputFile, InputsDirectory}, - root::Gitignore, + root::{Env, Gitignore}, source::{MainFile, SourceDirectory}, }; - use leo_errors::{PackageError, Result}; +use snarkvm_console::prelude::Network; -use crate::build::BuildDirectory; use serde::Deserialize; -use std::path::Path; +use std::{marker::PhantomData, path::Path}; #[derive(Deserialize)] -pub struct Package { +pub struct Package { pub name: String, pub version: String, pub description: Option, pub license: Option, + _phantom: PhantomData, } -impl Package { +impl Package { pub fn new(package_name: &str) -> Result { // Check that the package name is valid. if !Self::is_package_name_valid(package_name) { return Err(PackageError::invalid_package_name(package_name).into()); } - Ok(Self { name: package_name.to_owned(), version: "0.1.0".to_owned(), description: None, license: None }) + Ok(Self { + name: package_name.to_owned(), + version: "0.1.0".to_owned(), + description: None, + license: None, + _phantom: PhantomData, + }) } /// Returns `true` if the package name is valid. @@ -139,6 +146,12 @@ impl Package { Gitignore::new().write_to(path)?; } + // Verify that the .env file does not exist. + if !Env::::exists_at(path) { + // Create the .env file. + Env::::new().write_to(path)?; + } + // Create the source directory. SourceDirectory::create(path)?; @@ -172,27 +185,29 @@ impl Package { mod tests { use super::*; + type CurrentNetwork = snarkvm::prelude::Testnet3; + #[test] fn test_is_package_name_valid() { - assert!(Package::is_package_name_valid("foo")); - assert!(Package::is_package_name_valid("foo_bar")); - assert!(Package::is_package_name_valid("foo1")); - assert!(Package::is_package_name_valid("foo_bar___baz_")); + assert!(Package::::is_package_name_valid("foo")); + assert!(Package::::is_package_name_valid("foo_bar")); + assert!(Package::::is_package_name_valid("foo1")); + assert!(Package::::is_package_name_valid("foo_bar___baz_")); - assert!(!Package::is_package_name_valid("foo-bar")); - assert!(!Package::is_package_name_valid("foo-bar-baz")); - assert!(!Package::is_package_name_valid("foo-1")); - assert!(!Package::is_package_name_valid("")); - assert!(!Package::is_package_name_valid("-")); - assert!(!Package::is_package_name_valid("-foo")); - assert!(!Package::is_package_name_valid("-foo-")); - assert!(!Package::is_package_name_valid("_foo")); - assert!(!Package::is_package_name_valid("foo--bar")); - assert!(!Package::is_package_name_valid("foo---bar")); - assert!(!Package::is_package_name_valid("foo--bar--baz")); - assert!(!Package::is_package_name_valid("foo---bar---baz")); - assert!(!Package::is_package_name_valid("foo*bar")); - assert!(!Package::is_package_name_valid("foo,bar")); - assert!(!Package::is_package_name_valid("1-foo")); + assert!(!Package::::is_package_name_valid("foo-bar")); + assert!(!Package::::is_package_name_valid("foo-bar-baz")); + assert!(!Package::::is_package_name_valid("foo-1")); + assert!(!Package::::is_package_name_valid("")); + assert!(!Package::::is_package_name_valid("-")); + assert!(!Package::::is_package_name_valid("-foo")); + assert!(!Package::::is_package_name_valid("-foo-")); + assert!(!Package::::is_package_name_valid("_foo")); + assert!(!Package::::is_package_name_valid("foo--bar")); + assert!(!Package::::is_package_name_valid("foo---bar")); + assert!(!Package::::is_package_name_valid("foo--bar--baz")); + assert!(!Package::::is_package_name_valid("foo---bar---baz")); + assert!(!Package::::is_package_name_valid("foo*bar")); + assert!(!Package::::is_package_name_valid("foo,bar")); + assert!(!Package::::is_package_name_valid("1-foo")); } } diff --git a/leo/package/src/root/env.rs b/leo/package/src/root/env.rs new file mode 100644 index 0000000000..9929032e6a --- /dev/null +++ b/leo/package/src/root/env.rs @@ -0,0 +1,64 @@ +// Copyright (C) 2019-2023 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +//! The `.env` file. +use leo_errors::{PackageError, Result}; +use snarkvm_console::{account::PrivateKey, prelude::Network}; + +use serde::Deserialize; +use std::{borrow::Cow, fs::File, io::Write, marker::PhantomData, path::Path}; + +pub static ENV_FILENAME: &str = ".env"; + +#[derive(Deserialize, Default)] +pub struct Env { + _phantom: PhantomData, +} + +impl Env { + pub fn new() -> Self { + Self { _phantom: PhantomData } + } + + pub fn exists_at(path: &Path) -> bool { + let mut path = Cow::from(path); + if path.is_dir() { + path.to_mut().push(ENV_FILENAME); + } + path.exists() + } + + pub fn write_to(self, path: &Path) -> Result<()> { + let mut path = Cow::from(path); + if path.is_dir() { + path.to_mut().push(ENV_FILENAME); + } + + let mut file = File::create(&path).map_err(PackageError::io_error_env_file)?; + file.write_all(self.template()?.as_bytes()).map_err(PackageError::io_error_env_file)?; + Ok(()) + } + + fn template(&self) -> Result { + // Initialize an RNG. + let rng = &mut rand::thread_rng(); + + // Initialize a new development private key. + let private_key = PrivateKey::::new(rng)?; + + Ok(format!("NETWORK=testnet3\nPRIVATE_KEY={private_key}\n")) + } +} diff --git a/leo/package/src/root/gitignore.rs b/leo/package/src/root/gitignore.rs index 616e6245ea..4ad4d0fc1f 100644 --- a/leo/package/src/root/gitignore.rs +++ b/leo/package/src/root/gitignore.rs @@ -28,7 +28,7 @@ pub struct Gitignore; impl Gitignore { pub fn new() -> Self { - Self::default() + Self } pub fn exists_at(path: &Path) -> bool { @@ -51,6 +51,6 @@ impl Gitignore { } fn template(&self) -> String { - "outputs/\nbuild/\n".to_string() + ".env\n*.avm\n*.prover\n*.verifier\noutputs/\n".to_string() } } diff --git a/leo/package/src/root/mod.rs b/leo/package/src/root/mod.rs index 1d654c7405..22e576f444 100644 --- a/leo/package/src/root/mod.rs +++ b/leo/package/src/root/mod.rs @@ -13,6 +13,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +pub mod env; +pub use self::env::*; pub mod gitignore; pub use self::gitignore::*; diff --git a/tests/expectations/execution/eq.out b/tests/expectations/execution/eq.out index 29bd48e8c7..3033d403c9 100644 --- a/tests/expectations/execution/eq.out +++ b/tests/expectations/execution/eq.out @@ -2,21 +2,21 @@ namespace: Execute expectation: Pass outputs: - - - initial_ast: e384bbb19d9c6c31a1f7793869f62db14b66859be16bc50c89cbbbd392010ea8 - unrolled_ast: e384bbb19d9c6c31a1f7793869f62db14b66859be16bc50c89cbbbd392010ea8 - ssa_ast: e384bbb19d9c6c31a1f7793869f62db14b66859be16bc50c89cbbbd392010ea8 - flattened_ast: e384bbb19d9c6c31a1f7793869f62db14b66859be16bc50c89cbbbd392010ea8 - inlined_ast: e384bbb19d9c6c31a1f7793869f62db14b66859be16bc50c89cbbbd392010ea8 - dce_ast: e384bbb19d9c6c31a1f7793869f62db14b66859be16bc50c89cbbbd392010ea8 - bytecode: 65dc5b6d2517bf5b8da9b0947b784d4142cc1214a64c4cd7e2a80d3831b2167e + - - initial_ast: 983bdab4b48b6dc290532719adac21f3b2ed0b01e3dbd3c4ad2f80b39b8acc5c + unrolled_ast: 983bdab4b48b6dc290532719adac21f3b2ed0b01e3dbd3c4ad2f80b39b8acc5c + ssa_ast: baaa311d292dbfbccf2687c5d6c4b64d83232acb799f0b5b8fa19007ff2b6488 + flattened_ast: 5403da36860a27060343d61a1cf5ca5ed514e978439804356252ccb7db2c5fb7 + inlined_ast: 5403da36860a27060343d61a1cf5ca5ed514e978439804356252ccb7db2c5fb7 + dce_ast: 5403da36860a27060343d61a1cf5ca5ed514e978439804356252ccb7db2c5fb7 + bytecode: 15a3a90b1837b318b43b3f3bfc5e454a8821357b4c3feb01da00a4db810bde89 warnings: "" results: main: - input: "[0u32, 1u32]" - output: "SnarkVMError(Failed to evaluate instruction (assert.eq r0 r1 ;): 'assert.eq' failed: '0u32' is not equal to '1u32' (should be equal))" + output: "[false]" - input: "[1u32, 1u32]" - output: "[]" + output: "[true]" - input: "[1u32, 2u32]" - output: "SnarkVMError(Failed to evaluate instruction (assert.eq r0 r1 ;): 'assert.eq' failed: '1u32' is not equal to '2u32' (should be equal))" + output: "[false]" - input: "[2u32, 2u32]" - output: "[]" + output: "[true]" diff --git a/tests/expectations/execution/primitive_casts.out b/tests/expectations/execution/primitive_casts.out index aa2550836e..506e526e28 100644 --- a/tests/expectations/execution/primitive_casts.out +++ b/tests/expectations/execution/primitive_casts.out @@ -12,47 +12,47 @@ outputs: warnings: "" results: address_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r2 as boolean;): Cannot downcast a field literal to a boolean type (yet).)" bool_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[false]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a boolean literal to another type.)" field_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0field]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a field literal to an address type.)" group_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0group]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r2 as boolean;): Cannot downcast a field literal to a boolean type (yet).)" i128_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0i128]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i128 literal to another type (yet).)" i16_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0i16]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i16 literal to another type (yet).)" i32_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0i32]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i32 literal to another type (yet).)" i64_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0i64]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i64 literal to another type (yet).)" i8_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0i8]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i8 literal to another type (yet).)" scalar_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0scalar]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a scalar literal to another type (yet).)" u128_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0u128]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u128 literal to another type (yet).)" u16_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0u16]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u16 literal to another type (yet).)" u32_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0u32]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u32 literal to another type (yet).)" u64_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0u64]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u64 literal to another type (yet).)" u8_casts: - - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" - output: SnarkVMError(Cannot downcast a field literal to a boolean type (yet).) + - input: "[0u8]" + output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u8 literal to another type (yet).)" diff --git a/tests/tests/execution/eq.leo b/tests/tests/execution/eq.leo index a17b1a903b..33cefc3793 100644 --- a/tests/tests/execution/eq.leo +++ b/tests/tests/execution/eq.leo @@ -10,7 +10,8 @@ cases: */ program test.aleo { - transition main(x: u32, y: u32) { + transition main(x: u32, y: u32) -> bool { assert_eq(x, y); + return x == y; } } diff --git a/tests/tests/execution/primitive_casts.leo b/tests/tests/execution/primitive_casts.leo index fbc190e6a5..9e6e84bbb3 100644 --- a/tests/tests/execution/primitive_casts.leo +++ b/tests/tests/execution/primitive_casts.leo @@ -3,35 +3,35 @@ namespace: Execute expectation: Pass cases: address_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey"] bool_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["false"] field_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0field"] group_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0group"] i8_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0i8"] i16_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0i16"] i32_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0i32"] i64_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0i64"] i128_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0i128"] u8_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0u8"] u16_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0u16"] u32_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0u32"] u64_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0u64"] u128_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0u128"] scalar_casts: - - input: ["aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey", "false", "0field", "0group", "0i8", "0i16", "0i32", "0i64", "0i128", "0u8", "0u16", "0u32", "0u64", "0u128", "0scalar"] + - input: ["0scalar"]