From f2e0ba7dcd08d4a7428c28c7f73f3298ddeca55b Mon Sep 17 00:00:00 2001 From: d0cd Date: Mon, 6 Jun 2022 19:42:11 -0700 Subject: [PATCH 01/43] Initial prototype for code gen --- Cargo.lock | 347 +++++++++--------- compiler/passes/Cargo.toml | 3 + .../passes/src/code_generation/generator.rs | 49 +++ compiler/passes/src/code_generation/mod.rs | 46 +++ .../src/code_generation/visit_expressions.rs | 137 +++++++ .../src/code_generation/visit_program.rs | 38 ++ .../src/code_generation/visit_statements.rs | 95 +++++ .../passes/src/code_generation/visit_type.rs | 35 ++ compiler/passes/src/lib.rs | 3 + 9 files changed, 575 insertions(+), 178 deletions(-) create mode 100644 compiler/passes/src/code_generation/generator.rs create mode 100644 compiler/passes/src/code_generation/mod.rs create mode 100644 compiler/passes/src/code_generation/visit_expressions.rs create mode 100644 compiler/passes/src/code_generation/visit_program.rs create mode 100644 compiler/passes/src/code_generation/visit_statements.rs create mode 100644 compiler/passes/src/code_generation/visit_type.rs diff --git a/Cargo.lock b/Cargo.lock index d7563d136d..059c844a98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "aleo-std" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cedebcd5cef12e2739faee8e07ccde1c4a0c7d23371f4007799c49ba2a7eb278" +checksum = "6613c3c045767658f6cc0f5356414ca7814fb936df9197367914e5809e24622a" dependencies = [ "aleo-std-cpu", "aleo-std-profiler", @@ -90,9 +90,9 @@ checksum = "d1dcc739555d14733cbe4756f144b81d64f01843df359189b4d71bd5e521e2ee" [[package]] name = "aleo-std-profiler" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360a97d2f318af317382164debf2acb0aef276117ad06616f2768909aff01afe" +checksum = "3d72acece2832bc2aceeebcbb58f5ea7526c2524ccbbf13229ff1be8bc9ccc15" [[package]] name = "aleo-std-storage" @@ -116,20 +116,20 @@ dependencies = [ [[package]] name = "aleo-std-timed" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b85aed1b7ca965b6613d14ab243c746316180401cbb9ba3b2cb22bff16fc08f" +checksum = "6118baab6285accf088b31d5ea5029c37bbf9d98e62b4d8720a0a5a66bc2e427" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", ] [[package]] name = "aleo-std-timer" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bed34621f0713d3e750b59acdd3961a8950650fa7615b7cb40e6bc062a1d0b" +checksum = "5edd669f91f0e6f9fd14aa9489fb64fff760723ee4c73c4e93f721f11aaf62e7" dependencies = [ "colored", ] @@ -289,9 +289,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byteorder" @@ -620,9 +620,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.53+curl-7.82.0" +version = "0.4.55+curl-7.83.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8092905a5a9502c312f223b2775f57ec5c5b715f9a15ee9d2a8591d1364a0352" +checksum = "23734ec77368ec583c2e61dd3f0b0e5c98b93abe6d2a004ca06b91dd7e3e2762" dependencies = [ "cc", "libc", @@ -639,9 +639,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", ] [[package]] @@ -729,9 +729,9 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" +checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" dependencies = [ "cfg-if 1.0.0", "libc", @@ -741,13 +741,11 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if 1.0.0", "crc32fast", - "libc", "miniz_oxide", ] @@ -949,9 +947,9 @@ checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" [[package]] name = "hashbrown" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" +checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" dependencies = [ "ahash", ] @@ -991,20 +989,20 @@ dependencies = [ [[package]] name = "http" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" +checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" dependencies = [ "bytes", "fnv", - "itoa 1.0.1", + "itoa 1.0.2", ] [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -1013,9 +1011,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6330e8a36bd8c859f3fa6d9382911fbb7147ec39807f63b923933a247240b9ba" +checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" [[package]] name = "httpdate" @@ -1025,9 +1023,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" dependencies = [ "bytes", "futures-channel", @@ -1038,7 +1036,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.1", + "itoa 1.0.2", "pin-project-lite", "socket2", "tokio", @@ -1134,9 +1132,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" +checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "itertools" @@ -1155,9 +1153,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "jobserver" @@ -1333,6 +1331,7 @@ name = "leo-passes" version = "1.5.3" dependencies = [ "indexmap", + "itertools", "leo-ast", "leo-core", "leo-errors", @@ -1364,15 +1363,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.123" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb691a747a7ab48abc15c5b42066eaafde10dc427e3b6ee2a1cf43db04c763bd" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libz-sys" -version = "1.1.5" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" dependencies = [ "cc", "libc", @@ -1398,9 +1397,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if 1.0.0", ] @@ -1413,9 +1412,9 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" @@ -1450,9 +1449,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", ] @@ -1470,7 +1469,7 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow 0.2.2", + "miow", "net2", "slab", "winapi 0.2.8", @@ -1478,16 +1477,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" +checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" dependencies = [ "libc", "log", - "miow 0.3.7", - "ntapi", "wasi 0.11.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "windows-sys", ] [[package]] @@ -1514,15 +1511,6 @@ dependencies = [ "ws2_32-sys", ] -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "native-tls" version = "0.2.10" @@ -1586,15 +1574,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "num-bigint" version = "0.4.3" @@ -1608,9 +1587,9 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -1618,9 +1597,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] @@ -1637,9 +1616,9 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aba1801fb138d8e85e11d0fc70baf4fe1cdfffda7c6cd34a854905df588e5ed0" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" dependencies = [ "libc", ] @@ -1652,18 +1631,18 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.28.3" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "oorandom" @@ -1679,18 +1658,30 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.38" +version = "0.10.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ "bitflags", "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", + "openssl-macros", "openssl-sys", ] +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2 1.0.39", + "quote 1.0.18", + "syn 1.0.96", +] + [[package]] name = "openssl-probe" version = "0.1.5" @@ -1699,9 +1690,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.72" +version = "0.9.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" +checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" dependencies = [ "autocfg", "cc", @@ -1712,15 +1703,15 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", "parking_lot_core", @@ -1728,9 +1719,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if 1.0.0", "libc", @@ -1776,9 +1767,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -1869,9 +1860,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", "version_check", ] @@ -1881,7 +1872,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", "version_check", ] @@ -1892,16 +1883,16 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid 0.2.2", + "unicode-ident", ] [[package]] @@ -1928,7 +1919,7 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", ] [[package]] @@ -1972,9 +1963,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" dependencies = [ "autocfg", "crossbeam-deque", @@ -1984,14 +1975,13 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] @@ -2113,9 +2103,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "same-file" @@ -2128,12 +2118,12 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi 0.3.9", + "windows-sys", ] [[package]] @@ -2191,9 +2181,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" +checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" [[package]] name = "serde" @@ -2220,19 +2210,19 @@ version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", ] [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ "indexmap", - "itoa 1.0.1", + "itoa 1.0.2", "ryu", "serde", ] @@ -2244,7 +2234,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa 1.0.2", "ryu", "serde", ] @@ -2320,7 +2310,7 @@ dependencies = [ "curl", "derivative", "digest", - "hashbrown 0.12.0", + "hashbrown 0.12.1", "hex", "itertools", "lazy_static", @@ -2362,9 +2352,9 @@ source = "git+https://github.com/AleoHQ/snarkVM.git?rev=51633e2#51633e2fac247bc8 dependencies = [ "proc-macro-crate", "proc-macro-error", - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", ] [[package]] @@ -2500,9 +2490,9 @@ source = "git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79#85b7a790659168d6 dependencies = [ "proc-macro-crate", "proc-macro-error", - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", ] [[package]] @@ -2546,9 +2536,9 @@ checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", ] [[package]] @@ -2565,18 +2555,18 @@ checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] name = "syn" -version = "1.0.91" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "unicode-xid 0.2.2", + "unicode-ident", ] [[package]] @@ -2667,9 +2657,9 @@ version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", ] [[package]] @@ -2687,7 +2677,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" dependencies = [ - "itoa 1.0.1", + "itoa 1.0.2", "libc", "num_threads", "time-macros", @@ -2711,9 +2701,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -2726,15 +2716,16 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.17.0" +version = "1.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" +checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" dependencies = [ "bytes", "libc", "memchr", - "mio 0.8.2", + "mio 0.8.3", "num_cpus", + "once_cell", "pin-project-lite", "socket2", "winapi 0.3.9", @@ -2752,9 +2743,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" dependencies = [ "bytes", "futures-core", @@ -2793,20 +2784,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", ] [[package]] name = "tracing-core" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfce9f3241b150f36e8e54bb561a742d5daa1a47b5dd9a5ce369fd4a4db2210" +checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" dependencies = [ "lazy_static", "valuable", @@ -2814,9 +2805,9 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ "lazy_static", "log", @@ -2860,9 +2851,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" [[package]] name = "unicode-normalization" @@ -2891,12 +2888,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - [[package]] name = "url" version = "2.2.2" @@ -2994,9 +2985,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", "wasm-bindgen-shared", ] @@ -3028,9 +3019,9 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ - "proc-macro2 1.0.37", + "proc-macro2 1.0.39", "quote 1.0.18", - "syn 1.0.91", + "syn 1.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3096,9 +3087,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5acdd78cb4ba54c0045ac14f62d8f94a03d10047904ae2a40afa1e99d8f70825" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ "windows_aarch64_msvc", "windows_i686_gnu", @@ -3109,33 +3100,33 @@ dependencies = [ [[package]] name = "windows_aarch64_msvc" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_i686_gnu" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_msvc" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_x86_64_gnu" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_msvc" -version = "0.34.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "winreg" @@ -3187,18 +3178,18 @@ dependencies = [ [[package]] name = "zstd" -version = "0.10.0+zstd.1.5.2" +version = "0.10.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1365becbe415f3f0fcd024e2f7b45bacfb5bdd055f0dc113571394114e7bdd" +checksum = "5f4a6bd64f22b5e3e94b4e238669ff9f10815c27a5180108b849d24174a83847" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "4.1.4+zstd.1.5.2" +version = "4.1.6+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7cd17c9af1a4d6c24beb1cc54b17e2ef7b593dc92f19e9d9acad8b182bbaee" +checksum = "94b61c51bb270702d6167b8ce67340d2754b088d0c091b06e593aa772c3ee9bb" dependencies = [ "libc", "zstd-sys", diff --git a/compiler/passes/Cargo.toml b/compiler/passes/Cargo.toml index 7da2bfe33d..7f8f5fdd93 100644 --- a/compiler/passes/Cargo.toml +++ b/compiler/passes/Cargo.toml @@ -43,3 +43,6 @@ version = "1.5.3" [dependencies.leo-core] path = "../core" version = "1.5.3" + +[dependencies.itertools] +version = "0.10.3" \ No newline at end of file diff --git a/compiler/passes/src/code_generation/generator.rs b/compiler/passes/src/code_generation/generator.rs new file mode 100644 index 0000000000..1676b821b1 --- /dev/null +++ b/compiler/passes/src/code_generation/generator.rs @@ -0,0 +1,49 @@ +// Copyright (C) 2019-2022 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 crate::SymbolTable; + +use leo_ast::{Function, Identifier}; +use leo_errors::emitter::Handler; + +use std::collections::HashMap; + +pub struct CodeGenerator<'a> { + /// Symbol table. + // TODO: Including this for now. Remove if not needed. + symbol_table: &'a mut SymbolTable<'a>, + /// Error handler. + handler: &'a Handler, + /// A counter to track the next available register. + pub(crate) next_register: u64, + /// Reference to the current function. + pub(crate) current_function: Option<&'a Function>, + /// Mapping of variables to registers. + pub(crate) variable_mapping: HashMap<&'a Identifier, String>, +} + +impl<'a> CodeGenerator<'a> { + /// Initializes a new `CodeGenerator`. + pub fn new(symbol_table: &'a mut SymbolTable<'a>, handler: &'a Handler) -> Self { + Self { + symbol_table, + handler, + next_register: 0, + current_function: None, + variable_mapping: HashMap::new(), + } + } +} diff --git a/compiler/passes/src/code_generation/mod.rs b/compiler/passes/src/code_generation/mod.rs new file mode 100644 index 0000000000..0cc3f1614c --- /dev/null +++ b/compiler/passes/src/code_generation/mod.rs @@ -0,0 +1,46 @@ +// Copyright (C) 2019-2022 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 . + +pub mod generator; +pub use generator::*; + +mod visit_expressions; + +mod visit_program; + +mod visit_statements; + +mod visit_type; + +use crate::{Pass, SymbolTable}; + +use leo_ast::Ast; +use leo_errors::emitter::Handler; +use leo_errors::Result; + + +impl<'a> Pass<'a> for CodeGenerator<'a> { + type Input = (&'a Ast, &'a mut SymbolTable<'a>, &'a Handler); + type Output = Result<()>; + + fn do_pass((ast, symbol_table, handler): Self::Input) -> Self::Output { + let mut generator = Self::new(symbol_table, handler); + generator.visit_program(ast.as_repr()); + handler.last_err()?; + + Ok(()) + } +} diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs new file mode 100644 index 0000000000..8dd139b2d6 --- /dev/null +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -0,0 +1,137 @@ +// Copyright (C) 2019-2022 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 crate::CodeGenerator; + +use leo_ast::{ + BinaryExpression, BinaryOperation, CallExpression, ErrExpression, Expression, Identifier, TernaryExpression, + UnaryExpression, UnaryOperation, ValueExpression, +}; + +/// Implement the necessary methods to visit nodes in the AST. +// Note: We opt for this option instead of using `Visitor` and `Director` because this pass requires +// a post-order traversal of the AST. This is sufficient since this implementation is intended to be +// a prototype. The production implementation will require a redesign of `Director`. +impl<'a> CodeGenerator<'a> { + pub(crate) fn visit_expression(&mut self, input: &'a Expression) -> (String, String) { + match input { + Expression::Identifier(expr) => self.visit_identifier(expr), + Expression::Value(expr) => self.visit_value(expr), + Expression::Unary(expr) => self.visit_unary(expr), + Expression::Binary(expr) => self.visit_binary(expr), + Expression::Ternary(expr) => self.visit_ternary(expr), + Expression::Call(expr) => self.visit_call(expr), + Expression::Err(expr) => self.visit_err(expr), + } + } + + fn visit_identifier(&mut self, input: &'a Identifier) -> (String, String) { + (self.variable_mapping.get(input).unwrap().clone(), String::new()) + } + + fn visit_value(&mut self, input: &'a ValueExpression) -> (String, String) { + (format!("{}", input), String::new()) + } + + fn visit_binary(&mut self, input: &'a BinaryExpression) -> (String, String) { + let (left_operand, left_instructions) = self.visit_expression(&input.left); + let (right_operand, right_instructions) = self.visit_expression(&input.right); + + let opcode = match input.op { + BinaryOperation::Add => String::from("add"), + BinaryOperation::Sub => String::from("sub"), + BinaryOperation::Mul => String::from("mul"), + BinaryOperation::Div => String::from("div"), + BinaryOperation::Pow => String::from("pow"), + BinaryOperation::Or => String::from("or"), + BinaryOperation::And => String::from("and"), + BinaryOperation::Eq => String::from("eq"), + BinaryOperation::Ne => String::from("neq"), + BinaryOperation::Ge => String::from("ge"), + BinaryOperation::Gt => String::from("gt"), + BinaryOperation::Le => String::from("le"), + BinaryOperation::Lt => String::from("lt"), + }; + + let destination_register = format!("r{}", self.next_register); + let binary_instruction = format!( + "{} {} {} into {}", + opcode, left_operand, right_operand, destination_register + ); + + // Increment the register counter. + self.next_register += 1; + + // Concatenate the instructions. + let mut instructions = left_instructions; + instructions.push_str(&right_instructions); + instructions.push_str(&binary_instruction); + + (destination_register, instructions) + } + + fn visit_unary(&mut self, input: &'a UnaryExpression) -> (String, String) { + let (expression_operand, expression_instructions) = self.visit_expression(&input.inner); + + let opcode = match input.op { + UnaryOperation::Not => String::from("not"), + UnaryOperation::Negate => String::from("neg"), + }; + + let destination_register = format!("r{}", self.next_register); + let unary_instruction = format!("{} {} into {};", opcode, expression_operand, destination_register); + + // Increment the register counter. + self.next_register += 1; + + // Concatenate the instructions. + let mut instructions = expression_instructions; + instructions.push_str(&unary_instruction); + + (destination_register, instructions) + } + + fn visit_ternary(&mut self, input: &'a TernaryExpression) -> (String, String) { + let (condition_operand, mut condition_instructions) = self.visit_expression(&input.condition); + let (if_true_operand, if_true_instructions) = self.visit_expression(&input.if_true); + let (if_false_operand, if_false_instructions) = self.visit_expression(&input.if_false); + + let destination_register = format!("r{}", self.next_register); + let ternary_instruction = format!( + "ternary {} {} {} into r{};", + condition_operand, if_true_operand, if_false_operand, destination_register + ); + + // Increment the register counter. + self.next_register += 1; + + // Concatenate the instructions. + let mut instructions = condition_instructions; + instructions.push_str(&if_true_instructions); + instructions.push_str(&if_false_instructions); + instructions.push_str(&ternary_instruction); + + (destination_register, instructions) + } + + fn visit_call(&mut self, input: &'a CallExpression) -> (String, String) { + unreachable!("`CallExpression`s should not be in the AST at this phase of compilation.") + } + + fn visit_err(&mut self, input: &'a ErrExpression) -> (String, String) { + unreachable!("`ErrExpression`s should not be in the AST at this phase of compilation.") + } +} diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs new file mode 100644 index 0000000000..9232dcae19 --- /dev/null +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -0,0 +1,38 @@ +// Copyright (C) 2019-2022 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 crate::CodeGenerator; + +use leo_ast::{Function, Program}; + +use itertools::Itertools; + +impl<'a> CodeGenerator<'a> { + pub(crate) fn visit_program(&mut self, input: &'a Program) -> String { + // Visit each `Function` in the Leo AST and produce a bytecode function. + input + .functions + .values() + .map(|function| self.visit_function(function)) + .join("") + } + + fn visit_function(&mut self, input: &'a Function) -> String { + let block_string = self.visit_block(&input.block); + + String::new() + } +} diff --git a/compiler/passes/src/code_generation/visit_statements.rs b/compiler/passes/src/code_generation/visit_statements.rs new file mode 100644 index 0000000000..db460d3d75 --- /dev/null +++ b/compiler/passes/src/code_generation/visit_statements.rs @@ -0,0 +1,95 @@ +// Copyright (C) 2019-2022 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 crate::CodeGenerator; + +use leo_ast::{ + AssignStatement, Block, ConditionalStatement, ConsoleStatement, DefinitionStatement, IterationStatement, + ReturnStatement, Statement, +}; + +use itertools::Itertools; + +impl<'a> CodeGenerator<'a> { + fn visit_statement(&mut self, input: &'a Statement) -> String { + match input { + Statement::Return(stmt) => self.visit_return(stmt), + Statement::Definition(stmt) => self.visit_definition(stmt), + Statement::Assign(stmt) => self.visit_assign(stmt), + Statement::Conditional(stmt) => self.visit_conditional(stmt), + Statement::Iteration(stmt) => self.visit_iteration(stmt), + Statement::Console(stmt) => self.visit_console(stmt), + Statement::Block(stmt) => self.visit_block(stmt), + } + } + + fn visit_return(&mut self, input: &'a ReturnStatement) -> String { + let (operand, mut expression_instructions) = self.visit_expression(&input.expression); + let output_type = self.visit_type(&self.current_function.unwrap().output); + // TODO: Bytecode functions have an associated output mode. Currently defaulting to private since we do not yet support this at the Leo level. + let output_statement = format!("output {} as {}.private;", operand, output_type); + expression_instructions.push_str(&output_statement); + + expression_instructions + } + + fn visit_definition(&mut self, input: &'a DefinitionStatement) -> String { + // Note: `DefinitionStatement`s should not exist in SSA form. However, for the purposes of this + // prototype, we will need to support them. + match input.variable_names.len() == 1 { + // TODO: Is this a valid assumption? + false => unreachable!("DefinitionStatements should contain only one variable once put into SSA form"), + true => { + let (operand, expression_instructions) = self.visit_expression(&input.value); + self.variable_mapping + .insert(&input.variable_names[0].identifier, operand.clone()); + expression_instructions + } + } + } + + fn visit_assign(&mut self, input: &'a AssignStatement) -> String { + // Note: SSA form requires that a variable is assigned to only once. + // Since we do not have a compiler pass that transforms the AST into SSA form, + // we will disallow `AssignStatement`s. This will only be the case for this prototype. + unimplemented!("Code generation is not implemented for `AssignStatement`s.") + } + + fn visit_conditional(&mut self, input: &'a ConditionalStatement) -> String { + // Note: This requires that the AST is in static-single assignment form. + // It is not possible to provide an input program with a conditional statement in SSA form as + // complete SSA has different semantics from source Leo programs. + unimplemented!("Code generation is not implemented for conditional statements.") + } + + fn visit_iteration(&mut self, input: &'a IterationStatement) -> String { + unreachable!("`IterationStatement`s should not be in the AST at this phase of compilation."); + } + + fn visit_console(&mut self, input: &'a ConsoleStatement) -> String { + // `ConsoleStatement`s do not need to be included in the bytecode. + String::new() + } + + pub(crate) fn visit_block(&mut self, input: &'a Block) -> String { + // For each statement in the block, visit it and add its instructions to the list. + input + .statements + .iter() + .map(|stmt| self.visit_statement(stmt)) + .join("") + } +} diff --git a/compiler/passes/src/code_generation/visit_type.rs b/compiler/passes/src/code_generation/visit_type.rs new file mode 100644 index 0000000000..ecbdbd2264 --- /dev/null +++ b/compiler/passes/src/code_generation/visit_type.rs @@ -0,0 +1,35 @@ +// Copyright (C) 2019-2022 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 crate::CodeGenerator; + +use leo_ast::Type; + +impl<'a> CodeGenerator<'a> { + pub(crate) fn visit_type(&mut self, input: &'a Type) -> String { + match input { + Type::Address + | Type::Boolean + | Type::Field + | Type::Group + | Type::Scalar + | Type::String + | Type::IntegerType(..) => format!("{}", input), + Type::Identifier(_) => unimplemented!("Support for composite types is not yet implemented"), + Type::Err => unreachable!("Error types should not exist at this phase of compilation"), + } + } +} diff --git a/compiler/passes/src/lib.rs b/compiler/passes/src/lib.rs index 6f8bc05083..50949e1050 100644 --- a/compiler/passes/src/lib.rs +++ b/compiler/passes/src/lib.rs @@ -26,6 +26,9 @@ pub use canonicalization::*; /* pub mod import_resolution; pub use import_resolution::*; */ +pub mod code_generation; +pub use code_generation::*; + pub mod pass; pub use self::pass::*; From 472ff794a6cd024a0fc84863fe6bec30a295832b Mon Sep 17 00:00:00 2001 From: d0cd Date: Tue, 7 Jun 2022 10:01:13 -0700 Subject: [PATCH 02/43] Integrate prototype into compiler passes --- compiler/compiler/src/lib.rs | 14 ++++++++ .../passes/src/code_generation/generator.rs | 13 ++----- compiler/passes/src/code_generation/mod.rs | 15 ++++---- .../src/code_generation/visit_expressions.rs | 6 ++-- .../src/code_generation/visit_program.rs | 34 ++++++++++++++++--- .../src/code_generation/visit_statements.rs | 14 +++----- leo/commands/build.rs | 21 ++++++++++-- 7 files changed, 81 insertions(+), 36 deletions(-) diff --git a/compiler/compiler/src/lib.rs b/compiler/compiler/src/lib.rs index 40308980fd..6f907efbe1 100644 --- a/compiler/compiler/src/lib.rs +++ b/compiler/compiler/src/lib.rs @@ -135,4 +135,18 @@ impl<'a> Compiler<'a> { pub fn compile(&self) -> Result> { self.compiler_stages() } + + /// + /// Returns a compiled Leo program and prints the resulting bytecode. + /// TODO: Remove when code generation is ready to be integrated into the compiler. + /// + pub fn compile_and_generate_bytecode(&self) -> Result<(SymbolTable<'_>, String)> { + let symbol_table = CreateSymbolTable::do_pass((&self.ast, self.handler))?; + + TypeChecker::do_pass((&self.ast, &mut symbol_table.clone(), self.handler))?; + + let bytecode = CodeGenerator::do_pass((&self.ast, &self.handler))?; + + Ok((symbol_table, bytecode)) + } } diff --git a/compiler/passes/src/code_generation/generator.rs b/compiler/passes/src/code_generation/generator.rs index 1676b821b1..3c98134900 100644 --- a/compiler/passes/src/code_generation/generator.rs +++ b/compiler/passes/src/code_generation/generator.rs @@ -14,19 +14,13 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::SymbolTable; - use leo_ast::{Function, Identifier}; use leo_errors::emitter::Handler; use std::collections::HashMap; pub struct CodeGenerator<'a> { - /// Symbol table. - // TODO: Including this for now. Remove if not needed. - symbol_table: &'a mut SymbolTable<'a>, - /// Error handler. - handler: &'a Handler, + _handler: &'a Handler, /// A counter to track the next available register. pub(crate) next_register: u64, /// Reference to the current function. @@ -37,10 +31,9 @@ pub struct CodeGenerator<'a> { impl<'a> CodeGenerator<'a> { /// Initializes a new `CodeGenerator`. - pub fn new(symbol_table: &'a mut SymbolTable<'a>, handler: &'a Handler) -> Self { + pub fn new(handler: &'a Handler) -> Self { Self { - symbol_table, - handler, + _handler: handler, next_register: 0, current_function: None, variable_mapping: HashMap::new(), diff --git a/compiler/passes/src/code_generation/mod.rs b/compiler/passes/src/code_generation/mod.rs index 0cc3f1614c..92bb98dbb3 100644 --- a/compiler/passes/src/code_generation/mod.rs +++ b/compiler/passes/src/code_generation/mod.rs @@ -25,22 +25,21 @@ mod visit_statements; mod visit_type; -use crate::{Pass, SymbolTable}; +use crate::Pass; use leo_ast::Ast; use leo_errors::emitter::Handler; use leo_errors::Result; - impl<'a> Pass<'a> for CodeGenerator<'a> { - type Input = (&'a Ast, &'a mut SymbolTable<'a>, &'a Handler); - type Output = Result<()>; + type Input = (&'a Ast, &'a Handler); + type Output = Result; - fn do_pass((ast, symbol_table, handler): Self::Input) -> Self::Output { - let mut generator = Self::new(symbol_table, handler); - generator.visit_program(ast.as_repr()); + fn do_pass((ast, handler): Self::Input) -> Self::Output { + let mut generator = Self::new(handler); + let bytecode = generator.visit_program(ast.as_repr()); handler.last_err()?; - Ok(()) + Ok(bytecode) } } diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 8dd139b2d6..8c8637dfde 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -105,7 +105,7 @@ impl<'a> CodeGenerator<'a> { } fn visit_ternary(&mut self, input: &'a TernaryExpression) -> (String, String) { - let (condition_operand, mut condition_instructions) = self.visit_expression(&input.condition); + let (condition_operand, condition_instructions) = self.visit_expression(&input.condition); let (if_true_operand, if_true_instructions) = self.visit_expression(&input.if_true); let (if_false_operand, if_false_instructions) = self.visit_expression(&input.if_false); @@ -127,11 +127,11 @@ impl<'a> CodeGenerator<'a> { (destination_register, instructions) } - fn visit_call(&mut self, input: &'a CallExpression) -> (String, String) { + fn visit_call(&mut self, _input: &'a CallExpression) -> (String, String) { unreachable!("`CallExpression`s should not be in the AST at this phase of compilation.") } - fn visit_err(&mut self, input: &'a ErrExpression) -> (String, String) { + fn visit_err(&mut self, _input: &'a ErrExpression) -> (String, String) { unreachable!("`ErrExpression`s should not be in the AST at this phase of compilation.") } } diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs index 9232dcae19..f397bbdbf6 100644 --- a/compiler/passes/src/code_generation/visit_program.rs +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -19,6 +19,7 @@ use crate::CodeGenerator; use leo_ast::{Function, Program}; use itertools::Itertools; +use std::collections::HashMap; impl<'a> CodeGenerator<'a> { pub(crate) fn visit_program(&mut self, input: &'a Program) -> String { @@ -27,12 +28,37 @@ impl<'a> CodeGenerator<'a> { .functions .values() .map(|function| self.visit_function(function)) - .join("") + .join("\n") } - fn visit_function(&mut self, input: &'a Function) -> String { - let block_string = self.visit_block(&input.block); + fn visit_function(&mut self, function: &'a Function) -> String { + // Initialize the state of `self` with the appropriate values before visiting `function`. + self.next_register = 0; + self.variable_mapping = HashMap::new(); + self.current_function = Some(function); - String::new() + // Construct the header of the function. + let mut function_string = format!("function {}: ", function.identifier); + + // Construct and append the input declarations of the function. + for input in function.input.iter() { + let register_string = format!("r{}", self.next_register); + self.variable_mapping + .insert(&input.get_variable().identifier, register_string.clone()); + + let type_string = self.visit_type(&input.get_variable().type_); + function_string.push_str(&format!( + "input {} as {}.{};", + register_string, + type_string, + input.get_variable().mode() + )) + } + + // Construct and append the function body. + let block_string = self.visit_block(&function.block); + function_string.push_str(&block_string); + + function_string } } diff --git a/compiler/passes/src/code_generation/visit_statements.rs b/compiler/passes/src/code_generation/visit_statements.rs index db460d3d75..87ec83695e 100644 --- a/compiler/passes/src/code_generation/visit_statements.rs +++ b/compiler/passes/src/code_generation/visit_statements.rs @@ -61,35 +61,31 @@ impl<'a> CodeGenerator<'a> { } } - fn visit_assign(&mut self, input: &'a AssignStatement) -> String { + fn visit_assign(&mut self, _input: &'a AssignStatement) -> String { // Note: SSA form requires that a variable is assigned to only once. // Since we do not have a compiler pass that transforms the AST into SSA form, // we will disallow `AssignStatement`s. This will only be the case for this prototype. unimplemented!("Code generation is not implemented for `AssignStatement`s.") } - fn visit_conditional(&mut self, input: &'a ConditionalStatement) -> String { + fn visit_conditional(&mut self, _input: &'a ConditionalStatement) -> String { // Note: This requires that the AST is in static-single assignment form. // It is not possible to provide an input program with a conditional statement in SSA form as // complete SSA has different semantics from source Leo programs. unimplemented!("Code generation is not implemented for conditional statements.") } - fn visit_iteration(&mut self, input: &'a IterationStatement) -> String { + fn visit_iteration(&mut self, _input: &'a IterationStatement) -> String { unreachable!("`IterationStatement`s should not be in the AST at this phase of compilation."); } - fn visit_console(&mut self, input: &'a ConsoleStatement) -> String { + fn visit_console(&mut self, _input: &'a ConsoleStatement) -> String { // `ConsoleStatement`s do not need to be included in the bytecode. String::new() } pub(crate) fn visit_block(&mut self, input: &'a Block) -> String { // For each statement in the block, visit it and add its instructions to the list. - input - .statements - .iter() - .map(|stmt| self.visit_statement(stmt)) - .join("") + input.statements.iter().map(|stmt| self.visit_statement(stmt)).join("") } } diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 1808186973..2a9acd7959 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -50,6 +50,12 @@ pub struct BuildOptions { pub enable_canonicalized_ast_snapshot: bool, #[structopt(long, help = "Writes AST snapshot after the type inference phase.")] pub enable_type_inferenced_ast_snapshot: bool, + // Note: This is currently made optional since code generation is just a prototype. + #[structopt( + long, + help = "Runs the code generation stage of the compiler and prints the resulting bytecode." + )] + pub enable_code_generation: bool, } // impl From for CompilerOptions { @@ -187,8 +193,19 @@ impl Command for Build { // Compute the current program checksum let program_checksum = program.checksum()?; - // Compile the program - program.compile()?; + // Compile the program. + // TODO: Remove when code generation is ready to be integrated into the compiler. + match self.compiler_options.enable_code_generation { + false => { + program.compile()?; + } + true => { + let (_, bytecode) = program.compile_and_generate_bytecode()?; + // TODO: Remove when AVM output file format is stabilized. + tracing::info!("Printing bytecode..."); + println!("{}", bytecode); + } + } // Generate the program on the constraint system and verify correctness { From 86d7cb99ddcbf576c3225f0804b5bdad4849d00b Mon Sep 17 00:00:00 2001 From: d0cd Date: Tue, 7 Jun 2022 11:13:11 -0700 Subject: [PATCH 03/43] Prettier bytecode printing --- compiler/passes/src/code_generation/generator.rs | 5 +++-- compiler/passes/src/code_generation/visit_expressions.rs | 8 ++++---- compiler/passes/src/code_generation/visit_program.rs | 8 +++++--- compiler/passes/src/code_generation/visit_statements.rs | 4 ++-- leo/commands/build.rs | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/compiler/passes/src/code_generation/generator.rs b/compiler/passes/src/code_generation/generator.rs index 3c98134900..669ae6a90a 100644 --- a/compiler/passes/src/code_generation/generator.rs +++ b/compiler/passes/src/code_generation/generator.rs @@ -14,8 +14,9 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use leo_ast::{Function, Identifier}; +use leo_ast::Function; use leo_errors::emitter::Handler; +use leo_span::Symbol; use std::collections::HashMap; @@ -26,7 +27,7 @@ pub struct CodeGenerator<'a> { /// Reference to the current function. pub(crate) current_function: Option<&'a Function>, /// Mapping of variables to registers. - pub(crate) variable_mapping: HashMap<&'a Identifier, String>, + pub(crate) variable_mapping: HashMap<&'a Symbol, String>, } impl<'a> CodeGenerator<'a> { diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 8c8637dfde..b0d50ad845 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -39,7 +39,7 @@ impl<'a> CodeGenerator<'a> { } fn visit_identifier(&mut self, input: &'a Identifier) -> (String, String) { - (self.variable_mapping.get(input).unwrap().clone(), String::new()) + (self.variable_mapping.get(&input.name).unwrap().clone(), String::new()) } fn visit_value(&mut self, input: &'a ValueExpression) -> (String, String) { @@ -68,7 +68,7 @@ impl<'a> CodeGenerator<'a> { let destination_register = format!("r{}", self.next_register); let binary_instruction = format!( - "{} {} {} into {}", + " {} {} {} into {};\n", opcode, left_operand, right_operand, destination_register ); @@ -92,7 +92,7 @@ impl<'a> CodeGenerator<'a> { }; let destination_register = format!("r{}", self.next_register); - let unary_instruction = format!("{} {} into {};", opcode, expression_operand, destination_register); + let unary_instruction = format!(" {} {} into {};\n", opcode, expression_operand, destination_register); // Increment the register counter. self.next_register += 1; @@ -111,7 +111,7 @@ impl<'a> CodeGenerator<'a> { let destination_register = format!("r{}", self.next_register); let ternary_instruction = format!( - "ternary {} {} {} into r{};", + " ternary {} {} {} into r{};\n", condition_operand, if_true_operand, if_false_operand, destination_register ); diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs index f397bbdbf6..42472a5eb7 100644 --- a/compiler/passes/src/code_generation/visit_program.rs +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -38,17 +38,19 @@ impl<'a> CodeGenerator<'a> { self.current_function = Some(function); // Construct the header of the function. - let mut function_string = format!("function {}: ", function.identifier); + let mut function_string = format!("function {}:\n", function.identifier); // Construct and append the input declarations of the function. for input in function.input.iter() { let register_string = format!("r{}", self.next_register); + self.next_register += 1; + self.variable_mapping - .insert(&input.get_variable().identifier, register_string.clone()); + .insert(&input.get_variable().identifier.name, register_string.clone()); let type_string = self.visit_type(&input.get_variable().type_); function_string.push_str(&format!( - "input {} as {}.{};", + " input {} as {}.{};\n", register_string, type_string, input.get_variable().mode() diff --git a/compiler/passes/src/code_generation/visit_statements.rs b/compiler/passes/src/code_generation/visit_statements.rs index 87ec83695e..3203224401 100644 --- a/compiler/passes/src/code_generation/visit_statements.rs +++ b/compiler/passes/src/code_generation/visit_statements.rs @@ -40,7 +40,7 @@ impl<'a> CodeGenerator<'a> { let (operand, mut expression_instructions) = self.visit_expression(&input.expression); let output_type = self.visit_type(&self.current_function.unwrap().output); // TODO: Bytecode functions have an associated output mode. Currently defaulting to private since we do not yet support this at the Leo level. - let output_statement = format!("output {} as {}.private;", operand, output_type); + let output_statement = format!(" output {} as {}.private;\n", operand, output_type); expression_instructions.push_str(&output_statement); expression_instructions @@ -55,7 +55,7 @@ impl<'a> CodeGenerator<'a> { true => { let (operand, expression_instructions) = self.visit_expression(&input.value); self.variable_mapping - .insert(&input.variable_names[0].identifier, operand.clone()); + .insert(&input.variable_names[0].identifier.name, operand.clone()); expression_instructions } } diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 2a9acd7959..279599975a 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -202,7 +202,7 @@ impl Command for Build { true => { let (_, bytecode) = program.compile_and_generate_bytecode()?; // TODO: Remove when AVM output file format is stabilized. - tracing::info!("Printing bytecode..."); + tracing::info!("Printing bytecode...\n"); println!("{}", bytecode); } } From 88aa7c478e552c4aeeff6cdbc4f3b26794739154 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 20 Jun 2022 14:31:00 -0700 Subject: [PATCH 04/43] enable codegen --- compiler/compiler/src/compiler.rs | 26 ++++++++++------------ compiler/core/src/algorithms/poseidon.rs | 1 - examples/hello-world/inputs/hello-world.in | 1 + examples/hello-world/src/main.leo | 9 ++------ leo/commands/build.rs | 24 +++++++++++--------- 5 files changed, 28 insertions(+), 33 deletions(-) diff --git a/compiler/compiler/src/compiler.rs b/compiler/compiler/src/compiler.rs index 99d980ad03..9d95b089f2 100644 --- a/compiler/compiler/src/compiler.rs +++ b/compiler/compiler/src/compiler.rs @@ -157,20 +157,6 @@ impl<'a> Compiler<'a> { TypeChecker::do_pass((&self.ast, &mut symbol_table.clone(), self.handler)) } - /// - /// Returns a compiled Leo program and prints the resulting bytecode. - /// TODO: Remove when code generation is ready to be integrated into the compiler. - /// - pub fn compile_and_generate_bytecode(&self) -> Result<(SymbolTable<'_>, String)> { - let symbol_table = CreateSymbolTable::do_pass((&self.ast, self.handler))?; - - TypeChecker::do_pass((&self.ast, &mut symbol_table.clone(), self.handler))?; - - let bytecode = CodeGenerator::do_pass((&self.ast, &self.handler))?; - - Ok((symbol_table, bytecode)) - } - /// /// Runs the compiler stages. /// @@ -180,6 +166,18 @@ impl<'a> Compiler<'a> { Ok(st) } + /// + /// Returns a compiled Leo program and prints the resulting bytecode. + /// TODO: Remove when code generation is ready to be integrated into the compiler. + /// + pub fn compile_and_generate_bytecode(&self) -> Result<(SymbolTable<'_>, String)> { + let symbol_table = self.compiler_stages()?; + + let bytecode = CodeGenerator::do_pass((&self.ast, &self.handler))?; + + Ok((symbol_table, bytecode)) + } + /// /// Returns a compiled Leo program. /// diff --git a/compiler/core/src/algorithms/poseidon.rs b/compiler/core/src/algorithms/poseidon.rs index 41b39c1e83..0ac1268e6e 100644 --- a/compiler/core/src/algorithms/poseidon.rs +++ b/compiler/core/src/algorithms/poseidon.rs @@ -58,4 +58,3 @@ impl CoreFunction for Poseidon8Hash { Type::Field } } - diff --git a/examples/hello-world/inputs/hello-world.in b/examples/hello-world/inputs/hello-world.in index 03eacdd3ad..e555ccce2b 100644 --- a/examples/hello-world/inputs/hello-world.in +++ b/examples/hello-world/inputs/hello-world.in @@ -1,3 +1,4 @@ [main] +a: u8 = 1u8; [registers] diff --git a/examples/hello-world/src/main.leo b/examples/hello-world/src/main.leo index 33952ab765..c9f641f13d 100644 --- a/examples/hello-world/src/main.leo +++ b/examples/hello-world/src/main.leo @@ -1,8 +1,3 @@ -circuit Foo { - x: u8, - y: u8, -} - -function main(a: u8) -> field { - return BHP256::hash(a); +function main() -> u8 { + return 1u8 + 1u8; } \ No newline at end of file diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 3e7e5dc61a..20f339f805 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -165,17 +165,19 @@ impl Command for Build { // Compile the program. // TODO: Remove when code generation is ready to be integrated into the compiler. - match self.compiler_options.enable_code_generation { - false => { - program.compile()?; - } - true => { - let (_, bytecode) = program.compile_and_generate_bytecode()?; - // TODO: Remove when AVM output file format is stabilized. - tracing::info!("Printing bytecode...\n"); - println!("{}", bytecode); - } - } + // match self.compiler_options.enable_code_generation { + // false => { + // program.compile()?; + // } + // true => { + + let (_, bytecode) = program.compile_and_generate_bytecode()?; + // TODO: Remove when AVM output file format is stabilized. + tracing::info!("Printing bytecode...\n"); + println!("{}", bytecode); + + // } + // } // Generate the program on the constraint system and verify correctness { From 6366f44762e71194bbafff1a9e403018746eb604 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 20 Jun 2022 16:41:21 -0700 Subject: [PATCH 05/43] AVM evaluate wip --- Cargo.lock | 447 +++++++++++++++++++++++++++--- Cargo.toml | 8 +- compiler/compiler/src/compiler.rs | 3 +- examples/hello-world/src/main.leo | 7 +- leo/commands/build.rs | 16 +- 5 files changed, 442 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 463e23c85b..98ad9efc70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -231,6 +231,12 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf9ff0bbfd639f15c74af777d81383cf53efb7c93613f6cab67c6c11e05bbf8b" +[[package]] +name = "bech32" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5738be7561b0eeb501ef1d5c5db3f24e01ceb55fededd9b00039aada34966ad" + [[package]] name = "bincode" version = "1.3.3" @@ -713,6 +719,22 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "enum_index" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5532bdea562e7be83060c36185eecccba82fe16729d2eaad2891d65417656dd" + +[[package]] +name = "enum_index_derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ab22c8085548bf06190113dca556e149ecdbb05ae5b972a2b9899f26b944ee4" +dependencies = [ + "quote 0.3.15", + "syn 0.11.11", +] + [[package]] name = "envmnt" version = "0.8.4" @@ -1185,7 +1207,8 @@ dependencies = [ "self_update", "serde", "serde_json", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=51633e2)", + "snarkvm-bytecode", + "snarkvm-circuit", "sys-info", "test_dir", "toml", @@ -1417,6 +1440,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.40", + "quote 1.0.20", + "syn 1.0.98", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -1685,6 +1719,16 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-crate" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +dependencies = [ + "thiserror", + "toml", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1715,7 +1759,7 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid", + "unicode-xid 0.1.0", ] [[package]] @@ -1736,6 +1780,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "quote" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" + [[package]] name = "quote" version = "0.6.13" @@ -2157,13 +2207,285 @@ dependencies = [ "serde", "sha2", "smallvec", - "snarkvm-curves", - "snarkvm-fields", - "snarkvm-r1cs", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "thiserror", ] +[[package]] +name = "snarkvm-bytecode" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "enum_index", + "enum_index_derive", + "indexmap", + "nom", + "once_cell", + "paste", + "snarkvm-circuit", + "snarkvm-console-program", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-circuit" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-account", + "snarkvm-circuit-algorithms", + "snarkvm-circuit-environment", + "snarkvm-circuit-network", + "snarkvm-circuit-program", + "snarkvm-circuit-types", +] + +[[package]] +name = "snarkvm-circuit-account" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-algorithms", + "snarkvm-circuit-network", + "snarkvm-circuit-types", + "snarkvm-console-account", +] + +[[package]] +name = "snarkvm-circuit-algorithms" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-types", + "snarkvm-console-algorithms", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-circuit-environment" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "indexmap", + "itertools", + "nom", + "num-derive", + "num-traits", + "once_cell", + "rayon", + "snarkvm-circuit-environment-witness", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-circuit-environment-witness" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" + +[[package]] +name = "snarkvm-circuit-network" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-algorithms", + "snarkvm-circuit-types", + "snarkvm-console-network", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-circuit-program" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "nom", + "snarkvm-circuit-account", + "snarkvm-circuit-algorithms", + "snarkvm-circuit-network", + "snarkvm-circuit-types", + "snarkvm-console-account", + "snarkvm-console-program", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-circuit-types" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-environment", + "snarkvm-circuit-types-address", + "snarkvm-circuit-types-boolean", + "snarkvm-circuit-types-field", + "snarkvm-circuit-types-group", + "snarkvm-circuit-types-integers", + "snarkvm-circuit-types-scalar", + "snarkvm-circuit-types-string", +] + +[[package]] +name = "snarkvm-circuit-types-address" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "bech32 0.9.0", + "snarkvm-circuit-environment", + "snarkvm-circuit-types-boolean", + "snarkvm-circuit-types-field", + "snarkvm-circuit-types-group", + "snarkvm-circuit-types-scalar", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-circuit-types-boolean" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-environment", +] + +[[package]] +name = "snarkvm-circuit-types-field" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-environment", + "snarkvm-circuit-types-boolean", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-circuit-types-group" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-environment", + "snarkvm-circuit-types-boolean", + "snarkvm-circuit-types-field", + "snarkvm-circuit-types-scalar", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-circuit-types-integers" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-environment", + "snarkvm-circuit-types-boolean", + "snarkvm-circuit-types-field", +] + +[[package]] +name = "snarkvm-circuit-types-scalar" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-environment", + "snarkvm-circuit-types-boolean", + "snarkvm-circuit-types-field", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-circuit-types-string" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "snarkvm-circuit-environment", + "snarkvm-circuit-types-boolean", + "snarkvm-circuit-types-field", + "snarkvm-circuit-types-integers", +] + +[[package]] +name = "snarkvm-console-account" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "anyhow", + "base58", + "bech32 0.9.0", + "serde", + "snarkvm-console-algorithms", + "snarkvm-console-network", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-console-algorithms" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "anyhow", + "blake2s_simd", + "itertools", + "smallvec", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-console-network" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "anyhow", + "itertools", + "snarkvm-console-algorithms", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-console-program" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "anyhow", + "enum_index", + "enum_index_derive", + "itertools", + "once_cell", + "rayon", + "serde", + "serde_json", + "snarkvm-console-account", + "snarkvm-console-algorithms", + "snarkvm-console-network", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", +] + +[[package]] +name = "snarkvm-curves" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "derivative", + "rand", + "rustc_version", + "serde", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "thiserror", +] + [[package]] name = "snarkvm-curves" version = "0.7.5" @@ -2173,23 +2495,11 @@ dependencies = [ "rand", "rustc_version", "serde", - "snarkvm-fields", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "thiserror", ] -[[package]] -name = "snarkvm-derives" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=51633e2#51633e2fac247bc829bd316a93f59b6ba0759661" -dependencies = [ - "proc-macro-crate", - "proc-macro-error", - "proc-macro2 1.0.40", - "quote 1.0.20", - "syn 1.0.98", -] - [[package]] name = "snarkvm-dpc" version = "0.7.5" @@ -2197,7 +2507,7 @@ source = "git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79#85b7a790659168d6 dependencies = [ "anyhow", "base58", - "bech32", + "bech32 0.8.1", "bincode", "blake2", "derivative", @@ -2209,16 +2519,30 @@ dependencies = [ "serde", "serde_json", "snarkvm-algorithms", - "snarkvm-curves", - "snarkvm-fields", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-gadgets", "snarkvm-parameters", - "snarkvm-r1cs", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "thiserror", "time", ] +[[package]] +name = "snarkvm-fields" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "anyhow", + "derivative", + "rand", + "rayon", + "serde", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "thiserror", +] + [[package]] name = "snarkvm-fields" version = "0.7.5" @@ -2243,9 +2567,9 @@ dependencies = [ "itertools", "num-traits", "snarkvm-algorithms", - "snarkvm-curves", - "snarkvm-fields", - "snarkvm-r1cs", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "thiserror", ] @@ -2267,6 +2591,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "snarkvm-r1cs" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "anyhow", + "cfg-if", + "fxhash", + "indexmap", + "itertools", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "thiserror", +] + [[package]] name = "snarkvm-r1cs" version = "0.7.5" @@ -2277,8 +2617,8 @@ dependencies = [ "fxhash", "indexmap", "itertools", - "snarkvm-curves", - "snarkvm-fields", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "thiserror", ] @@ -2286,15 +2626,18 @@ dependencies = [ [[package]] name = "snarkvm-utilities" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=51633e2#51633e2fac247bc829bd316a93f59b6ba0759661" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" dependencies = [ + "aleo-std", "anyhow", "bincode", - "itertools", "num-bigint", + "num_cpus", "rand", + "rand_xorshift", + "rayon", "serde", - "snarkvm-derives", + "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", "thiserror", ] @@ -2312,16 +2655,28 @@ dependencies = [ "rand_xorshift", "rayon", "serde", - "snarkvm-utilities-derives", + "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "thiserror", ] +[[package]] +name = "snarkvm-utilities-derives" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro-error", + "proc-macro2 1.0.40", + "quote 1.0.20", + "syn 1.0.98", +] + [[package]] name = "snarkvm-utilities-derives" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79#85b7a790659168d693ebb93bfe49e3b8808fbb41" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro-error", "proc-macro2 1.0.40", "quote 1.0.20", @@ -2350,6 +2705,17 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "syn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" +dependencies = [ + "quote 0.3.15", + "synom", + "unicode-xid 0.0.4", +] + [[package]] name = "syn" version = "0.15.44" @@ -2358,7 +2724,7 @@ checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", - "unicode-xid", + "unicode-xid 0.1.0", ] [[package]] @@ -2372,6 +2738,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "synom" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" +dependencies = [ + "unicode-xid 0.0.4", +] + [[package]] name = "sys-info" version = "0.9.1" @@ -2679,6 +3054,12 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +[[package]] +name = "unicode-xid" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" + [[package]] name = "unicode-xid" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 9e14f1aef7..1dccf8e570 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,9 +50,13 @@ version = "1.5.3" path = "./leo/span" version = "1.5.3" -[dependencies.snarkvm-utilities] +[dependencies.snarkvm-bytecode] git = "https://github.com/AleoHQ/snarkVM.git" -rev = "51633e2" +rev = "327dd86" + +[dependencies.snarkvm-circuit] +git = "https://github.com/AleoHQ/snarkVM.git" +rev = "327dd86" [dependencies.backtrace] version = "0.3.65" diff --git a/compiler/compiler/src/compiler.rs b/compiler/compiler/src/compiler.rs index 9d95b089f2..6ad0869021 100644 --- a/compiler/compiler/src/compiler.rs +++ b/compiler/compiler/src/compiler.rs @@ -170,7 +170,8 @@ impl<'a> Compiler<'a> { /// Returns a compiled Leo program and prints the resulting bytecode. /// TODO: Remove when code generation is ready to be integrated into the compiler. /// - pub fn compile_and_generate_bytecode(&self) -> Result<(SymbolTable<'_>, String)> { + pub fn compile_and_generate_bytecode(&mut self) -> Result<(SymbolTable<'_>, String)> { + self.parse_program()?; let symbol_table = self.compiler_stages()?; let bytecode = CodeGenerator::do_pass((&self.ast, &self.handler))?; diff --git a/examples/hello-world/src/main.leo b/examples/hello-world/src/main.leo index c9f641f13d..3574c43344 100644 --- a/examples/hello-world/src/main.leo +++ b/examples/hello-world/src/main.leo @@ -1,3 +1,6 @@ -function main() -> u8 { - return 1u8 + 1u8; +function main( + public r0: field, + r1: field +) -> field { + return r0 + r1; } \ No newline at end of file diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 20f339f805..e258e8f9a3 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -25,6 +25,9 @@ use leo_package::{ source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, }; +use snarkvm_bytecode::{Identifier, Process, Program, Value}; +use snarkvm_circuit::prelude::*; + use clap::StructOpt; use tracing::span::Span; @@ -176,6 +179,17 @@ impl Command for Build { tracing::info!("Printing bytecode...\n"); println!("{}", bytecode); + { + // Initialize AVM bytecode. + Process::from_str(&bytecode); + + // Run program todo: run with real inputs. + // Run the `HelloWorld` program with the given inputs. + let first = Value::from_str("1field.public"); + let second = Value::from_str("1field.private"); + let output = Process::get_function(&Identifier::from_str("main")).unwrap().evaluate(&[first, second]); + println!("program output: {}", output.first().unwrap()); + } // } // } @@ -233,4 +247,4 @@ impl Command for Build { Ok((program.input_ast, program.ast, checksum_differs)) } -} +} \ No newline at end of file From ac73ffa952e3673452657597e8f73e3798870593 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 6 Jul 2022 10:25:00 -0700 Subject: [PATCH 06/43] update leo cli for demo --- examples/hello-world/src/main.leo | 13 ++- leo/commands/build.rs | 41 +++----- leo/commands/{unused => }/clean.rs | 15 ++- leo/commands/mod.rs | 6 +- .../src/errors/package/package_errors.rs | 26 ++++- leo/main.rs | 16 +-- leo/package/src/outputs/aleo.rs | 97 +++++++++++++++++++ leo/package/src/outputs/mod.rs | 2 + 8 files changed, 165 insertions(+), 51 deletions(-) rename leo/commands/{unused => }/clean.rs (85%) create mode 100644 leo/package/src/outputs/aleo.rs diff --git a/examples/hello-world/src/main.leo b/examples/hello-world/src/main.leo index 3574c43344..17d31d1e07 100644 --- a/examples/hello-world/src/main.leo +++ b/examples/hello-world/src/main.leo @@ -1,6 +1,9 @@ -function main( - public r0: field, - r1: field -) -> field { - return r0 + r1; +record Token { + owner: address, + balance: u64, + token_amount: u64, +} + +function main(r0: Token) -> u64 { + return r0.token_amount + r0.token_amount; } \ No newline at end of file diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 44aad2e893..6105575632 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -21,7 +21,7 @@ use leo_package::{ inputs::InputFile, // inputs::*, // outputs::CircuitFile - outputs::{ChecksumFile, OutputsDirectory, OUTPUTS_DIRECTORY_NAME}, + outputs::{AleoFile, ChecksumFile, OutputsDirectory, OUTPUTS_DIRECTORY_NAME}, source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, }; @@ -167,31 +167,22 @@ impl Command for Build { let program_checksum = program.checksum()?; // Compile the program. - // TODO: Remove when code generation is ready to be integrated into the compiler. - // match self.compiler_options.enable_code_generation { - // false => { - // program.compile()?; - // } - // true => { + { + let (_, bytecode) = program.compile_and_generate_bytecode()?; + // // Initialize AVM bytecode. + // Process::from_str(&bytecode); + // + // // Run program todo: run with real inputs. + // // Run the `HelloWorld` program with the given inputs. + // let first = Value::from_str("1field.public"); + // let second = Value::from_str("1field.private"); + // let output = Process::get_function(&Identifier::from_str("main")).unwrap().evaluate(&[first, second]); + // println!("program output: {}\n", output.first().unwrap()); - let (_, bytecode) = program.compile_and_generate_bytecode()?; - // TODO: Remove when AVM output file format is stabilized. - tracing::info!("Printing bytecode...\n"); - println!("{}", bytecode); - - // { - // // Initialize AVM bytecode. - // Process::from_str(&bytecode); - // - // // Run program todo: run with real inputs. - // // Run the `HelloWorld` program with the given inputs. - // let first = Value::from_str("1field.public"); - // let second = Value::from_str("1field.private"); - // let output = Process::get_function(&Identifier::from_str("main")).unwrap().evaluate(&[first, second]); - // println!("program output: {}\n", output.first().unwrap()); - // } - // } - // } + // Write the Aleo file to the output directory. + let aleo_file = AleoFile::new(&package_name); + aleo_file.write_to(&path, bytecode)?; + } // Generate the program on the constraint system and verify correctness { diff --git a/leo/commands/unused/clean.rs b/leo/commands/clean.rs similarity index 85% rename from leo/commands/unused/clean.rs rename to leo/commands/clean.rs index 6d70d906c2..80cfe8e90c 100644 --- a/leo/commands/unused/clean.rs +++ b/leo/commands/clean.rs @@ -15,18 +15,14 @@ // along with the Leo library. If not, see . use crate::{commands::Command, context::Context}; -use leo_compiler::OutputFile; use leo_errors::Result; -use leo_package::outputs::{ - ChecksumFile, CircuitFile, ProofFile, ProvingKeyFile, Snapshot, SnapshotFile, VerificationKeyFile, -}; +use leo_package::outputs::{AleoFile, ChecksumFile, CircuitFile, ProofFile, ProvingKeyFile, Snapshot, SnapshotFile, VerificationKeyFile}; -use structopt::StructOpt; +use clap::StructOpt; use tracing::span::Span; /// Clean outputs folder command #[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] pub struct Clean {} impl Command for Clean { @@ -45,14 +41,17 @@ impl Command for Clean { let path = context.dir()?; let package_name = context.manifest()?.get_package_name(); + // Remove the aleo file from the output directory. + AleoFile::new(&package_name).remove(&path)?; + // Remove the checksum from the output directory ChecksumFile::new(&package_name).remove(&path)?; // Remove the serialized circuit from the output directory CircuitFile::new(&package_name).remove(&path)?; - // Remove the program output file from the output directory - OutputFile::new(&package_name).remove(&path)?; + // // Remove the program output file from the output directory + // OutputFile::new(&package_name).remove(&path)?; // Remove the proving key from the output directory ProvingKeyFile::new(&package_name).remove(&path)?; diff --git a/leo/commands/mod.rs b/leo/commands/mod.rs index cd3a47eb52..b473354c32 100644 --- a/leo/commands/mod.rs +++ b/leo/commands/mod.rs @@ -23,9 +23,9 @@ use tracing::span::Span; // local program commands pub mod build; pub use build::Build; -// -// pub mod clean; -// pub use clean::Clean; + +pub mod clean; +pub use clean::Clean; // // pub mod deploy; // pub use deploy::Deploy; diff --git a/leo/errors/src/errors/package/package_errors.rs b/leo/errors/src/errors/package/package_errors.rs index b971c71f79..4fcc457583 100644 --- a/leo/errors/src/errors/package/package_errors.rs +++ b/leo/errors/src/errors/package/package_errors.rs @@ -21,8 +21,6 @@ use std::{ fmt::{Debug, Display}, }; -// todo (collin): redo these after Mazdak finishes error indexing. - create_messages!( /// PackageError enum that represents all the errors for the `leo-package` crate. PackageError, @@ -134,6 +132,14 @@ create_messages!( help: None, } + /// For when reading the aleo file failed. + @backtraced + failed_to_read_aleo_file { + args: (path: impl Debug), + msg: format!("Cannot read aleo file from the provided file path - {:?}", path), + help: None, + } + /// For when reading the checksum file failed. @backtraced failed_to_read_checksum_file { @@ -303,6 +309,22 @@ create_messages!( help: None, } + /// For when the aleo file has an IO error. + @backtraced + io_error_aleo_file { + args: (error: impl ErrorArg), + msg: format!("IO error aleo file from the provided file path - {}", error), + help: None, + } + + /// For when removing the circuit file failed. + @backtraced + failed_to_remove_aleo_file { + args: (path: impl Debug), + msg: format!("failed removing aleo file from the provided file path - {:?}", path), + help: None, + } + /// For when removing the circuit file failed. @backtraced failed_to_remove_circuit_file { diff --git a/leo/main.rs b/leo/main.rs index 9be6e49430..7705019fa8 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -24,7 +24,7 @@ pub mod updater; use commands::{ // package::{Clone, Fetch, Login, Logout, Publish}, Build, - // Clean, + Clean, Command, // Deploy, Init, Lint, New, Prove, Run, Setup, Test, Update, Watch, }; @@ -79,6 +79,12 @@ enum CommandOpts { #[structopt(flatten)] command: Build, }, + #[structopt(about = "Clean the output directory")] + Clean { + #[structopt(flatten)] + command: Clean, + }, + // // #[structopt(about = "Run a program setup")] // Setup { @@ -98,12 +104,6 @@ enum CommandOpts { // command: Run, // }, // - // #[structopt(about = "Clean the output directory")] - // Clean { - // #[structopt(flatten)] - // command: Clean, - // }, - // // #[structopt(about = "Watch for changes of Leo source files")] // Watch { // #[structopt(flatten)] @@ -233,11 +233,11 @@ fn run_with_args(opt: Opt) -> Result<()> { // CommandOpts::Init { command } => command.try_execute(context), // CommandOpts::New { command } => command.try_execute(context), CommandOpts::Build { command } => command.try_execute(context), + CommandOpts::Clean { command } => command.try_execute(context), // CommandOpts::Setup { command } => command.try_execute(context), // CommandOpts::Prove { command } => command.try_execute(context), // CommandOpts::Test { command } => command.try_execute(context), // CommandOpts::Run { command } => command.try_execute(context), - // CommandOpts::Clean { command } => command.try_execute(context), // CommandOpts::Watch { command } => command.try_execute(context), // CommandOpts::Update { command } => command.try_execute(context), // diff --git a/leo/package/src/outputs/aleo.rs b/leo/package/src/outputs/aleo.rs new file mode 100644 index 0000000000..5767734467 --- /dev/null +++ b/leo/package/src/outputs/aleo.rs @@ -0,0 +1,97 @@ +// Copyright (C) 2019-2022 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 . + +//! An Aleo file. + +use crate::outputs::OUTPUTS_DIRECTORY_NAME; +use leo_errors::{PackageError, Result}; + +use serde::Deserialize; +use std::{ + borrow::Cow, + fs::{ + File, {self}, + }, + io::Write, + path::Path, +}; + +pub static CHECKSUM_FILE_EXTENSION: &str = ".aleo"; + +#[derive(Deserialize)] +pub struct AleoFile { + pub package_name: String, +} + +impl AleoFile { + pub fn new(package_name: &str) -> Self { + Self { + package_name: package_name.to_string(), + } + } + + pub fn exists_at(&self, path: &Path) -> bool { + let path = self.setup_file_path(path); + path.exists() + } + + /// Reads the aleo from the given file path if it exists. + pub fn read_from(&self, path: &Path) -> Result { + let path = self.setup_file_path(path); + + let string = + fs::read_to_string(&path).map_err(|_| PackageError::failed_to_read_aleo_file(path.into_owned()))?; + Ok(string) + } + + /// Writes the given aleo to a file. + pub fn write_to(&self, path: &Path, aleo: String) -> Result<()> { + let path = self.setup_file_path(path); + let mut file = File::create(&path).map_err(PackageError::io_error_aleo_file)?; + + // Write program id to file. + let mut aleo_file = format!("program {};\n\n", self.package_name); + aleo_file.push_str(&aleo); + + file.write_all(aleo_file.as_bytes()) + .map_err(PackageError::io_error_aleo_file)?; + Ok(()) + } + + /// Removes the aleo file at the given path if it exists. Returns `true` on success, + /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. + pub fn remove(&self, path: &Path) -> Result { + let path = self.setup_file_path(path); + if !path.exists() { + return Ok(false); + } + + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_aleo_file(path.into_owned()))?; + Ok(true) + } + + fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { + let mut path = Cow::from(path); + if path.is_dir() { + if !path.ends_with(OUTPUTS_DIRECTORY_NAME) { + path.to_mut().push(OUTPUTS_DIRECTORY_NAME); + } + path.to_mut() + .push(format!("{}{}", self.package_name, CHECKSUM_FILE_EXTENSION)); + } + path + } +} diff --git a/leo/package/src/outputs/mod.rs b/leo/package/src/outputs/mod.rs index 9268adb8f0..07a341d1a9 100644 --- a/leo/package/src/outputs/mod.rs +++ b/leo/package/src/outputs/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 aleo; +pub use self::aleo::*; pub mod ast_snapshot; pub use self::ast_snapshot::*; From 5c8fa2bd02c5eaaee7debc33173451fe545ac0b9 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:13:07 -0700 Subject: [PATCH 07/43] update program id --- examples/hello-world/Leo.toml | 5 +---- examples/hello-world/inputs/hello-world.state | 0 examples/token/Leo.toml | 3 --- examples/token/inputs/token.state | 0 leo/package/src/outputs/aleo.rs | 2 +- leo/package/src/root/manifest.rs | 4 ---- 6 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 examples/hello-world/inputs/hello-world.state delete mode 100644 examples/token/inputs/token.state diff --git a/examples/hello-world/Leo.toml b/examples/hello-world/Leo.toml index 74750f2cfc..35c2cdb8d0 100644 --- a/examples/hello-world/Leo.toml +++ b/examples/hello-world/Leo.toml @@ -1,12 +1,9 @@ [project] name = "hello-world" version = "0.3.0" -description = "Logs hello world" +description = "A minimal token program in Leo." license = "LICENSE-MIT" [remote] author = "aleo" -[target] -curve = "bls12_377" -proving_system = "groth16" diff --git a/examples/hello-world/inputs/hello-world.state b/examples/hello-world/inputs/hello-world.state deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/examples/token/Leo.toml b/examples/token/Leo.toml index 7c114b4fd2..6e7077e6f8 100644 --- a/examples/token/Leo.toml +++ b/examples/token/Leo.toml @@ -6,6 +6,3 @@ license = "LICENSE-MIT" [remote] author = "aleo" - -[target] -proving_system = "marlin" diff --git a/examples/token/inputs/token.state b/examples/token/inputs/token.state deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/leo/package/src/outputs/aleo.rs b/leo/package/src/outputs/aleo.rs index 5767734467..91b252a0ad 100644 --- a/leo/package/src/outputs/aleo.rs +++ b/leo/package/src/outputs/aleo.rs @@ -63,7 +63,7 @@ impl AleoFile { let mut file = File::create(&path).map_err(PackageError::io_error_aleo_file)?; // Write program id to file. - let mut aleo_file = format!("program {};\n\n", self.package_name); + let mut aleo_file = format!("program {}.aleo;\n\n", self.package_name); aleo_file.push_str(&aleo); file.write_all(aleo_file.as_bytes()) diff --git a/leo/package/src/root/manifest.rs b/leo/package/src/root/manifest.rs index 40fa25ed7f..b9f4feacba 100644 --- a/leo/package/src/root/manifest.rs +++ b/leo/package/src/root/manifest.rs @@ -142,10 +142,6 @@ license = "MIT" [remote] author = "{author}" # Add your Aleo Package Manager username or team name. -[target] -curve = "bls12_377" -proving_system = "groth16" - [dependencies] # Define dependencies here in format: # name = {{ package = "package-name", author = "author", version = "version" }} From f3b87b5ccb47a6f25b11ac1187ceb12502b7babc Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 6 Jul 2022 14:36:23 -0700 Subject: [PATCH 08/43] cargo fmt --- .../src/code_generation/visit_expressions.rs | 13 ++--- .../src/code_generation/visit_program.rs | 58 +++++++++---------- .../passes/src/code_generation/visit_type.rs | 1 - leo/commands/build.rs | 2 +- leo/commands/clean.rs | 4 +- leo/main.rs | 1 - leo/package/src/outputs/aleo.rs | 4 +- 7 files changed, 39 insertions(+), 44 deletions(-) diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index c1d1a130fe..665803dcfa 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -16,7 +16,10 @@ use crate::CodeGenerator; -use leo_ast::{BinaryExpression, BinaryOperation, CallExpression, ErrExpression, Expression, Identifier, TernaryExpression, UnaryExpression, UnaryOperation, LiteralExpression, CircuitInitExpression, AccessExpression, MemberAccess}; +use leo_ast::{ + AccessExpression, BinaryExpression, BinaryOperation, CallExpression, CircuitInitExpression, ErrExpression, + Expression, Identifier, LiteralExpression, MemberAccess, TernaryExpression, UnaryExpression, UnaryOperation, +}; /// Implement the necessary methods to visit nodes in the AST. // Note: We opt for this option instead of using `Visitor` and `Director` because this pass requires @@ -184,11 +187,7 @@ impl<'a> CodeGenerator<'a> { fn visit_member_access(&mut self, input: &'a MemberAccess) -> (String, String) { let (inner_circuit, _inner_instructions) = self.visit_expression(&input.inner); - let member_access_instruction = format!( - "{}.{}", - inner_circuit, - input.name - ); + let member_access_instruction = format!("{}.{}", inner_circuit, input.name); (member_access_instruction, String::new()) } @@ -197,7 +196,7 @@ impl<'a> CodeGenerator<'a> { match input { AccessExpression::Member(access) => self.visit_member_access(access), AccessExpression::AssociatedConstant(_) => todo!(), - AccessExpression::AssociatedFunction(_) => todo!() + AccessExpression::AssociatedFunction(_) => todo!(), } } diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs index 7a6674be9b..9d2a969538 100644 --- a/compiler/passes/src/code_generation/visit_program.rs +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -26,20 +26,24 @@ impl<'a> CodeGenerator<'a> { let mut program_string = String::new(); // Visit each `Circuit` or `Record` in the Leo AST and produce a bytecode circuit. - program_string.push_str(&input - .circuits - .values() - .map(|circuit| self.visit_circuit_or_record(circuit)) - .join("\n")); + program_string.push_str( + &input + .circuits + .values() + .map(|circuit| self.visit_circuit_or_record(circuit)) + .join("\n"), + ); program_string.push_str("\n"); // Visit each `Function` in the Leo AST and produce a bytecode function. - program_string.push_str(&input - .functions - .values() - .map(|function| self.visit_function(function)) - .join("\n")); + program_string.push_str( + &input + .functions + .values() + .map(|function| self.visit_function(function)) + .join("\n"), + ); program_string } @@ -54,44 +58,39 @@ impl<'a> CodeGenerator<'a> { fn visit_circuit(&mut self, circuit: &'a Circuit) -> String { // Add private symbol to composite types. - self.composite_mapping.insert(&circuit.identifier.name, String::from("private")); // todo: private by default here. + self.composite_mapping + .insert(&circuit.identifier.name, String::from("private")); // todo: private by default here. - let mut output_string = - format!("interface {}:\n", circuit.identifier.to_string().to_lowercase()); // todo: check if this is safe from name conflicts. + let mut output_string = format!("interface {}:\n", circuit.identifier.to_string().to_lowercase()); // todo: check if this is safe from name conflicts. // Construct and append the record variables. for var in circuit.members.iter() { let (name, type_) = match var { - CircuitMember::CircuitVariable(name, type_) => (name, type_) + CircuitMember::CircuitVariable(name, type_) => (name, type_), }; - output_string.push_str(&format!( - " {} as {};\n", - name, - type_, - )) + output_string.push_str(&format!(" {} as {};\n", name, type_,)) } - output_string } fn visit_record(&mut self, record: &'a Circuit) -> String { // Add record symbol to composite types. let mut output_string = String::from("record"); - self.composite_mapping.insert(&record.identifier.name, output_string.clone()); - output_string.push_str( &format!(" {}:\n", record.identifier.to_string().to_lowercase())); // todo: check if this is safe from name conflicts. + self.composite_mapping + .insert(&record.identifier.name, output_string.clone()); + output_string.push_str(&format!(" {}:\n", record.identifier.to_string().to_lowercase())); // todo: check if this is safe from name conflicts. // Construct and append the record variables. for var in record.members.iter() { let (name, type_) = match var { - CircuitMember::CircuitVariable(name, type_) => (name, type_) + CircuitMember::CircuitVariable(name, type_) => (name, type_), }; output_string.push_str(&format!( " {} as {}.private;\n", // todo: CAUTION private record variables only. - name, - type_, + name, type_, )) } @@ -115,12 +114,9 @@ impl<'a> CodeGenerator<'a> { self.variable_mapping .insert(&input.get_variable().identifier.name, register_string.clone()); - let type_string = self.visit_type_with_visibility(&input.get_variable().type_, Some(input.get_variable().mode())); - function_string.push_str(&format!( - " input {} as {};\n", - register_string, - type_string, - )) + let type_string = + self.visit_type_with_visibility(&input.get_variable().type_, Some(input.get_variable().mode())); + function_string.push_str(&format!(" input {} as {};\n", register_string, type_string,)) } // Construct and append the function body. diff --git a/compiler/passes/src/code_generation/visit_type.rs b/compiler/passes/src/code_generation/visit_type.rs index 50ca2b9447..4a29d7e470 100644 --- a/compiler/passes/src/code_generation/visit_type.rs +++ b/compiler/passes/src/code_generation/visit_type.rs @@ -39,7 +39,6 @@ impl<'a> CodeGenerator<'a> { } } - pub(crate) fn visit_type_with_visibility(&mut self, input: &'a Type, visibility: Option) -> String { let mut return_type = self.visit_type(input); diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 6105575632..9d7b150ba2 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -238,4 +238,4 @@ impl Command for Build { Ok((program.input_ast, program.ast, checksum_differs)) } -} \ No newline at end of file +} diff --git a/leo/commands/clean.rs b/leo/commands/clean.rs index 80cfe8e90c..79b24def79 100644 --- a/leo/commands/clean.rs +++ b/leo/commands/clean.rs @@ -16,7 +16,9 @@ use crate::{commands::Command, context::Context}; use leo_errors::Result; -use leo_package::outputs::{AleoFile, ChecksumFile, CircuitFile, ProofFile, ProvingKeyFile, Snapshot, SnapshotFile, VerificationKeyFile}; +use leo_package::outputs::{ + AleoFile, ChecksumFile, CircuitFile, ProofFile, ProvingKeyFile, Snapshot, SnapshotFile, VerificationKeyFile, +}; use clap::StructOpt; use tracing::span::Span; diff --git a/leo/main.rs b/leo/main.rs index 7705019fa8..9633df3c7b 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -84,7 +84,6 @@ enum CommandOpts { #[structopt(flatten)] command: Clean, }, - // // #[structopt(about = "Run a program setup")] // Setup { diff --git a/leo/package/src/outputs/aleo.rs b/leo/package/src/outputs/aleo.rs index 91b252a0ad..de7dd56ae7 100644 --- a/leo/package/src/outputs/aleo.rs +++ b/leo/package/src/outputs/aleo.rs @@ -48,7 +48,7 @@ impl AleoFile { path.exists() } - /// Reads the aleo from the given file path if it exists. + /// Reads the aleo file from the given file path if it exists. pub fn read_from(&self, path: &Path) -> Result { let path = self.setup_file_path(path); @@ -57,7 +57,7 @@ impl AleoFile { Ok(string) } - /// Writes the given aleo to a file. + /// Writes the given aleo string to a file. pub fn write_to(&self, path: &Path, aleo: String) -> Result<()> { let path = self.setup_file_path(path); let mut file = File::create(&path).map_err(PackageError::io_error_aleo_file)?; From dc9063de5a6bd0c3f7c4bc1bad90ee91612cbaf7 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 6 Jul 2022 14:47:52 -0700 Subject: [PATCH 09/43] update snarkvm rev --- Cargo.lock | 492 +++++++++++++++++++++++--------- Cargo.toml | 8 +- compiler/parser/Cargo.toml | 2 +- leo/commands/build.rs | 2 +- tests/test-framework/Cargo.toml | 2 +- 5 files changed, 369 insertions(+), 137 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3881936d98..e38acc8a95 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -417,9 +417,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ "os_str_bytes", ] @@ -574,9 +574,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff1f980957787286a554052d03c7aee98d99cc32e09f6d45f0a814133c87978" +checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83" dependencies = [ "cfg-if", "once_cell", @@ -584,9 +584,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "5999502d32b9c48d492abe66392408144895020ec4709e549e840799f3bb74c0" dependencies = [ "generic-array", "typenum", @@ -700,9 +700,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" [[package]] name = "encode_unicode" @@ -1207,7 +1207,7 @@ dependencies = [ "self_update", "serde", "serde_json", - "snarkvm-bytecode", + "snarkvm", "snarkvm-circuit", "sys-info", "test_dir", @@ -1309,9 +1309,9 @@ dependencies = [ [[package]] name = "linked-hash-map" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "lock_api" @@ -1507,9 +1507,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "oorandom" @@ -1652,9 +1652,9 @@ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "plotters" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a" +checksum = "9428003b84df1496fb9d6eeee9c5f8145cb41ca375eb0dad204328888832811f" dependencies = [ "num-traits", "plotters-backend", @@ -1665,15 +1665,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c" +checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9" +checksum = "e0918736323d1baff32ee0eade54984f6f201ad7e97d5cfb5d6ab4a358529615" dependencies = [ "plotters-backend", ] @@ -1890,9 +1890,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.6" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", @@ -1907,9 +1907,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.26" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remove_dir_all" @@ -2065,9 +2065,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" +checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" [[package]] name = "serde" @@ -2101,9 +2101,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.81" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" dependencies = [ "indexmap", "itoa 1.0.2", @@ -2174,13 +2174,66 @@ checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" [[package]] name = "smallvec" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" dependencies = [ "serde", ] +[[package]] +name = "snarkvm" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "anyhow", + "clap 3.2.8", + "colored", + "rand", + "self_update", + "serde_json", + "snarkvm-circuit", + "snarkvm-compiler", + "snarkvm-console", + "thiserror", + "walkdir", +] + +[[package]] +name = "snarkvm-algorithms" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "blake2s_simd", + "crossbeam-channel", + "curl", + "derivative", + "digest", + "hashbrown", + "hex", + "itertools", + "lazy_static", + "num_cpus", + "once_cell", + "parking_lot", + "rand", + "rand_chacha", + "rand_core", + "rayon", + "serde", + "sha2", + "smallvec", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "thiserror", +] + [[package]] name = "snarkvm-algorithms" version = "0.7.5" @@ -2215,39 +2268,25 @@ dependencies = [ "thiserror", ] -[[package]] -name = "snarkvm-bytecode" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" -dependencies = [ - "enum_index", - "enum_index_derive", - "indexmap", - "nom", - "once_cell", - "paste", - "snarkvm-circuit", - "snarkvm-console-program", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", -] - [[package]] name = "snarkvm-circuit" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-account", "snarkvm-circuit-algorithms", + "snarkvm-circuit-collections", "snarkvm-circuit-environment", "snarkvm-circuit-network", "snarkvm-circuit-program", + "snarkvm-circuit-transition", "snarkvm-circuit-types", ] [[package]] name = "snarkvm-circuit-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-network", @@ -2258,69 +2297,86 @@ dependencies = [ [[package]] name = "snarkvm-circuit-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-types", "snarkvm-console-algorithms", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-collections" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-circuit-algorithms", + "snarkvm-circuit-types", + "snarkvm-console-collections", ] [[package]] name = "snarkvm-circuit-environment" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "indexmap", "itertools", "nom", - "num-derive", "num-traits", "once_cell", - "rayon", "snarkvm-circuit-environment-witness", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-console-network", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] [[package]] name = "snarkvm-circuit-environment-witness" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" [[package]] name = "snarkvm-circuit-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-algorithms", + "snarkvm-circuit-collections", "snarkvm-circuit-types", "snarkvm-console-network", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] [[package]] name = "snarkvm-circuit-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "nom", "snarkvm-circuit-account", - "snarkvm-circuit-algorithms", "snarkvm-circuit-network", "snarkvm-circuit-types", - "snarkvm-console-account", "snarkvm-console-program", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-transition" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-circuit-account", + "snarkvm-circuit-network", + "snarkvm-circuit-types", + "snarkvm-console-transition", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] [[package]] name = "snarkvm-circuit-types" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-address", @@ -2335,155 +2391,308 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-address" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "bech32 0.9.0", "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", "snarkvm-circuit-types-field", "snarkvm-circuit-types-group", "snarkvm-circuit-types-scalar", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-console-types-address", ] [[package]] name = "snarkvm-circuit-types-boolean" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-environment", + "snarkvm-console-types-boolean", ] [[package]] name = "snarkvm-circuit-types-field" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-console-types-field", ] [[package]] name = "snarkvm-circuit-types-group" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", "snarkvm-circuit-types-field", "snarkvm-circuit-types-scalar", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-console-types-group", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] [[package]] name = "snarkvm-circuit-types-integers" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", "snarkvm-circuit-types-field", + "snarkvm-console-types-integers", ] [[package]] name = "snarkvm-circuit-types-scalar" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", "snarkvm-circuit-types-field", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-console-types-scalar", ] [[package]] name = "snarkvm-circuit-types-string" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", "snarkvm-circuit-types-field", "snarkvm-circuit-types-integers", + "snarkvm-console-types-string", +] + +[[package]] +name = "snarkvm-compiler" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "anyhow", + "colored", + "indexmap", + "once_cell", + "parking_lot", + "paste", + "rand", + "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit", + "snarkvm-console", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "tracing", +] + +[[package]] +name = "snarkvm-console" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-account", + "snarkvm-console-algorithms", + "snarkvm-console-collections", + "snarkvm-console-network", + "snarkvm-console-program", + "snarkvm-console-transition", + "snarkvm-console-types", ] [[package]] name = "snarkvm-console-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "anyhow", "base58", - "bech32 0.9.0", - "serde", - "snarkvm-console-algorithms", "snarkvm-console-network", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-console-types", ] [[package]] name = "snarkvm-console-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "anyhow", "blake2s_simd", - "itertools", "smallvec", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-console-types", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-collections" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "aleo-std", + "rayon", + "snarkvm-console-algorithms", + "snarkvm-console-types", ] [[package]] name = "snarkvm-console-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "anyhow", "itertools", + "lazy_static", + "serde", "snarkvm-console-algorithms", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-console-collections", + "snarkvm-console-network-environment", + "snarkvm-console-types", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-network-environment" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "anyhow", + "bech32 0.9.0", + "itertools", + "nom", + "num-traits", + "rand", + "rand_xorshift", + "serde", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] [[package]] name = "snarkvm-console-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "anyhow", "enum_index", "enum_index_derive", - "itertools", + "indexmap", + "num-derive", + "num-traits", "once_cell", - "rayon", - "serde", - "serde_json", "snarkvm-console-account", - "snarkvm-console-algorithms", "snarkvm-console-network", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-console-types", +] + +[[package]] +name = "snarkvm-console-transition" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-account", + "snarkvm-console-network", + "snarkvm-console-types", +] + +[[package]] +name = "snarkvm-console-types" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-network-environment", + "snarkvm-console-types-address", + "snarkvm-console-types-boolean", + "snarkvm-console-types-field", + "snarkvm-console-types-group", + "snarkvm-console-types-integers", + "snarkvm-console-types-scalar", + "snarkvm-console-types-string", +] + +[[package]] +name = "snarkvm-console-types-address" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-network-environment", + "snarkvm-console-types-boolean", + "snarkvm-console-types-field", + "snarkvm-console-types-group", +] + +[[package]] +name = "snarkvm-console-types-boolean" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-network-environment", +] + +[[package]] +name = "snarkvm-console-types-field" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-network-environment", + "snarkvm-console-types-boolean", +] + +[[package]] +name = "snarkvm-console-types-group" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-network-environment", + "snarkvm-console-types-boolean", + "snarkvm-console-types-field", + "snarkvm-console-types-scalar", +] + +[[package]] +name = "snarkvm-console-types-integers" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-network-environment", + "snarkvm-console-types-boolean", + "snarkvm-console-types-field", +] + +[[package]] +name = "snarkvm-console-types-scalar" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-network-environment", + "snarkvm-console-types-boolean", + "snarkvm-console-types-field", +] + +[[package]] +name = "snarkvm-console-types-string" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "snarkvm-console-network-environment", + "snarkvm-console-types-boolean", + "snarkvm-console-types-field", + "snarkvm-console-types-integers", ] [[package]] name = "snarkvm-curves" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "derivative", "rand", "rustc_version", "serde", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "thiserror", ] @@ -2519,11 +2728,11 @@ dependencies = [ "rayon", "serde", "serde_json", - "snarkvm-algorithms", + "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-gadgets", - "snarkvm-parameters", + "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "thiserror", @@ -2533,14 +2742,15 @@ dependencies = [ [[package]] name = "snarkvm-fields" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "anyhow", "derivative", + "num-traits", "rand", "rayon", "serde", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "thiserror", ] @@ -2567,7 +2777,7 @@ dependencies = [ "derivative", "itertools", "num-traits", - "snarkvm-algorithms", + "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", @@ -2575,6 +2785,28 @@ dependencies = [ "thiserror", ] +[[package]] +name = "snarkvm-parameters" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "cfg-if", + "curl", + "hex", + "itertools", + "lazy_static", + "paste", + "rand", + "serde_json", + "sha2", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "thiserror", +] + [[package]] name = "snarkvm-parameters" version = "0.7.5" @@ -2587,7 +2819,7 @@ dependencies = [ "hex", "paste", "serde_json", - "snarkvm-algorithms", + "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=85b7a79)", "thiserror", ] @@ -2595,16 +2827,16 @@ dependencies = [ [[package]] name = "snarkvm-r1cs" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "anyhow", "cfg-if", "fxhash", "indexmap", "itertools", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "thiserror", ] @@ -2627,7 +2859,7 @@ dependencies = [ [[package]] name = "snarkvm-utilities" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "aleo-std", "anyhow", @@ -2638,7 +2870,7 @@ dependencies = [ "rand_xorshift", "rayon", "serde", - "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86)", + "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "thiserror", ] @@ -2663,7 +2895,7 @@ dependencies = [ [[package]] name = "snarkvm-utilities-derives" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=327dd86#327dd865154c121ce193ff21c168f76c5ee0c94c" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro-error", @@ -2852,9 +3084,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82501a4c1c0330d640a6e176a3d6a204f5ec5237aca029029d21864a902e27b0" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ "itoa 1.0.2", "libc", @@ -2963,9 +3195,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ "proc-macro2 1.0.40", "quote 1.0.20", @@ -3042,9 +3274,9 @@ checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" dependencies = [ "tinyvec", ] diff --git a/Cargo.toml b/Cargo.toml index 9546d5781e..f31da11023 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,19 +50,19 @@ version = "1.5.3" path = "./leo/span" version = "1.5.3" -[dependencies.snarkvm-bytecode] +[dependencies.snarkvm] git = "https://github.com/AleoHQ/snarkVM.git" -rev = "327dd86" +rev = "18ee4e5" [dependencies.snarkvm-circuit] git = "https://github.com/AleoHQ/snarkVM.git" -rev = "327dd86" +rev = "18ee4e5" [dependencies.backtrace] version = "0.3.65" [dependencies.clap] -version = "3.2.8" +version = "3.1" features = ["derive", "env"] [dependencies.color-backtrace] diff --git a/compiler/parser/Cargo.toml b/compiler/parser/Cargo.toml index 28f468d029..2d2a4ac6c0 100644 --- a/compiler/parser/Cargo.toml +++ b/compiler/parser/Cargo.toml @@ -62,7 +62,7 @@ features = [ "preserve_order" ] version = "0.8" [dependencies.clap] -version = "3.1.18" +version = "3.1" features = ["derive"] [features] diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 9d7b150ba2..ba6be02386 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -25,7 +25,7 @@ use leo_package::{ source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, }; -use snarkvm_bytecode::{Identifier, Process, Program, Value}; +use snarkvm::prelude::*; use snarkvm_circuit::prelude::*; use clap::StructOpt; diff --git a/tests/test-framework/Cargo.toml b/tests/test-framework/Cargo.toml index dfef7b4e56..34ef59e388 100644 --- a/tests/test-framework/Cargo.toml +++ b/tests/test-framework/Cargo.toml @@ -37,7 +37,7 @@ features = ["preserve_order"] version = "0.8" [dependencies.clap] -version = "3.2.8" +version = "3.1" features = ["derive"] [dependencies.leo-errors] From 0e5ad5e385d8905d30615b32102cb79ecfa72092 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:02:29 -0700 Subject: [PATCH 10/43] update circle ci config --- .circleci/config.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2dcc4f14ca..4f3c59a64c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ commands: jobs: check-style: docker: - - image: cimg/rust:1.59.0 + - image: cimg/rust:1.62 resource_class: xlarge steps: - checkout @@ -61,7 +61,7 @@ jobs: clippy: docker: - - image: cimg/rust:1.59.0 + - image: cimg/rust:1.62 resource_class: xlarge steps: - checkout @@ -70,13 +70,16 @@ jobs: - run: name: Clippy no_output_timeout: 35m - command: cargo clippy --all-features --examples --all --benches + command: | + rustup toolchain install nightly-x86_64-unknown-linux-gnu + cargo +nightly clippy --workspace --all-targets -- -D warnings + cargo +nightly clippy --workspace --all-targets --all-features -- -D warnings - clear_environment: cache_key: leo-clippy-cache # code-cov: # docker: - # - image: cimg/rust:1.59.0 + # - image: cimg/rust:1.62 # resource_class: xlarge # environment: # RUSTC_BOOTSTRAP: 1 @@ -118,7 +121,7 @@ jobs: leo-executable: docker: - - image: cimg/rust:1.59.0 + - image: cimg/rust:1.62 resource_class: xlarge steps: - checkout @@ -136,7 +139,7 @@ jobs: # # leo-new: # docker: -# - image: cimg/rust:1.59.0 +# - image: cimg/rust:1.62 # resource_class: xlarge # steps: # - attach_workspace: @@ -149,7 +152,7 @@ jobs: # # leo-init: # docker: -# - image: cimg/rust:1.59.0 +# - image: cimg/rust:1.62 # resource_class: xlarge # steps: # - attach_workspace: @@ -162,7 +165,7 @@ jobs: # # leo-clean: # docker: -# - image: cimg/rust:1.59.0 +# - image: cimg/rust:1.62 # resource_class: xlarge # steps: # - attach_workspace: @@ -175,7 +178,7 @@ jobs: # # leo-setup: # docker: -# - image: cimg/rust:1.59.0 +# - image: cimg/rust:1.62 # resource_class: xlarge # steps: # - attach_workspace: @@ -188,7 +191,7 @@ jobs: # leo-add-remove: # docker: - # - image: cimg/rust:1.59.0 + # - image: cimg/rust:1.62 # resource_class: xlarge # steps: # - attach_workspace: @@ -202,7 +205,7 @@ jobs: # todo (collin): uncomment after compiler refactor # leo-check-constraints: # docker: -# - image: cimg/rust:1.59.0 +# - image: cimg/rust:1.62 # resource_class: xlarge # steps: # - attach_workspace: @@ -215,7 +218,7 @@ jobs: # # leo-login-logout: # docker: -# - image: cimg/rust:1.59.0 +# - image: cimg/rust:1.62 # resource_class: xlarge # steps: # - attach_workspace: @@ -228,7 +231,7 @@ jobs: # # leo-clone: # docker: -# - image: cimg/rust:1.59.0 +# - image: cimg/rust:1.62 # resource_class: xlarge # steps: # - attach_workspace: @@ -241,7 +244,7 @@ jobs: # # leo-publish: # docker: -# - image: cimg/rust:1.59.0 +# - image: cimg/rust:1.62 # resource_class: xlarge # steps: # - attach_workspace: From 95c2f66c5adefa1a753e00f12a4ba18a2da9f523 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:49:05 -0700 Subject: [PATCH 11/43] clippy --- build.rs | 5 +++-- compiler/compiler/src/compiler.rs | 2 +- compiler/parser/src/tokenizer/mod.rs | 6 ++++-- .../src/code_generation/visit_expressions.rs | 13 ++++++------ .../src/code_generation/visit_program.rs | 20 +++++++++++-------- .../src/code_generation/visit_statements.rs | 2 +- .../passes/src/code_generation/visit_type.rs | 3 ++- leo/api.rs | 4 ---- leo/commands/build.rs | 3 +-- leo/errors/src/emitter/mod.rs | 2 +- leo/span/src/source_map.rs | 2 +- 11 files changed, 33 insertions(+), 29 deletions(-) diff --git a/build.rs b/build.rs index 2bf51d40ab..7a1eba6439 100644 --- a/build.rs +++ b/build.rs @@ -43,7 +43,8 @@ fn compare_license_text(path: &Path, expected_lines: &[&str]) { let reader = BufReader::new(file); for (i, (file_line, expected_line)) in reader.lines().zip(expected_lines).enumerate() { - let file_line = file_line.expect(&format!("Can't read line {} in file \"{}\"!", i + 1, path.display())); + let file_line = + file_line.unwrap_or_else(|_| panic!("Can't read line {} in file \"{}\"!", i + 1, path.display())); assert!( &file_line == expected_line, @@ -75,7 +76,7 @@ fn check_file_licenses>(path: P) { // Check all files with the ".rs" extension. if entry_type.is_file() && entry.file_name().to_str().unwrap_or("").ends_with(".rs") { - compare_license_text(&entry.path(), &license_lines); + compare_license_text(entry.path(), &license_lines); } } diff --git a/compiler/compiler/src/compiler.rs b/compiler/compiler/src/compiler.rs index 43fa0909f7..c77e044e5a 100644 --- a/compiler/compiler/src/compiler.rs +++ b/compiler/compiler/src/compiler.rs @@ -174,7 +174,7 @@ impl<'a> Compiler<'a> { self.parse_program()?; let symbol_table = self.compiler_stages()?; - let bytecode = CodeGenerator::do_pass((&self.ast, &self.handler))?; + let bytecode = CodeGenerator::do_pass((&self.ast, self.handler))?; Ok((symbol_table, bytecode)) } diff --git a/compiler/parser/src/tokenizer/mod.rs b/compiler/parser/src/tokenizer/mod.rs index 20e838804e..e119db2063 100644 --- a/compiler/parser/src/tokenizer/mod.rs +++ b/compiler/parser/src/tokenizer/mod.rs @@ -20,7 +20,6 @@ //! separated by whitespace. pub(crate) mod token; -use std::iter; pub use self::token::KEYWORD_TOKENS; pub(crate) use self::token::*; @@ -31,6 +30,8 @@ pub(crate) use self::lexer::*; use leo_errors::Result; use leo_span::span::{BytePos, Pos, Span}; +use std::iter; + /// Creates a new vector of spanned tokens from a given file path and source code text. pub(crate) fn tokenize(input: &str, start_pos: BytePos) -> Result> { tokenize_iter(input, start_pos).collect() @@ -65,6 +66,7 @@ pub(crate) fn tokenize_iter(mut input: &str, mut lo: BytePos) -> impl '_ + Itera mod tests { use super::*; use leo_span::{source_map::FileName, symbol::create_session_if_not_set_then}; + use std::fmt::Write as _; #[test] fn test_tokenizer() { @@ -147,7 +149,7 @@ mod tests { let tokens = tokenize(&sf.src, sf.start_pos).unwrap(); let mut output = String::new(); for SpannedToken { token, .. } in tokens.iter() { - output += &format!("{} ", token); + write!(output, "{} ", token).expect("failed to write to string"); } assert_eq!( diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 665803dcfa..92610cc9f2 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -15,12 +15,13 @@ // along with the Leo library. If not, see . use crate::CodeGenerator; - use leo_ast::{ AccessExpression, BinaryExpression, BinaryOperation, CallExpression, CircuitInitExpression, ErrExpression, Expression, Identifier, LiteralExpression, MemberAccess, TernaryExpression, UnaryExpression, UnaryOperation, }; +use std::fmt::Write as _; + /// Implement the necessary methods to visit nodes in the AST. // Note: We opt for this option instead of using `Visitor` and `Director` because this pass requires // a post-order traversal of the AST. This is sufficient since this implementation is intended to be @@ -171,12 +172,12 @@ impl<'a> CodeGenerator<'a> { }; // Push operand name to circuit init instruction. - circuit_init_instruction.push_str(&format!("{} ", operand)) + write!(circuit_init_instruction, "{} ", operand).expect("failed to write to string"); } // Push destination register to circuit init instruction. let destination_register = format!("r{}", self.next_register); - circuit_init_instruction.push_str(&format!("into {};\n", destination_register)); + writeln!(circuit_init_instruction, "into {};", destination_register).expect("failed to write to string"); instructions.push_str(&circuit_init_instruction); // Increment the register counter. @@ -205,14 +206,14 @@ impl<'a> CodeGenerator<'a> { let mut instructions = String::new(); for argument in input.arguments.iter() { - let (argument, argument_instructions) = self.visit_expression(&argument); - call_instruction.push_str(&format!("{} ", argument)); + let (argument, argument_instructions) = self.visit_expression(argument); + write!(call_instruction, "{} ", argument).expect("failed to write to string"); instructions.push_str(&argument_instructions); } // Push destination register to call instruction. let destination_register = format!("r{}", self.next_register); - call_instruction.push_str(&format!("into {};\n", destination_register)); + writeln!(call_instruction, "into {};", destination_register).expect("failed to write to string"); instructions.push_str(&call_instruction); // Increment the register counter. diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs index 9d2a969538..9e82c33390 100644 --- a/compiler/passes/src/code_generation/visit_program.rs +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -19,7 +19,7 @@ use crate::CodeGenerator; use leo_ast::{Circuit, CircuitMember, Function, Program}; use itertools::Itertools; -use std::collections::HashMap; +use std::{collections::HashMap, fmt::Write as _}; impl<'a> CodeGenerator<'a> { pub(crate) fn visit_program(&mut self, input: &'a Program) -> String { @@ -34,7 +34,7 @@ impl<'a> CodeGenerator<'a> { .join("\n"), ); - program_string.push_str("\n"); + program_string.push('\n'); // Visit each `Function` in the Leo AST and produce a bytecode function. program_string.push_str( @@ -69,7 +69,7 @@ impl<'a> CodeGenerator<'a> { CircuitMember::CircuitVariable(name, type_) => (name, type_), }; - output_string.push_str(&format!(" {} as {};\n", name, type_,)) + writeln!(output_string, " {} as {};", name, type_,).expect("failed to write to string"); } output_string @@ -80,7 +80,8 @@ impl<'a> CodeGenerator<'a> { let mut output_string = String::from("record"); self.composite_mapping .insert(&record.identifier.name, output_string.clone()); - output_string.push_str(&format!(" {}:\n", record.identifier.to_string().to_lowercase())); // todo: check if this is safe from name conflicts. + writeln!(output_string, " {}:", record.identifier.to_string().to_lowercase()) + .expect("failed to write to string"); // todo: check if this is safe from name conflicts. // Construct and append the record variables. for var in record.members.iter() { @@ -88,10 +89,12 @@ impl<'a> CodeGenerator<'a> { CircuitMember::CircuitVariable(name, type_) => (name, type_), }; - output_string.push_str(&format!( - " {} as {}.private;\n", // todo: CAUTION private record variables only. + writeln!( + output_string, + " {} as {}.private;", // todo: CAUTION private record variables only. name, type_, - )) + ) + .expect("failed to write to string"); } output_string @@ -116,7 +119,8 @@ impl<'a> CodeGenerator<'a> { let type_string = self.visit_type_with_visibility(&input.get_variable().type_, Some(input.get_variable().mode())); - function_string.push_str(&format!(" input {} as {};\n", register_string, type_string,)) + writeln!(function_string, " input {} as {};", register_string, type_string,) + .expect("failed to write to string"); } // Construct and append the function body. diff --git a/compiler/passes/src/code_generation/visit_statements.rs b/compiler/passes/src/code_generation/visit_statements.rs index 2c854ab2f9..e87733cd98 100644 --- a/compiler/passes/src/code_generation/visit_statements.rs +++ b/compiler/passes/src/code_generation/visit_statements.rs @@ -55,7 +55,7 @@ impl<'a> CodeGenerator<'a> { true => { let (operand, expression_instructions) = self.visit_expression(&input.value); self.variable_mapping - .insert(&input.variable_names[0].identifier.name, operand.clone()); + .insert(&input.variable_names[0].identifier.name, operand); expression_instructions } } diff --git a/compiler/passes/src/code_generation/visit_type.rs b/compiler/passes/src/code_generation/visit_type.rs index 4a29d7e470..eb11b51697 100644 --- a/compiler/passes/src/code_generation/visit_type.rs +++ b/compiler/passes/src/code_generation/visit_type.rs @@ -17,6 +17,7 @@ use crate::CodeGenerator; use leo_ast::{ParamMode, Type}; +use std::fmt::Write as _; impl<'a> CodeGenerator<'a> { pub(crate) fn visit_type(&mut self, input: &'a Type) -> String { @@ -47,7 +48,7 @@ impl<'a> CodeGenerator<'a> { } else { // Append `.private` to return type. // todo: CAUTION private by default. - return_type.push_str(&format!(".{}", visibility.unwrap_or(ParamMode::Private).to_string())); + write!(return_type, ".{}", visibility.unwrap_or(ParamMode::Private)).expect("failed to write to string"); } return_type diff --git a/leo/api.rs b/leo/api.rs index 7da4bf429b..65fc5cf28b 100644 --- a/leo/api.rs +++ b/leo/api.rs @@ -86,10 +86,6 @@ impl Api { } } - pub fn host(&self) -> &str { - &*self.host - } - /// Returns the token for bearer auth, otherwise None. /// The [`auth_token`] should be passed into the Api through Context. pub fn auth_token(&self) -> Option { diff --git a/leo/commands/build.rs b/leo/commands/build.rs index ba6be02386..4ef490ebce 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -25,7 +25,6 @@ use leo_package::{ source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, }; -use snarkvm::prelude::*; use snarkvm_circuit::prelude::*; use clap::StructOpt; @@ -159,7 +158,7 @@ impl Command for Build { &handler, main_file_path, output_directory, - Some(self.compiler_options.clone().into()), + Some(self.compiler_options.into()), ); program.parse_input(input_path.to_path_buf())?; diff --git a/leo/errors/src/emitter/mod.rs b/leo/errors/src/emitter/mod.rs index f08d959cbd..180f9f0afc 100644 --- a/leo/errors/src/emitter/mod.rs +++ b/leo/errors/src/emitter/mod.rs @@ -299,7 +299,7 @@ mod tests { }); assert_eq!(count_err(res.unwrap_err().to_string()), 2); - let () = Handler::with(|_| Ok(())).unwrap(); + Handler::with(|_| Ok(())).unwrap(); }) } } diff --git a/leo/span/src/source_map.rs b/leo/span/src/source_map.rs index e80088a9e4..15ee2b10d0 100644 --- a/leo/span/src/source_map.rs +++ b/leo/span/src/source_map.rs @@ -429,7 +429,7 @@ fn analyze_source_file(src: &str, source_file_start_pos: BytePos) -> (Vec 1 { From 41a5a3938060d80a415dd4db26269e31d7fb934b Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:50:33 -0700 Subject: [PATCH 12/43] circleci use 1.61 --- .circleci/config.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f3c59a64c..c16936cc9f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ commands: jobs: check-style: docker: - - image: cimg/rust:1.62 + - image: cimg/rust:1.61 resource_class: xlarge steps: - checkout @@ -61,7 +61,7 @@ jobs: clippy: docker: - - image: cimg/rust:1.62 + - image: cimg/rust:1.61 resource_class: xlarge steps: - checkout @@ -79,7 +79,7 @@ jobs: # code-cov: # docker: - # - image: cimg/rust:1.62 + # - image: cimg/rust:1.61 # resource_class: xlarge # environment: # RUSTC_BOOTSTRAP: 1 @@ -121,7 +121,7 @@ jobs: leo-executable: docker: - - image: cimg/rust:1.62 + - image: cimg/rust:1.61 resource_class: xlarge steps: - checkout @@ -139,7 +139,7 @@ jobs: # # leo-new: # docker: -# - image: cimg/rust:1.62 +# - image: cimg/rust:1.61 # resource_class: xlarge # steps: # - attach_workspace: @@ -152,7 +152,7 @@ jobs: # # leo-init: # docker: -# - image: cimg/rust:1.62 +# - image: cimg/rust:1.61 # resource_class: xlarge # steps: # - attach_workspace: @@ -165,7 +165,7 @@ jobs: # # leo-clean: # docker: -# - image: cimg/rust:1.62 +# - image: cimg/rust:1.61 # resource_class: xlarge # steps: # - attach_workspace: @@ -178,7 +178,7 @@ jobs: # # leo-setup: # docker: -# - image: cimg/rust:1.62 +# - image: cimg/rust:1.61 # resource_class: xlarge # steps: # - attach_workspace: @@ -191,7 +191,7 @@ jobs: # leo-add-remove: # docker: - # - image: cimg/rust:1.62 + # - image: cimg/rust:1.61 # resource_class: xlarge # steps: # - attach_workspace: @@ -205,7 +205,7 @@ jobs: # todo (collin): uncomment after compiler refactor # leo-check-constraints: # docker: -# - image: cimg/rust:1.62 +# - image: cimg/rust:1.61 # resource_class: xlarge # steps: # - attach_workspace: @@ -218,7 +218,7 @@ jobs: # # leo-login-logout: # docker: -# - image: cimg/rust:1.62 +# - image: cimg/rust:1.61 # resource_class: xlarge # steps: # - attach_workspace: @@ -231,7 +231,7 @@ jobs: # # leo-clone: # docker: -# - image: cimg/rust:1.62 +# - image: cimg/rust:1.61 # resource_class: xlarge # steps: # - attach_workspace: @@ -244,7 +244,7 @@ jobs: # # leo-publish: # docker: -# - image: cimg/rust:1.62 +# - image: cimg/rust:1.61 # resource_class: xlarge # steps: # - attach_workspace: From 1d0dd0781d6a2e9906e72521bf80b6f5b51ca432 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 11 Jul 2022 11:08:01 -0700 Subject: [PATCH 13/43] impl codegen for return tuples --- .../src/code_generation/visit_expressions.rs | 18 ++++++++++-- .../src/code_generation/visit_statements.rs | 13 +++++++-- .../passes/src/code_generation/visit_type.rs | 29 +++++++++++++++---- 3 files changed, 49 insertions(+), 11 deletions(-) diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 2234871186..266bd31b6d 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -221,8 +221,22 @@ impl<'a> CodeGenerator<'a> { (destination_register, instructions) } - fn visit_tuple(&mut self, _input: &'a TupleExpression) -> (String, String) { - todo!() + fn visit_tuple(&mut self, input: &'a TupleExpression) -> (String, String) { + // Need to return a single string here so we will join the tuple elements with '\n' + // and split them after this method is called. + let mut tuple_elements = String::new(); + let mut instructions = String::new(); + + input.elements + .iter() + .for_each(|element| { + let (element, element_instructions) = self.visit_expression(element); + writeln!(tuple_elements, "{}", element).expect("failed to write tuple to string"); + instructions.push_str(&element_instructions); + }); + + // CAUTION: does not return the destination_register. + (tuple_elements, instructions) } fn visit_err(&mut self, _input: &'a ErrExpression) -> (String, String) { diff --git a/compiler/passes/src/code_generation/visit_statements.rs b/compiler/passes/src/code_generation/visit_statements.rs index e87733cd98..4643a8eece 100644 --- a/compiler/passes/src/code_generation/visit_statements.rs +++ b/compiler/passes/src/code_generation/visit_statements.rs @@ -38,10 +38,17 @@ impl<'a> CodeGenerator<'a> { fn visit_return(&mut self, input: &'a ReturnStatement) -> String { let (operand, mut expression_instructions) = self.visit_expression(&input.expression); - let output_type = self.visit_type_with_visibility(&self.current_function.unwrap().output, None); + let operands = operand.split('\n').collect::>(); + let types = self.visit_return_type(&self.current_function.unwrap().output, None); // TODO: Bytecode functions have an associated output mode. Currently defaulting to private since we do not yet support this at the Leo level. - let output_statement = format!(" output {} as {};\n", operand, output_type); - expression_instructions.push_str(&output_statement); + let mut instructions = operands + .into_iter() + .zip(types.iter()) + .map(|(operand, type_)| format!(" output {} as {};", operand, type_)) + .join("\n"); + instructions.push('\n'); + + expression_instructions.push_str(&instructions); expression_instructions } diff --git a/compiler/passes/src/code_generation/visit_type.rs b/compiler/passes/src/code_generation/visit_type.rs index c48c65b849..52c874a720 100644 --- a/compiler/passes/src/code_generation/visit_type.rs +++ b/compiler/passes/src/code_generation/visit_type.rs @@ -20,7 +20,7 @@ use leo_ast::{ParamMode, Type}; use std::fmt::Write as _; impl<'a> CodeGenerator<'a> { - pub(crate) fn visit_type(&mut self, input: &'a Type) -> String { + fn visit_type(&mut self, input: &'a Type) -> String { match input { Type::Address | Type::Boolean @@ -28,8 +28,7 @@ impl<'a> CodeGenerator<'a> { | Type::Group | Type::Scalar | Type::String - | Type::IntegerType(..) - | Type::Tuple(..) => format!("{}", input), + | Type::IntegerType(..) => format!("{}", input), Type::Identifier(ident) => { if let Some(type_) = self.composite_mapping.get(&ident.name) { format!("{}.{}", ident.to_string().to_lowercase(), type_) @@ -37,21 +36,39 @@ impl<'a> CodeGenerator<'a> { unreachable!("All composite types should be known at this phase of compilation") } }, + Type::Tuple(_) => { + unreachable!("All composite types should be known at this phase of compilation") + }, Type::Err => unreachable!("Error types should not exist at this phase of compilation"), } } + pub(crate) fn visit_type_with_visibility(&mut self, input: &'a Type, visibility: Option) -> String { - let mut return_type = self.visit_type(input); + let mut type_string = self.visit_type(input); if let Type::Identifier(_) = input { // Do not append anything for record and circuit types. } else { // Append `.private` to return type. // todo: CAUTION private by default. - write!(return_type, ".{}", visibility.unwrap_or(ParamMode::Private)).expect("failed to write to string"); + write!(type_string, ".{}", visibility.unwrap_or(ParamMode::Private)).expect("failed to write to string"); } - return_type + type_string + } + + + /// Returns one or more types equal to the number of return tuple members. + pub(crate) fn visit_return_type(&mut self, input: &'a Type, visibility: Option) -> Vec { + // Handle return tuples. + if let Type::Tuple(types) = input { + types + .iter() + .map(|type_| self.visit_type_with_visibility(type_, visibility)) + .collect() + } else { + vec![self.visit_type_with_visibility(input, visibility)] + } } } From 426941ac8ccedcbb4a8fc348760bc67bbad46f5c Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 11 Jul 2022 11:56:38 -0700 Subject: [PATCH 14/43] fix associated function calls --- .../src/code_generation/visit_expressions.rs | 69 ++++++++++++++++--- .../passes/src/code_generation/visit_type.rs | 8 +-- 2 files changed, 61 insertions(+), 16 deletions(-) diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 266bd31b6d..06d4744785 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -15,7 +15,12 @@ // along with the Leo library. If not, see . use crate::CodeGenerator; -use leo_ast::{AccessExpression, BinaryExpression, BinaryOperation, CallExpression, CircuitExpression, ErrExpression, Expression, Identifier, Literal, MemberAccess, TernaryExpression, TupleExpression, UnaryExpression, UnaryOperation}; +use leo_ast::{ + AccessExpression, AssociatedFunction, BinaryExpression, BinaryOperation, CallExpression, CircuitExpression, + ErrExpression, Expression, Identifier, Literal, MemberAccess, TernaryExpression, TupleExpression, Type, + UnaryExpression, UnaryOperation, +}; +use leo_span::sym; use std::fmt::Write as _; @@ -191,12 +196,55 @@ impl<'a> CodeGenerator<'a> { (member_access_instruction, String::new()) } + // Pedersen64::hash() -> hash.ped64 + fn visit_associated_function(&mut self, input: &'a AssociatedFunction) -> (String, String) { + // Write identifier as opcode. `Pedersen64` -> `ped64`. + let symbol: &str = if let Type::Identifier(identifier) = input.ty { + match identifier.name { + sym::BHP256 => "bhp256", + sym::BHP512 => "bhp512", + sym::BHP768 => "bhp768", + sym::BHP1024 => "bhp1024", + sym::Pedersen64 => "ped64", + sym::Pedersen128 => "ped128", + sym::Poseidon2 => "psd2", + sym::Poseidon4 => "psd4", + sym::Poseidon8 => "psd8", + _ => unreachable!("All core circuit function calls should be known at this time."), + } + } else { + unreachable!("All core circuits should be known at this time.") + }; + + // Construct associated function call. + let mut associated_function_call = format!(" {}.{} ", input.name, symbol); + let mut instructions = String::new(); + + // Visit each function argument and accumulate instructions from expressions. + for arg in input.args.iter() { + let (arg_string, arg_instructions) = self.visit_expression(arg); + write!(associated_function_call, "{} ", arg_string).expect("failed to write associated function argument"); + instructions.push_str(&arg_instructions); + } + + // Push destination register to associated function call instruction. + let destination_register = format!("r{}", self.next_register); + writeln!(associated_function_call, "into {};", destination_register) + .expect("failed to write dest register for associated function"); + instructions.push_str(&associated_function_call); + + // Increment the register counter. + self.next_register += 1; + + (destination_register, instructions) + } + fn visit_access(&mut self, input: &'a AccessExpression) -> (String, String) { match input { AccessExpression::Member(access) => self.visit_member_access(access), - AccessExpression::AssociatedConstant(_) => todo!(), - AccessExpression::AssociatedFunction(_) => todo!(), - AccessExpression::Tuple(_) => todo!(), + AccessExpression::AssociatedConstant(_) => todo!(), // Associated constants are not supported in AVM yet. + AccessExpression::AssociatedFunction(function) => self.visit_associated_function(function), + AccessExpression::Tuple(_) => todo!(), // Tuples are not supported in AVM yet. } } @@ -227,13 +275,12 @@ impl<'a> CodeGenerator<'a> { let mut tuple_elements = String::new(); let mut instructions = String::new(); - input.elements - .iter() - .for_each(|element| { - let (element, element_instructions) = self.visit_expression(element); - writeln!(tuple_elements, "{}", element).expect("failed to write tuple to string"); - instructions.push_str(&element_instructions); - }); + // Visit each tuple element and accumulate instructions from expressions. + for element in input.elements.iter() { + let (element, element_instructions) = self.visit_expression(element); + writeln!(tuple_elements, "{}", element).expect("failed to write tuple to string"); + instructions.push_str(&element_instructions); + } // CAUTION: does not return the destination_register. (tuple_elements, instructions) diff --git a/compiler/passes/src/code_generation/visit_type.rs b/compiler/passes/src/code_generation/visit_type.rs index 52c874a720..0558cc9530 100644 --- a/compiler/passes/src/code_generation/visit_type.rs +++ b/compiler/passes/src/code_generation/visit_type.rs @@ -35,15 +35,14 @@ impl<'a> CodeGenerator<'a> { } else { unreachable!("All composite types should be known at this phase of compilation") } - }, + } Type::Tuple(_) => { unreachable!("All composite types should be known at this phase of compilation") - }, + } Type::Err => unreachable!("Error types should not exist at this phase of compilation"), } } - pub(crate) fn visit_type_with_visibility(&mut self, input: &'a Type, visibility: Option) -> String { let mut type_string = self.visit_type(input); @@ -58,8 +57,7 @@ impl<'a> CodeGenerator<'a> { type_string } - - /// Returns one or more types equal to the number of return tuple members. + /// Returns one or more types equal to the number of return tuple members. pub(crate) fn visit_return_type(&mut self, input: &'a Type, visibility: Option) -> Vec { // Handle return tuples. if let Type::Tuple(types) = input { From 608d29a81cc737957c1e93deab112c7629cabdbc Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 11 Jul 2022 11:58:31 -0700 Subject: [PATCH 15/43] clippy --- compiler/passes/src/code_generation/visit_statements.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/passes/src/code_generation/visit_statements.rs b/compiler/passes/src/code_generation/visit_statements.rs index 4643a8eece..777243c558 100644 --- a/compiler/passes/src/code_generation/visit_statements.rs +++ b/compiler/passes/src/code_generation/visit_statements.rs @@ -38,10 +38,10 @@ impl<'a> CodeGenerator<'a> { fn visit_return(&mut self, input: &'a ReturnStatement) -> String { let (operand, mut expression_instructions) = self.visit_expression(&input.expression); - let operands = operand.split('\n').collect::>(); let types = self.visit_return_type(&self.current_function.unwrap().output, None); // TODO: Bytecode functions have an associated output mode. Currently defaulting to private since we do not yet support this at the Leo level. - let mut instructions = operands + let mut instructions = operand + .split('\n') .into_iter() .zip(types.iter()) .map(|(operand, type_)| format!(" output {} as {};", operand, type_)) From 616a2e944d050322dc6ae0928a163318c711b001 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 11 Jul 2022 12:06:51 -0700 Subject: [PATCH 16/43] impl .aleo program id --- leo/commands/build.rs | 2 +- leo/commands/clean.rs | 2 +- leo/package/src/outputs/aleo.rs | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 4ef490ebce..ec76c446a2 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -179,7 +179,7 @@ impl Command for Build { // println!("program output: {}\n", output.first().unwrap()); // Write the Aleo file to the output directory. - let aleo_file = AleoFile::new(&package_name); + let aleo_file = AleoFile::new(&package_name, "aleo"); // Specifies `.aleo` in `program foo.aleo;` identifier. aleo_file.write_to(&path, bytecode)?; } diff --git a/leo/commands/clean.rs b/leo/commands/clean.rs index 79b24def79..4eb3e7bb4a 100644 --- a/leo/commands/clean.rs +++ b/leo/commands/clean.rs @@ -44,7 +44,7 @@ impl Command for Clean { let package_name = context.manifest()?.get_package_name(); // Remove the aleo file from the output directory. - AleoFile::new(&package_name).remove(&path)?; + AleoFile::new(&package_name, "aleo").remove(&path)?; // Remove the checksum from the output directory ChecksumFile::new(&package_name).remove(&path)?; diff --git a/leo/package/src/outputs/aleo.rs b/leo/package/src/outputs/aleo.rs index de7dd56ae7..fa5a9020cf 100644 --- a/leo/package/src/outputs/aleo.rs +++ b/leo/package/src/outputs/aleo.rs @@ -34,12 +34,14 @@ pub static CHECKSUM_FILE_EXTENSION: &str = ".aleo"; #[derive(Deserialize)] pub struct AleoFile { pub package_name: String, + pub network: String, } impl AleoFile { - pub fn new(package_name: &str) -> Self { + pub fn new(package_name: &str, network: &str) -> Self { Self { package_name: package_name.to_string(), + network: network.to_string(), } } @@ -58,13 +60,13 @@ impl AleoFile { } /// Writes the given aleo string to a file. - pub fn write_to(&self, path: &Path, aleo: String) -> Result<()> { + pub fn write_to(&self, path: &Path, program_string: String) -> Result<()> { let path = self.setup_file_path(path); let mut file = File::create(&path).map_err(PackageError::io_error_aleo_file)?; // Write program id to file. - let mut aleo_file = format!("program {}.aleo;\n\n", self.package_name); - aleo_file.push_str(&aleo); + let mut aleo_file = format!("program {}.{};\n\n", self.package_name, self.network); + aleo_file.push_str(&program_string); file.write_all(aleo_file.as_bytes()) .map_err(PackageError::io_error_aleo_file)?; From c719843223596514f3701fda80e85c03651fbaea Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 11 Jul 2022 14:10:22 -0700 Subject: [PATCH 17/43] impl program json, aleo build and run working --- Cargo.lock | 33 +++--- Cargo.toml | 4 - compiler/ast/Cargo.toml | 2 +- compiler/core/Cargo.toml | 4 +- compiler/parser/Cargo.toml | 2 +- compiler/passes/Cargo.toml | 4 +- examples/hello-world/src/main.leo | 9 -- examples/{hello-world => hello}/.gitignore | 0 examples/{hello-world => hello}/Leo.toml | 2 +- examples/{hello-world => hello}/README.md | 0 .../inputs/hello-world.in | 0 examples/hello/src/main.leo | 3 + leo/commands/build.rs | 12 +- leo/package/src/outputs/aleo.rs | 11 +- leo/package/src/outputs/mod.rs | 3 + leo/package/src/outputs/program_json.rs | 104 ++++++++++++++++++ leo/span/Cargo.toml | 20 +++- 17 files changed, 166 insertions(+), 47 deletions(-) delete mode 100644 examples/hello-world/src/main.leo rename examples/{hello-world => hello}/.gitignore (100%) rename examples/{hello-world => hello}/Leo.toml (85%) rename examples/{hello-world => hello}/README.md (100%) rename examples/{hello-world => hello}/inputs/hello-world.in (100%) create mode 100644 examples/hello/src/main.leo create mode 100644 leo/package/src/outputs/program_json.rs diff --git a/Cargo.lock b/Cargo.lock index 3060bf03f9..7df163b8af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -590,9 +590,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5999502d32b9c48d492abe66392408144895020ec4709e549e840799f3bb74c0" +checksum = "2ccfd8c0ee4cce11e45b3fd6f9d5e69e0cc62912aa6a0cb1bf4617b0eba5a12f" dependencies = [ "generic-array", "typenum", @@ -927,9 +927,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hashbrown" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" +checksum = "607c8a29735385251a339424dd462993c0fed8fa09d378f259377df08c126022" dependencies = [ "ahash", ] @@ -1000,9 +1000,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.19" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ "bytes", "futures-channel", @@ -1214,7 +1214,6 @@ dependencies = [ "serde", "serde_json", "snarkvm", - "snarkvm-circuit", "sys-info", "test_dir", "toml", @@ -1531,9 +1530,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.40" +version = "0.10.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" +checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0" dependencies = [ "bitflags", "cfg-if", @@ -1563,9 +1562,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.74" +version = "0.9.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" +checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f" dependencies = [ "autocfg", "cc", @@ -2077,9 +2076,9 @@ checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" [[package]] name = "serde" -version = "1.0.138" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1578c6245786b9d168c5447eeacfb96856573ca56c9d68fdcf394be134882a47" +checksum = "0171ebb889e45aa68b44aee0859b3eede84c6f5f5c228e6f140c0b2a0a46cad6" dependencies = [ "serde_derive", ] @@ -2096,9 +2095,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.138" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023e9b1467aef8a10fb88f25611870ada9800ef7e22afce356bb0d2387b6f27c" +checksum = "dc1d3230c1de7932af58ad8ffbe1d784bd55efd5a9d84ac24f69c72d83543dfb" dependencies = [ "proc-macro2 1.0.40", "quote 1.0.20", @@ -2131,9 +2130,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.24" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707d15895415db6628332b737c838b88c598522e4dc70647e59b72312924aebc" +checksum = "1ec0091e1f5aa338283ce049bd9dfefd55e1f168ac233e85c1ffe0038fb48cbe" dependencies = [ "indexmap", "ryu", diff --git a/Cargo.toml b/Cargo.toml index 42af0ce34e..04050415ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,10 +54,6 @@ version = "1.5.3" git = "https://github.com/AleoHQ/snarkVM.git" rev = "18ee4e5" -[dependencies.snarkvm-circuit] -git = "https://github.com/AleoHQ/snarkVM.git" -rev = "18ee4e5" - [dependencies.backtrace] version = "0.3.66" diff --git a/compiler/ast/Cargo.toml b/compiler/ast/Cargo.toml index fcfe9e4632..b6cc017397 100644 --- a/compiler/ast/Cargo.toml +++ b/compiler/ast/Cargo.toml @@ -27,7 +27,7 @@ path = "../../leo/span" version = "1.5.3" [dependencies.indexmap] -version = "1.8.0" +version = "1.9" features = [ "serde-1" ] [dependencies.serde] diff --git a/compiler/core/Cargo.toml b/compiler/core/Cargo.toml index 51aa9c69a2..f45e42fbd5 100644 --- a/compiler/core/Cargo.toml +++ b/compiler/core/Cargo.toml @@ -32,5 +32,5 @@ version = "1.5.3" path = "../../leo/span" version = "1.5.3" -[dependencies] -indexmap = "1.7.0" \ No newline at end of file +[dependencies.indexmap] +version = "1.9" \ No newline at end of file diff --git a/compiler/parser/Cargo.toml b/compiler/parser/Cargo.toml index 2d2a4ac6c0..5d55d72dcc 100644 --- a/compiler/parser/Cargo.toml +++ b/compiler/parser/Cargo.toml @@ -35,7 +35,7 @@ git = "https://github.com/AleoHQ/snarkVM.git" rev = "85b7a79" [dependencies.indexmap] -version = "1.8" +version = "1.9" [dependencies.lazy_static] version = "1.3.0" diff --git a/compiler/passes/Cargo.toml b/compiler/passes/Cargo.toml index 7f8f5fdd93..b590a178cf 100644 --- a/compiler/passes/Cargo.toml +++ b/compiler/passes/Cargo.toml @@ -21,8 +21,8 @@ rust-version = "1.56.1" [lib] path = "src/lib.rs" -[dependencies] -indexmap = "1.7.0" +[dependencies.indexmap] +version = "1.9" [dependencies.leo-ast] path = "../ast" diff --git a/examples/hello-world/src/main.leo b/examples/hello-world/src/main.leo deleted file mode 100644 index 17d31d1e07..0000000000 --- a/examples/hello-world/src/main.leo +++ /dev/null @@ -1,9 +0,0 @@ -record Token { - owner: address, - balance: u64, - token_amount: u64, -} - -function main(r0: Token) -> u64 { - return r0.token_amount + r0.token_amount; -} \ No newline at end of file diff --git a/examples/hello-world/.gitignore b/examples/hello/.gitignore similarity index 100% rename from examples/hello-world/.gitignore rename to examples/hello/.gitignore diff --git a/examples/hello-world/Leo.toml b/examples/hello/Leo.toml similarity index 85% rename from examples/hello-world/Leo.toml rename to examples/hello/Leo.toml index 35c2cdb8d0..1f48853e3f 100644 --- a/examples/hello-world/Leo.toml +++ b/examples/hello/Leo.toml @@ -1,5 +1,5 @@ [project] -name = "hello-world" +name = "hello" version = "0.3.0" description = "A minimal token program in Leo." license = "LICENSE-MIT" diff --git a/examples/hello-world/README.md b/examples/hello/README.md similarity index 100% rename from examples/hello-world/README.md rename to examples/hello/README.md diff --git a/examples/hello-world/inputs/hello-world.in b/examples/hello/inputs/hello-world.in similarity index 100% rename from examples/hello-world/inputs/hello-world.in rename to examples/hello/inputs/hello-world.in diff --git a/examples/hello/src/main.leo b/examples/hello/src/main.leo new file mode 100644 index 0000000000..fe0b6852aa --- /dev/null +++ b/examples/hello/src/main.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32) -> u32 { + return a + b; +} \ No newline at end of file diff --git a/leo/commands/build.rs b/leo/commands/build.rs index ec76c446a2..b7ddd0dff4 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -25,10 +25,9 @@ use leo_package::{ source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, }; -use snarkvm_circuit::prelude::*; - use clap::StructOpt; use tracing::span::Span; +use leo_package::outputs::ProgramJson; /// Compiler Options wrapper for Build command. Also used by other commands which /// require Build command output as their input. @@ -181,6 +180,15 @@ impl Command for Build { // Write the Aleo file to the output directory. let aleo_file = AleoFile::new(&package_name, "aleo"); // Specifies `.aleo` in `program foo.aleo;` identifier. aleo_file.write_to(&path, bytecode)?; + + // Write the program.json file to the output directory. + let program_file = ProgramJson::new( + aleo_file.program_id(), + "0.0.0".to_string(), + "".to_string(), + "MIT".to_string(), + ); + program_file.write_to(&path)?; } // Generate the program on the constraint system and verify correctness diff --git a/leo/package/src/outputs/aleo.rs b/leo/package/src/outputs/aleo.rs index fa5a9020cf..26cb65c726 100644 --- a/leo/package/src/outputs/aleo.rs +++ b/leo/package/src/outputs/aleo.rs @@ -29,7 +29,7 @@ use std::{ path::Path, }; -pub static CHECKSUM_FILE_EXTENSION: &str = ".aleo"; +pub static MAIN_ALEO_FILE_NAME: &str = "main.aleo"; #[derive(Deserialize)] pub struct AleoFile { @@ -65,7 +65,7 @@ impl AleoFile { let mut file = File::create(&path).map_err(PackageError::io_error_aleo_file)?; // Write program id to file. - let mut aleo_file = format!("program {}.{};\n\n", self.package_name, self.network); + let mut aleo_file = format!("program {}.{};\n", self.package_name, self.network); aleo_file.push_str(&program_string); file.write_all(aleo_file.as_bytes()) @@ -92,8 +92,13 @@ impl AleoFile { path.to_mut().push(OUTPUTS_DIRECTORY_NAME); } path.to_mut() - .push(format!("{}{}", self.package_name, CHECKSUM_FILE_EXTENSION)); + .push(MAIN_ALEO_FILE_NAME); } path } + + /// Returns the program id as a string. + pub fn program_id(&self) -> String { + format!("{}.{}", self.package_name, self.network) + } } diff --git a/leo/package/src/outputs/mod.rs b/leo/package/src/outputs/mod.rs index 07a341d1a9..fccdf36e99 100644 --- a/leo/package/src/outputs/mod.rs +++ b/leo/package/src/outputs/mod.rs @@ -28,6 +28,9 @@ pub use self::checksum::*; pub mod directory; pub use directory::*; +pub mod program_json; +pub use program_json::*; + pub mod proof; pub use self::proof::*; diff --git a/leo/package/src/outputs/program_json.rs b/leo/package/src/outputs/program_json.rs new file mode 100644 index 0000000000..1c28beb799 --- /dev/null +++ b/leo/package/src/outputs/program_json.rs @@ -0,0 +1,104 @@ +// Copyright (C) 2019-2022 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 program JSON file for an aleo file. + +use crate::outputs::OUTPUTS_DIRECTORY_NAME; +use leo_errors::{PackageError, Result}; + +use serde::Deserialize; +use std::{ + borrow::Cow, + fs::{ + File, {self}, + }, + io::Write, + path::Path, +}; + +pub static PROGRAM_JSON_FILE_NAME: &str = "program.json"; + +#[derive(Deserialize)] +pub struct ProgramJson { + pub program: String, + pub version: String, + pub description: String, + pub license: String, +} + +impl ProgramJson { + pub fn new( + program: String, + version: String, + description: String, + license: String, + ) -> Self { + Self { + program, + version, + description, + license, + } + } + + /// Writes the given program id to a program json file. + pub fn write_to(&self, path: &Path) -> Result<()> { + let path = self.setup_file_path(path); + let mut file = File::create(&path).map_err(PackageError::io_error_aleo_file)?; + + // Write program json file. + let aleo_file = format!( + r#"{{ + "program": "{program}", + "version": "{version}", + "description": "{description}", + "license": "{license}" +}}"#, + program = self.program, + version = self.version, + description = self.description, + license = self.license, + ); + + file.write_all(aleo_file.as_bytes()) + .map_err(PackageError::io_error_aleo_file)?; + Ok(()) + } + + /// Removes the program json file at the given path if it exists. Returns `true` on success, + /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. + pub fn remove(&self, path: &Path) -> Result { + let path = self.setup_file_path(path); + if !path.exists() { + return Ok(false); + } + + fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_aleo_file(path.into_owned()))?; + Ok(true) + } + + fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { + let mut path = Cow::from(path); + if path.is_dir() { + if !path.ends_with(OUTPUTS_DIRECTORY_NAME) { + path.to_mut().push(OUTPUTS_DIRECTORY_NAME); + } + path.to_mut() + .push(PROGRAM_JSON_FILE_NAME); + } + path + } +} diff --git a/leo/span/Cargo.toml b/leo/span/Cargo.toml index 2cccb5612d..50533d4c21 100644 --- a/leo/span/Cargo.toml +++ b/leo/span/Cargo.toml @@ -18,8 +18,18 @@ license = "GPL-3.0" edition = "2021" rust-version = "1.56.1" -[dependencies] -fxhash = "0.2.1" -indexmap = { version = "1.8", features = ["serde"] } -serde = { version = "1.0.133", features = [ "derive", "rc" ] } -scoped-tls = { version = "1.0.0" } +[dependencies.indexmap] +version = "1.9" +features = ["serde"] + +[dependencies.fxhash] +version = "0.2.1" + +[dependencies.scoped-tls] +version = "1.0.0" + +[dependencies.serde] +version = "1.0.133" +features = ["derive", "rc"] + + From e013b888116876b9021483757305d446704ab001 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 11 Jul 2022 21:09:27 -0700 Subject: [PATCH 18/43] stabilize leo build --- Cargo.lock | 870 +++++++++++++++--- Cargo.toml | 6 + compiler/ast/src/lib.rs | 12 + compiler/ast/src/passes/reconstructor.rs | 1 + compiler/ast/src/program.rs | 23 +- compiler/compiler/src/compiler.rs | 16 +- compiler/compiler/src/test.rs | 2 + compiler/parser/src/parser/file.rs | 1 + .../src/code_generation/visit_program.rs | 2 +- examples/hello/.gitignore | 1 + examples/hello/main.aleo | 7 + examples/hello/program.json | 6 + leo/commands/build.rs | 83 +- leo/commands/clean.rs | 30 +- leo/package/src/outputs/aleo.rs | 104 --- leo/package/src/outputs/mod.rs | 7 +- leo/package/src/outputs/program_json.rs | 104 --- tests/test-framework/benches/leo_compiler.rs | 2 + 18 files changed, 850 insertions(+), 427 deletions(-) create mode 100644 examples/hello/main.aleo create mode 100644 examples/hello/program.json delete mode 100644 leo/package/src/outputs/aleo.rs delete mode 100644 leo/package/src/outputs/program_json.rs diff --git a/Cargo.lock b/Cargo.lock index 7df163b8af..03a4fd6d06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -68,6 +68,21 @@ dependencies = [ "memchr", ] +[[package]] +name = "aleo" +version = "0.2.0" +source = "git+https://github.com/AleoHQ/aleo.git?rev=03b12ff#03b12fffe1e276c845d15ef6c3264aa6f9e9a731" +dependencies = [ + "anyhow", + "clap 3.2.8", + "colored", + "rand", + "rand_chacha", + "self_update 0.28.0", + "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "thiserror", +] + [[package]] name = "aleo-std" version = "0.1.14" @@ -1192,6 +1207,7 @@ dependencies = [ name = "leo-lang" version = "1.5.3" dependencies = [ + "aleo", "ansi_term", "assert_cmd", "backtrace", @@ -1210,10 +1226,10 @@ dependencies = [ "rand_core", "reqwest", "rusty-hook", - "self_update", + "self_update 0.30.0", "serde", "serde_json", - "snarkvm", + "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "sys-info", "test_dir", "toml", @@ -1637,6 +1653,15 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + [[package]] name = "pin-project-lite" version = "0.2.9" @@ -1777,6 +1802,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "quick-xml" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26aab6b48e2590e4a64d1ed808749ba06257882b461d01ca71baeb747074a6dd" +dependencies = [ + "memchr", +] + [[package]] name = "quick-xml" version = "0.22.0" @@ -1975,7 +2009,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver", + "semver 1.0.12", ] [[package]] @@ -2050,6 +2084,23 @@ dependencies = [ "libc", ] +[[package]] +name = "self_update" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bc3e89793fe56c82104ddc103c998e4e94713cb975202207829e61031eb4be6" +dependencies = [ + "hyper", + "indicatif", + "log", + "quick-xml 0.20.0", + "regex", + "reqwest", + "semver 0.11.0", + "serde_json", + "tempfile", +] + [[package]] name = "self_update" version = "0.30.0" @@ -2059,21 +2110,39 @@ dependencies = [ "hyper", "indicatif", "log", - "quick-xml", + "quick-xml 0.22.0", "regex", "reqwest", - "semver", + "semver 1.0.12", "serde_json", "tempfile", "zip", ] +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "serde" version = "1.0.139" @@ -2195,11 +2264,29 @@ dependencies = [ "clap 3.2.8", "colored", "rand", - "self_update", + "self_update 0.30.0", "serde_json", - "snarkvm-circuit", - "snarkvm-compiler", - "snarkvm-console", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "thiserror", + "walkdir", +] + +[[package]] +name = "snarkvm" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "anyhow", + "clap 3.2.8", + "colored", + "rand", + "self_update 0.30.0", + "serde_json", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", "thiserror", "walkdir", ] @@ -2273,19 +2360,68 @@ dependencies = [ "thiserror", ] +[[package]] +name = "snarkvm-algorithms" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "blake2s_simd", + "crossbeam-channel", + "curl", + "derivative", + "digest", + "hashbrown", + "hex", + "itertools", + "lazy_static", + "num_cpus", + "once_cell", + "parking_lot", + "rand", + "rand_chacha", + "rand_core", + "rayon", + "serde", + "sha2", + "smallvec", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "thiserror", +] + [[package]] name = "snarkvm-circuit" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-account", - "snarkvm-circuit-algorithms", - "snarkvm-circuit-collections", - "snarkvm-circuit-environment", - "snarkvm-circuit-network", - "snarkvm-circuit-program", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-circuit-transition", - "snarkvm-circuit-types", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2293,10 +2429,21 @@ name = "snarkvm-circuit-account" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-algorithms", - "snarkvm-circuit-network", - "snarkvm-circuit-types", - "snarkvm-console-account", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-account" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2304,19 +2451,39 @@ name = "snarkvm-circuit-algorithms" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-types", - "snarkvm-console-algorithms", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] +[[package]] +name = "snarkvm-circuit-algorithms" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", +] + [[package]] name = "snarkvm-circuit-collections" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-algorithms", - "snarkvm-circuit-types", - "snarkvm-console-collections", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-collections" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2329,51 +2496,98 @@ dependencies = [ "nom", "num-traits", "once_cell", - "snarkvm-circuit-environment-witness", - "snarkvm-console-network", + "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] +[[package]] +name = "snarkvm-circuit-environment" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "indexmap", + "itertools", + "nom", + "num-traits", + "once_cell", + "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", +] + [[package]] name = "snarkvm-circuit-environment-witness" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +[[package]] +name = "snarkvm-circuit-environment-witness" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" + [[package]] name = "snarkvm-circuit-network" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-algorithms", - "snarkvm-circuit-collections", - "snarkvm-circuit-types", - "snarkvm-console-network", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] +[[package]] +name = "snarkvm-circuit-network" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", +] + [[package]] name = "snarkvm-circuit-program" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-account", - "snarkvm-circuit-network", - "snarkvm-circuit-types", - "snarkvm-console-program", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] +[[package]] +name = "snarkvm-circuit-program" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", +] + [[package]] name = "snarkvm-circuit-transition" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-account", - "snarkvm-circuit-network", - "snarkvm-circuit-types", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-console-transition", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] @@ -2383,14 +2597,29 @@ name = "snarkvm-circuit-types" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-environment", - "snarkvm-circuit-types-address", - "snarkvm-circuit-types-boolean", - "snarkvm-circuit-types-field", - "snarkvm-circuit-types-group", - "snarkvm-circuit-types-integers", - "snarkvm-circuit-types-scalar", - "snarkvm-circuit-types-string", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-types" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2398,12 +2627,25 @@ name = "snarkvm-circuit-types-address" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-environment", - "snarkvm-circuit-types-boolean", - "snarkvm-circuit-types-field", - "snarkvm-circuit-types-group", - "snarkvm-circuit-types-scalar", - "snarkvm-console-types-address", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-types-address" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2411,8 +2653,17 @@ name = "snarkvm-circuit-types-boolean" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-environment", - "snarkvm-console-types-boolean", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-types-boolean" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2420,9 +2671,19 @@ name = "snarkvm-circuit-types-field" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-environment", - "snarkvm-circuit-types-boolean", - "snarkvm-console-types-field", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-types-field" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2430,23 +2691,47 @@ name = "snarkvm-circuit-types-group" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-environment", - "snarkvm-circuit-types-boolean", - "snarkvm-circuit-types-field", - "snarkvm-circuit-types-scalar", - "snarkvm-console-types-group", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] +[[package]] +name = "snarkvm-circuit-types-group" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", +] + [[package]] name = "snarkvm-circuit-types-integers" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-environment", - "snarkvm-circuit-types-boolean", - "snarkvm-circuit-types-field", - "snarkvm-console-types-integers", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-types-integers" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2454,10 +2739,21 @@ name = "snarkvm-circuit-types-scalar" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-environment", - "snarkvm-circuit-types-boolean", - "snarkvm-circuit-types-field", - "snarkvm-console-types-scalar", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-types-scalar" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2465,11 +2761,23 @@ name = "snarkvm-circuit-types-string" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-circuit-environment", - "snarkvm-circuit-types-boolean", - "snarkvm-circuit-types-field", - "snarkvm-circuit-types-integers", - "snarkvm-console-types-string", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-circuit-types-string" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2485,26 +2793,61 @@ dependencies = [ "paste", "rand", "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit", - "snarkvm-console", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "tracing", ] +[[package]] +name = "snarkvm-compiler" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "anyhow", + "colored", + "indexmap", + "once_cell", + "parking_lot", + "paste", + "rand", + "serde_json", + "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "tracing", +] + [[package]] name = "snarkvm-console" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-account", - "snarkvm-console-algorithms", - "snarkvm-console-collections", - "snarkvm-console-network", - "snarkvm-console-program", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-console-transition", - "snarkvm-console-types", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2513,8 +2856,18 @@ version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ "base58", - "snarkvm-console-network", - "snarkvm-console-types", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-account" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "base58", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2524,11 +2877,23 @@ source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f4 dependencies = [ "blake2s_simd", "smallvec", - "snarkvm-console-types", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] +[[package]] +name = "snarkvm-console-algorithms" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "blake2s_simd", + "smallvec", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", +] + [[package]] name = "snarkvm-console-collections" version = "0.7.5" @@ -2536,8 +2901,19 @@ source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f4 dependencies = [ "aleo-std", "rayon", - "snarkvm-console-algorithms", - "snarkvm-console-types", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-collections" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "aleo-std", + "rayon", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2549,15 +2925,33 @@ dependencies = [ "itertools", "lazy_static", "serde", - "snarkvm-console-algorithms", - "snarkvm-console-collections", - "snarkvm-console-network-environment", - "snarkvm-console-types", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] +[[package]] +name = "snarkvm-console-network" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "anyhow", + "itertools", + "lazy_static", + "serde", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", +] + [[package]] name = "snarkvm-console-network-environment" version = "0.7.5" @@ -2576,6 +2970,24 @@ dependencies = [ "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] +[[package]] +name = "snarkvm-console-network-environment" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "anyhow", + "bech32 0.9.0", + "itertools", + "nom", + "num-traits", + "rand", + "rand_xorshift", + "serde", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", +] + [[package]] name = "snarkvm-console-program" version = "0.7.5" @@ -2587,9 +2999,25 @@ dependencies = [ "num-derive", "num-traits", "once_cell", - "snarkvm-console-account", - "snarkvm-console-network", - "snarkvm-console-types", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-program" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "enum_index", + "enum_index_derive", + "indexmap", + "num-derive", + "num-traits", + "once_cell", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2597,9 +3025,9 @@ name = "snarkvm-console-transition" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-account", - "snarkvm-console-network", - "snarkvm-console-types", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", ] [[package]] @@ -2607,14 +3035,29 @@ name = "snarkvm-console-types" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-network-environment", - "snarkvm-console-types-address", - "snarkvm-console-types-boolean", - "snarkvm-console-types-field", - "snarkvm-console-types-group", - "snarkvm-console-types-integers", - "snarkvm-console-types-scalar", - "snarkvm-console-types-string", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-types" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2622,10 +3065,21 @@ name = "snarkvm-console-types-address" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-network-environment", - "snarkvm-console-types-boolean", - "snarkvm-console-types-field", - "snarkvm-console-types-group", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-types-address" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2633,7 +3087,15 @@ name = "snarkvm-console-types-boolean" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-network-environment", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-types-boolean" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2641,8 +3103,17 @@ name = "snarkvm-console-types-field" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-network-environment", - "snarkvm-console-types-boolean", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-types-field" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2650,10 +3121,21 @@ name = "snarkvm-console-types-group" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-network-environment", - "snarkvm-console-types-boolean", - "snarkvm-console-types-field", - "snarkvm-console-types-scalar", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-types-group" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2661,9 +3143,19 @@ name = "snarkvm-console-types-integers" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-network-environment", - "snarkvm-console-types-boolean", - "snarkvm-console-types-field", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-types-integers" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2671,9 +3163,19 @@ name = "snarkvm-console-types-scalar" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-network-environment", - "snarkvm-console-types-boolean", - "snarkvm-console-types-field", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-types-scalar" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2681,10 +3183,21 @@ name = "snarkvm-console-types-string" version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" dependencies = [ - "snarkvm-console-network-environment", - "snarkvm-console-types-boolean", - "snarkvm-console-types-field", - "snarkvm-console-types-integers", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", +] + +[[package]] +name = "snarkvm-console-types-string" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", ] [[package]] @@ -2715,6 +3228,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "snarkvm-curves" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "derivative", + "rand", + "rustc_version", + "serde", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "thiserror", +] + [[package]] name = "snarkvm-dpc" version = "0.7.5" @@ -2773,6 +3300,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "snarkvm-fields" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "anyhow", + "derivative", + "num-traits", + "rand", + "rayon", + "serde", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "thiserror", +] + [[package]] name = "snarkvm-gadgets" version = "0.7.5" @@ -2829,6 +3371,28 @@ dependencies = [ "thiserror", ] +[[package]] +name = "snarkvm-parameters" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "cfg-if", + "curl", + "hex", + "itertools", + "lazy_static", + "paste", + "rand", + "serde_json", + "sha2", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "thiserror", +] + [[package]] name = "snarkvm-r1cs" version = "0.7.5" @@ -2861,6 +3425,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "snarkvm-r1cs" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "anyhow", + "cfg-if", + "fxhash", + "indexmap", + "itertools", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "thiserror", +] + [[package]] name = "snarkvm-utilities" version = "0.7.5" @@ -2897,6 +3477,24 @@ dependencies = [ "thiserror", ] +[[package]] +name = "snarkvm-utilities" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "num-bigint", + "num_cpus", + "rand", + "rand_xorshift", + "rayon", + "serde", + "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "thiserror", +] + [[package]] name = "snarkvm-utilities-derives" version = "0.7.5" @@ -2921,6 +3519,18 @@ dependencies = [ "syn 1.0.98", ] +[[package]] +name = "snarkvm-utilities-derives" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro-error", + "proc-macro2 1.0.40", + "quote 1.0.20", + "syn 1.0.98", +] + [[package]] name = "socket2" version = "0.4.4" @@ -3256,6 +3866,12 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +[[package]] +name = "ucd-trie" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c" + [[package]] name = "unicase" version = "2.6.0" diff --git a/Cargo.toml b/Cargo.toml index 04050415ef..fe82d803b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,9 +50,15 @@ version = "1.5.3" path = "./leo/span" version = "1.5.3" +[dependencies.aleo] +git = "https://github.com/AleoHQ/aleo.git" +rev = "03b12ff" + [dependencies.snarkvm] +#path = "../snarkVM" git = "https://github.com/AleoHQ/snarkVM.git" rev = "18ee4e5" +features = ["circuit", "console"] [dependencies.backtrace] version = "0.3.66" diff --git a/compiler/ast/src/lib.rs b/compiler/ast/src/lib.rs index fa2fd34a5f..f22ebeab2d 100644 --- a/compiler/ast/src/lib.rs +++ b/compiler/ast/src/lib.rs @@ -74,6 +74,18 @@ impl Ast { Self { ast: program } } + /// Set the program name to the given string. + pub fn set_program_name(mut self, name: String) -> Self { + self.ast.name = name; + self + } + + /// Set the network name to the given string. + pub fn set_network(mut self, network: String) -> Self { + self.ast.network = network; + self + } + /// Returns a reference to the inner program AST representation. pub fn as_repr(&self) -> &Program { &self.ast diff --git a/compiler/ast/src/passes/reconstructor.rs b/compiler/ast/src/passes/reconstructor.rs index 49c9edde7a..0465ac868e 100644 --- a/compiler/ast/src/passes/reconstructor.rs +++ b/compiler/ast/src/passes/reconstructor.rs @@ -256,6 +256,7 @@ pub trait ProgramReconstructor: StatementReconstructor { fn reconstruct_program(&mut self, input: Program) -> Program { Program { name: input.name, + network: input.network, expected_input: input.expected_input, functions: input .functions diff --git a/compiler/ast/src/program.rs b/compiler/ast/src/program.rs index 953b301bc9..4728f0e384 100644 --- a/compiler/ast/src/program.rs +++ b/compiler/ast/src/program.rs @@ -27,8 +27,9 @@ use std::fmt; #[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] pub struct Program { /// The name of the program. - /// Empty after parsing. pub name: String, + /// The network of the program. + pub network: String, /// Expected main function inputs. /// Empty after parsing. pub expected_input: Vec, @@ -52,25 +53,15 @@ impl fmt::Display for Program { } } -impl Program { - /// Constructs an empty program with `name`. - pub fn new(name: String) -> Self { +impl Default for Program { + /// Constructs an empty program node. + fn default() -> Self { Self { - name, + name: String::new(), + network: String::new(), expected_input: vec![], functions: IndexMap::new(), circuits: IndexMap::new(), } } - - /// Extract the name of the program. - pub fn name(&self) -> &str { - &self.name - } - - /// Sets the name of the program. - pub fn set_name(mut self, name: String) -> Self { - self.name = name; - self - } } diff --git a/compiler/compiler/src/compiler.rs b/compiler/compiler/src/compiler.rs index d5f5f73b56..1c2600be9c 100644 --- a/compiler/compiler/src/compiler.rs +++ b/compiler/compiler/src/compiler.rs @@ -41,6 +41,10 @@ pub struct Compiler<'a> { main_file_path: PathBuf, /// The path to where the compiler outputs all generated files. output_directory: PathBuf, + /// The program name, + pub program_name: String, + /// The network name, + pub network: String, /// The AST for the program. pub ast: Ast, /// The input ast for the program if it exists. @@ -54,6 +58,8 @@ impl<'a> Compiler<'a> { /// Returns a new Leo compiler. /// pub fn new( + program_name: String, + network: String, handler: &'a Handler, main_file_path: PathBuf, output_directory: PathBuf, @@ -63,7 +69,9 @@ impl<'a> Compiler<'a> { handler, main_file_path, output_directory, - ast: Ast::new(Program::new("Initial".to_string())), + program_name, + network, + ast: Ast::new(Program::default()), input_ast: None, output_options: output_options.unwrap_or_default(), } @@ -91,7 +99,9 @@ impl<'a> Compiler<'a> { let prg_sf = with_session_globals(|s| s.source_map.new_source(program_string, name)); // Use the parser to construct the abstract syntax tree (ast). - let ast: leo_ast::Ast = leo_parser::parse_ast(self.handler, &prg_sf.src, prg_sf.start_pos)?; + let mut ast: leo_ast::Ast = leo_parser::parse_ast(self.handler, &prg_sf.src, prg_sf.start_pos)?; + ast = ast.set_program_name(self.program_name.clone()); + ast = ast.set_network(self.network.clone()); if self.output_options.ast_initial { // Write the AST snapshot post parsing. @@ -170,7 +180,7 @@ impl<'a> Compiler<'a> { /// Returns a compiled Leo program and prints the resulting bytecode. /// TODO: Remove when code generation is ready to be integrated into the compiler. /// - pub fn compile_and_generate_bytecode(&mut self) -> Result<(SymbolTable, String)> { + pub fn compile_and_generate_instructions(&mut self) -> Result<(SymbolTable, String)> { self.parse_program()?; let symbol_table = self.compiler_stages()?; diff --git a/compiler/compiler/src/test.rs b/compiler/compiler/src/test.rs index fc8332bfb5..45a2e88cd4 100644 --- a/compiler/compiler/src/test.rs +++ b/compiler/compiler/src/test.rs @@ -41,6 +41,8 @@ fn new_compiler(handler: &Handler, main_file_path: PathBuf) -> Compiler<'_> { fs::create_dir_all(output_dir.clone()).unwrap(); Compiler::new( + String::from("test"), + String::from("testnet3"), handler, main_file_path, output_dir, diff --git a/compiler/parser/src/parser/file.rs b/compiler/parser/src/parser/file.rs index c038d0edf9..f9cf79ff7d 100644 --- a/compiler/parser/src/parser/file.rs +++ b/compiler/parser/src/parser/file.rs @@ -45,6 +45,7 @@ impl ParserContext<'_> { } Ok(Program { name: String::new(), + network: String::new(), expected_input: Vec::new(), functions, circuits, diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs index 9e82c33390..493570eca0 100644 --- a/compiler/passes/src/code_generation/visit_program.rs +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -23,7 +23,7 @@ use std::{collections::HashMap, fmt::Write as _}; impl<'a> CodeGenerator<'a> { pub(crate) fn visit_program(&mut self, input: &'a Program) -> String { - let mut program_string = String::new(); + let mut program_string = format!("program {}.{};\n", input.name, input.network); // Visit each `Circuit` or `Record` in the Leo AST and produce a bytecode circuit. program_string.push_str( diff --git a/examples/hello/.gitignore b/examples/hello/.gitignore index ef3a390676..6275406923 100644 --- a/examples/hello/.gitignore +++ b/examples/hello/.gitignore @@ -1,2 +1,3 @@ +build/ outputs/ /.leo diff --git a/examples/hello/main.aleo b/examples/hello/main.aleo new file mode 100644 index 0000000000..524c515faa --- /dev/null +++ b/examples/hello/main.aleo @@ -0,0 +1,7 @@ +program hello.aleo; + +function main: + input r0 as u32.private; + input r1 as u32.private; + add r0 r1 into r2; + output r2 as u32.private; diff --git a/examples/hello/program.json b/examples/hello/program.json new file mode 100644 index 0000000000..a4c305481b --- /dev/null +++ b/examples/hello/program.json @@ -0,0 +1,6 @@ +{ + "program": "hello.aleo", + "version": "0.0.0", + "description": "", + "license": "MIT" +} diff --git a/leo/commands/build.rs b/leo/commands/build.rs index b7ddd0dff4..c802b23360 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -21,13 +21,17 @@ use leo_package::{ inputs::InputFile, // inputs::*, // outputs::CircuitFile - outputs::{AleoFile, ChecksumFile, OutputsDirectory, OUTPUTS_DIRECTORY_NAME}, + outputs::{ChecksumFile, OutputsDirectory, MAIN_ALEO_FILE_NAME, OUTPUTS_DIRECTORY_NAME}, source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, }; +use snarkvm::{ + console::{network::Testnet3, program::ProgramID}, + file::{AleoFile, Manifest}, +}; +use std::str::FromStr; use clap::StructOpt; use tracing::span::Span; -use leo_package::outputs::ProgramJson; /// Compiler Options wrapper for Build command. Also used by other commands which /// require Build command output as their input. @@ -153,7 +157,10 @@ impl Command for Build { // Initialize error handler let handler = leo_errors::emitter::Handler::default(); + // Create a new instance of the Leo compiler. let mut program = Compiler::new( + package_name.to_string(), + String::from("aleo"), &handler, main_file_path, output_directory, @@ -166,61 +173,35 @@ impl Command for Build { // Compile the program. { - let (_, bytecode) = program.compile_and_generate_bytecode()?; - // // Initialize AVM bytecode. - // Process::from_str(&bytecode); - // - // // Run program todo: run with real inputs. - // // Run the `HelloWorld` program with the given inputs. - // let first = Value::from_str("1field.public"); - // let second = Value::from_str("1field.private"); - // let output = Process::get_function(&Identifier::from_str("main")).unwrap().evaluate(&[first, second]); - // println!("program output: {}\n", output.first().unwrap()); + let program_id_string = format!("{}.aleo", package_name); // todo: read this from a config file. + let (_, instructions) = program.compile_and_generate_instructions()?; - // Write the Aleo file to the output directory. - let aleo_file = AleoFile::new(&package_name, "aleo"); // Specifies `.aleo` in `program foo.aleo;` identifier. - aleo_file.write_to(&path, bytecode)?; + // Parse the generated instructions into an Aleo file. + let file = + AleoFile::::from_str(&instructions).expect("Failed to parse generated Aleo instructions."); - // Write the program.json file to the output directory. - let program_file = ProgramJson::new( - aleo_file.program_id(), - "0.0.0".to_string(), - "".to_string(), - "MIT".to_string(), - ); - program_file.write_to(&path)?; - } + // Write the Aleo file to `main.aleo`. + let mut aleo_file_path = package_path.clone(); + aleo_file_path.push(MAIN_ALEO_FILE_NAME); - // Generate the program on the constraint system and verify correctness - { - // let mut cs = CircuitSynthesizer:: { - // constraints: Default::default(), - // public_variables: Default::default(), - // private_variables: Default::default(), - // namespaces: Default::default(), - // }; - // let temporary_program = program.clone(); - // let output = temporary_program.compile_constraints(&mut cs)?; - // - // tracing::debug!("Compiled output - {:#?}", output); - // tracing::info!("Number of constraints - {:#?}", cs.num_constraints()); + file.write_to(&aleo_file_path).expect("Failed to write the aleo file."); - // Serialize the circuit - // let circuit_object = SerializedCircuit::from(cs); - // let json = circuit_object.to_json_string().unwrap(); - // println!("json: {}", json); + // Initialize the program id. + let program_id = + ProgramID::::from_str(&program_id_string).expect("Failed to parse program id from string."); - // Write serialized circuit to circuit `.json` file. - // let circuit_file = CircuitFile::new(&package_name); - // circuit_file.write_to(&path, json)?; + // Create the program.json file to the output directory. + let _manifest_file = if Manifest::::exists_at(&package_path) { + Manifest::::open(&package_path).expect("Failed to open manifest file.") + } else { + Manifest::::create(&package_path, &program_id).expect("Failed to create manifest file.") + }; - // Check that we can read the serialized circuit file - // let serialized = circuit_file.read_from(&package_path)?; - - // Deserialize the circuit - // let deserialized = SerializedCircuit::from_json_string(&serialized).unwrap(); - // let _circuit_synthesizer = CircuitSynthesizer::::try_from(deserialized).unwrap(); - // println!("deserialized {:?}", circuit_synthesizer.num_constraints()); + // Call the `build` command from the Aleo SDK. + // todo error: thread 'main' panicked at 'Failed to call `aleo build` command from the Aleo SDK: Development private key not found.', leo/commands/build.rs:203:37 + // let build = aleo::commands::Build; + // let res = build.parse().expect("Failed to call `aleo build` command from the Aleo SDK"); + // tracing::info!("Result: {}", res); } // If a checksum file exists, check if it differs from the new checksum diff --git a/leo/commands/clean.rs b/leo/commands/clean.rs index 4eb3e7bb4a..a7b8079a50 100644 --- a/leo/commands/clean.rs +++ b/leo/commands/clean.rs @@ -16,9 +16,7 @@ use crate::{commands::Command, context::Context}; use leo_errors::Result; -use leo_package::outputs::{ - AleoFile, ChecksumFile, CircuitFile, ProofFile, ProvingKeyFile, Snapshot, SnapshotFile, VerificationKeyFile, -}; +use leo_package::outputs::ChecksumFile; use clap::StructOpt; use tracing::span::Span; @@ -44,31 +42,31 @@ impl Command for Clean { let package_name = context.manifest()?.get_package_name(); // Remove the aleo file from the output directory. - AleoFile::new(&package_name, "aleo").remove(&path)?; + // AleoFile::new(&package_name, "aleo").remove(&path)?; // Remove the checksum from the output directory ChecksumFile::new(&package_name).remove(&path)?; - // Remove the serialized circuit from the output directory - CircuitFile::new(&package_name).remove(&path)?; + // // Remove the serialized circuit from the output directory + // CircuitFile::new(&package_name).remove(&path)?; // // Remove the program output file from the output directory // OutputFile::new(&package_name).remove(&path)?; - // Remove the proving key from the output directory - ProvingKeyFile::new(&package_name).remove(&path)?; + // // Remove the proving key from the output directory + // ProvingKeyFile::new(&package_name).remove(&path)?; - // Remove the verification key from the output directory - VerificationKeyFile::new(&package_name).remove(&path)?; + // // Remove the verification key from the output directory + // VerificationKeyFile::new(&package_name).remove(&path)?; - // Remove the proof from the output directory - ProofFile::new(&package_name).remove(&path)?; + // // Remove the proof from the output directory + // ProofFile::new(&package_name).remove(&path)?; // Remove AST snapshots from the output directory - SnapshotFile::new(&package_name, Snapshot::Initial).remove(&path)?; - SnapshotFile::new(&package_name, Snapshot::ImportsResolved).remove(&path)?; - SnapshotFile::new(&package_name, Snapshot::TypeInference).remove(&path)?; - SnapshotFile::new(&package_name, Snapshot::Canonicalization).remove(&path)?; + // SnapshotFile::new(&package_name, Snapshot::Initial).remove(&path)?; + // SnapshotFile::new(&package_name, Snapshot::ImportsResolved).remove(&path)?; + // SnapshotFile::new(&package_name, Snapshot::TypeInference).remove(&path)?; + // SnapshotFile::new(&package_name, Snapshot::Canonicalization).remove(&path)?; Ok(()) } diff --git a/leo/package/src/outputs/aleo.rs b/leo/package/src/outputs/aleo.rs deleted file mode 100644 index 26cb65c726..0000000000 --- a/leo/package/src/outputs/aleo.rs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -//! An Aleo file. - -use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; - -use serde::Deserialize; -use std::{ - borrow::Cow, - fs::{ - File, {self}, - }, - io::Write, - path::Path, -}; - -pub static MAIN_ALEO_FILE_NAME: &str = "main.aleo"; - -#[derive(Deserialize)] -pub struct AleoFile { - pub package_name: String, - pub network: String, -} - -impl AleoFile { - pub fn new(package_name: &str, network: &str) -> Self { - Self { - package_name: package_name.to_string(), - network: network.to_string(), - } - } - - pub fn exists_at(&self, path: &Path) -> bool { - let path = self.setup_file_path(path); - path.exists() - } - - /// Reads the aleo file from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result { - let path = self.setup_file_path(path); - - let string = - fs::read_to_string(&path).map_err(|_| PackageError::failed_to_read_aleo_file(path.into_owned()))?; - Ok(string) - } - - /// Writes the given aleo string to a file. - pub fn write_to(&self, path: &Path, program_string: String) -> Result<()> { - let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(PackageError::io_error_aleo_file)?; - - // Write program id to file. - let mut aleo_file = format!("program {}.{};\n", self.package_name, self.network); - aleo_file.push_str(&program_string); - - file.write_all(aleo_file.as_bytes()) - .map_err(PackageError::io_error_aleo_file)?; - Ok(()) - } - - /// Removes the aleo file at the given path if it exists. Returns `true` on success, - /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { - let path = self.setup_file_path(path); - if !path.exists() { - return Ok(false); - } - - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_aleo_file(path.into_owned()))?; - Ok(true) - } - - fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { - let mut path = Cow::from(path); - if path.is_dir() { - if !path.ends_with(OUTPUTS_DIRECTORY_NAME) { - path.to_mut().push(OUTPUTS_DIRECTORY_NAME); - } - path.to_mut() - .push(MAIN_ALEO_FILE_NAME); - } - path - } - - /// Returns the program id as a string. - pub fn program_id(&self) -> String { - format!("{}.{}", self.package_name, self.network) - } -} diff --git a/leo/package/src/outputs/mod.rs b/leo/package/src/outputs/mod.rs index fccdf36e99..cc9ca5b5d8 100644 --- a/leo/package/src/outputs/mod.rs +++ b/leo/package/src/outputs/mod.rs @@ -13,8 +13,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -pub mod aleo; -pub use self::aleo::*; pub mod ast_snapshot; pub use self::ast_snapshot::*; @@ -28,9 +26,6 @@ pub use self::checksum::*; pub mod directory; pub use directory::*; -pub mod program_json; -pub use program_json::*; - pub mod proof; pub use self::proof::*; @@ -39,3 +34,5 @@ pub use self::proving_key::*; pub mod verification_key; pub use self::verification_key::*; + +pub static MAIN_ALEO_FILE_NAME: &str = "main.aleo"; diff --git a/leo/package/src/outputs/program_json.rs b/leo/package/src/outputs/program_json.rs deleted file mode 100644 index 1c28beb799..0000000000 --- a/leo/package/src/outputs/program_json.rs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (C) 2019-2022 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 program JSON file for an aleo file. - -use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; - -use serde::Deserialize; -use std::{ - borrow::Cow, - fs::{ - File, {self}, - }, - io::Write, - path::Path, -}; - -pub static PROGRAM_JSON_FILE_NAME: &str = "program.json"; - -#[derive(Deserialize)] -pub struct ProgramJson { - pub program: String, - pub version: String, - pub description: String, - pub license: String, -} - -impl ProgramJson { - pub fn new( - program: String, - version: String, - description: String, - license: String, - ) -> Self { - Self { - program, - version, - description, - license, - } - } - - /// Writes the given program id to a program json file. - pub fn write_to(&self, path: &Path) -> Result<()> { - let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(PackageError::io_error_aleo_file)?; - - // Write program json file. - let aleo_file = format!( - r#"{{ - "program": "{program}", - "version": "{version}", - "description": "{description}", - "license": "{license}" -}}"#, - program = self.program, - version = self.version, - description = self.description, - license = self.license, - ); - - file.write_all(aleo_file.as_bytes()) - .map_err(PackageError::io_error_aleo_file)?; - Ok(()) - } - - /// Removes the program json file at the given path if it exists. Returns `true` on success, - /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { - let path = self.setup_file_path(path); - if !path.exists() { - return Ok(false); - } - - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_aleo_file(path.into_owned()))?; - Ok(true) - } - - fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { - let mut path = Cow::from(path); - if path.is_dir() { - if !path.ends_with(OUTPUTS_DIRECTORY_NAME) { - path.to_mut().push(OUTPUTS_DIRECTORY_NAME); - } - path.to_mut() - .push(PROGRAM_JSON_FILE_NAME); - } - path - } -} diff --git a/tests/test-framework/benches/leo_compiler.rs b/tests/test-framework/benches/leo_compiler.rs index 9fdd36a469..325f295019 100644 --- a/tests/test-framework/benches/leo_compiler.rs +++ b/tests/test-framework/benches/leo_compiler.rs @@ -71,6 +71,8 @@ struct Sample { /// A helper function to help create a Leo Compiler struct. fn new_compiler(handler: &Handler) -> Compiler<'_> { Compiler::new( + String::new(), + String::new(), handler, PathBuf::from(String::new()), PathBuf::from(String::new()), From 9ccae186227ad67d227f0567af2e3832e057a1fe Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 11 Jul 2022 21:47:01 -0700 Subject: [PATCH 19/43] clean up cli wip --- Cargo.lock | 1 + leo/commands/build.rs | 5 +- leo/commands/clean.rs | 3 +- leo/commands/mod.rs | 45 ++++------- leo/errors/Cargo.toml | 9 ++- leo/errors/src/errors/mod.rs | 7 +- leo/main.rs | 143 +++++++---------------------------- 7 files changed, 56 insertions(+), 157 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 03a4fd6d06..083c21aad5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1194,6 +1194,7 @@ dependencies = [ name = "leo-errors" version = "1.5.3" dependencies = [ + "anyhow", "backtrace", "color-backtrace", "colored", diff --git a/leo/commands/build.rs b/leo/commands/build.rs index c802b23360..84913519e7 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +use super::*; use crate::{commands::Command, context::Context}; use leo_compiler::{Ast, Compiler, InputAst, OutputOptions}; use leo_errors::{CliError, Result}; @@ -24,10 +25,6 @@ use leo_package::{ outputs::{ChecksumFile, OutputsDirectory, MAIN_ALEO_FILE_NAME, OUTPUTS_DIRECTORY_NAME}, source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, }; -use snarkvm::{ - console::{network::Testnet3, program::ProgramID}, - file::{AleoFile, Manifest}, -}; use std::str::FromStr; use clap::StructOpt; diff --git a/leo/commands/clean.rs b/leo/commands/clean.rs index a7b8079a50..b6f24b056d 100644 --- a/leo/commands/clean.rs +++ b/leo/commands/clean.rs @@ -41,8 +41,7 @@ impl Command for Clean { let path = context.dir()?; let package_name = context.manifest()?.get_package_name(); - // Remove the aleo file from the output directory. - // AleoFile::new(&package_name, "aleo").remove(&path)?; + // Removes the aleo file from the output directory. // Remove the checksum from the output directory ChecksumFile::new(&package_name).remove(&path)?; diff --git a/leo/commands/mod.rs b/leo/commands/mod.rs index b473354c32..d0fad3b258 100644 --- a/leo/commands/mod.rs +++ b/leo/commands/mod.rs @@ -14,51 +14,32 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::context::Context; -use leo_errors::Result; - -use std::time::Instant; -use tracing::span::Span; - // local program commands pub mod build; pub use build::Build; pub mod clean; pub use clean::Clean; -// -// pub mod deploy; -// pub use deploy::Deploy; -// + // pub mod init; // pub use init::Init; -// -// pub mod lint; -// pub use lint::Lint; -// + // pub mod new; // pub use new::New; -// -// pub mod prove; -// pub use prove::Prove; -// + // pub mod run; // pub use run::Run; -// -// pub mod setup; -// pub use setup::Setup; -// -// pub mod test; -// pub use test::Test; -// -// pub mod update; -// pub use update::{Automatic as UpdateAutomatic, Update}; -// -// pub mod watch; -// pub use watch::Watch; -// Aleo PM related commands -// pub mod package; +use crate::context::*; +use leo_errors::Result; + +use snarkvm::{ + console::{network::Testnet3, program::ProgramID}, + file::{AleoFile, Manifest}, +}; + +use std::time::Instant; +use tracing::span::Span; /// Base trait for the Leo CLI, see methods and their documentation for details. pub trait Command { diff --git a/leo/errors/Cargo.toml b/leo/errors/Cargo.toml index b730668ad4..7cdabcc335 100644 --- a/leo/errors/Cargo.toml +++ b/leo/errors/Cargo.toml @@ -18,13 +18,16 @@ license = "GPL-3.0" edition = "2021" rust-version = "1.56" -[dependencies.backtrace] -version = "0.3.66" - [dependencies.leo-span] path = "../span" version = "1.5.3" +[dependencies.anyhow] +version = "1.0" + +[dependencies.backtrace] +version = "0.3.66" + [dependencies.colored] version = "2.0.0" diff --git a/leo/errors/src/errors/mod.rs b/leo/errors/src/errors/mod.rs index dea0cff8ab..0e9b547242 100644 --- a/leo/errors/src/errors/mod.rs +++ b/leo/errors/src/errors/mod.rs @@ -47,7 +47,7 @@ pub use self::type_checker::*; /// The LeoError type that contains all sub error types. /// This allows a unified error type throughout the Leo crates. -#[derive(Clone, Debug, Error)] +#[derive(Debug, Error)] pub enum LeoError { /// Represents an AST Error in a Leo Error. #[error(transparent)] @@ -74,6 +74,9 @@ pub enum LeoError { /// not re-displaying an error. #[error("")] LastErrorCode(i32), + /// Anyhow errors. + #[error(transparent)] + Anyhow(#[from] anyhow::Error), } impl LeoError { @@ -90,6 +93,7 @@ impl LeoError { PackageError(error) => error.error_code(), TypeCheckerError(error) => error.error_code(), LastErrorCode(_) => unreachable!(), + Anyhow(_) => unimplemented!(), // todo: implement error codes for snarkvm errors. } } @@ -106,6 +110,7 @@ impl LeoError { PackageError(error) => error.exit_code(), TypeCheckerError(error) => error.exit_code(), LastErrorCode(code) => *code, + Anyhow(_) => unimplemented!(), // todo: implement exit codes for snarkvm errors. } } } diff --git a/leo/main.rs b/leo/main.rs index 9633df3c7b..ed992a7a04 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -21,24 +21,19 @@ pub mod context; pub mod logger; pub mod updater; -use commands::{ - // package::{Clone, Fetch, Login, Logout, Publish}, - Build, - Clean, - Command, - // Deploy, Init, Lint, New, Prove, Run, Setup, Test, Update, Watch, -}; +use crate::commands::*; +use crate::context::*; use leo_errors::Result; use leo_span::symbol::create_session_if_not_set_then; -// use snarkvm_utilities::Write; use clap::StructOpt; -use std::{path::PathBuf, process::exit}; +use std::path::PathBuf; +use std::process::exit; /// CLI Arguments entry point - includes global parameters and subcommands #[derive(StructOpt, Debug)] #[structopt(name = "leo", author = "The Aleo Team ")] -struct Opt { +pub struct CLI { #[structopt(short, global = true, help = "Print additional information for debugging")] debug: bool, @@ -46,7 +41,7 @@ struct Opt { quiet: bool, #[structopt(subcommand)] - command: CommandOpts, + command: Commands, #[structopt(help = "Custom Aleo PM backend URL", env = "APM_URL")] api: Option, @@ -62,7 +57,7 @@ struct Opt { ///Leo compiler and package manager #[derive(StructOpt, Debug)] -enum CommandOpts { +enum Commands { // #[structopt(about = "Create a new Leo package in an existing directory")] // Init { // #[structopt(flatten)] @@ -84,94 +79,11 @@ enum CommandOpts { #[structopt(flatten)] command: Clean, }, - // - // #[structopt(about = "Run a program setup")] - // Setup { - // #[structopt(flatten)] - // command: Setup, - // }, - // - // #[structopt(about = "Run the program and produce a proof")] - // Prove { - // #[structopt(flatten)] - // command: Prove, - // }, - // // #[structopt(about = "Run a program with input variables")] // Run { // #[structopt(flatten)] // command: Run, // }, - // - // #[structopt(about = "Watch for changes of Leo source files")] - // Watch { - // #[structopt(flatten)] - // command: Watch, - // }, - // - // #[structopt(about = "Update Leo to the latest version")] - // Update { - // #[structopt(flatten)] - // command: Update, - // }, - // - // #[structopt(about = "Compile and run all tests in the current package")] - // Test { - // #[structopt(flatten)] - // command: Test, - // }, - // - // #[structopt(about = "Import a package from the Aleo Package Manager")] - // Add { - // #[structopt(flatten)] - // command: Add, - // }, - // #[structopt(about = "Pull dependencies from Aleo Package Manager")] - // Fetch { - // #[structopt(flatten)] - // command: Fetch, - // }, - // - // #[structopt(about = "Clone a package from the Aleo Package Manager")] - // Clone { - // #[structopt(flatten)] - // command: Clone, - // }, - // - // #[structopt(about = "Login to the Aleo Package Manager")] - // Login { - // #[structopt(flatten)] - // command: Login, - // }, - // - // #[structopt(about = "Logout of the Aleo Package Manager")] - // Logout { - // #[structopt(flatten)] - // command: Logout, - // }, - // - // #[structopt(about = "Publish the current package to the Aleo Package Manager")] - // Publish { - // #[structopt(flatten)] - // command: Publish, - // }, - // - // #[structopt(about = "Uninstall a package from the current package")] - // Remove { - // #[structopt(flatten)] - // command: Remove, - // }, - // #[structopt(about = "Lints the Leo files in the package (*)")] - // Lint { - // #[structopt(flatten)] - // command: Lint, - // }, - // - // #[structopt(about = "Deploy the current package as a program to the network (*)")] - // Deploy { - // #[structopt(flatten)] - // command: Deploy, - // }, } fn set_panic_hook() { @@ -203,18 +115,23 @@ fn set_panic_hook() { }); } -fn main() { - set_panic_hook(); - create_session_if_not_set_then(|_| handle_error(run_with_args(Opt::parse()))); +pub fn handle_error(res: Result) -> T { + match res { + Ok(t) => t, + Err(err) => { + eprintln!("{}", err); + exit(err.exit_code()); + } + } } /// Run command with custom build arguments. -fn run_with_args(opt: Opt) -> Result<()> { - if !opt.quiet { +pub fn run_with_args(cli: CLI) -> Result<()> { + if !cli.quiet { // Init logger with optional debug flag. logger::init_logger( "leo", - match opt.debug { + match cli.debug { false => 1, true => 2, }, @@ -223,16 +140,16 @@ fn run_with_args(opt: Opt) -> Result<()> { // Get custom root folder and create context for it. // If not specified, default context will be created in cwd. - let context = handle_error(match opt.path { - Some(path) => context::create_context(path, opt.api), - None => context::get_context(opt.api), + let context = handle_error(match cli.path { + Some(path) => create_context(path, cli.api), + None => get_context(cli.api), }); - match opt.command { + match cli.command { // CommandOpts::Init { command } => command.try_execute(context), // CommandOpts::New { command } => command.try_execute(context), - CommandOpts::Build { command } => command.try_execute(context), - CommandOpts::Clean { command } => command.try_execute(context), + Commands::Build { command } => command.try_execute(context), + Commands::Clean { command } => command.try_execute(context), // CommandOpts::Setup { command } => command.try_execute(context), // CommandOpts::Prove { command } => command.try_execute(context), // CommandOpts::Test { command } => command.try_execute(context), @@ -252,15 +169,11 @@ fn run_with_args(opt: Opt) -> Result<()> { } } -fn handle_error(res: Result) -> T { - match res { - Ok(t) => t, - Err(err) => { - eprintln!("{}", err); - exit(err.exit_code()); - } - } +fn main() { + set_panic_hook(); + create_session_if_not_set_then(|_| handle_error(run_with_args(CLI::parse()))); } + // todo (collin): uncomment after refactor // #[cfg(test)] // mod cli_tests { From f4a32331b7d509147b4a1cc80b728744c0d45b10 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Mon, 11 Jul 2022 22:20:37 -0700 Subject: [PATCH 20/43] remove unused logic --- leo/commands/build.rs | 14 +++--- leo/commands/clean.rs | 2 +- leo/commands/mod.rs | 6 +-- leo/commands/{unused => }/run.rs | 37 +++++---------- leo/context.rs | 20 +++----- leo/main.rs | 27 +++-------- leo/package/src/imports/mod.rs | 18 ------- leo/package/src/inputs/mod.rs | 6 --- leo/package/src/lib.rs | 46 +++++++++--------- leo/package/src/outputs/mod.rs | 9 ---- leo/package/src/package.rs | 47 ++++--------------- leo/package/src/root/mod.rs | 6 --- .../src/{imports => unused}/directory.rs | 0 leo/package/src/{root => unused}/lock_file.rs | 0 leo/package/src/{root => unused}/manifest.rs | 0 leo/package/src/{inputs => unused}/pairs.rs | 0 leo/package/src/{outputs => unused}/proof.rs | 0 .../src/{outputs => unused}/proving_key.rs | 0 leo/package/src/{inputs => unused}/state.rs | 0 .../{outputs => unused}/verification_key.rs | 0 20 files changed, 67 insertions(+), 171 deletions(-) rename leo/commands/{unused => }/run.rs (54%) delete mode 100644 leo/package/src/imports/mod.rs rename leo/package/src/{imports => unused}/directory.rs (100%) rename leo/package/src/{root => unused}/lock_file.rs (100%) rename leo/package/src/{root => unused}/manifest.rs (100%) rename leo/package/src/{inputs => unused}/pairs.rs (100%) rename leo/package/src/{outputs => unused}/proof.rs (100%) rename leo/package/src/{outputs => unused}/proving_key.rs (100%) rename leo/package/src/{inputs => unused}/state.rs (100%) rename leo/package/src/{outputs => unused}/verification_key.rs (100%) diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 84913519e7..5b50259558 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -88,13 +88,13 @@ impl Command for Build { fn apply(self, context: Context, _: Self::Input) -> Result { let path = context.dir()?; let manifest = context.manifest().map_err(|_| CliError::manifest_file_not_found())?; - let package_name = manifest.get_package_name(); - let imports_map = manifest.get_imports_map().unwrap_or_default(); - - // Error out if there are dependencies but no lock file found. - if !imports_map.is_empty() && !context.lock_file_exists()? { - return Err(CliError::dependencies_are_not_installed().into()); - } + let package_name = manifest.program_id().name().to_string(); + // let imports_map = manifest.get_imports_map().unwrap_or_default(); + // + // // Error out if there are dependencies but no lock file found. + // if !imports_map.is_empty() && !context.lock_file_exists()? { + // return Err(CliError::dependencies_are_not_installed().into()); + // } // Sanitize the package path to the root directory. let mut package_path = path.clone(); diff --git a/leo/commands/clean.rs b/leo/commands/clean.rs index b6f24b056d..ddd6c0156e 100644 --- a/leo/commands/clean.rs +++ b/leo/commands/clean.rs @@ -39,7 +39,7 @@ impl Command for Clean { fn apply(self, context: Context, _: Self::Input) -> Result { let path = context.dir()?; - let package_name = context.manifest()?.get_package_name(); + let package_name = context.manifest()?.program_id().name().to_string(); // Removes the aleo file from the output directory. diff --git a/leo/commands/mod.rs b/leo/commands/mod.rs index d0fad3b258..0e602902c6 100644 --- a/leo/commands/mod.rs +++ b/leo/commands/mod.rs @@ -21,15 +21,15 @@ pub use build::Build; pub mod clean; pub use clean::Clean; +pub mod run; +pub use run::Run; + // pub mod init; // pub use init::Init; // pub mod new; // pub use new::New; -// pub mod run; -// pub use run::Run; - use crate::context::*; use leo_errors::Result; diff --git a/leo/commands/unused/run.rs b/leo/commands/run.rs similarity index 54% rename from leo/commands/unused/run.rs rename to leo/commands/run.rs index a8346e9c9e..7ce164107f 100644 --- a/leo/commands/unused/run.rs +++ b/leo/commands/run.rs @@ -14,18 +14,17 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use super::{build::BuildOptions, prove::Prove}; +use super::build::BuildOptions; use crate::{commands::Command, context::Context}; -use leo_errors::{Result, SnarkVMError}; +use leo_errors::Result; -use snarkvm_algorithms::{snark::groth16::Groth16, traits::SNARK}; -use snarkvm_curves::bls12_377::{Bls12_377, Fr}; -use structopt::StructOpt; +// use aleo::commands::CLI as AleoCLI; + +use clap::StructOpt; use tracing::span::Span; /// Build, Prove and Run Leo program with inputs #[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] pub struct Run { #[structopt(long = "skip-key-check", help = "Skip key verification on Setup stage")] pub(crate) skip_key_check: bool, @@ -35,35 +34,25 @@ pub struct Run { } impl Command for Run { - type Input = ::Output; + type Input = (); type Output = (); fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Verifying") + tracing::span!(tracing::Level::INFO, "Executing") } - fn prelude(&self, context: Context) -> Result { - (Prove { - skip_key_check: self.skip_key_check, - compiler_options: self.compiler_options.clone(), - }) - .execute(context) + fn prelude(&self, _context: Context) -> Result { + Ok(()) // todo: call aleo build here? } - fn apply(self, _context: Context, input: Self::Input) -> Result { - let (proof, prepared_verifying_key) = input; - + fn apply(self, _context: Context, _input: Self::Input) -> Result { tracing::info!("Starting..."); - // Run the verifier - let is_success = Groth16::>::verify_prepared(&prepared_verifying_key, &vec![], &proof) - .map_err(|_| SnarkVMError::default())?; + // Execute the aleo program. + // let cli = AleoCLI::parse_from(&["aleo", "run", "main"]); // Log the verifier output - match is_success { - true => tracing::info!("Proof is valid"), - false => tracing::error!("Proof is invalid"), - }; + // tracing::info!("Result: {}", res); Ok(()) } diff --git a/leo/context.rs b/leo/context.rs index 7224f54365..f8c13f1543 100644 --- a/leo/context.rs +++ b/leo/context.rs @@ -16,9 +16,11 @@ use crate::{api::Api, config}; use leo_errors::{CliError, Result}; -use leo_package::root::{LockFile, Manifest}; -use std::{convert::TryFrom, env::current_dir, path::PathBuf}; +use snarkvm::file::Manifest; +use snarkvm::prelude::Testnet3; + +use std::{env::current_dir, path::PathBuf}; pub const PACKAGE_MANAGER_URL: &str = "https://api.aleo.pm/"; @@ -42,18 +44,8 @@ impl Context { } /// Get package manifest for current context. - pub fn manifest(&self) -> Result { - Ok(Manifest::try_from(self.dir()?.as_path())?) - } - - /// Get lock file for current context. - pub fn lock_file(&self) -> Result { - Ok(LockFile::try_from(self.dir()?.as_path())?) - } - - /// Check if lock file exists. - pub fn lock_file_exists(&self) -> Result { - Ok(LockFile::exists_at(&self.dir()?)) + pub fn manifest(&self) -> Result> { + Ok(Manifest::::open(self.dir()?.as_path())?) } } diff --git a/leo/main.rs b/leo/main.rs index ed992a7a04..bc209964c3 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -79,11 +79,11 @@ enum Commands { #[structopt(flatten)] command: Clean, }, - // #[structopt(about = "Run a program with input variables")] - // Run { - // #[structopt(flatten)] - // command: Run, - // }, + #[structopt(about = "Run a program with input variables")] + Run { + #[structopt(flatten)] + command: Run, + }, } fn set_panic_hook() { @@ -150,22 +150,7 @@ pub fn run_with_args(cli: CLI) -> Result<()> { // CommandOpts::New { command } => command.try_execute(context), Commands::Build { command } => command.try_execute(context), Commands::Clean { command } => command.try_execute(context), - // CommandOpts::Setup { command } => command.try_execute(context), - // CommandOpts::Prove { command } => command.try_execute(context), - // CommandOpts::Test { command } => command.try_execute(context), - // CommandOpts::Run { command } => command.try_execute(context), - // CommandOpts::Watch { command } => command.try_execute(context), - // CommandOpts::Update { command } => command.try_execute(context), - // - // // CommandOpts::Add { command } => command.try_execute(context), - // CommandOpts::Fetch { command } => command.try_execute(context), - // CommandOpts::Clone { command } => command.try_execute(context), - // CommandOpts::Login { command } => command.try_execute(context), - // CommandOpts::Logout { command } => command.try_execute(context), - // CommandOpts::Publish { command } => command.try_execute(context), - // // CommandOpts::Remove { command } => command.try_execute(context), - // CommandOpts::Lint { command } => command.try_execute(context), - // CommandOpts::Deploy { command } => command.try_execute(context), + Commands::Run { command } => command.try_execute(context), } } diff --git a/leo/package/src/imports/mod.rs b/leo/package/src/imports/mod.rs deleted file mode 100644 index 17dc003496..0000000000 --- a/leo/package/src/imports/mod.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -pub mod directory; -pub use directory::*; diff --git a/leo/package/src/inputs/mod.rs b/leo/package/src/inputs/mod.rs index 8d95048b07..7ebc7a582e 100644 --- a/leo/package/src/inputs/mod.rs +++ b/leo/package/src/inputs/mod.rs @@ -19,9 +19,3 @@ pub use directory::*; pub mod input; pub use input::*; - -pub mod pairs; -pub use pairs::*; - -pub mod state; -pub use state::*; diff --git a/leo/package/src/lib.rs b/leo/package/src/lib.rs index 77b648bf31..942afc3680 100644 --- a/leo/package/src/lib.rs +++ b/leo/package/src/lib.rs @@ -16,32 +16,32 @@ #![doc = include_str!("../README.md")] -pub mod imports; +// pub mod imports; pub mod inputs; pub mod outputs; pub mod package; pub mod root; pub mod source; -use std::path::Path; - -use leo_errors::Result; - -pub struct LeoPackage; - -impl LeoPackage { - /// Initializes a Leo package at the given path. - pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<()> { - package::Package::initialize(package_name, path, author) - } - - /// Returns `true` if the given Leo package name is valid. - pub fn is_package_name_valid(package_name: &str) -> bool { - package::Package::is_package_name_valid(package_name) - } - - /// Removes an imported Leo package - pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<()> { - package::Package::remove_imported_package(package_name, path) - } -} +// use std::path::Path; +// +// use leo_errors::Result; +// +// pub struct LeoPackage; +// +// impl LeoPackage { +// /// Initializes a Leo package at the given path. +// pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<()> { +// package::Package::initialize(package_name, path, author) +// } +// +// /// Returns `true` if the given Leo package name is valid. +// pub fn is_package_name_valid(package_name: &str) -> bool { +// package::Package::is_package_name_valid(package_name) +// } +// +// /// Removes an imported Leo package +// pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<()> { +// package::Package::remove_imported_package(package_name, path) +// } +// } diff --git a/leo/package/src/outputs/mod.rs b/leo/package/src/outputs/mod.rs index cc9ca5b5d8..58d8911c2a 100644 --- a/leo/package/src/outputs/mod.rs +++ b/leo/package/src/outputs/mod.rs @@ -26,13 +26,4 @@ pub use self::checksum::*; pub mod directory; pub use directory::*; -pub mod proof; -pub use self::proof::*; - -pub mod proving_key; -pub use self::proving_key::*; - -pub mod verification_key; -pub use self::verification_key::*; - pub static MAIN_ALEO_FILE_NAME: &str = "main.aleo"; diff --git a/leo/package/src/package.rs b/leo/package/src/package.rs index 67a29b9550..df67bd7b19 100644 --- a/leo/package/src/package.rs +++ b/leo/package/src/package.rs @@ -15,9 +15,8 @@ // along with the Leo library. If not, see . use crate::{ - imports::ImportsDirectory, - inputs::{InputFile, InputsDirectory, StateFile}, - root::{Gitignore, Manifest, README}, + inputs::{InputFile, InputsDirectory}, + root::{Gitignore, README}, source::{MainFile, SourceDirectory}, }; @@ -117,12 +116,6 @@ impl Package { let mut result = true; let mut existing_files = vec![]; - // Check if the manifest file already exists. - if Manifest::exists_at(path) { - existing_files.push(Manifest::filename()); - result = false; - } - // Check if the input file already exists. let input_file = InputFile::new(package_name); if input_file.exists_at(path) { @@ -130,13 +123,6 @@ impl Package { result = false; } - // Check if the state file already exists. - let state_file = StateFile::new(package_name); - if state_file.exists_at(path) { - existing_files.push(state_file.filename()); - result = false; - } - // Check if the main file already exists. if MainFile::exists_at(path) { existing_files.push(MainFile::filename()); @@ -157,23 +143,12 @@ impl Package { return false; } - // Check if the manifest file exists. - if !Manifest::exists_at(path) { - return false; - } - // Check if the input file exists. let input_file = InputFile::new(package_name); if !input_file.exists_at(path) { return false; } - // Check if the state file exists. - let state_file = StateFile::new(package_name); - if !state_file.exists_at(path) { - return false; - } - // Check if the main file exists. if !MainFile::exists_at(path) { return false; @@ -183,7 +158,7 @@ impl Package { } /// Creates a package at the given path - pub fn initialize(package_name: &str, path: &Path, author: Option) -> Result<()> { + pub fn initialize(package_name: &str, path: &Path, _author: Option) -> Result<()> { // First, verify that this directory is not already initialized as a Leo package. { if !Self::can_initialize(package_name, path) { @@ -192,9 +167,6 @@ impl Package { } // Next, initialize this directory as a Leo package. { - // Create the manifest file. - Manifest::new(package_name, author)?.write_to(path)?; - // Verify that the .gitignore file does not exist. if !Gitignore::exists_at(path) { // Create the .gitignore file. @@ -216,9 +188,6 @@ impl Package { // Create the input file in the inputs directory. InputFile::new(package_name).write_to(path)?; - // Create the state file in the inputs directory. - StateFile::new(package_name).write_to(path)?; - // Create the main file in the source directory. MainFile::new(package_name).write_to(path)?; } @@ -231,11 +200,11 @@ impl Package { Ok(()) } - - /// Removes the package at the given path - pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<()> { - ImportsDirectory::remove_import(path, package_name) - } + // + // /// Removes the package at the given path + // pub fn remove_imported_package(package_name: &str, path: &Path) -> Result<()> { + // ImportsDirectory::remove_import(path, package_name) + // } } #[cfg(test)] diff --git a/leo/package/src/root/mod.rs b/leo/package/src/root/mod.rs index c2c7d6fc1b..63c34f0993 100644 --- a/leo/package/src/root/mod.rs +++ b/leo/package/src/root/mod.rs @@ -17,11 +17,5 @@ pub mod gitignore; pub use self::gitignore::*; -pub mod lock_file; -pub use self::lock_file::*; - -pub mod manifest; -pub use self::manifest::*; - pub mod readme; pub use self::readme::*; diff --git a/leo/package/src/imports/directory.rs b/leo/package/src/unused/directory.rs similarity index 100% rename from leo/package/src/imports/directory.rs rename to leo/package/src/unused/directory.rs diff --git a/leo/package/src/root/lock_file.rs b/leo/package/src/unused/lock_file.rs similarity index 100% rename from leo/package/src/root/lock_file.rs rename to leo/package/src/unused/lock_file.rs diff --git a/leo/package/src/root/manifest.rs b/leo/package/src/unused/manifest.rs similarity index 100% rename from leo/package/src/root/manifest.rs rename to leo/package/src/unused/manifest.rs diff --git a/leo/package/src/inputs/pairs.rs b/leo/package/src/unused/pairs.rs similarity index 100% rename from leo/package/src/inputs/pairs.rs rename to leo/package/src/unused/pairs.rs diff --git a/leo/package/src/outputs/proof.rs b/leo/package/src/unused/proof.rs similarity index 100% rename from leo/package/src/outputs/proof.rs rename to leo/package/src/unused/proof.rs diff --git a/leo/package/src/outputs/proving_key.rs b/leo/package/src/unused/proving_key.rs similarity index 100% rename from leo/package/src/outputs/proving_key.rs rename to leo/package/src/unused/proving_key.rs diff --git a/leo/package/src/inputs/state.rs b/leo/package/src/unused/state.rs similarity index 100% rename from leo/package/src/inputs/state.rs rename to leo/package/src/unused/state.rs diff --git a/leo/package/src/outputs/verification_key.rs b/leo/package/src/unused/verification_key.rs similarity index 100% rename from leo/package/src/outputs/verification_key.rs rename to leo/package/src/unused/verification_key.rs From dcd6501262802dee42a5e7e955313da2e05d5102 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 12:48:51 -0700 Subject: [PATCH 21/43] update revs, improve error handling, remove unused code --- Cargo.lock | 995 +++++++++--------- Cargo.toml | 4 +- examples/hello/Leo.toml | 9 - examples/hello/README.md | 1 - examples/hello/inputs/hello-world.in | 3 - examples/hello/program.json | 6 - examples/hello/src/main.leo | 3 - examples/{hello => helloworld}/.gitignore | 3 +- examples/helloworld/README.md | 6 + examples/helloworld/inputs/helloworld.in | 4 + examples/{hello => helloworld}/main.aleo | 2 +- examples/helloworld/program.json | 10 + examples/helloworld/src/main.leo | 5 + examples/token/.gitignore | 2 +- examples/token/Leo.toml | 8 - examples/token/README.md | 6 + examples/token/inputs/token.in | 5 +- examples/token/program.json | 10 + leo/commands/build.rs | 85 +- leo/commands/clean.rs | 10 +- leo/commands/mod.rs | 13 +- leo/commands/{unused => }/new.rs | 42 +- leo/context.rs | 46 +- leo/errors/src/errors/cli/cli_errors.rs | 28 + .../src/errors/package/package_errors.rs | 110 +- leo/lib.rs | 2 - leo/main.rs | 214 +--- leo/package/src/inputs/input.rs | 7 +- leo/package/src/package.rs | 45 +- leo/package/src/root/gitignore.rs | 2 +- leo/package/src/root/mod.rs | 3 - leo/package/src/root/readme.rs | 90 -- leo/package/tests/initialize/mod.rs | 2 +- leo/package/tests/mod.rs | 112 +- leo/{ => unused}/api.rs | 0 leo/{ => unused}/config.rs | 0 leo/updater.rs | 24 +- 37 files changed, 775 insertions(+), 1142 deletions(-) delete mode 100644 examples/hello/Leo.toml delete mode 100644 examples/hello/README.md delete mode 100644 examples/hello/inputs/hello-world.in delete mode 100644 examples/hello/program.json delete mode 100644 examples/hello/src/main.leo rename examples/{hello => helloworld}/.gitignore (72%) create mode 100644 examples/helloworld/README.md create mode 100644 examples/helloworld/inputs/helloworld.in rename examples/{hello => helloworld}/main.aleo (83%) create mode 100644 examples/helloworld/program.json create mode 100644 examples/helloworld/src/main.leo delete mode 100644 examples/token/Leo.toml create mode 100644 examples/token/README.md create mode 100644 examples/token/program.json rename leo/commands/{unused => }/new.rs (52%) delete mode 100644 leo/package/src/root/readme.rs rename leo/{ => unused}/api.rs (100%) rename leo/{ => unused}/config.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 083c21aad5..6ea219a1f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,7 +71,7 @@ dependencies = [ [[package]] name = "aleo" version = "0.2.0" -source = "git+https://github.com/AleoHQ/aleo.git?rev=03b12ff#03b12fffe1e276c845d15ef6c3264aa6f9e9a731" +source = "git+https://github.com/AleoHQ/aleo.git?rev=a0895e0#a0895e0f1b1d4ceb78199dec5439425e7abb0b53" dependencies = [ "anyhow", "clap 3.2.8", @@ -79,7 +79,7 @@ dependencies = [ "rand", "rand_chacha", "self_update 0.28.0", - "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", "thiserror", ] @@ -1230,7 +1230,7 @@ dependencies = [ "self_update 0.30.0", "serde", "serde_json", - "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", "sys-info", "test_dir", "toml", @@ -2259,7 +2259,7 @@ dependencies = [ [[package]] name = "snarkvm" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", "clap 3.2.8", @@ -2267,9 +2267,9 @@ dependencies = [ "rand", "self_update 0.30.0", "serde_json", - "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", "thiserror", "walkdir", ] @@ -2277,7 +2277,7 @@ dependencies = [ [[package]] name = "snarkvm" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", "clap 3.2.8", @@ -2285,48 +2285,13 @@ dependencies = [ "rand", "self_update 0.30.0", "serde_json", - "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", "thiserror", "walkdir", ] -[[package]] -name = "snarkvm-algorithms" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" -dependencies = [ - "aleo-std", - "anyhow", - "bincode", - "blake2s_simd", - "crossbeam-channel", - "curl", - "derivative", - "digest", - "hashbrown", - "hex", - "itertools", - "lazy_static", - "num_cpus", - "once_cell", - "parking_lot", - "rand", - "rand_chacha", - "rand_core", - "rayon", - "serde", - "sha2", - "smallvec", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "thiserror", -] - [[package]] name = "snarkvm-algorithms" version = "0.7.5" @@ -2364,7 +2329,7 @@ dependencies = [ [[package]] name = "snarkvm-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "aleo-std", "anyhow", @@ -2388,424 +2353,425 @@ dependencies = [ "serde", "sha2", "smallvec", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "thiserror", +] + +[[package]] +name = "snarkvm-algorithms" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "blake2s_simd", + "crossbeam-channel", + "curl", + "derivative", + "digest", + "hashbrown", + "hex", + "itertools", + "lazy_static", + "num_cpus", + "once_cell", + "parking_lot", + "rand", + "rand_chacha", + "rand_core", + "rayon", + "serde", + "sha2", + "smallvec", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", "thiserror", ] [[package]] name = "snarkvm-circuit" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-transition", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-collections" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-collections" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-environment" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "indexmap", "itertools", "nom", "num-traits", "once_cell", - "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-environment" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "indexmap", "itertools", "nom", "num-traits", "once_cell", - "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-environment-witness" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" [[package]] name = "snarkvm-circuit-environment-witness" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" [[package]] name = "snarkvm-circuit-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", -] - -[[package]] -name = "snarkvm-circuit-transition" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" -dependencies = [ - "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-transition", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-types" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-types" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-types-address" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-types-address" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-types-boolean" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-types-boolean" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-types-field" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-types-field" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-types-group" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-types-group" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-types-integers" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-types-integers" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-types-scalar" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-types-scalar" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-circuit-types-string" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-circuit-types-string" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-compiler" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" -dependencies = [ - "anyhow", - "colored", - "indexmap", - "once_cell", - "parking_lot", - "paste", - "rand", - "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "tracing", -] - -[[package]] -name = "snarkvm-compiler" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", "colored", @@ -2815,148 +2781,169 @@ dependencies = [ "paste", "rand", "serde_json", - "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "tracing", +] + +[[package]] +name = "snarkvm-compiler" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +dependencies = [ + "anyhow", + "colored", + "indexmap", + "once_cell", + "parking_lot", + "paste", + "rand", + "serde_json", + "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", "tracing", ] [[package]] name = "snarkvm-console" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-transition", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "base58", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "base58", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "blake2s_simd", "smallvec", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "blake2s_simd", "smallvec", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-collections" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "aleo-std", "rayon", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-collections" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "aleo-std", "rayon", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", "itertools", "lazy_static", "serde", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", "itertools", "lazy_static", "serde", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-network-environment" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", "bech32 0.9.0", @@ -2966,15 +2953,15 @@ dependencies = [ "rand", "rand_xorshift", "serde", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-network-environment" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", "bech32 0.9.0", @@ -2984,15 +2971,15 @@ dependencies = [ "rand", "rand_xorshift", "serde", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "enum_index", "enum_index_derive", @@ -3000,15 +2987,15 @@ dependencies = [ "num-derive", "num-traits", "once_cell", - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "enum_index", "enum_index_derive", @@ -3016,203 +3003,179 @@ dependencies = [ "num-derive", "num-traits", "once_cell", - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", -] - -[[package]] -name = "snarkvm-console-transition" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" -dependencies = [ - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-types" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-types" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-types-address" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-types-address" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-types-boolean" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-types-boolean" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-types-field" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-types-field" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-types-group" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-types-group" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-types-integers" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-types-integers" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-types-scalar" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-types-scalar" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] name = "snarkvm-console-types-string" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", ] [[package]] name = "snarkvm-console-types-string" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", -] - -[[package]] -name = "snarkvm-curves" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" -dependencies = [ - "derivative", - "rand", - "rustc_version", - "serde", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "thiserror", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", ] [[package]] @@ -3232,14 +3195,28 @@ dependencies = [ [[package]] name = "snarkvm-curves" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "derivative", "rand", "rustc_version", "serde", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "thiserror", +] + +[[package]] +name = "snarkvm-curves" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +dependencies = [ + "derivative", + "rand", + "rustc_version", + "serde", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", "thiserror", ] @@ -3272,21 +3249,6 @@ dependencies = [ "time", ] -[[package]] -name = "snarkvm-fields" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" -dependencies = [ - "anyhow", - "derivative", - "num-traits", - "rand", - "rayon", - "serde", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "thiserror", -] - [[package]] name = "snarkvm-fields" version = "0.7.5" @@ -3304,7 +3266,7 @@ dependencies = [ [[package]] name = "snarkvm-fields" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", "derivative", @@ -3312,7 +3274,22 @@ dependencies = [ "rand", "rayon", "serde", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "thiserror", +] + +[[package]] +name = "snarkvm-fields" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +dependencies = [ + "anyhow", + "derivative", + "num-traits", + "rand", + "rayon", + "serde", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", "thiserror", ] @@ -3333,28 +3310,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "snarkvm-parameters" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" -dependencies = [ - "aleo-std", - "anyhow", - "bincode", - "cfg-if", - "curl", - "hex", - "itertools", - "lazy_static", - "paste", - "rand", - "serde_json", - "sha2", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "thiserror", -] - [[package]] name = "snarkvm-parameters" version = "0.7.5" @@ -3375,7 +3330,7 @@ dependencies = [ [[package]] name = "snarkvm-parameters" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "aleo-std", "anyhow", @@ -3389,24 +3344,30 @@ dependencies = [ "rand", "serde_json", "sha2", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", "thiserror", ] [[package]] -name = "snarkvm-r1cs" +name = "snarkvm-parameters" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ + "aleo-std", "anyhow", + "bincode", "cfg-if", - "fxhash", - "indexmap", + "curl", + "hex", "itertools", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "lazy_static", + "paste", + "rand", + "serde_json", + "sha2", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", "thiserror", ] @@ -3429,34 +3390,32 @@ dependencies = [ [[package]] name = "snarkvm-r1cs" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", "cfg-if", "fxhash", "indexmap", "itertools", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", "thiserror", ] [[package]] -name = "snarkvm-utilities" +name = "snarkvm-r1cs" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "aleo-std", "anyhow", - "bincode", - "num-bigint", - "num_cpus", - "rand", - "rand_xorshift", - "rayon", - "serde", - "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5)", + "cfg-if", + "fxhash", + "indexmap", + "itertools", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", "thiserror", ] @@ -3481,7 +3440,7 @@ dependencies = [ [[package]] name = "snarkvm-utilities" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "aleo-std", "anyhow", @@ -3492,20 +3451,26 @@ dependencies = [ "rand_xorshift", "rayon", "serde", - "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc)", + "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", "thiserror", ] [[package]] -name = "snarkvm-utilities-derives" +name = "snarkvm-utilities" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=18ee4e5#18ee4e5148d343f479e88ed1dc055158358c442a" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", - "proc-macro2 1.0.40", - "quote 1.0.20", - "syn 1.0.98", + "aleo-std", + "anyhow", + "bincode", + "num-bigint", + "num_cpus", + "rand", + "rand_xorshift", + "rayon", + "serde", + "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "thiserror", ] [[package]] @@ -3523,7 +3488,19 @@ dependencies = [ [[package]] name = "snarkvm-utilities-derives" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=ecc17f1dc#ecc17f1dc265dfa5808834d28e6af612b158d219" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro-error", + "proc-macro2 1.0.40", + "quote 1.0.20", + "syn 1.0.98", +] + +[[package]] +name = "snarkvm-utilities-derives" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro-error", diff --git a/Cargo.toml b/Cargo.toml index fe82d803b1..0cfb5050ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,12 +52,12 @@ version = "1.5.3" [dependencies.aleo] git = "https://github.com/AleoHQ/aleo.git" -rev = "03b12ff" +rev = "a0895e0" [dependencies.snarkvm] #path = "../snarkVM" git = "https://github.com/AleoHQ/snarkVM.git" -rev = "18ee4e5" +rev = "f25e0b2" features = ["circuit", "console"] [dependencies.backtrace] diff --git a/examples/hello/Leo.toml b/examples/hello/Leo.toml deleted file mode 100644 index 1f48853e3f..0000000000 --- a/examples/hello/Leo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[project] -name = "hello" -version = "0.3.0" -description = "A minimal token program in Leo." -license = "LICENSE-MIT" - -[remote] -author = "aleo" - diff --git a/examples/hello/README.md b/examples/hello/README.md deleted file mode 100644 index 1534e6cdf3..0000000000 --- a/examples/hello/README.md +++ /dev/null @@ -1 +0,0 @@ -# hello-world diff --git a/examples/hello/inputs/hello-world.in b/examples/hello/inputs/hello-world.in deleted file mode 100644 index 550d3026ce..0000000000 --- a/examples/hello/inputs/hello-world.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -r0: field = 1field; -r1: field = 1field; diff --git a/examples/hello/program.json b/examples/hello/program.json deleted file mode 100644 index a4c305481b..0000000000 --- a/examples/hello/program.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "program": "hello.aleo", - "version": "0.0.0", - "description": "", - "license": "MIT" -} diff --git a/examples/hello/src/main.leo b/examples/hello/src/main.leo deleted file mode 100644 index fe0b6852aa..0000000000 --- a/examples/hello/src/main.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32) -> u32 { - return a + b; -} \ No newline at end of file diff --git a/examples/hello/.gitignore b/examples/helloworld/.gitignore similarity index 72% rename from examples/hello/.gitignore rename to examples/helloworld/.gitignore index 6275406923..b28696155d 100644 --- a/examples/hello/.gitignore +++ b/examples/helloworld/.gitignore @@ -1,3 +1,2 @@ -build/ outputs/ -/.leo +build/ diff --git a/examples/helloworld/README.md b/examples/helloworld/README.md new file mode 100644 index 0000000000..54497b88ba --- /dev/null +++ b/examples/helloworld/README.md @@ -0,0 +1,6 @@ +# helloworld.aleo +## Build Guide +To compile this Aleo program, run: +```bash +aleo build +``` diff --git a/examples/helloworld/inputs/helloworld.in b/examples/helloworld/inputs/helloworld.in new file mode 100644 index 0000000000..774a402e83 --- /dev/null +++ b/examples/helloworld/inputs/helloworld.in @@ -0,0 +1,4 @@ +// The program input for helloworld/src/main.leo +[main] +a: u32 = 1u32; +b: u32 = 2u32; diff --git a/examples/hello/main.aleo b/examples/helloworld/main.aleo similarity index 83% rename from examples/hello/main.aleo rename to examples/helloworld/main.aleo index 524c515faa..778936d032 100644 --- a/examples/hello/main.aleo +++ b/examples/helloworld/main.aleo @@ -1,4 +1,4 @@ -program hello.aleo; +program helloworld.aleo; function main: input r0 as u32.private; diff --git a/examples/helloworld/program.json b/examples/helloworld/program.json new file mode 100644 index 0000000000..5ab6425df6 --- /dev/null +++ b/examples/helloworld/program.json @@ -0,0 +1,10 @@ +{ + "program": "helloworld.aleo", + "version": "0.0.0", + "description": "", + "development": { + "private_key": "APrivateKey1zkpBvXdKZKaXXcLUnwAVFCQNp41jrX6JqTuJo1JShfPoRfx", + "address": "aleo1mgfq6g40l6zkhsm063n3uhr43qk5e0zsua5aszeq5080dsvlcvxsn0rrau" + }, + "license": "MIT" +} diff --git a/examples/helloworld/src/main.leo b/examples/helloworld/src/main.leo new file mode 100644 index 0000000000..6ca156da3f --- /dev/null +++ b/examples/helloworld/src/main.leo @@ -0,0 +1,5 @@ +// The 'helloworld' main function. +function main(a: u32, b: u32) -> u32 { + let c: u32 = a + b; + return c; +} diff --git a/examples/token/.gitignore b/examples/token/.gitignore index ef3a390676..b28696155d 100644 --- a/examples/token/.gitignore +++ b/examples/token/.gitignore @@ -1,2 +1,2 @@ outputs/ -/.leo +build/ diff --git a/examples/token/Leo.toml b/examples/token/Leo.toml deleted file mode 100644 index 6e7077e6f8..0000000000 --- a/examples/token/Leo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[project] -name = "token" -version = "0.3.0" -description = "A simple token" -license = "LICENSE-MIT" - -[remote] -author = "aleo" diff --git a/examples/token/README.md b/examples/token/README.md new file mode 100644 index 0000000000..00e89b78a4 --- /dev/null +++ b/examples/token/README.md @@ -0,0 +1,6 @@ +# token.aleo +## Build Guide +To compile this Aleo program, run: +```bash +aleo build +``` diff --git a/examples/token/inputs/token.in b/examples/token/inputs/token.in index 03eacdd3ad..254046e373 100644 --- a/examples/token/inputs/token.in +++ b/examples/token/inputs/token.in @@ -1,3 +1,4 @@ +// The program input for token/src/main.leo [main] - -[registers] +a: u32 = 1u32; +b: u32 = 2u32; diff --git a/examples/token/program.json b/examples/token/program.json new file mode 100644 index 0000000000..fc619581eb --- /dev/null +++ b/examples/token/program.json @@ -0,0 +1,10 @@ +{ + "program": "token.aleo", + "version": "0.0.0", + "description": "", + "development": { + "private_key": "APrivateKey1zkpBqRv2cwkSiR4hQ3Tb4AZFD3XzdwPqV9QsEykTKBV1YKT", + "address": "aleo1ht2a9q0gsd38j0se4t9lsfulxgqrens2vgzgry3pkvs93xrrzu8s892zn7" + }, + "license": "MIT" +} diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 5b50259558..1b4771a428 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -20,14 +20,14 @@ use leo_compiler::{Ast, Compiler, InputAst, OutputOptions}; use leo_errors::{CliError, Result}; use leo_package::{ inputs::InputFile, - // inputs::*, - // outputs::CircuitFile - outputs::{ChecksumFile, OutputsDirectory, MAIN_ALEO_FILE_NAME, OUTPUTS_DIRECTORY_NAME}, + outputs::{ChecksumFile, OutputsDirectory, OUTPUTS_DIRECTORY_NAME}, source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, }; -use std::str::FromStr; + +use aleo::commands::Build as AleoBuild; use clap::StructOpt; +use std::str::FromStr; use tracing::span::Span; /// Compiler Options wrapper for Build command. Also used by other commands which @@ -86,15 +86,11 @@ impl Command for Build { } fn apply(self, context: Context, _: Self::Input) -> Result { + // Get the package path. let path = context.dir()?; - let manifest = context.manifest().map_err(|_| CliError::manifest_file_not_found())?; - let package_name = manifest.program_id().name().to_string(); - // let imports_map = manifest.get_imports_map().unwrap_or_default(); - // - // // Error out if there are dependencies but no lock file found. - // if !imports_map.is_empty() && !context.lock_file_exists()? { - // return Err(CliError::dependencies_are_not_installed().into()); - // } + + // Get the package name. + let package_name = context.program_name()?; // Sanitize the package path to the root directory. let mut package_path = path.clone(); @@ -113,9 +109,6 @@ impl Command for Build { return Err(CliError::package_main_file_not_found().into()); } - // Create the output directory - OutputsDirectory::create(&package_path)?; - // Construct the path to the main file in the source directory let mut main_file_path = package_path.clone(); main_file_path.push(SOURCE_DIRECTORY_NAME); @@ -124,33 +117,12 @@ impl Command for Build { // Load the input file at `package_name.in` let input_path = InputFile::new(&package_name).setup_file_path(&path); - // Load the state file at `package_name.in` - // let (state_string, state_path) = StateFile::new(&package_name).read_from(&path)?; + // Create the outputs directory + OutputsDirectory::create(&package_path)?; // Log compilation of files to console tracing::info!("Compiling main program... ({:?})", main_file_path); - // let imports_map = if context.lock_file_exists()? { - // context.lock_file()?.to_import_map() - // } else { - // Default::default() - // }; - - // Load the program at `main_file_path` - // let program = Compiler::::parse_program_with_input( - // package_name.clone(), - // main_file_path, - // output_directory, - // &input_string, - // &input_path, - // &state_string, - // &state_path, - // thread_leaked_context(), - // Some(self.compiler_options.clone().into()), - // imports_map, - // Some(self.compiler_options.into()), - // )?; - // Initialize error handler let handler = leo_errors::emitter::Handler::default(); @@ -170,35 +142,24 @@ impl Command for Build { // Compile the program. { - let program_id_string = format!("{}.aleo", package_name); // todo: read this from a config file. + // Compile the Leo program into Aleo instructions. let (_, instructions) = program.compile_and_generate_instructions()?; - // Parse the generated instructions into an Aleo file. - let file = - AleoFile::::from_str(&instructions).expect("Failed to parse generated Aleo instructions."); + // Parse the generated Aleo instructions into an Aleo file. + let file = AleoFile::::from_str(&instructions).map_err(CliError::failed_to_load_instructions)?; + + // Create the path to the Aleo file. + let mut aleo_file_path = package_path.clone(); + aleo_file_path.push(AleoFile::::main_file_name()); // Write the Aleo file to `main.aleo`. - let mut aleo_file_path = package_path.clone(); - aleo_file_path.push(MAIN_ALEO_FILE_NAME); + file.write_to(&aleo_file_path) + .map_err(|err| CliError::failed_to_write_to_aleo_file(aleo_file_path.display(), err))?; - file.write_to(&aleo_file_path).expect("Failed to write the aleo file."); - - // Initialize the program id. - let program_id = - ProgramID::::from_str(&program_id_string).expect("Failed to parse program id from string."); - - // Create the program.json file to the output directory. - let _manifest_file = if Manifest::::exists_at(&package_path) { - Manifest::::open(&package_path).expect("Failed to open manifest file.") - } else { - Manifest::::create(&package_path, &program_id).expect("Failed to create manifest file.") - }; - - // Call the `build` command from the Aleo SDK. - // todo error: thread 'main' panicked at 'Failed to call `aleo build` command from the Aleo SDK: Development private key not found.', leo/commands/build.rs:203:37 - // let build = aleo::commands::Build; - // let res = build.parse().expect("Failed to call `aleo build` command from the Aleo SDK"); - // tracing::info!("Result: {}", res); + // Call the `aleo build` command from the Aleo SDK. + let res = AleoBuild.parse().map_err(CliError::failed_to_call_aleo_build)?; + // Log the result of the build + tracing::info!("Result: {}", res); } // If a checksum file exists, check if it differs from the new checksum diff --git a/leo/commands/clean.rs b/leo/commands/clean.rs index ddd6c0156e..41363f634d 100644 --- a/leo/commands/clean.rs +++ b/leo/commands/clean.rs @@ -16,7 +16,7 @@ use crate::{commands::Command, context::Context}; use leo_errors::Result; -use leo_package::outputs::ChecksumFile; +// use leo_package::outputs::ChecksumFile; use clap::StructOpt; use tracing::span::Span; @@ -37,14 +37,14 @@ impl Command for Clean { Ok(()) } - fn apply(self, context: Context, _: Self::Input) -> Result { - let path = context.dir()?; - let package_name = context.manifest()?.program_id().name().to_string(); + fn apply(self, _context: Context, _: Self::Input) -> Result { + // let path = context.dir()?; + // let package_name = context.manifest()?.program_id().name().to_string(); // Removes the aleo file from the output directory. // Remove the checksum from the output directory - ChecksumFile::new(&package_name).remove(&path)?; + // ChecksumFile::new(&package_name).remove(&path)?; // // Remove the serialized circuit from the output directory // CircuitFile::new(&package_name).remove(&path)?; diff --git a/leo/commands/mod.rs b/leo/commands/mod.rs index 0e602902c6..fe2901b4fa 100644 --- a/leo/commands/mod.rs +++ b/leo/commands/mod.rs @@ -21,26 +21,25 @@ pub use build::Build; pub mod clean; pub use clean::Clean; +pub mod new; +pub use new::New; + pub mod run; pub use run::Run; // pub mod init; // pub use init::Init; -// pub mod new; -// pub use new::New; - use crate::context::*; use leo_errors::Result; -use snarkvm::{ - console::{network::Testnet3, program::ProgramID}, - file::{AleoFile, Manifest}, -}; +use snarkvm::file::AleoFile; use std::time::Instant; use tracing::span::Span; +pub(crate) type Network = snarkvm::prelude::Testnet3; + /// Base trait for the Leo CLI, see methods and their documentation for details. pub trait Command { /// If the current command requires running another command beforehand diff --git a/leo/commands/unused/new.rs b/leo/commands/new.rs similarity index 52% rename from leo/commands/unused/new.rs rename to leo/commands/new.rs index eeadc07732..ffd4fcb489 100644 --- a/leo/commands/unused/new.rs +++ b/leo/commands/new.rs @@ -14,17 +14,17 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{commands::Command, config::*, context::Context}; -use leo_errors::{CliError, Result}; -use leo_package::LeoPackage; +use crate::{commands::Command, context::Context}; +use leo_errors::{PackageError, Result}; +use leo_package::package::Package; -use std::fs; -use structopt::StructOpt; +use aleo::commands::New as AleoNew; + +use clap::StructOpt; use tracing::span::Span; /// Create new Leo project #[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] pub struct New { #[structopt(name = "NAME", help = "Set package name")] name: String, @@ -42,28 +42,22 @@ impl Command for New { Ok(()) } - fn apply(self, context: Context, _: Self::Input) -> Result { - // Check that the given package name is valid. - let package_name = self.name; - if !LeoPackage::is_package_name_valid(&package_name) { - return Err(CliError::invalid_project_name().into()); - } + fn apply(self, _context: Context, _: Self::Input) -> Result { + // Call the `aleo new` command from the Aleo SDK. + let command = AleoNew::try_parse_from(&["aleo", &self.name]).expect("Failed to parse `aleo new` command"); + let result = command.parse().expect("Failed to create a new Aleo project"); - let username = read_username().ok(); + // Derive the program directory path. + let mut path = std::env::current_dir().map_err(|e| PackageError::io_error("current directory", e))?; + path.push(&self.name); - // Derive the package directory path. - let mut path = context.dir()?; - path.push(&package_name); + // Initialize the Leo package in the directory created by `aleo new`. + Package::initialize(&self.name, &path)?; - // Verify the package directory path does not exist yet. - if path.exists() { - return Err(CliError::package_directory_already_exists(&path).into()); - } + // todo: modify the readme file to build with `leo build`. - // Create the package directory - fs::create_dir_all(&path).map_err(CliError::package_could_not_create_directory)?; - - LeoPackage::initialize(&package_name, &path, username)?; + // Log success. + tracing::info!("{}", result); Ok(()) } diff --git a/leo/context.rs b/leo/context.rs index f8c13f1543..a24237631a 100644 --- a/leo/context.rs +++ b/leo/context.rs @@ -14,28 +14,26 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::{api::Api, config}; +use crate::commands::Network; use leo_errors::{CliError, Result}; - use snarkvm::file::Manifest; -use snarkvm::prelude::Testnet3; use std::{env::current_dir, path::PathBuf}; -pub const PACKAGE_MANAGER_URL: &str = "https://api.aleo.pm/"; - /// Project context, manifest, current directory etc /// All the info that is relevant in most of the commands #[derive(Clone)] pub struct Context { - /// Api client for Aleo PM - pub api: Api, - /// Path at which the command is called, None when default pub path: Option, } impl Context { + pub fn new(path: Option) -> Result { + Ok(Context { path }) + } + + /// Returns the path to the Leo package. pub fn dir(&self) -> Result { match &self.path { Some(path) => Ok(path.clone()), @@ -43,26 +41,16 @@ impl Context { } } - /// Get package manifest for current context. - pub fn manifest(&self) -> Result> { - Ok(Manifest::::open(self.dir()?.as_path())?) + /// Returns the program name as a String. + pub fn program_name(&self) -> Result { + // Open the manifest file. + let path = self.dir()?; + let manifest = Manifest::::open(&path).map_err(CliError::failed_to_open_manifest)?; + + // Lookup the program id. + let program_id = manifest.program_id(); + + // Get package name from program id. + Ok(program_id.name().to_string()) } } - -/// Create a new context for the current directory. -pub fn create_context(path: PathBuf, api_url: Option) -> Result { - let token = config::read_token().ok(); - - let api = Api::new(api_url.unwrap_or_else(|| PACKAGE_MANAGER_URL.to_string()), token); - - Ok(Context { api, path: Some(path) }) -} - -/// Returns project context. -pub fn get_context(api_url: Option) -> Result { - let token = config::read_token().ok(); - - let api = Api::new(api_url.unwrap_or_else(|| PACKAGE_MANAGER_URL.to_string()), token); - - Ok(Context { api, path: None }) -} diff --git a/leo/errors/src/errors/cli/cli_errors.rs b/leo/errors/src/errors/cli/cli_errors.rs index e9d8d6b208..1136217ef8 100644 --- a/leo/errors/src/errors/cli/cli_errors.rs +++ b/leo/errors/src/errors/cli/cli_errors.rs @@ -400,6 +400,34 @@ create_messages!( msg: "unable to parse imported dependency's manifest", help: None, } + + @backtraced + failed_to_open_manifest { + args: (error: impl Display), + msg: format!("Failed to open manifest file: {}", error), + help: Some("Create a package by running `leo new`.".to_string()), + } + + @backtraced + failed_to_load_instructions { + args: (error: impl Display), + msg: format!("Failed to load compiled Aleo instructions into an Aleo file: {}", error), + help: Some("This is a Leo code generation bug. Please report it to https://github.com/AleoHQ/leo/issues/new/choose".to_string()), + } + + @backtraced + failed_to_write_to_aleo_file { + args: (path: impl Display, error: impl Display), + msg: format!("Failed to write to the Aleo file at `{}`. Error: {}", path, error), + help: None, + } + + @backtraced + failed_to_call_aleo_build { + args: (error: impl Display), + msg: format!("Failed to call the `aleo build` command. Error: {}", error), + help: None, + } ); impl CliError { diff --git a/leo/errors/src/errors/package/package_errors.rs b/leo/errors/src/errors/package/package_errors.rs index 4fcc457583..0006a0b486 100644 --- a/leo/errors/src/errors/package/package_errors.rs +++ b/leo/errors/src/errors/package/package_errors.rs @@ -172,61 +172,61 @@ create_messages!( help: None, } - /// For when creating the manifest file failed. - @backtraced - failed_to_create_manifest_file { - args: (filename: impl Display, error: impl ErrorArg), - msg: format!("failed creating manifest file `{}` {}", filename, error), - help: None, - } - - /// For when parsing the manifest file failed. - @backtraced - failed_to_parse_manifest_file { - args: (filename: impl Display, error: impl ErrorArg), - msg: format!("failed parsing manifest file `{}` {}", filename, error), - help: None, - } - - /// For when opening the manifest file failed. - @backtraced - failed_to_open_manifest_file { - args: (filename: impl Display, error: impl ErrorArg), - msg: format!("failed openining manifest file `{}` {}", filename, error), - help: None, - } - - /// For when reading the manifest file failed. - @backtraced - failed_to_read_manifest_file { - args: (filename: impl Display, error: impl ErrorArg), - msg: format!("failed reading manifest file `{}` {}", filename, error), - help: None, - } - - /// For when writing the manifest file failed. - @backtraced - failed_to_write_manifest_file { - args: (filename: impl Display, error: impl ErrorArg), - msg: format!("failed writing manifest file `{}` {}", filename, error), - help: None, - } - - /// For when the manifest file has an IO error. - @backtraced - io_error_manifest_file { - args: (error: impl ErrorArg), - msg: format!("IO error manifest file from the provided file path - {}", error), - help: None, - } - - /// For when getting the manifest metadata file failed. - @backtraced - failed_to_get_manifest_metadata_file { - args: (filename: impl Display, error: impl ErrorArg), - msg: format!("failed getting manifest metadata file `{}` {}", filename, error), - help: None, - } + // /// For when creating the manifest file failed. + // @backtraced + // failed_to_create_manifest_file { + // args: (filename: impl Display, error: impl ErrorArg), + // msg: format!("failed creating manifest file `{}` {}", filename, error), + // help: None, + // } + // + // /// For when parsing the manifest file failed. + // @backtraced + // failed_to_parse_manifest_file { + // args: (filename: impl Display, error: impl ErrorArg), + // msg: format!("failed parsing manifest file `{}` {}", filename, error), + // help: None, + // } + // + // /// For when opening the manifest file failed. + // @backtraced + // failed_to_open_manifest_file { + // args: (filename: impl Display, error: impl ErrorArg), + // msg: format!("failed openining manifest file `{}` {}", filename, error), + // help: None, + // } + // + // /// For when reading the manifest file failed. + // @backtraced + // failed_to_read_manifest_file { + // args: (filename: impl Display, error: impl ErrorArg), + // msg: format!("failed reading manifest file `{}` {}", filename, error), + // help: None, + // } + // + // /// For when writing the manifest file failed. + // @backtraced + // failed_to_write_manifest_file { + // args: (filename: impl Display, error: impl ErrorArg), + // msg: format!("failed writing manifest file `{}` {}", filename, error), + // help: None, + // } + // + // /// For when the manifest file has an IO error. + // @backtraced + // io_error_manifest_file { + // args: (error: impl ErrorArg), + // msg: format!("IO error manifest file from the provided file path - {}", error), + // help: None, + // } + // + // /// For when getting the manifest metadata file failed. + // @backtraced + // failed_to_get_manifest_metadata_file { + // args: (filename: impl Display, error: impl ErrorArg), + // msg: format!("failed getting manifest metadata file `{}` {}", filename, error), + // help: None, + // } /// For when creating the zip file failed. diff --git a/leo/lib.rs b/leo/lib.rs index 9092690d7d..cb7a72bf73 100644 --- a/leo/lib.rs +++ b/leo/lib.rs @@ -16,9 +16,7 @@ #![doc = include_str!("../README.md")] -pub mod api; pub mod commands; -pub mod config; pub mod context; pub mod logger; pub mod updater; diff --git a/leo/main.rs b/leo/main.rs index bc209964c3..9550b06e42 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -14,9 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -pub mod api; pub mod commands; -pub mod config; pub mod context; pub mod logger; pub mod updater; @@ -64,11 +62,11 @@ enum Commands { // command: Init, // }, // - // #[structopt(about = "Create a new Leo package in a new directory")] - // New { - // #[structopt(flatten)] - // command: New, - // }, + #[structopt(about = "Create a new Leo package in a new directory")] + New { + #[structopt(flatten)] + command: New, + }, #[structopt(about = "Compile the current package as a program")] Build { #[structopt(flatten)] @@ -140,14 +138,11 @@ pub fn run_with_args(cli: CLI) -> Result<()> { // Get custom root folder and create context for it. // If not specified, default context will be created in cwd. - let context = handle_error(match cli.path { - Some(path) => create_context(path, cli.api), - None => get_context(cli.api), - }); + let context = handle_error(Context::new(cli.path)); match cli.command { // CommandOpts::Init { command } => command.try_execute(context), - // CommandOpts::New { command } => command.try_execute(context), + Commands::New { command } => command.try_execute(context), Commands::Build { command } => command.try_execute(context), Commands::Clean { command } => command.try_execute(context), Commands::Run { command } => command.try_execute(context), @@ -158,198 +153,3 @@ fn main() { set_panic_hook(); create_session_if_not_set_then(|_| handle_error(run_with_args(CLI::parse()))); } - -// todo (collin): uncomment after refactor -// #[cfg(test)] -// mod cli_tests { -// use crate::{run_with_args, Opt}; -// use leo_errors::{CliError, Result}; -// -// use snarkvm_utilities::Write; -// use std::path::PathBuf; -// use structopt::StructOpt; -// use test_dir::{DirBuilder, FileType, TestDir}; -// -// // Runs Command from cmd-like argument "leo run --arg1 --arg2". -// fn run_cmd(args: &str, path: &Option) -> Result<()> { -// let args = args.split(' ').collect::>(); -// let mut opts = Opt::from_iter_safe(args).map_err(CliError::opt_args_error)?; -// -// if path.is_some() { -// opts.path = path.clone(); -// } -// -// if !opts.debug { -// // turn off tracing for all tests -// opts.quiet = true; -// } -// -// run_with_args(opts) -// } -// -// // Create a test directory with name. -// fn testdir(name: &str) -> TestDir { -// TestDir::temp().create(name, FileType::Dir) -// } -// -// #[test] -// fn global_options() { -// let path = Some(PathBuf::from("examples/pedersen-hash")); -// -// assert!(run_cmd("leo build", &path).is_ok()); -// assert!(run_cmd("leo -q build", &path).is_ok()); -// } -// -// #[test] -// fn global_options_fail() { -// assert!(run_cmd("leo --path ../../examples/no-directory-there build", &None).is_err()); -// assert!(run_cmd("leo -v build", &None).is_err()); -// } -// -// #[test] -// fn init() { -// let dir = testdir("test"); -// let path = Some(dir.path("test")); -// -// assert!(run_cmd("leo init", &path).is_ok()); -// assert!(run_cmd("leo init", &path).is_err()); // 2nd time -// } -// -// #[test] -// fn init_fail() { -// let dir = testdir("incorrect_name"); -// let path = Some(dir.path("incorrect_name")); -// let fake = Some(PathBuf::from("no_such_directory")); -// -// assert!(run_cmd("leo init", &fake).is_err()); -// assert!(run_cmd("leo init", &path).is_err()); -// } -// -// #[test] -// fn new() { -// let dir = testdir("new"); -// let path = Some(dir.path("new")); -// -// assert!(run_cmd("leo new test", &path).is_ok()); -// assert!(run_cmd("leo new test", &path).is_err()); // 2nd time -// assert!(run_cmd("leo new wrong_name", &path).is_err()); -// } -// -// #[test] -// #[should_panic] -// fn unimplemented() { -// assert!(run_cmd("leo lint", &None).is_err()); -// assert!(run_cmd("leo deploy", &None).is_err()); -// } -// -// #[test] -// fn clean() { -// let path = &Some(PathBuf::from("examples/pedersen-hash")); -// -// assert!(run_cmd("leo build", path).is_ok()); -// assert!(run_cmd("leo clean", path).is_ok()); -// } -// -// #[test] -// fn build_optimizations() { -// let dir = testdir("build-test"); -// let path = dir.path("build-test"); -// -// assert!(run_cmd("leo new setup-test", &Some(path.clone())).is_ok()); -// -// let build_path = &Some(path.join("setup-test")); -// -// assert!(run_cmd("leo build --disable-all-optimizations", build_path).is_ok()); -// assert!(run_cmd("leo build --disable-code-elimination", build_path).is_ok()); -// assert!(run_cmd("leo build --disable-constant-folding", build_path).is_ok()); -// } -// -// #[test] -// fn setup_prove_run_clean() { -// let dir = testdir("test"); -// let path = dir.path("test"); -// -// assert!(run_cmd("leo new setup-test", &Some(path.clone())).is_ok()); -// -// let setup_path = &Some(path.join("setup-test")); -// -// assert!(run_cmd("leo setup", setup_path).is_ok()); -// assert!(run_cmd("leo setup", setup_path).is_ok()); -// assert!(run_cmd("leo setup --skip-key-check", setup_path).is_ok()); -// assert!(run_cmd("leo prove --skip-key-check", setup_path).is_ok()); -// assert!(run_cmd("leo run --skip-key-check", setup_path).is_ok()); -// assert!(run_cmd("leo clean", setup_path).is_ok()); -// } -// -// #[test] -// #[ignore] -// fn test_import() { -// let dir = testdir("test"); -// let path = dir.path("test"); -// -// assert!(run_cmd("leo new import", &Some(path.clone())).is_ok()); -// -// let import_path = &Some(path.join("import")); -// -// assert!(run_cmd("leo add no-package/definitely-no", import_path).is_err()); -// assert!(run_cmd("leo add justice-league/u8u32", import_path).is_ok()); -// assert!(run_cmd("leo remove u8u32", import_path).is_ok()); -// assert!(run_cmd("leo add --author justice-league --package u8u32", import_path).is_ok()); -// assert!(run_cmd("leo remove u8u32", import_path).is_ok()); -// assert!(run_cmd("leo remove u8u32", import_path).is_err()); -// } -// -// #[test] -// fn test_missing_file() { -// let dir = testdir("test"); -// let path = dir.path("test"); -// -// assert!(run_cmd("leo new test-file-missing", &Some(path.clone())).is_ok()); -// -// let path = path.join("test-file-missing"); -// let file = path.join("src/main.leo"); -// let path = Some(path); -// -// assert!(run_cmd("leo test", &path).is_ok()); -// std::fs::remove_file(&file).unwrap(); -// assert!(run_cmd("leo test", &path).is_err()); -// } -// -// #[test] -// fn test_sudoku() { -// let path = &Some(PathBuf::from("examples/silly-sudoku")); -// -// assert!(run_cmd("leo build", path).is_ok()); -// assert!(run_cmd("leo test", path).is_ok()); -// assert!(run_cmd("leo test -f examples/silly-sudoku/src/lib.leo", path).is_ok()); -// assert!(run_cmd("leo test -f examples/silly-sudoku/src/main.leo", path).is_ok()); -// } -// -// #[test] -// fn test_install() { -// let dir = testdir("test"); -// let path = dir.path("test"); -// -// assert!(run_cmd("leo new install", &Some(path.clone())).is_ok()); -// -// let install_path = &Some(path.join("install")); -// -// let mut file = std::fs::OpenOptions::new() -// .write(true) -// .append(true) -// .open(path.join("install/Leo.toml")) -// .unwrap(); -// -// assert!(run_cmd("leo fetch", install_path).is_ok()); -// assert!(file -// .write_all( -// br#" -// sudoku = {author = "justice-league", package = "u8u32", version = "0.1.0"} -// "# -// ) -// .is_ok()); -// -// assert!(run_cmd("leo fetch", install_path).is_ok()); -// assert!(run_cmd("leo build", install_path).is_ok()); -// } -// } diff --git a/leo/package/src/inputs/input.rs b/leo/package/src/inputs/input.rs index dee280a741..acb702a512 100644 --- a/leo/package/src/inputs/input.rs +++ b/leo/package/src/inputs/input.rs @@ -76,11 +76,8 @@ impl InputFile { format!( r#"// The program input for {}/src/main.leo [main] -a: u32 = 1; -b: u32 = 2; - -[registers] -r0: u32 = 0; +a: u32 = 1u32; +b: u32 = 2u32; "#, self.package_name ) diff --git a/leo/package/src/package.rs b/leo/package/src/package.rs index df67bd7b19..13509dab5d 100644 --- a/leo/package/src/package.rs +++ b/leo/package/src/package.rs @@ -16,7 +16,7 @@ use crate::{ inputs::{InputFile, InputsDirectory}, - root::{Gitignore, README}, + root::Gitignore, source::{MainFile, SourceDirectory}, }; @@ -157,40 +157,25 @@ impl Package { true } - /// Creates a package at the given path - pub fn initialize(package_name: &str, path: &Path, _author: Option) -> Result<()> { - // First, verify that this directory is not already initialized as a Leo package. - { - if !Self::can_initialize(package_name, path) { - return Err(PackageError::failed_to_initialize_package(package_name, path.as_os_str()).into()); - } + /// Creates a Leo package at the given path + pub fn initialize(package_name: &str, path: &Path) -> Result<()> { + // Verify that the .gitignore file does not exist. + if !Gitignore::exists_at(path) { + // Create the .gitignore file. + Gitignore::new().write_to(path)?; } - // Next, initialize this directory as a Leo package. - { - // Verify that the .gitignore file does not exist. - if !Gitignore::exists_at(path) { - // Create the .gitignore file. - Gitignore::new().write_to(path)?; - } - // Verify that the README.md file does not exist. - if !README::exists_at(path) { - // Create the README.md file. - README::new(package_name).write_to(path)?; - } + // Create the source directory. + SourceDirectory::create(path)?; - // Create the source directory. - SourceDirectory::create(path)?; + // Create the input directory. + InputsDirectory::create(path)?; - // Create the input directory. - InputsDirectory::create(path)?; + // Create the input file in the inputs directory. + InputFile::new(package_name).write_to(path)?; - // Create the input file in the inputs directory. - InputFile::new(package_name).write_to(path)?; - - // Create the main file in the source directory. - MainFile::new(package_name).write_to(path)?; - } + // Create the main file in the source directory. + MainFile::new(package_name).write_to(path)?; // Next, verify that a valid Leo package has been initialized in this directory { if !Self::is_initialized(package_name, path) { diff --git a/leo/package/src/root/gitignore.rs b/leo/package/src/root/gitignore.rs index 31fefa8715..5122a98601 100644 --- a/leo/package/src/root/gitignore.rs +++ b/leo/package/src/root/gitignore.rs @@ -52,6 +52,6 @@ impl Gitignore { } fn template(&self) -> String { - "outputs/\n".to_string() + "outputs/\nbuild/\n".to_string() } } diff --git a/leo/package/src/root/mod.rs b/leo/package/src/root/mod.rs index 63c34f0993..9baedd22eb 100644 --- a/leo/package/src/root/mod.rs +++ b/leo/package/src/root/mod.rs @@ -16,6 +16,3 @@ pub mod gitignore; pub use self::gitignore::*; - -pub mod readme; -pub use self::readme::*; diff --git a/leo/package/src/root/readme.rs b/leo/package/src/root/readme.rs deleted file mode 100644 index 7b38f188ab..0000000000 --- a/leo/package/src/root/readme.rs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) 2019-2022 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 . -#![allow(clippy::upper_case_acronyms)] - -//! The `README.md` file. - -use leo_errors::{PackageError, Result}; - -use serde::Deserialize; -use std::{borrow::Cow, fs::File, io::Write, path::Path}; - -pub static README_FILENAME: &str = "README.md"; - -#[derive(Deserialize)] -pub struct README { - pub package_name: String, -} - -impl README { - pub fn new(package_name: &str) -> Self { - Self { - package_name: package_name.to_string(), - } - } - - pub fn package_name(&self) -> String { - self.package_name.clone() - } - - pub fn exists_at(path: &Path) -> bool { - let mut path = Cow::from(path); - if path.is_dir() { - path.to_mut().push(README_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(README_FILENAME); - } - - let mut file = File::create(&path).map_err(PackageError::io_error_readme_file)?; - - file.write_all(self.template().as_bytes()) - .map_err(PackageError::io_error_readme_file)?; - Ok(()) - } - - fn template(&self) -> String { - format!( - r"# {} - -## Build Guide - -To compile this Leo program, run: -```bash -leo build -``` - -To test this Leo program, run: -```bash -leo test -``` - -## Development - -To output the number of constraints, run: -```bash -leo build -d -``` -", - self.package_name - ) - } -} diff --git a/leo/package/tests/initialize/mod.rs b/leo/package/tests/initialize/mod.rs index 21faba3806..92a68e88d1 100644 --- a/leo/package/tests/initialize/mod.rs +++ b/leo/package/tests/initialize/mod.rs @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -pub mod initialize; +// pub mod initialize; diff --git a/leo/package/tests/mod.rs b/leo/package/tests/mod.rs index 43d58c3209..5a22cd5961 100644 --- a/leo/package/tests/mod.rs +++ b/leo/package/tests/mod.rs @@ -16,59 +16,59 @@ #![allow(clippy::module_inception)] -pub mod initialize; -pub mod manifest; - -use lazy_static::lazy_static; -use std::{ - cell::RefCell, - env, fs, - path::PathBuf, - sync::atomic::{AtomicUsize, Ordering}, -}; - -const PACKAGE_TEST_DIRECTORY: &str = "package-testing"; - -thread_local! { - /// Establish a test id for each test. - pub static TEST_ID: RefCell> = RefCell::new(None); -} - -lazy_static! { - /// Create a testing directory for packages in `target/` - pub static ref TEST_DIR: PathBuf = { - let mut path = env::current_exe().unwrap(); - path.pop(); // Remove executable name - path.pop(); // Remove 'debug' - - // Attempt to point at the `target` directory - if path.file_name().and_then(|s| s.to_str()) != Some("target") { - path.pop(); - } - - path.push(PACKAGE_TEST_DIRECTORY); - fs::create_dir_all(&path).unwrap(); - - path - }; -} - -/// Create a new directory for each test based on the ID of the test. -pub(crate) fn test_dir() -> PathBuf { - static NEXT_ID: AtomicUsize = AtomicUsize::new(0); - - let id = NEXT_ID.fetch_add(1, Ordering::Relaxed); - TEST_ID.with(|n| *n.borrow_mut() = Some(id)); - - let path: PathBuf = TEST_DIR.join(&format!("t{}", id)); - - if path.exists() { - if let Err(e) = fs::remove_dir_all(&path) { - panic!("failed to remove {:?}: {:?}", &path, e) - } - } - - fs::create_dir_all(&path).unwrap(); - - path -} +// pub mod initialize; +// pub mod manifest; +// +// use lazy_static::lazy_static; +// use std::{ +// cell::RefCell, +// env, fs, +// path::PathBuf, +// sync::atomic::{AtomicUsize, Ordering}, +// }; +// +// const PACKAGE_TEST_DIRECTORY: &str = "package-testing"; +// +// thread_local! { +// /// Establish a test id for each test. +// pub static TEST_ID: RefCell> = RefCell::new(None); +// } +// +// lazy_static! { +// /// Create a testing directory for packages in `target/` +// pub static ref TEST_DIR: PathBuf = { +// let mut path = env::current_exe().unwrap(); +// path.pop(); // Remove executable name +// path.pop(); // Remove 'debug' +// +// // Attempt to point at the `target` directory +// if path.file_name().and_then(|s| s.to_str()) != Some("target") { +// path.pop(); +// } +// +// path.push(PACKAGE_TEST_DIRECTORY); +// fs::create_dir_all(&path).unwrap(); +// +// path +// }; +// } +// +// /// Create a new directory for each test based on the ID of the test. +// pub(crate) fn test_dir() -> PathBuf { +// static NEXT_ID: AtomicUsize = AtomicUsize::new(0); +// +// let id = NEXT_ID.fetch_add(1, Ordering::Relaxed); +// TEST_ID.with(|n| *n.borrow_mut() = Some(id)); +// +// let path: PathBuf = TEST_DIR.join(&format!("t{}", id)); +// +// if path.exists() { +// if let Err(e) = fs::remove_dir_all(&path) { +// panic!("failed to remove {:?}: {:?}", &path, e) +// } +// } +// +// fs::create_dir_all(&path).unwrap(); +// +// path +// } diff --git a/leo/api.rs b/leo/unused/api.rs similarity index 100% rename from leo/api.rs rename to leo/unused/api.rs diff --git a/leo/config.rs b/leo/unused/config.rs similarity index 100% rename from leo/config.rs rename to leo/unused/config.rs diff --git a/leo/updater.rs b/leo/updater.rs index 9926042659..ed3a9925fb 100644 --- a/leo/updater.rs +++ b/leo/updater.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::config::Config; use leo_errors::{CliError, Result}; use std::fmt::Write as _; @@ -91,24 +90,13 @@ impl Updater { /// Display the CLI message, if the Leo configuration allows. pub fn print_cli() { - let config = Config::read_config().unwrap(); + // If the auto update configuration is off, notify the user to update leo. + if let Ok(latest_version) = Self::update_available() { + let mut message = "🟢 A new version is available! Run".bold().green().to_string(); + message += &" `leo update` ".bold().white(); + message += &format!("to update to v{}.", latest_version).bold().green(); - if config.update.automatic { - // If the auto update configuration is on, attempt to update the version. - if let Ok(status) = Self::update_to_latest_release(false) { - if status.updated() { - tracing::info!("Successfully updated to {}", status.version()); - } - } - } else { - // If the auto update configuration is off, notify the user to update leo. - if let Ok(latest_version) = Self::update_available() { - let mut message = "🟢 A new version is available! Run".bold().green().to_string(); - message += &" `leo update` ".bold().white(); - message += &format!("to update to v{}.", latest_version).bold().green(); - - tracing::info!("\n{}\n", message); - } + tracing::info!("\n{}\n", message); } } } From fa28678a261641f165b7f4013021983ad73ef5c7 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 14:44:20 -0700 Subject: [PATCH 22/43] impl leo run --- compiler/ast/src/input/input_ast.rs | 18 +++++++-- compiler/ast/src/input/mod.rs | 3 -- compiler/ast/src/input/program_input.rs | 11 +----- compiler/ast/src/input/program_state.rs | 50 ------------------------- compiler/parser/src/lib.rs | 7 +--- leo/commands/build.rs | 16 ++++---- leo/commands/mod.rs | 1 + leo/commands/new.rs | 10 +++-- leo/commands/run.rs | 38 ++++++++++++++----- 9 files changed, 63 insertions(+), 91 deletions(-) delete mode 100644 compiler/ast/src/input/program_state.rs diff --git a/compiler/ast/src/input/input_ast.rs b/compiler/ast/src/input/input_ast.rs index 11f57a615b..17cdb95d2d 100644 --- a/compiler/ast/src/input/input_ast.rs +++ b/compiler/ast/src/input/input_ast.rs @@ -19,11 +19,10 @@ use crate::{normalize_json_value, remove_key_from_json}; use super::*; use leo_errors::{AstError, Result}; -/// Input data which includes [`ProgramInput`] and [`ProgramState`]. +/// Input data which includes [`ProgramInput`]. #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct Input { pub program_input: ProgramInput, - pub program_state: ProgramState, } impl Input { @@ -34,13 +33,26 @@ impl Input { } /// A raw unprocessed input or state file data. Used for future conversion -/// into [`ProgramInput`] or [`ProgramState`]. +/// into [`ProgramInput`]. #[derive(Clone, Debug, Serialize, Deserialize)] pub struct InputAst { pub sections: Vec
, } impl InputAst { + /// Returns all values of the input AST for execution with `leo run`. + pub fn values(&self) -> Vec { + self.sections + .iter() + .flat_map(|section| { + section + .definitions + .iter() + .map(|definition| definition.value.to_string()) + }) + .collect::>() + } + /// Serializes the `Input` into a JSON Value. pub fn to_json_value(&self) -> Result { Ok(serde_json::to_value(&self).map_err(|e| AstError::failed_to_convert_ast_to_json_value(&e))?) diff --git a/compiler/ast/src/input/mod.rs b/compiler/ast/src/input/mod.rs index 2b9c2bd8f0..a9d4989ae7 100644 --- a/compiler/ast/src/input/mod.rs +++ b/compiler/ast/src/input/mod.rs @@ -26,9 +26,6 @@ pub use input_value::*; pub mod program_input; pub use program_input::*; -pub mod program_state; -pub use program_state::*; - pub mod section; pub use section::*; diff --git a/compiler/ast/src/input/program_input.rs b/compiler/ast/src/input/program_input.rs index 55ab527c98..560d3afbc8 100644 --- a/compiler/ast/src/input/program_input.rs +++ b/compiler/ast/src/input/program_input.rs @@ -20,24 +20,17 @@ use super::*; #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct ProgramInput { pub main: Definitions, - pub registers: Definitions, } impl TryFrom for ProgramInput { type Error = LeoError; fn try_from(input: InputAst) -> Result { let mut main = IndexMap::new(); - let mut registers = IndexMap::new(); for section in input.sections { let target = match section.name { sym::main => &mut main, - sym::registers => &mut registers, - _ => { - return Err( - InputError::unexpected_section(&["main", "registers"], section.name, section.span).into(), - ) - } + _ => return Err(InputError::unexpected_section(&["main"], section.name, section.span).into()), }; for definition in section.definitions { @@ -48,6 +41,6 @@ impl TryFrom for ProgramInput { } } - Ok(ProgramInput { main, registers }) + Ok(ProgramInput { main }) } } diff --git a/compiler/ast/src/input/program_state.rs b/compiler/ast/src/input/program_state.rs deleted file mode 100644 index b3ecc3a644..0000000000 --- a/compiler/ast/src/input/program_state.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2019-2022 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::*; - -/// Processed Program state. -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -pub struct ProgramState { - pub state: Definitions, -} - -impl TryFrom for ProgramState { - type Error = LeoError; - fn try_from(input: InputAst) -> Result { - let mut state = IndexMap::new(); - - for section in input.sections { - if matches!(section.name, sym::state | sym::record | sym::state_leaf) { - for definition in section.definitions { - state.insert( - definition.name.name, - InputValue::try_from((definition.type_, definition.value))?, - ); - } - } else { - return Err(InputError::unexpected_section( - &["state", "record", "state_leaf"], - section.name, - section.span, - ) - .into()); - } - } - - Ok(ProgramState { state }) - } -} diff --git a/compiler/parser/src/lib.rs b/compiler/parser/src/lib.rs index 00fc0d8893..1c7942b417 100644 --- a/compiler/parser/src/lib.rs +++ b/compiler/parser/src/lib.rs @@ -30,7 +30,7 @@ pub(crate) use tokenizer::*; pub mod parser; pub use parser::*; -use leo_ast::{Ast, Input, ProgramInput, ProgramState}; +use leo_ast::{Ast, Input, ProgramInput}; use leo_errors::emitter::Handler; use leo_errors::Result; @@ -46,8 +46,5 @@ pub fn parse_ast(handler: &Handler, source: &str, start_pos: BytePos) -> Result< pub fn parse_program_inputs(handler: &Handler, input_string: &str, start_pos: BytePos) -> Result { let program_input: ProgramInput = parser::parse_input(handler, input_string, start_pos)?.try_into()?; - Ok(Input { - program_input, - program_state: ProgramState::default(), - }) + Ok(Input { program_input }) } diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 1b4771a428..656559687c 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -16,7 +16,7 @@ use super::*; use crate::{commands::Command, context::Context}; -use leo_compiler::{Ast, Compiler, InputAst, OutputOptions}; +use leo_compiler::{Compiler, InputAst, OutputOptions}; use leo_errors::{CliError, Result}; use leo_package::{ inputs::InputFile, @@ -75,7 +75,7 @@ pub struct Build { impl Command for Build { type Input = (); - type Output = (Option, Ast, bool); + type Output = Option; fn log_span(&self) -> Span { tracing::span!(tracing::Level::INFO, "Build") @@ -89,8 +89,8 @@ impl Command for Build { // Get the package path. let path = context.dir()?; - // Get the package name. - let package_name = context.program_name()?; + // Get the program name. + let program_name = context.program_name()?; // Sanitize the package path to the root directory. let mut package_path = path.clone(); @@ -115,7 +115,7 @@ impl Command for Build { main_file_path.push(MAIN_FILENAME); // Load the input file at `package_name.in` - let input_path = InputFile::new(&package_name).setup_file_path(&path); + let input_path = InputFile::new(&program_name).setup_file_path(&path); // Create the outputs directory OutputsDirectory::create(&package_path)?; @@ -128,7 +128,7 @@ impl Command for Build { // Create a new instance of the Leo compiler. let mut program = Compiler::new( - package_name.to_string(), + program_name.to_string(), String::from("aleo"), &handler, main_file_path, @@ -163,7 +163,7 @@ impl Command for Build { } // If a checksum file exists, check if it differs from the new checksum - let checksum_file = ChecksumFile::new(&package_name); + let checksum_file = ChecksumFile::new(&program_name); let checksum_differs = if checksum_file.exists_at(&package_path) { let previous_checksum = checksum_file.read_from(&package_path)?; program_checksum != previous_checksum @@ -182,6 +182,6 @@ impl Command for Build { tracing::info!("Complete"); - Ok((program.input_ast, program.ast, checksum_differs)) + Ok(program.input_ast) } } diff --git a/leo/commands/mod.rs b/leo/commands/mod.rs index fe2901b4fa..6bea9995c7 100644 --- a/leo/commands/mod.rs +++ b/leo/commands/mod.rs @@ -39,6 +39,7 @@ use std::time::Instant; use tracing::span::Span; pub(crate) type Network = snarkvm::prelude::Testnet3; +pub(crate) const ALEO_CLI_COMMAND: &str = "aleo"; /// Base trait for the Leo CLI, see methods and their documentation for details. pub trait Command { diff --git a/leo/commands/new.rs b/leo/commands/new.rs index ffd4fcb489..26513aacf5 100644 --- a/leo/commands/new.rs +++ b/leo/commands/new.rs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +use crate::commands::ALEO_CLI_COMMAND; use crate::{commands::Command, context::Context}; use leo_errors::{PackageError, Result}; use leo_package::package::Package; @@ -43,8 +44,11 @@ impl Command for New { } fn apply(self, _context: Context, _: Self::Input) -> Result { + tracing::info!("Starting..."); + // Call the `aleo new` command from the Aleo SDK. - let command = AleoNew::try_parse_from(&["aleo", &self.name]).expect("Failed to parse `aleo new` command"); + let command = + AleoNew::try_parse_from(&[ALEO_CLI_COMMAND, &self.name]).expect("Failed to parse `aleo new` command"); let result = command.parse().expect("Failed to create a new Aleo project"); // Derive the program directory path. @@ -54,9 +58,9 @@ impl Command for New { // Initialize the Leo package in the directory created by `aleo new`. Package::initialize(&self.name, &path)?; - // todo: modify the readme file to build with `leo build`. + // todo: modify the readme file to recommend building with `leo build`. - // Log success. + // Log the output of the `aleo new` command. tracing::info!("{}", result); Ok(()) diff --git a/leo/commands/run.rs b/leo/commands/run.rs index 7ce164107f..098920201c 100644 --- a/leo/commands/run.rs +++ b/leo/commands/run.rs @@ -15,10 +15,14 @@ // along with the Leo library. If not, see . use super::build::BuildOptions; -use crate::{commands::Command, context::Context}; +use crate::commands::ALEO_CLI_COMMAND; +use crate::{ + commands::{Build, Command}, + context::Context, +}; use leo_errors::Result; -// use aleo::commands::CLI as AleoCLI; +use aleo::commands::Run as AleoRun; use clap::StructOpt; use tracing::span::Span; @@ -34,25 +38,39 @@ pub struct Run { } impl Command for Run { - type Input = (); + type Input = ::Output; type Output = (); fn log_span(&self) -> Span { tracing::span!(tracing::Level::INFO, "Executing") } - fn prelude(&self, _context: Context) -> Result { - Ok(()) // todo: call aleo build here? + fn prelude(&self, context: Context) -> Result { + (Build { + compiler_options: self.compiler_options.clone(), + }) + .execute(context) } - fn apply(self, _context: Context, _input: Self::Input) -> Result { + fn apply(self, _context: Context, input: Self::Input) -> Result { + // Compose the `aleo run` command. + let mut arguments = vec![ALEO_CLI_COMMAND.to_string(), "main".to_string()]; + + // Get the input values. + let mut values = match input { + Some(input_ast) => input_ast.values(), + None => Vec::new(), + }; + arguments.append(&mut values); + tracing::info!("Starting..."); - // Execute the aleo program. - // let cli = AleoCLI::parse_from(&["aleo", "run", "main"]); + // Call the `aleo run` command from the Aleo SDK. + let command = AleoRun::try_parse_from(&arguments).expect("Failed to parse aleo run command"); + let res = command.parse().expect("Failed to execute Aleo project."); - // Log the verifier output - // tracing::info!("Result: {}", res); + // Log the output of the `aleo run` command. + tracing::info!("{}", res); Ok(()) } From f93186513e08e8e0fc21d2f9b13895866307bd02 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 15:00:46 -0700 Subject: [PATCH 23/43] improve errors --- leo/commands/build.rs | 2 +- leo/commands/new.rs | 16 +++++++------ leo/commands/run.rs | 6 ++--- leo/errors/src/errors/cli/cli_errors.rs | 32 +++++++++++++++++++++++-- 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/leo/commands/build.rs b/leo/commands/build.rs index 656559687c..ce0cc754fd 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -157,7 +157,7 @@ impl Command for Build { .map_err(|err| CliError::failed_to_write_to_aleo_file(aleo_file_path.display(), err))?; // Call the `aleo build` command from the Aleo SDK. - let res = AleoBuild.parse().map_err(CliError::failed_to_call_aleo_build)?; + let res = AleoBuild.parse().map_err(CliError::failed_to_execute_aleo_build)?; // Log the result of the build tracing::info!("Result: {}", res); } diff --git a/leo/commands/new.rs b/leo/commands/new.rs index 26513aacf5..979000c421 100644 --- a/leo/commands/new.rs +++ b/leo/commands/new.rs @@ -14,9 +14,11 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use crate::commands::ALEO_CLI_COMMAND; -use crate::{commands::Command, context::Context}; -use leo_errors::{PackageError, Result}; +use crate::{ + commands::{Command, ALEO_CLI_COMMAND}, + context::Context, +}; +use leo_errors::{CliError, Result}; use leo_package::package::Package; use aleo::commands::New as AleoNew; @@ -43,16 +45,16 @@ impl Command for New { Ok(()) } - fn apply(self, _context: Context, _: Self::Input) -> Result { + fn apply(self, context: Context, _: Self::Input) -> Result { tracing::info!("Starting..."); // Call the `aleo new` command from the Aleo SDK. let command = - AleoNew::try_parse_from(&[ALEO_CLI_COMMAND, &self.name]).expect("Failed to parse `aleo new` command"); - let result = command.parse().expect("Failed to create a new Aleo project"); + 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)?; // Derive the program directory path. - let mut path = std::env::current_dir().map_err(|e| PackageError::io_error("current directory", e))?; + let mut path = context.dir()?; path.push(&self.name); // Initialize the Leo package in the directory created by `aleo new`. diff --git a/leo/commands/run.rs b/leo/commands/run.rs index 098920201c..99e0c241b8 100644 --- a/leo/commands/run.rs +++ b/leo/commands/run.rs @@ -20,7 +20,7 @@ use crate::{ commands::{Build, Command}, context::Context, }; -use leo_errors::Result; +use leo_errors::{CliError, Result}; use aleo::commands::Run as AleoRun; @@ -66,8 +66,8 @@ impl Command for Run { tracing::info!("Starting..."); // Call the `aleo run` command from the Aleo SDK. - let command = AleoRun::try_parse_from(&arguments).expect("Failed to parse aleo run command"); - let res = command.parse().expect("Failed to execute Aleo project."); + 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)?; // Log the output of the `aleo run` command. tracing::info!("{}", res); diff --git a/leo/errors/src/errors/cli/cli_errors.rs b/leo/errors/src/errors/cli/cli_errors.rs index 1136217ef8..6495d7e0bf 100644 --- a/leo/errors/src/errors/cli/cli_errors.rs +++ b/leo/errors/src/errors/cli/cli_errors.rs @@ -423,9 +423,37 @@ create_messages!( } @backtraced - failed_to_call_aleo_build { + failed_to_execute_aleo_build { args: (error: impl Display), - msg: format!("Failed to call the `aleo build` command. Error: {}", error), + msg: format!("Failed to execute the `aleo build` command. Error: {}", error), + help: None, + } + + @backtraced + failed_to_execute_aleo_new { + args: (error: impl Display), + msg: format!("Failed to execute the `aleo new` command. Error: {}", error), + help: None, + } + + @backtraced + failed_to_execute_aleo_run { + args: (error: impl Display), + msg: format!("Failed to execute the `aleo run` command. Error: {}", error), + help: None, + } + + @backtraced + failed_to_parse_aleo_new { + args: (error: impl Display), + msg: format!("Failed to parse the `aleo new` command. Error: {}", error), + help: None, + } + + @backtraced + failed_to_parse_aleo_run { + args: (error: impl Display), + msg: format!("Failed to parse the `aleo run` command. Error: {}", error), help: None, } ); From f91b960031c8b9c0258393d999677380b41e011a Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 15:12:46 -0700 Subject: [PATCH 24/43] push public input var in helloworld example --- examples/helloworld/inputs/helloworld.in | 4 ++-- examples/helloworld/main.aleo | 2 +- examples/helloworld/src/main.leo | 2 +- leo/package/src/inputs/input.rs | 2 +- leo/package/src/source/main.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/helloworld/inputs/helloworld.in b/examples/helloworld/inputs/helloworld.in index 774a402e83..deaaded38e 100644 --- a/examples/helloworld/inputs/helloworld.in +++ b/examples/helloworld/inputs/helloworld.in @@ -1,4 +1,4 @@ // The program input for helloworld/src/main.leo [main] -a: u32 = 1u32; -b: u32 = 2u32; +public a: u32 = 1u32; +b: u32 = 2u32; // Input variable `b` is private by default. diff --git a/examples/helloworld/main.aleo b/examples/helloworld/main.aleo index 778936d032..88fd8a3f5b 100644 --- a/examples/helloworld/main.aleo +++ b/examples/helloworld/main.aleo @@ -1,7 +1,7 @@ program helloworld.aleo; function main: - input r0 as u32.private; + 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/src/main.leo b/examples/helloworld/src/main.leo index 6ca156da3f..7ec442526d 100644 --- a/examples/helloworld/src/main.leo +++ b/examples/helloworld/src/main.leo @@ -1,5 +1,5 @@ // The 'helloworld' main function. -function main(a: u32, b: u32) -> u32 { +function main(public a: u32, b: u32) -> u32 { let c: u32 = a + b; return c; } diff --git a/leo/package/src/inputs/input.rs b/leo/package/src/inputs/input.rs index acb702a512..ee1b9fa476 100644 --- a/leo/package/src/inputs/input.rs +++ b/leo/package/src/inputs/input.rs @@ -76,7 +76,7 @@ impl InputFile { format!( r#"// The program input for {}/src/main.leo [main] -a: u32 = 1u32; +public a: u32 = 1u32; b: u32 = 2u32; "#, self.package_name diff --git a/leo/package/src/source/main.rs b/leo/package/src/source/main.rs index c3759dec8b..19baf2f3be 100644 --- a/leo/package/src/source/main.rs +++ b/leo/package/src/source/main.rs @@ -69,7 +69,7 @@ impl MainFile { fn template(&self) -> String { format!( r#"// The '{}' main function. -function main(a: u32, b: u32) -> u32 {{ +function main(public a: u32, b: u32) -> u32 {{ let c: u32 = a + b; return c; }} From 163f94d7c1bcf3e042518387d61b5dac96e245a9 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 15:41:11 -0700 Subject: [PATCH 25/43] regen tests --- tests/expectations/compiler/compiler/address/binary.out | 2 +- tests/expectations/compiler/compiler/address/branch.out | 2 +- tests/expectations/compiler/compiler/address/equal.out | 2 +- tests/expectations/compiler/compiler/address/ternary.out | 2 +- tests/expectations/compiler/compiler/boolean/and.out | 2 +- tests/expectations/compiler/compiler/boolean/conditional.out | 2 +- tests/expectations/compiler/compiler/boolean/equal.out | 2 +- tests/expectations/compiler/compiler/boolean/not_equal.out | 2 +- .../expectations/compiler/compiler/boolean/operator_methods.out | 2 +- tests/expectations/compiler/compiler/boolean/or.out | 2 +- tests/expectations/compiler/compiler/char/string.out | 2 +- tests/expectations/compiler/compiler/circuits/inline.out | 2 +- .../expectations/compiler/compiler/circuits/member_variable.out | 2 +- tests/expectations/compiler/compiler/console/assert.out | 2 +- .../compiler/compiler/console/conditional_assert.out | 2 +- tests/expectations/compiler/compiler/console/error.out | 2 +- tests/expectations/compiler/compiler/console/log.out | 2 +- .../expectations/compiler/compiler/console/log_conditional.out | 2 +- tests/expectations/compiler/compiler/console/log_input.out | 2 +- tests/expectations/compiler/compiler/console/log_parameter.out | 2 +- .../compiler/compiler/console/log_parameter_many.out | 2 +- tests/expectations/compiler/compiler/core/algorithms/bhp.out | 2 +- .../expectations/compiler/compiler/core/algorithms/pedersen.out | 2 +- .../expectations/compiler/compiler/core/algorithms/poseidon.out | 2 +- .../expectations/compiler/compiler/definition/out_of_order.out | 2 +- tests/expectations/compiler/compiler/field/add.out | 2 +- tests/expectations/compiler/compiler/field/div.out | 2 +- tests/expectations/compiler/compiler/field/eq.out | 2 +- tests/expectations/compiler/compiler/field/field.out | 2 +- tests/expectations/compiler/compiler/field/mul.out | 2 +- tests/expectations/compiler/compiler/field/negate.out | 2 +- tests/expectations/compiler/compiler/field/operator_methods.out | 2 +- tests/expectations/compiler/compiler/field/pow.out | 2 +- tests/expectations/compiler/compiler/field/sub.out | 2 +- tests/expectations/compiler/compiler/field/ternary.out | 2 +- .../compiler/compiler/function/conditional_return.out | 2 +- tests/expectations/compiler/compiler/function/iteration.out | 2 +- .../compiler/compiler/function/iteration_repeated.out | 2 +- tests/expectations/compiler/compiler/function/repeated.out | 2 +- tests/expectations/compiler/compiler/function/return.out | 2 +- tests/expectations/compiler/compiler/group/add.out | 2 +- tests/expectations/compiler/compiler/group/assert_eq.out | 2 +- tests/expectations/compiler/compiler/group/both_sign_high.out | 2 +- .../expectations/compiler/compiler/group/both_sign_inferred.out | 2 +- tests/expectations/compiler/compiler/group/both_sign_low.out | 2 +- tests/expectations/compiler/compiler/group/eq.out | 2 +- tests/expectations/compiler/compiler/group/input.out | 2 +- tests/expectations/compiler/compiler/group/mult_by_scalar.out | 2 +- tests/expectations/compiler/compiler/group/negate.out | 2 +- tests/expectations/compiler/compiler/group/one.out | 2 +- tests/expectations/compiler/compiler/group/operator_methods.out | 2 +- tests/expectations/compiler/compiler/group/point.out | 2 +- tests/expectations/compiler/compiler/group/point_input.out | 2 +- .../compiler/compiler/group/positive_and_negative.out | 2 +- tests/expectations/compiler/compiler/group/sub.out | 2 +- tests/expectations/compiler/compiler/group/ternary.out | 2 +- tests/expectations/compiler/compiler/group/x_and_y.out | 2 +- tests/expectations/compiler/compiler/group/x_sign_high.out | 2 +- tests/expectations/compiler/compiler/group/x_sign_inferred.out | 2 +- tests/expectations/compiler/compiler/group/x_sign_low.out | 2 +- tests/expectations/compiler/compiler/group/y_sign_high.out | 2 +- tests/expectations/compiler/compiler/group/y_sign_inferred.out | 2 +- tests/expectations/compiler/compiler/group/y_sign_low.out | 2 +- tests/expectations/compiler/compiler/group/zero.out | 2 +- .../compiler/compiler/input_files/program_input/main.out | 2 +- .../compiler/compiler/input_files/program_input/main_field.out | 2 +- .../compiler/compiler/input_files/program_input/main_group.out | 2 +- .../compiler/input_files/program_input_constants/main.out | 2 +- .../compiler/input_files/program_input_constants/main_field.out | 2 +- .../compiler/input_files/program_input_constants/main_group.out | 2 +- .../input_files/program_input_constants/main_multiple.out | 2 +- tests/expectations/compiler/compiler/integers/i128/add.out | 2 +- tests/expectations/compiler/compiler/integers/i128/and.out | 2 +- .../compiler/compiler/integers/i128/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/i128/div.out | 2 +- tests/expectations/compiler/compiler/integers/i128/eq.out | 2 +- tests/expectations/compiler/compiler/integers/i128/ge.out | 2 +- tests/expectations/compiler/compiler/integers/i128/gt.out | 2 +- tests/expectations/compiler/compiler/integers/i128/le.out | 2 +- tests/expectations/compiler/compiler/integers/i128/lt.out | 2 +- tests/expectations/compiler/compiler/integers/i128/max.out | 2 +- tests/expectations/compiler/compiler/integers/i128/min.out | 2 +- tests/expectations/compiler/compiler/integers/i128/mul.out | 2 +- tests/expectations/compiler/compiler/integers/i128/ne.out | 2 +- tests/expectations/compiler/compiler/integers/i128/negate.out | 2 +- .../expectations/compiler/compiler/integers/i128/negate_min.out | 2 +- .../compiler/compiler/integers/i128/negate_zero.out | 2 +- .../compiler/compiler/integers/i128/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/i128/or.out | 2 +- tests/expectations/compiler/compiler/integers/i128/pow.out | 2 +- tests/expectations/compiler/compiler/integers/i128/shl.out | 2 +- tests/expectations/compiler/compiler/integers/i128/shr.out | 2 +- tests/expectations/compiler/compiler/integers/i128/sub.out | 2 +- tests/expectations/compiler/compiler/integers/i128/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/i128/xor.out | 2 +- tests/expectations/compiler/compiler/integers/i16/add.out | 2 +- tests/expectations/compiler/compiler/integers/i16/and.out | 2 +- .../compiler/compiler/integers/i16/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/i16/div.out | 2 +- tests/expectations/compiler/compiler/integers/i16/eq.out | 2 +- tests/expectations/compiler/compiler/integers/i16/ge.out | 2 +- tests/expectations/compiler/compiler/integers/i16/gt.out | 2 +- tests/expectations/compiler/compiler/integers/i16/le.out | 2 +- tests/expectations/compiler/compiler/integers/i16/lt.out | 2 +- tests/expectations/compiler/compiler/integers/i16/max.out | 2 +- tests/expectations/compiler/compiler/integers/i16/min.out | 2 +- tests/expectations/compiler/compiler/integers/i16/mul.out | 2 +- tests/expectations/compiler/compiler/integers/i16/ne.out | 2 +- tests/expectations/compiler/compiler/integers/i16/negate.out | 2 +- .../compiler/compiler/integers/i16/negate_min_fail.out | 2 +- .../expectations/compiler/compiler/integers/i16/negate_zero.out | 2 +- .../compiler/compiler/integers/i16/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/i16/or.out | 2 +- tests/expectations/compiler/compiler/integers/i16/pow.out | 2 +- tests/expectations/compiler/compiler/integers/i16/shl.out | 2 +- tests/expectations/compiler/compiler/integers/i16/shr.out | 2 +- tests/expectations/compiler/compiler/integers/i16/sub.out | 2 +- tests/expectations/compiler/compiler/integers/i16/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/i16/xor.out | 2 +- tests/expectations/compiler/compiler/integers/i32/add.out | 2 +- tests/expectations/compiler/compiler/integers/i32/and.out | 2 +- .../compiler/compiler/integers/i32/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/i32/div.out | 2 +- tests/expectations/compiler/compiler/integers/i32/eq.out | 2 +- tests/expectations/compiler/compiler/integers/i32/ge.out | 2 +- tests/expectations/compiler/compiler/integers/i32/gt.out | 2 +- tests/expectations/compiler/compiler/integers/i32/le.out | 2 +- tests/expectations/compiler/compiler/integers/i32/lt.out | 2 +- tests/expectations/compiler/compiler/integers/i32/max.out | 2 +- tests/expectations/compiler/compiler/integers/i32/min.out | 2 +- tests/expectations/compiler/compiler/integers/i32/mul.out | 2 +- tests/expectations/compiler/compiler/integers/i32/ne.out | 2 +- tests/expectations/compiler/compiler/integers/i32/negate.out | 2 +- .../expectations/compiler/compiler/integers/i32/negate_min.out | 2 +- .../expectations/compiler/compiler/integers/i32/negate_zero.out | 2 +- .../compiler/compiler/integers/i32/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/i32/or.out | 2 +- tests/expectations/compiler/compiler/integers/i32/pow.out | 2 +- tests/expectations/compiler/compiler/integers/i32/shl.out | 2 +- tests/expectations/compiler/compiler/integers/i32/shr.out | 2 +- tests/expectations/compiler/compiler/integers/i32/sub.out | 2 +- tests/expectations/compiler/compiler/integers/i32/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/i32/xor.out | 2 +- tests/expectations/compiler/compiler/integers/i64/add.out | 2 +- tests/expectations/compiler/compiler/integers/i64/and.out | 2 +- .../compiler/compiler/integers/i64/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/i64/div.out | 2 +- tests/expectations/compiler/compiler/integers/i64/eq.out | 2 +- tests/expectations/compiler/compiler/integers/i64/ge.out | 2 +- tests/expectations/compiler/compiler/integers/i64/gt.out | 2 +- tests/expectations/compiler/compiler/integers/i64/le.out | 2 +- tests/expectations/compiler/compiler/integers/i64/lt.out | 2 +- tests/expectations/compiler/compiler/integers/i64/max.out | 2 +- tests/expectations/compiler/compiler/integers/i64/min.out | 2 +- tests/expectations/compiler/compiler/integers/i64/mul.out | 2 +- tests/expectations/compiler/compiler/integers/i64/ne.out | 2 +- tests/expectations/compiler/compiler/integers/i64/negate.out | 2 +- .../expectations/compiler/compiler/integers/i64/negate_min.out | 2 +- .../expectations/compiler/compiler/integers/i64/negate_zero.out | 2 +- .../compiler/compiler/integers/i64/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/i64/or.out | 2 +- tests/expectations/compiler/compiler/integers/i64/pow.out | 2 +- tests/expectations/compiler/compiler/integers/i64/shl.out | 2 +- tests/expectations/compiler/compiler/integers/i64/shr.out | 2 +- tests/expectations/compiler/compiler/integers/i64/sub.out | 2 +- tests/expectations/compiler/compiler/integers/i64/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/i64/xor.out | 2 +- tests/expectations/compiler/compiler/integers/i8/add.out | 2 +- tests/expectations/compiler/compiler/integers/i8/and.out | 2 +- .../compiler/compiler/integers/i8/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/i8/div.out | 2 +- tests/expectations/compiler/compiler/integers/i8/eq.out | 2 +- tests/expectations/compiler/compiler/integers/i8/ge.out | 2 +- tests/expectations/compiler/compiler/integers/i8/gt.out | 2 +- tests/expectations/compiler/compiler/integers/i8/le.out | 2 +- tests/expectations/compiler/compiler/integers/i8/lt.out | 2 +- tests/expectations/compiler/compiler/integers/i8/max.out | 2 +- tests/expectations/compiler/compiler/integers/i8/min.out | 2 +- tests/expectations/compiler/compiler/integers/i8/mul.out | 2 +- tests/expectations/compiler/compiler/integers/i8/ne.out | 2 +- tests/expectations/compiler/compiler/integers/i8/negate.out | 2 +- tests/expectations/compiler/compiler/integers/i8/negate_min.out | 2 +- .../expectations/compiler/compiler/integers/i8/negate_zero.out | 2 +- .../compiler/compiler/integers/i8/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/i8/or.out | 2 +- tests/expectations/compiler/compiler/integers/i8/pow.out | 2 +- tests/expectations/compiler/compiler/integers/i8/shl.out | 2 +- tests/expectations/compiler/compiler/integers/i8/shr.out | 2 +- tests/expectations/compiler/compiler/integers/i8/sub.out | 2 +- tests/expectations/compiler/compiler/integers/i8/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/i8/xor.out | 2 +- tests/expectations/compiler/compiler/integers/u128/add.out | 2 +- tests/expectations/compiler/compiler/integers/u128/and.out | 2 +- .../compiler/compiler/integers/u128/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/u128/div.out | 2 +- tests/expectations/compiler/compiler/integers/u128/eq.out | 2 +- tests/expectations/compiler/compiler/integers/u128/ge.out | 2 +- tests/expectations/compiler/compiler/integers/u128/gt.out | 2 +- tests/expectations/compiler/compiler/integers/u128/le.out | 2 +- tests/expectations/compiler/compiler/integers/u128/lt.out | 2 +- tests/expectations/compiler/compiler/integers/u128/max.out | 2 +- tests/expectations/compiler/compiler/integers/u128/min.out | 2 +- tests/expectations/compiler/compiler/integers/u128/mul.out | 2 +- tests/expectations/compiler/compiler/integers/u128/ne.out | 2 +- .../compiler/compiler/integers/u128/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/u128/or.out | 2 +- tests/expectations/compiler/compiler/integers/u128/pow.out | 2 +- tests/expectations/compiler/compiler/integers/u128/shl.out | 2 +- tests/expectations/compiler/compiler/integers/u128/shr.out | 2 +- tests/expectations/compiler/compiler/integers/u128/sub.out | 2 +- tests/expectations/compiler/compiler/integers/u128/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/u128/xor.out | 2 +- tests/expectations/compiler/compiler/integers/u16/add.out | 2 +- tests/expectations/compiler/compiler/integers/u16/and.out | 2 +- .../compiler/compiler/integers/u16/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/u16/div.out | 2 +- tests/expectations/compiler/compiler/integers/u16/eq.out | 2 +- tests/expectations/compiler/compiler/integers/u16/ge.out | 2 +- tests/expectations/compiler/compiler/integers/u16/gt.out | 2 +- tests/expectations/compiler/compiler/integers/u16/le.out | 2 +- tests/expectations/compiler/compiler/integers/u16/lt.out | 2 +- tests/expectations/compiler/compiler/integers/u16/max.out | 2 +- tests/expectations/compiler/compiler/integers/u16/min.out | 2 +- tests/expectations/compiler/compiler/integers/u16/mul.out | 2 +- tests/expectations/compiler/compiler/integers/u16/ne.out | 2 +- .../compiler/compiler/integers/u16/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/u16/or.out | 2 +- tests/expectations/compiler/compiler/integers/u16/pow.out | 2 +- tests/expectations/compiler/compiler/integers/u16/shl.out | 2 +- tests/expectations/compiler/compiler/integers/u16/shr.out | 2 +- tests/expectations/compiler/compiler/integers/u16/sub.out | 2 +- tests/expectations/compiler/compiler/integers/u16/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/u16/xor.out | 2 +- tests/expectations/compiler/compiler/integers/u32/add.out | 2 +- tests/expectations/compiler/compiler/integers/u32/and.out | 2 +- .../compiler/compiler/integers/u32/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/u32/div.out | 2 +- tests/expectations/compiler/compiler/integers/u32/eq.out | 2 +- tests/expectations/compiler/compiler/integers/u32/ge.out | 2 +- tests/expectations/compiler/compiler/integers/u32/gt.out | 2 +- tests/expectations/compiler/compiler/integers/u32/le.out | 2 +- tests/expectations/compiler/compiler/integers/u32/lt.out | 2 +- tests/expectations/compiler/compiler/integers/u32/max.out | 2 +- tests/expectations/compiler/compiler/integers/u32/min.out | 2 +- tests/expectations/compiler/compiler/integers/u32/mul.out | 2 +- tests/expectations/compiler/compiler/integers/u32/ne.out | 2 +- .../compiler/compiler/integers/u32/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/u32/or.out | 2 +- tests/expectations/compiler/compiler/integers/u32/pow.out | 2 +- tests/expectations/compiler/compiler/integers/u32/shl.out | 2 +- tests/expectations/compiler/compiler/integers/u32/shr.out | 2 +- tests/expectations/compiler/compiler/integers/u32/sub.out | 2 +- tests/expectations/compiler/compiler/integers/u32/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/u32/xor.out | 2 +- tests/expectations/compiler/compiler/integers/u64/add.out | 2 +- tests/expectations/compiler/compiler/integers/u64/and.out | 2 +- .../compiler/compiler/integers/u64/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/u64/div.out | 2 +- tests/expectations/compiler/compiler/integers/u64/eq.out | 2 +- tests/expectations/compiler/compiler/integers/u64/ge.out | 2 +- tests/expectations/compiler/compiler/integers/u64/gt.out | 2 +- tests/expectations/compiler/compiler/integers/u64/le.out | 2 +- tests/expectations/compiler/compiler/integers/u64/lt.out | 2 +- tests/expectations/compiler/compiler/integers/u64/max.out | 2 +- tests/expectations/compiler/compiler/integers/u64/min.out | 2 +- tests/expectations/compiler/compiler/integers/u64/mul.out | 2 +- tests/expectations/compiler/compiler/integers/u64/ne.out | 2 +- .../compiler/compiler/integers/u64/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/u64/or.out | 2 +- tests/expectations/compiler/compiler/integers/u64/pow.out | 2 +- tests/expectations/compiler/compiler/integers/u64/shl.out | 2 +- tests/expectations/compiler/compiler/integers/u64/shr.out | 2 +- tests/expectations/compiler/compiler/integers/u64/sub.out | 2 +- tests/expectations/compiler/compiler/integers/u64/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/u64/xor.out | 2 +- tests/expectations/compiler/compiler/integers/u8/add.out | 2 +- tests/expectations/compiler/compiler/integers/u8/and.out | 2 +- .../compiler/compiler/integers/u8/console_assert.out | 2 +- tests/expectations/compiler/compiler/integers/u8/div.out | 2 +- tests/expectations/compiler/compiler/integers/u8/eq.out | 2 +- tests/expectations/compiler/compiler/integers/u8/ge.out | 2 +- tests/expectations/compiler/compiler/integers/u8/gt.out | 2 +- tests/expectations/compiler/compiler/integers/u8/le.out | 2 +- tests/expectations/compiler/compiler/integers/u8/lt.out | 2 +- tests/expectations/compiler/compiler/integers/u8/max.out | 2 +- tests/expectations/compiler/compiler/integers/u8/min.out | 2 +- tests/expectations/compiler/compiler/integers/u8/mul.out | 2 +- tests/expectations/compiler/compiler/integers/u8/ne.out | 2 +- .../compiler/compiler/integers/u8/operator_methods.out | 2 +- tests/expectations/compiler/compiler/integers/u8/or.out | 2 +- tests/expectations/compiler/compiler/integers/u8/pow.out | 2 +- tests/expectations/compiler/compiler/integers/u8/shl.out | 2 +- tests/expectations/compiler/compiler/integers/u8/shr.out | 2 +- tests/expectations/compiler/compiler/integers/u8/sub.out | 2 +- tests/expectations/compiler/compiler/integers/u8/ternary.out | 2 +- tests/expectations/compiler/compiler/integers/u8/xor.out | 2 +- tests/expectations/compiler/compiler/mutability/cond_mut.out | 2 +- .../compiler/compiler/mutability/function_input_mut.out | 2 +- .../compiler/compiler/mutability/let_mut_nested.out | 2 +- tests/expectations/compiler/compiler/records/declaration.out | 2 +- .../expectations/compiler/compiler/records/init_expression.out | 2 +- .../compiler/compiler/records/init_expression_shorthand.out | 2 +- tests/expectations/compiler/compiler/scalar/add.out | 2 +- tests/expectations/compiler/compiler/scalar/cmp.out | 2 +- tests/expectations/compiler/compiler/scalar/div.out | 2 +- tests/expectations/compiler/compiler/scalar/eq.out | 2 +- tests/expectations/compiler/compiler/scalar/group_mul.out | 2 +- tests/expectations/compiler/compiler/scalar/mul.out | 2 +- .../expectations/compiler/compiler/scalar/operator_methods.out | 2 +- tests/expectations/compiler/compiler/scalar/scalar.out | 2 +- tests/expectations/compiler/compiler/scalar/ternary.out | 2 +- tests/expectations/compiler/compiler/statements/all_loops.out | 2 +- tests/expectations/compiler/compiler/statements/block.out | 2 +- tests/expectations/compiler/compiler/statements/chain.out | 2 +- .../compiler/compiler/statements/compare_diff_types_fail.out | 2 +- tests/expectations/compiler/compiler/statements/for_loop.out | 2 +- .../compiler/compiler/statements/iteration_basic.out | 2 +- .../compiler/compiler/statements/iteration_variable.out | 2 +- .../compiler/compiler/statements/multiple_returns.out | 2 +- tests/expectations/compiler/compiler/statements/mutate.out | 2 +- .../compiler/statements/ternary_explicit_and_implicit.out | 2 +- tests/expectations/compiler/compiler/tuple/access.out | 2 +- tests/expectations/compiler/compiler/tuple/function_return.out | 2 +- tests/expectations/parser/parser/expression/literal/comment.out | 1 + tests/expectations/parser/parser/functions/const_input.out | 1 + tests/expectations/parser/parser/functions/const_param.out | 1 + tests/expectations/parser/parser/functions/empty2.out | 1 + tests/expectations/parser/parser/functions/params.out | 1 + tests/expectations/parser/parser/functions/params_return.out | 1 + tests/expectations/parser/parser/functions/public_param.out | 1 + tests/expectations/parser/parser/functions/return.out | 1 + tests/expectations/parser/parser/serialize/one_plus_one.out | 1 + 332 files changed, 332 insertions(+), 323 deletions(-) diff --git a/tests/expectations/compiler/compiler/address/binary.out b/tests/expectations/compiler/compiler/address/binary.out index 7c3aa8ed12..d50309ae81 100644 --- a/tests/expectations/compiler/compiler/address/binary.out +++ b/tests/expectations/compiler/compiler/address/binary.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: fe880c907d0257c9fc8314b8b98cabd8a8282b587d2d618408cc3cd8e528fda5 - initial_ast: d2bf8199011f00bef93c6cec36528966c69908982ea4a6f2e515c98c258edf25 + initial_ast: 74db04eff83c5719d8265824487945bce5713a8a6f731d7008bb2b7779ec57a3 diff --git a/tests/expectations/compiler/compiler/address/branch.out b/tests/expectations/compiler/compiler/address/branch.out index a1cd88e0fa..4125a5fd6c 100644 --- a/tests/expectations/compiler/compiler/address/branch.out +++ b/tests/expectations/compiler/compiler/address/branch.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 00f5aba05e4efae5a125eb52f02f16400132085b8a34919d910aa40c6c405a22 - initial_ast: d9baeb1448040c61f5e7f779270eb767a29b5f2fd23a60a680aad138327999e7 + initial_ast: 64da8309a6212bc505ed8092f6d65d5058d9135f7c9dfd0b7afa0ec4d7c23ef8 diff --git a/tests/expectations/compiler/compiler/address/equal.out b/tests/expectations/compiler/compiler/address/equal.out index 2c227aae42..4a2dd4a89d 100644 --- a/tests/expectations/compiler/compiler/address/equal.out +++ b/tests/expectations/compiler/compiler/address/equal.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 03e9df3bd1409f4af9e2a7f55130bc52f27d41f32a624ffa27f0ab114bf6fbf4 - initial_ast: ea3c9a73110ccc7684863543cf563ec78349402c460a75317b776af11d46f781 + initial_ast: 5f3c8ccefe7f00da812f3ed29612437f875c227de4d3132c8a39df46afe20d43 diff --git a/tests/expectations/compiler/compiler/address/ternary.out b/tests/expectations/compiler/compiler/address/ternary.out index 2eb04b98a6..e90abc2caf 100644 --- a/tests/expectations/compiler/compiler/address/ternary.out +++ b/tests/expectations/compiler/compiler/address/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: ec3cfeb93ea66a530150a5c5e2bd396688b3ef9b9fb0bcb961c62dac4daa064e - initial_input_ast: cb1d48114c10b2b732ad47a46fc8d05bf7a3e783da89e7f00065244bfc8d15c8 - initial_ast: 1bbe35b9a1a767668b4ff0d689873caded5d92ea7886aad2355a404511d76199 + initial_ast: 9d86ab07623cb2ddd95540b1d3128499b178ae85682cf93e4063f9b2745d9fe0 diff --git a/tests/expectations/compiler/compiler/boolean/and.out b/tests/expectations/compiler/compiler/boolean/and.out index 6f3005422b..681e20cd47 100644 --- a/tests/expectations/compiler/compiler/boolean/and.out +++ b/tests/expectations/compiler/compiler/boolean/and.out @@ -7,4 +7,4 @@ outputs: - initial_input_ast: 5f19f0086b0509628dc64db0f69000d599bc761cb8e3125144de44367081126a - initial_input_ast: 4c5eeffd0306b20c8deece509782b81ea8583245f650e40a4a300d517f6ed5f4 - initial_input_ast: a56b3f9908dec2acaed302691d4fe0c2cf046f0deb8f188f617e042e75502f71 - initial_ast: 8e4ab3450ec4ffbdba78fc0e1450c319bf538fd716af967419c8ce116ccd3d0e + initial_ast: 5d9edadf873e47ef0b3fd4de1e110591056b0f5c904af5352789956c8018a424 diff --git a/tests/expectations/compiler/compiler/boolean/conditional.out b/tests/expectations/compiler/compiler/boolean/conditional.out index 6be8e75ba1..8fc0743c83 100644 --- a/tests/expectations/compiler/compiler/boolean/conditional.out +++ b/tests/expectations/compiler/compiler/boolean/conditional.out @@ -7,4 +7,4 @@ outputs: - initial_input_ast: 9af3ce639269ea18073cb3b1a19520ba98f0484a04b20526584131d18c54712c - initial_input_ast: 7a1c39dec2388ab801496ceb17ca85665d2f515269929925b7cc9018e14297ea - initial_input_ast: 650984ca5077d11a815889421656b7735b4c6bd320bdf68b4deb87dfc0f49388 - initial_ast: d84cf01e1fddeb09983dc4f7e868ae999b7b9ab4dff9d4286108f81aefe80677 + initial_ast: b5ca7ecbd7860fdd531daa3b575d0396dc8ff469350d77c050935e221892dd50 diff --git a/tests/expectations/compiler/compiler/boolean/equal.out b/tests/expectations/compiler/compiler/boolean/equal.out index cc7ba139e9..bd32ad6116 100644 --- a/tests/expectations/compiler/compiler/boolean/equal.out +++ b/tests/expectations/compiler/compiler/boolean/equal.out @@ -7,4 +7,4 @@ outputs: - initial_input_ast: 5f19f0086b0509628dc64db0f69000d599bc761cb8e3125144de44367081126a - initial_input_ast: 4c5eeffd0306b20c8deece509782b81ea8583245f650e40a4a300d517f6ed5f4 - initial_input_ast: a56b3f9908dec2acaed302691d4fe0c2cf046f0deb8f188f617e042e75502f71 - initial_ast: d135ca0877ca63f6c31be572178a69508de9cfb81e258c4aec425861241f84c3 + initial_ast: 993b5ba359d01e7ca3c745a8547d33fb06a851ad39a33c52ceb29f9d80c5f61f diff --git a/tests/expectations/compiler/compiler/boolean/not_equal.out b/tests/expectations/compiler/compiler/boolean/not_equal.out index 359ec5342e..2a84841396 100644 --- a/tests/expectations/compiler/compiler/boolean/not_equal.out +++ b/tests/expectations/compiler/compiler/boolean/not_equal.out @@ -7,4 +7,4 @@ outputs: - initial_input_ast: 5f19f0086b0509628dc64db0f69000d599bc761cb8e3125144de44367081126a - initial_input_ast: 4c5eeffd0306b20c8deece509782b81ea8583245f650e40a4a300d517f6ed5f4 - initial_input_ast: a56b3f9908dec2acaed302691d4fe0c2cf046f0deb8f188f617e042e75502f71 - initial_ast: 42cf44d6821d7bd9d2c0222d2a673df9ff9c199f583e79a8b15b8eec53e2aea0 + initial_ast: 99adc86987f19c3e75d507e6ef98ffc55bea8403410c2a4fa99ab4c6d69e131b diff --git a/tests/expectations/compiler/compiler/boolean/operator_methods.out b/tests/expectations/compiler/compiler/boolean/operator_methods.out index c7eb2311fb..dc5971adb7 100644 --- a/tests/expectations/compiler/compiler/boolean/operator_methods.out +++ b/tests/expectations/compiler/compiler/boolean/operator_methods.out @@ -7,4 +7,4 @@ outputs: - initial_input_ast: 3254bbbc78ad3eec1c6667ade0b3d3da5ee17c7e569118cc1c771ba607e79ab0 - initial_input_ast: 19f1be52a19445695f23724e1979b362dd3fcf31aace997c829e2206dc1cccbe - initial_input_ast: d2fc1992beaf062678bbf6c3e862820dbbea39926589afcdc46c19c8669f0e37 - initial_ast: b8707d1d3f6c111db2515d4093d15b4739765bfb9e114ed345ebedce0c04024d + initial_ast: 10acf87c7211999c31d2a9ea2fba3fb4bee0304c03dd23b0501f2ba0fadd0177 diff --git a/tests/expectations/compiler/compiler/boolean/or.out b/tests/expectations/compiler/compiler/boolean/or.out index a144f56053..0e5235aca6 100644 --- a/tests/expectations/compiler/compiler/boolean/or.out +++ b/tests/expectations/compiler/compiler/boolean/or.out @@ -7,4 +7,4 @@ outputs: - initial_input_ast: 5f19f0086b0509628dc64db0f69000d599bc761cb8e3125144de44367081126a - initial_input_ast: 4c5eeffd0306b20c8deece509782b81ea8583245f650e40a4a300d517f6ed5f4 - initial_input_ast: a56b3f9908dec2acaed302691d4fe0c2cf046f0deb8f188f617e042e75502f71 - initial_ast: 6738dda9dfa2cce86f92f9d28e0e0750870156f6b5d6146d063baa221f88df3f + initial_ast: 0ea2461cca0ef0c18d5eec530ec6dbc5a3ec662b094442c150b1e8d0bc849446 diff --git a/tests/expectations/compiler/compiler/char/string.out b/tests/expectations/compiler/compiler/char/string.out index fa29d30ff4..c60947dee7 100644 --- a/tests/expectations/compiler/compiler/char/string.out +++ b/tests/expectations/compiler/compiler/char/string.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f1af7e79dff9ede0d2a1c88d5d22801cb3dfe3a9fb34e93bca646e29a61e9f65 - initial_ast: 80124fe1a7297907bc27330cfe87117bee204a9f2b8acce053b0778568415a31 + initial_ast: 74b9dd3f7abf4686ca41c4020d93b042ae55a84773b8b66a57a146425c5e3b0b diff --git a/tests/expectations/compiler/compiler/circuits/inline.out b/tests/expectations/compiler/compiler/circuits/inline.out index 940083acfe..872a2d787a 100644 --- a/tests/expectations/compiler/compiler/circuits/inline.out +++ b/tests/expectations/compiler/compiler/circuits/inline.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 06b7428058f95519ae12657c24f873f86f43f30f9715ee3f1c0192e632775d32 + initial_ast: 1f1764005f0d7fa538fdb17d09a1bd5cb92eba8a613ea23173859200a4dd7183 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.out b/tests/expectations/compiler/compiler/circuits/member_variable.out index 5076366ca3..5421281620 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 29f6139d908d390f890f04d8ee620757d29b7f71cd48c46ff65bc1e70aae840c - initial_ast: 9a9a861c36d5b4a6207e542505b8fa338721cd6cb57904577b425c733f0ae480 + initial_ast: 16404e55f68744b4439f4c0d315f7c47a426542544aef23d8ba990499cba6e0a diff --git a/tests/expectations/compiler/compiler/console/assert.out b/tests/expectations/compiler/compiler/console/assert.out index 81e99457b7..7374d8165c 100644 --- a/tests/expectations/compiler/compiler/console/assert.out +++ b/tests/expectations/compiler/compiler/console/assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 15a1f00a6c0ca8141202e45e534b7afd196e9391c184a4efd94f0d0ccf04a59d - initial_ast: 0ef8a9cfc447ad3fd1cb0275e91b1d005b7f230a02bf87e0f8ad56be86daa23e + initial_ast: db5d6991262358d8a9915ea7adf990aa0a11f17c420639c85be6b341c035dc80 diff --git a/tests/expectations/compiler/compiler/console/conditional_assert.out b/tests/expectations/compiler/compiler/console/conditional_assert.out index fb7f20e2db..e3e5269951 100644 --- a/tests/expectations/compiler/compiler/console/conditional_assert.out +++ b/tests/expectations/compiler/compiler/console/conditional_assert.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 8b94c0dbc84f44bd29c614b87947e625ad136549ea29ff18233ba5b01ce63c9b - initial_input_ast: a62874e75304ab81d487909be1c6b1efa2e5756a2980b46e3bb1368586c3ee83 - initial_ast: 487dcbee6a433329c15b3cd0b23ecc259d4df455906438f3e6cf348ebd63ee02 + initial_ast: c6321d54b4e0f42c7c6cff2662052d850ba3af8ce2f858784adf98bd1ccb87f0 diff --git a/tests/expectations/compiler/compiler/console/error.out b/tests/expectations/compiler/compiler/console/error.out index 2f6bbd33c7..31f7680edc 100644 --- a/tests/expectations/compiler/compiler/console/error.out +++ b/tests/expectations/compiler/compiler/console/error.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 14cd2c781b154a9037de84e945cfb348e9c587cef94d3e1f3be83e4306f92a0e - initial_ast: d718de3086bc78a00a392e3c2b46dfa8f76084909bad3c98a5a6759df73efb27 + initial_ast: 70e69c20b6435a96842fdc4c44a067602d3ae3dbcdaab9b0fbb4648fb590bdc9 diff --git a/tests/expectations/compiler/compiler/console/log.out b/tests/expectations/compiler/compiler/console/log.out index 3cebd2ca3c..cbe0c24afa 100644 --- a/tests/expectations/compiler/compiler/console/log.out +++ b/tests/expectations/compiler/compiler/console/log.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: fd19d82c3aba921f01b37174e3eb7fb603438506fe511657e21235b9fb3647d2 - initial_ast: 2a99ef2515c58607e4b617f93c74838b6f2afed28e9e2c2eed658cea6d729b2d + initial_ast: ac34d0d4cc9594de65d202f2ee9e693293221b121bc8b4cff4ef2746bc3109c8 diff --git a/tests/expectations/compiler/compiler/console/log_conditional.out b/tests/expectations/compiler/compiler/console/log_conditional.out index b310f78b73..936c42d695 100644 --- a/tests/expectations/compiler/compiler/console/log_conditional.out +++ b/tests/expectations/compiler/compiler/console/log_conditional.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 06fad995841b833ef5074920ae270b93bf82ad60b6c8b440c66b8bc5018aaa72 - initial_input_ast: 34bd981451bdeb915a2de749b969c8804c06e44a9f4473f36d6efac7617baead - initial_ast: f8315b82b0a05e0e69fb8b0342b46cbee976ec20d62e0edd2f066bf51acd81d6 + initial_ast: 7426953a65e20beaee1be9366d9b8b06780e98484ac21605d71f59d9b1653dd8 diff --git a/tests/expectations/compiler/compiler/console/log_input.out b/tests/expectations/compiler/compiler/console/log_input.out index a33183e252..6d13cbc836 100644 --- a/tests/expectations/compiler/compiler/console/log_input.out +++ b/tests/expectations/compiler/compiler/console/log_input.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 0961f603812e241567b6e3ef5adb458309f1829eb2c08a216efccb17bea89faf - initial_ast: 3602c929b2256f4ed5cec2ba9d3e967b029a7dc9717a371b32a356425cf9892b + initial_ast: a9744d52aa60e29370ea0089e3e7b113ae8942c2cfc968eeeb965cc15604b847 diff --git a/tests/expectations/compiler/compiler/console/log_parameter.out b/tests/expectations/compiler/compiler/console/log_parameter.out index fc2bab2a30..2f1a1f9177 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter.out +++ b/tests/expectations/compiler/compiler/console/log_parameter.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f18a0e019ca4719c4c4ef5b7313f562c3bc9581819d161d84566e706f3765249 - initial_ast: f319125731635279a198fb2df8c0446475024c70829e9de32fa5f43c38079862 + initial_ast: 6117801a1e89336d372b7c8f0b7a758a6a69d2521d8a584484bfa80d236e6a53 diff --git a/tests/expectations/compiler/compiler/console/log_parameter_many.out b/tests/expectations/compiler/compiler/console/log_parameter_many.out index d7d15bfa13..677e255a46 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_many.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_many.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 16910a94cf1f803ae6425ae6bee9422b01651c2c243b5e46807dc3191d169e64 - initial_ast: 52824ac2e84097578faf0ff92f7ca840d2de30e8454a540886123a2cf79192ae + initial_ast: ebd78ed2d4adce1c6b500ea303c2d6a206cee55a2d2bbf32209a5e6f1e45aaa5 diff --git a/tests/expectations/compiler/compiler/core/algorithms/bhp.out b/tests/expectations/compiler/compiler/core/algorithms/bhp.out index 679ddae844..7cfd8f752f 100644 --- a/tests/expectations/compiler/compiler/core/algorithms/bhp.out +++ b/tests/expectations/compiler/compiler/core/algorithms/bhp.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: fc0f2558100be5c1216c0d56e8be51be6ad4f51e47e42f89b96d1b9bae0ae34d + initial_ast: 2b9429372e086da93d9a26bf2eef064cc60bb511a381a7b104958d9e5ad5797a diff --git a/tests/expectations/compiler/compiler/core/algorithms/pedersen.out b/tests/expectations/compiler/compiler/core/algorithms/pedersen.out index 54cb9846c3..ebebc65246 100644 --- a/tests/expectations/compiler/compiler/core/algorithms/pedersen.out +++ b/tests/expectations/compiler/compiler/core/algorithms/pedersen.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 8c3b9cf2aad8ba67eb351b67ed4642caa64a7ff83a2dcdc48f05413bba7ba81f + initial_ast: bc094ac99da474df4e2f4f8e088fd1a5a6e3f836ab5d9eec62fcbe833320d421 diff --git a/tests/expectations/compiler/compiler/core/algorithms/poseidon.out b/tests/expectations/compiler/compiler/core/algorithms/poseidon.out index 231c78c0c3..206f851f80 100644 --- a/tests/expectations/compiler/compiler/core/algorithms/poseidon.out +++ b/tests/expectations/compiler/compiler/core/algorithms/poseidon.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 0a7abaad3d4eb543b09e8664f8b274714f742bec62c45fe56dd6bece0a19161e + initial_ast: b0fb97a0e73ddab53011e2e61b9361a743b47ddb0efc49e7e4e26a44c1b980d5 diff --git a/tests/expectations/compiler/compiler/definition/out_of_order.out b/tests/expectations/compiler/compiler/definition/out_of_order.out index 06bda2dadd..c33bac9917 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: b649852fa2fd7eda05bd0ba261f01dcee93b6b825d5d30fddb8dd5c5710081ca - initial_ast: 13b0f0680422f4f647cb4da2fef412662f35b745ba788ce147add5eeccb2edaa + initial_ast: 98d2449e87f1a922f56aefb40d5e9edaf9e5c6c177810defee8c55e862a0c43f diff --git a/tests/expectations/compiler/compiler/field/add.out b/tests/expectations/compiler/compiler/field/add.out index 80a593c1af..c1b9d299ec 100644 --- a/tests/expectations/compiler/compiler/field/add.out +++ b/tests/expectations/compiler/compiler/field/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 3f35e74d282a1e5281e7f283d1e572a3dc75dea1a5ef1a0f8c7f46412ef946a7 - initial_ast: 0aebc18388f6ceed8c1d813152ec6392bf687a814d3ae6d63ae10b50420c1a43 + initial_ast: d511c6a8b6d3aa29c4d52dab27af3b5a0b2ef3a57b042b620a8cc91b00472f47 diff --git a/tests/expectations/compiler/compiler/field/div.out b/tests/expectations/compiler/compiler/field/div.out index 490f6960af..0b06905a43 100644 --- a/tests/expectations/compiler/compiler/field/div.out +++ b/tests/expectations/compiler/compiler/field/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 4e3882d83c8044e40258f8414966b09c715b00e08bc3383030cecf2c4a825c60 - initial_ast: 924a3905b44bfea2a10118e4c0336a596b6981a7b06ea39f71daac7000e5cf9c + initial_ast: 93bfac16d1f7c126b55801c5dbd4fe5f917278dff864bc76c6815e23433158c2 diff --git a/tests/expectations/compiler/compiler/field/eq.out b/tests/expectations/compiler/compiler/field/eq.out index 94b5701268..4b97767560 100644 --- a/tests/expectations/compiler/compiler/field/eq.out +++ b/tests/expectations/compiler/compiler/field/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: eeba130bda3ee24f2a4bf92f67fb555ab849173910a647096e28729c2ebd71c2 - initial_ast: 3546a10b24a6a53ee07d298e7dbbed5122bd9d0c973613296a94189d9e57f246 + initial_ast: 27b16b423a07ea4bc103ee0ad466de6bb8b756a84c3fd9c6c2a6671ca317154d diff --git a/tests/expectations/compiler/compiler/field/field.out b/tests/expectations/compiler/compiler/field/field.out index 961e64b25c..c70cb61156 100644 --- a/tests/expectations/compiler/compiler/field/field.out +++ b/tests/expectations/compiler/compiler/field/field.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 3a510480221eb323713b4b10cc374ba357f130e8ac2b07bf1c69ad5d8c936f12 - initial_ast: ff341146cdbb78e4a5bffd47c109cc9987dd3b7cea8224e0ef3668394d1c7a90 + initial_ast: 66e040c644e245d90b9ee3d4c6a5d712643956f2b7182431e4a3124429e0328f diff --git a/tests/expectations/compiler/compiler/field/mul.out b/tests/expectations/compiler/compiler/field/mul.out index 0ce7d7a6bb..4fbda101a8 100644 --- a/tests/expectations/compiler/compiler/field/mul.out +++ b/tests/expectations/compiler/compiler/field/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 3f35e74d282a1e5281e7f283d1e572a3dc75dea1a5ef1a0f8c7f46412ef946a7 - initial_ast: c05e588dae9e5f6e7e1c2d16d08629af8d287b453796b21de89b25d40970ec1b + initial_ast: a8425ef9203a8d4e1a0b2b63ae71c97af8ad6549c6ef1290e90263c7f119d941 diff --git a/tests/expectations/compiler/compiler/field/negate.out b/tests/expectations/compiler/compiler/field/negate.out index 4d5347e101..d2cfd8d05a 100644 --- a/tests/expectations/compiler/compiler/field/negate.out +++ b/tests/expectations/compiler/compiler/field/negate.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 9206742d7f18345efbd4d9077cd1aca0855d43a2436be0697ec22954650e3737 - initial_ast: c2122be4da96294b4ce4bca5d239176c6bb98765248c767dd41352b6b95888c8 + initial_ast: 9aa2f475e157ef05f8719a3cf9b9ec66ff624e42f630c5271d5b133dc07737cb diff --git a/tests/expectations/compiler/compiler/field/operator_methods.out b/tests/expectations/compiler/compiler/field/operator_methods.out index c0ad217a0a..62a876365c 100644 --- a/tests/expectations/compiler/compiler/field/operator_methods.out +++ b/tests/expectations/compiler/compiler/field/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 047866515f4dc74cd9966242734984b53e72f87afc21f7171b118e6defa1f166 - initial_ast: 49b4956c647eb7f6e1ae496ce2e5c4ff238493d9cbc9d20d6f0f3fee09dee4f4 + initial_ast: a2f110a65a61c8d6dc2f3f1d0fed51d3b237943c538d99e3059a24f248e323ac diff --git a/tests/expectations/compiler/compiler/field/pow.out b/tests/expectations/compiler/compiler/field/pow.out index f1a45f2135..712b84a6f2 100644 --- a/tests/expectations/compiler/compiler/field/pow.out +++ b/tests/expectations/compiler/compiler/field/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 5e0a61d909d2e94dfbc95775e4c5c356adb61375ceef2d583a5ab927b3b6342e - initial_ast: ecf60185d2eda458885b00f1daa586132dfbfc560b0565c1659bb4bfed3cb19d + initial_ast: 010a79bb3a9c1741cf10c9e389a27d6144de9ff20e98d27981edf903d56c5cec diff --git a/tests/expectations/compiler/compiler/field/sub.out b/tests/expectations/compiler/compiler/field/sub.out index c51054ede0..e919d72418 100644 --- a/tests/expectations/compiler/compiler/field/sub.out +++ b/tests/expectations/compiler/compiler/field/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 4e3882d83c8044e40258f8414966b09c715b00e08bc3383030cecf2c4a825c60 - initial_ast: 44033abf4e0e2d174cc770b32f903b8a1d4505ee4cbfdcfca3ad1f885071123e + initial_ast: bf9d7a6d419a40d9f4e7e042d36d785efe72d8fcf431ebcf8737aa35c42e9195 diff --git a/tests/expectations/compiler/compiler/field/ternary.out b/tests/expectations/compiler/compiler/field/ternary.out index 47d53e7b9c..62f1e2a191 100644 --- a/tests/expectations/compiler/compiler/field/ternary.out +++ b/tests/expectations/compiler/compiler/field/ternary.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: e19dcac0064fed4ec8293b9b40ec70cb94b5fdb05f1081fc29f46a023bf79b09 - initial_ast: 8efd26ef8db8c5c793450a368ec66d7a3fe3b363145655192344af4a8c2b4d81 + initial_ast: afe13dd9ae15d78809d112dd37d150e9b178f03253ea4d87bed659d4d8861cb2 diff --git a/tests/expectations/compiler/compiler/function/conditional_return.out b/tests/expectations/compiler/compiler/function/conditional_return.out index 6eaaf724e0..46e68e6bf8 100644 --- a/tests/expectations/compiler/compiler/function/conditional_return.out +++ b/tests/expectations/compiler/compiler/function/conditional_return.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f4c81e7647e3b7cb29e8faf5456878989cbc81cb49097acf5bc9aaafc9092b6b - initial_ast: ed69198e934ac7f6a604adb37a4b27ad593909930029904db802c1895d7269c9 + initial_ast: f3215f323352ce2c4b1fdc28f426ad816003ba3099972abe1bea4b9cbe4cb526 diff --git a/tests/expectations/compiler/compiler/function/iteration.out b/tests/expectations/compiler/compiler/function/iteration.out index 8972765c1d..07c616d89f 100644 --- a/tests/expectations/compiler/compiler/function/iteration.out +++ b/tests/expectations/compiler/compiler/function/iteration.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 1febcc333f69e7f5ea2e8b9e915c66a23f4e195c6106a31cffb1adb81b90f0e4 - initial_ast: 7df50863de140cd6033391d929212b91180ff90737c536e631f977ddf9eb9d91 + initial_ast: 2d7b49fb29e2b169f332c969a9a37692e93fbdbb1d3e8b403289e8c3cb225be0 diff --git a/tests/expectations/compiler/compiler/function/iteration_repeated.out b/tests/expectations/compiler/compiler/function/iteration_repeated.out index d4e41b329d..e9bb4ba847 100644 --- a/tests/expectations/compiler/compiler/function/iteration_repeated.out +++ b/tests/expectations/compiler/compiler/function/iteration_repeated.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ae87aca959c3d818c9259be6ca73eca6ada9633312e81a4df172d833f40c78e9 - initial_ast: 24bdae47f1154abc4c7f8dbe30dde72ae25779e4464e8942968c7fd36f602d42 + initial_ast: b15deda9104500243d3f8d61489174fd6b07143b9317378fd87149fd45ae5751 diff --git a/tests/expectations/compiler/compiler/function/repeated.out b/tests/expectations/compiler/compiler/function/repeated.out index a2f1234269..f4b93becc6 100644 --- a/tests/expectations/compiler/compiler/function/repeated.out +++ b/tests/expectations/compiler/compiler/function/repeated.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 6b8596d250b3c42a0ff9856eb4a94d28c72b2953313d594f13a5d3f1de6f072f - initial_ast: a21fe86230689152fbfcf3529c818c0ef25fe9f3117de260f85ae84cc535c503 + initial_ast: 6d702bfd15851a7b6ed1266b8f222099e735fa40fd3f6c7afbf8abfbb34b40eb diff --git a/tests/expectations/compiler/compiler/function/return.out b/tests/expectations/compiler/compiler/function/return.out index ba3a854867..14929b702e 100644 --- a/tests/expectations/compiler/compiler/function/return.out +++ b/tests/expectations/compiler/compiler/function/return.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: d11a4218606717322234d8ea4c4786d6edce90f07abde9e120d597cb0e838ce0 - initial_ast: 9a7092fce407db3067a8ed1a90dbd5613dff7d581d2df73ce7f6701ff64e5e0b + initial_ast: 661d666be36d9bdf394516586aab3e71d4e19d37c70cdefaee5faabd522775cf diff --git a/tests/expectations/compiler/compiler/group/add.out b/tests/expectations/compiler/compiler/group/add.out index 87b59e38db..3f4c44e846 100644 --- a/tests/expectations/compiler/compiler/group/add.out +++ b/tests/expectations/compiler/compiler/group/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a28b88dc36ace78ed0de93b56db7274f16521597ccf1e820a17fdb60a1e3d92a - initial_ast: 7109d173cdd239abf5f0f717e669e300cf7bd4b3bde2158a17d1f16c1b154276 + initial_ast: 1d86e1aac0e25fdc1240d21db65e5560d9239e8a688f36434d776a2a2cbfbf7f diff --git a/tests/expectations/compiler/compiler/group/assert_eq.out b/tests/expectations/compiler/compiler/group/assert_eq.out index 2ba63dcb51..4f60dc09da 100644 --- a/tests/expectations/compiler/compiler/group/assert_eq.out +++ b/tests/expectations/compiler/compiler/group/assert_eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 00c3cc87ce3c30894ad6b6874ce6dacfa02c9f2bc171615ff627f06f2e201997 - initial_ast: b6e75e27703bf6b6af69de95f9c22ef2033db46227f5658a9f2e88c33a169b1d + initial_ast: f18d5c334bc0c747499eacb6a0352da66a286d1f481ecd803465de3c2ee0cde2 diff --git a/tests/expectations/compiler/compiler/group/both_sign_high.out b/tests/expectations/compiler/compiler/group/both_sign_high.out index 7f24766d1d..d7cd769f87 100644 --- a/tests/expectations/compiler/compiler/group/both_sign_high.out +++ b/tests/expectations/compiler/compiler/group/both_sign_high.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 7631f3258e3f0f288fd21a0470c43f636b96bbe0f3643dad29353e9b48c63ee6 + initial_ast: 450c975f0cda3f2d34473d49050d7d416fc412c9d45b52123c596ed29e857f0d diff --git a/tests/expectations/compiler/compiler/group/both_sign_inferred.out b/tests/expectations/compiler/compiler/group/both_sign_inferred.out index 0a6abffb37..a96d42c610 100644 --- a/tests/expectations/compiler/compiler/group/both_sign_inferred.out +++ b/tests/expectations/compiler/compiler/group/both_sign_inferred.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 97c27f26fd8d201623b1cbb19474a2cb6934c6bda8d4b363c831b0a3193e75ec + initial_ast: dbe6aa13dda7ff3cb32573764fb36109c7bd274d52af44ff575f2ea6d15555eb diff --git a/tests/expectations/compiler/compiler/group/both_sign_low.out b/tests/expectations/compiler/compiler/group/both_sign_low.out index e1c407c92f..3b77184fae 100644 --- a/tests/expectations/compiler/compiler/group/both_sign_low.out +++ b/tests/expectations/compiler/compiler/group/both_sign_low.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 772357946f6febbf75a72e8f706975abc242cc805368babdac1e3d047a1d0dc8 + initial_ast: 74b5313552bdb51bdad8a657d0654be98aa4af8dad03ddbba2bb361ec73a0f79 diff --git a/tests/expectations/compiler/compiler/group/eq.out b/tests/expectations/compiler/compiler/group/eq.out index 2ba63dcb51..4f60dc09da 100644 --- a/tests/expectations/compiler/compiler/group/eq.out +++ b/tests/expectations/compiler/compiler/group/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 00c3cc87ce3c30894ad6b6874ce6dacfa02c9f2bc171615ff627f06f2e201997 - initial_ast: b6e75e27703bf6b6af69de95f9c22ef2033db46227f5658a9f2e88c33a169b1d + initial_ast: f18d5c334bc0c747499eacb6a0352da66a286d1f481ecd803465de3c2ee0cde2 diff --git a/tests/expectations/compiler/compiler/group/input.out b/tests/expectations/compiler/compiler/group/input.out index 2f9c18728d..dd08baf836 100644 --- a/tests/expectations/compiler/compiler/group/input.out +++ b/tests/expectations/compiler/compiler/group/input.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c93f9fd667509aa0aa3896c261cb48c7d579d9856d0a14b96e9b2c7e04566a0a - initial_ast: b6e75e27703bf6b6af69de95f9c22ef2033db46227f5658a9f2e88c33a169b1d + initial_ast: f18d5c334bc0c747499eacb6a0352da66a286d1f481ecd803465de3c2ee0cde2 diff --git a/tests/expectations/compiler/compiler/group/mult_by_scalar.out b/tests/expectations/compiler/compiler/group/mult_by_scalar.out index b68f5b687d..6a7a16c82c 100644 --- a/tests/expectations/compiler/compiler/group/mult_by_scalar.out +++ b/tests/expectations/compiler/compiler/group/mult_by_scalar.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 7b0236b04ad9caa4039a989b91e7f49021a9daf09a495a9cdad7c371ee196761 - initial_ast: 99e25dcd781ee8514ca93fdb34430f05caf429ed46dafa3189c3d835d680d7df + initial_ast: bbac1db068d093084fd034e7d0f9ef850730b08b2cd6f7539fd189479aa12932 diff --git a/tests/expectations/compiler/compiler/group/negate.out b/tests/expectations/compiler/compiler/group/negate.out index ab3c24e6ac..1e5b0447f6 100644 --- a/tests/expectations/compiler/compiler/group/negate.out +++ b/tests/expectations/compiler/compiler/group/negate.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 5e1e23855cb6841ee210c8a24e11cc819e91ce3b087a8c961035c574baa1784b - initial_ast: 491aa1b9665527f07687444cb882f1ae5d363ca3b024f9cc3de36027ec37fce4 + initial_ast: acb9a51c34074ae6b32540d3ce7564527272200903a9ca0c94a54c94ffd2a6d8 diff --git a/tests/expectations/compiler/compiler/group/one.out b/tests/expectations/compiler/compiler/group/one.out index dcc452de87..68a6439518 100644 --- a/tests/expectations/compiler/compiler/group/one.out +++ b/tests/expectations/compiler/compiler/group/one.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 5a4b6b18074e63ba98467539a224838675ea3f08b945b554c23df2f22f730181 + initial_ast: afc00f6d0f1e6251069f2eca6dd149916466c4d0f5d2e8584df2435b3dd25c71 diff --git a/tests/expectations/compiler/compiler/group/operator_methods.out b/tests/expectations/compiler/compiler/group/operator_methods.out index 9f118e0a28..d392d55936 100644 --- a/tests/expectations/compiler/compiler/group/operator_methods.out +++ b/tests/expectations/compiler/compiler/group/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a60503e3f83fbee658d02fb3806b3a3326fc6d4f4e43ac05bce7b16ac0552edb - initial_ast: 07af6f05d46a6cd91085fb1aaf8a0fcb9cb2c05ccf60fd5fad5449e9fbf079b4 + initial_ast: 77951acb353c18168cb7bab88a3f7ebec29c530438ac34d4cd470d44d94d9ad2 diff --git a/tests/expectations/compiler/compiler/group/point.out b/tests/expectations/compiler/compiler/group/point.out index b07290161b..c197bd8a7f 100644 --- a/tests/expectations/compiler/compiler/group/point.out +++ b/tests/expectations/compiler/compiler/group/point.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 7031bc0fd844a95ff14f558d113c6c5701834489713c2e9050d42b80e32fa2d0 + initial_ast: 3e92165f6dbeaa140379a0879c6642741370d57f8c2cba40d8f3afc944a77691 diff --git a/tests/expectations/compiler/compiler/group/point_input.out b/tests/expectations/compiler/compiler/group/point_input.out index 9de59b1a68..11721d8e27 100644 --- a/tests/expectations/compiler/compiler/group/point_input.out +++ b/tests/expectations/compiler/compiler/group/point_input.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 1b5330a3356c437ddc09afc027d1365eedb24c56777772fd83b9167cfebb4435 - initial_ast: c90971ebee1da3c277fef3288af860eeca4997ba9807a8038a3d1bd03200d277 + initial_ast: a625b5a5741abd87a155a202fb53c5843bd311c11e6df9adb27ad3f91d7e42e1 diff --git a/tests/expectations/compiler/compiler/group/positive_and_negative.out b/tests/expectations/compiler/compiler/group/positive_and_negative.out index 603b22b781..2069a91c39 100644 --- a/tests/expectations/compiler/compiler/group/positive_and_negative.out +++ b/tests/expectations/compiler/compiler/group/positive_and_negative.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 32f2a58463cce89611be1ef90aa7f109f3c86c8c2ad87b11c4ab62127ac8c969 + initial_ast: 5b0c90ba10301efea7f65fb625aa2e1fa476f21f1f897c107f4c0c713fca5c97 diff --git a/tests/expectations/compiler/compiler/group/sub.out b/tests/expectations/compiler/compiler/group/sub.out index 49e75f451a..90f039bec0 100644 --- a/tests/expectations/compiler/compiler/group/sub.out +++ b/tests/expectations/compiler/compiler/group/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a28b88dc36ace78ed0de93b56db7274f16521597ccf1e820a17fdb60a1e3d92a - initial_ast: 97ab784d4cdbb80329f8284003c821fa956e5b4913277813136217849815200d + initial_ast: 3d25db905c46d12c33837641c989a6e304ff06d8a632c5e19c2aa281fa47c66a diff --git a/tests/expectations/compiler/compiler/group/ternary.out b/tests/expectations/compiler/compiler/group/ternary.out index 251a0b6d32..dc57e21347 100644 --- a/tests/expectations/compiler/compiler/group/ternary.out +++ b/tests/expectations/compiler/compiler/group/ternary.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: d12e492b73a208051457ad2ce9ed8dbbb5a8096f32f52d697c41972ba8b88d35 - initial_ast: 5d6e9ede195a3cfc06f7a91b47937247e6ffc237b57e37859a6d0e5cc966b762 + initial_ast: 20bbc0fc6395c2ab6f4b698107a5e77a95ad851bf12a7715b0ae69f740c6fc36 diff --git a/tests/expectations/compiler/compiler/group/x_and_y.out b/tests/expectations/compiler/compiler/group/x_and_y.out index b3a7a9bf4e..737b0cbf3a 100644 --- a/tests/expectations/compiler/compiler/group/x_and_y.out +++ b/tests/expectations/compiler/compiler/group/x_and_y.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 3cf73b90d40fce8273b69ccf99424ad3b5f8fce2999d06bb1413428280f17f7d + initial_ast: efc5103265669cbb2f34ccd0fc92191aa66772481e811b73c011374cdd4b8b6a diff --git a/tests/expectations/compiler/compiler/group/x_sign_high.out b/tests/expectations/compiler/compiler/group/x_sign_high.out index d8238469aa..8f0486d0fa 100644 --- a/tests/expectations/compiler/compiler/group/x_sign_high.out +++ b/tests/expectations/compiler/compiler/group/x_sign_high.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 0ae122eb2bd121db2f072a8d79afbe3d0ad1023e7a4aaee2e4e9f4ba5c1a3c36 + initial_ast: 844d8a50fd65fbcb171cf66b21c1e6bb1b6f73e0087010a3b7b3214dda022722 diff --git a/tests/expectations/compiler/compiler/group/x_sign_inferred.out b/tests/expectations/compiler/compiler/group/x_sign_inferred.out index e7e03ae81c..03348d252e 100644 --- a/tests/expectations/compiler/compiler/group/x_sign_inferred.out +++ b/tests/expectations/compiler/compiler/group/x_sign_inferred.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 81f062d4ca72bbfb62d447cfe23d0658b3b40a4caf3ca1fd37db833a3a6ba9f5 + initial_ast: e891c946a429cff7f7ec15fb3553549491d8e3631fea5ceffaee8c6de3f32304 diff --git a/tests/expectations/compiler/compiler/group/x_sign_low.out b/tests/expectations/compiler/compiler/group/x_sign_low.out index 60fb907a2a..f79b2c5262 100644 --- a/tests/expectations/compiler/compiler/group/x_sign_low.out +++ b/tests/expectations/compiler/compiler/group/x_sign_low.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 2b60be6820f8dc537b2ab9ec70e4981d93d0c68ebdc71d9437345e57c66505bf + initial_ast: 374b8be1143a9cd8b7a4db45abf2d2c6f909e154dbf53c7f7455b0013d88e60e diff --git a/tests/expectations/compiler/compiler/group/y_sign_high.out b/tests/expectations/compiler/compiler/group/y_sign_high.out index c8f623e367..60c448082d 100644 --- a/tests/expectations/compiler/compiler/group/y_sign_high.out +++ b/tests/expectations/compiler/compiler/group/y_sign_high.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: c92281b28b5166cfa0cb458bb6f21dcc71d67dfe1f8bb757945c575cbb92a549 + initial_ast: 0857d89c42b962f2d03c557fe4b6d0d11ba42c4763fdc41cd92e78357a5ef62e diff --git a/tests/expectations/compiler/compiler/group/y_sign_inferred.out b/tests/expectations/compiler/compiler/group/y_sign_inferred.out index 8f7b4c9c71..58549a3635 100644 --- a/tests/expectations/compiler/compiler/group/y_sign_inferred.out +++ b/tests/expectations/compiler/compiler/group/y_sign_inferred.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: b5c2ab86061f7dcae809f6a707559c1738a0f0a2352270ca3ff91a3242d70af3 + initial_ast: 35b903600c9d219880c288ca48502e44cf1ef94fed2f809b9ffde54902c2046a diff --git a/tests/expectations/compiler/compiler/group/y_sign_low.out b/tests/expectations/compiler/compiler/group/y_sign_low.out index 50fa715c80..14c0190701 100644 --- a/tests/expectations/compiler/compiler/group/y_sign_low.out +++ b/tests/expectations/compiler/compiler/group/y_sign_low.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 1d5f67161857e1ef3195099a1a04370ddf33dc3eebade9e1a5e0f6266c495a75 + initial_ast: b4a5c6850a7f33b625c1ca1277312372fe60688a968c1cd86eecf5f775bb8971 diff --git a/tests/expectations/compiler/compiler/group/zero.out b/tests/expectations/compiler/compiler/group/zero.out index 78584cda00..03b1174c77 100644 --- a/tests/expectations/compiler/compiler/group/zero.out +++ b/tests/expectations/compiler/compiler/group/zero.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 31edb6eef4b9fa47acfb94f0f8f7ec9f50667501c7dc6bb5c643a65be90cbfb7 + initial_ast: 564f476bb3301c4b5895abdecfaa3920ab9b0371d63a9c310bfac99e63e0eb45 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main.out b/tests/expectations/compiler/compiler/input_files/program_input/main.out index 5384e83339..2f1646138d 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 23e62412d2a9377334d90aaeb6629b73c77e045ce87f23bd6ae2e2cd242e70f0 - initial_ast: 62a908a53573e228fec4b308f637909227856abaf327f527c23dd63e739d77d7 + initial_ast: 88afede96a73432dc346ab580a89f057da75b86f5a7dc10df2cf9479d5d29334 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_field.out b/tests/expectations/compiler/compiler/input_files/program_input/main_field.out index cd11030288..5c3f370972 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_field.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_field.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 2b6bc4ade2305a65746066befacf6a0a18382f754d4d7911d0c6e0abef682114 - initial_ast: 4d5c44da11b6644f95211ba6ebac1a6ca45ffbc63248fbc42a92a26e109cb63f + initial_ast: 8e12ed98d58d8969f9bdb53c4a039b5e0904120293c71cb8d1a214f208e647f8 diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_group.out b/tests/expectations/compiler/compiler/input_files/program_input/main_group.out index 7644cdd560..561172e194 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_group.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_group.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 4001f721e97052bdea8fafe39846356011e335e40281e0082c0b406cd6a85947 - initial_ast: 947309cb1c78f8b954bd55ccb34e84ce39f7988991c9f6c2ae6408257c979665 + initial_ast: 517d651785f72ffe568802f3e927b2167f748a668b5aa7f0efe00018ccb91392 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.out index d1dea74e1e..433524fe97 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: e626f055978f5125bc292065d74aab5b679229a5364f150ccbe1f07d0c167c3d - initial_ast: 22df0e8dcc96e127df94438ebdd1111070afb5f2fede13534a9aeb0d20885246 + initial_ast: c4e0902dd617b805cbd1b7c8229e36d417d5b390ca5278cf8e57b1c5b81d2ea0 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.out index 375fe9469a..09fd2cf68c 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 3eaa98274698edacf455de40418ea012234a1355d5b50b9063ee0e06d3d26709 - initial_ast: b1647dfd919968219b01ee5ff48ba97b155d8d40702498a69ff712b59c4a908f + initial_ast: b1bf0342450247a10aad28ab487190b40ceeef5d7e201fb3a569bc2b3f331328 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.out index 8863d1cbf4..ef37fc0e34 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 4efe3ae5f2d6a95663ca302b60d4e430b63bcb7c5a19d638ec7613b7dc099825 - initial_ast: f88e91c98500ea74503f284eb75e2e25857d9092257166716025bc9a95584b9d + initial_ast: 92ee7b6b0a7fd30bb38185f438f72ee9a760e1362ae695983eb5827e4781aec6 diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.out index b279e5d35a..2c98450825 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: e7173f6b8aa8aa40bcb167fa4de0b5d5a7f1b6d245a78dcb5ad70a73b53ef7de - initial_ast: 314c2343d15bc5676eb5669e9a7a193936ce32ea4f2c7a1ab10719202314e4ee + initial_ast: e37b21d12d6245c6972fabe5380ad8b8004eb575cd0a3ed33ba92d9e19a0c5eb diff --git a/tests/expectations/compiler/compiler/integers/i128/add.out b/tests/expectations/compiler/compiler/integers/i128/add.out index 45faf1211c..f476823388 100644 --- a/tests/expectations/compiler/compiler/integers/i128/add.out +++ b/tests/expectations/compiler/compiler/integers/i128/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ca7500628480432228743b9eff2cac69e433bc0a9da6ce007cae38ef9c2b57a6 - initial_ast: 07374055a6d078ecbf9f3c76a3c63cef7b529a583333afc655d1f7b22c8fd054 + initial_ast: 1a85875ed6a73f4853f373fb2c669175dc79e3f369a0d6289a41902aae30a47e diff --git a/tests/expectations/compiler/compiler/integers/i128/and.out b/tests/expectations/compiler/compiler/integers/i128/and.out index 26f4716946..a6ed55ad53 100644 --- a/tests/expectations/compiler/compiler/integers/i128/and.out +++ b/tests/expectations/compiler/compiler/integers/i128/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ca7500628480432228743b9eff2cac69e433bc0a9da6ce007cae38ef9c2b57a6 - initial_ast: 210dcc0f1e9522a7a7ada3b633f1ce0401f8c53ad0acf3e59f60772b51f35899 + initial_ast: a419caf1d4a83097f5a1d13fd426548af610ae460e0229000f6ef264d4a22de5 diff --git a/tests/expectations/compiler/compiler/integers/i128/console_assert.out b/tests/expectations/compiler/compiler/integers/i128/console_assert.out index 5dbfd1b4db..73e1a4d269 100644 --- a/tests/expectations/compiler/compiler/integers/i128/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/i128/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 86fc147511a8405918da9d9f5e40b2daccb441e80b793287203d30b21bb5600a - initial_ast: e684deb39dd4d7d41b1d5062f5f025df84d1998d16a59871d53f211dd9d9cce2 + initial_ast: 88d276f06c68e7bfeaf8892f129ad287901015447810fe8d4702a8d74d2a02bd diff --git a/tests/expectations/compiler/compiler/integers/i128/div.out b/tests/expectations/compiler/compiler/integers/i128/div.out index da99e4c620..0cd07a36f3 100644 --- a/tests/expectations/compiler/compiler/integers/i128/div.out +++ b/tests/expectations/compiler/compiler/integers/i128/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 8562aec00f8be8367748af8197e2add488cbae2e0931674b68581744dbaafe61 - initial_ast: ae2ef5614de8c31c25df7bb8cea87eb00ac8c154fb4a0ead71dfc306dc836b66 + initial_ast: 7a6243429d199fde36e7e7dfc7070347a935220df234ea2a524c8f44c09720a4 diff --git a/tests/expectations/compiler/compiler/integers/i128/eq.out b/tests/expectations/compiler/compiler/integers/i128/eq.out index ebe94d282f..dbb986b443 100644 --- a/tests/expectations/compiler/compiler/integers/i128/eq.out +++ b/tests/expectations/compiler/compiler/integers/i128/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a4d1618b78d6f649f06d5f58f5ae0bb45135717abf3feea0541698ddb0212ec6 - initial_ast: 44bd05c77cfb936ae6363fd532803e6939b0893d887d4e85b205ab3517ecfefa + initial_ast: 09a76ed250aeef6f007c330d581022d584a33a3d0b6de7580cf0a4039ff4eb3c diff --git a/tests/expectations/compiler/compiler/integers/i128/ge.out b/tests/expectations/compiler/compiler/integers/i128/ge.out index 476866b76b..98dadebccd 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ge.out +++ b/tests/expectations/compiler/compiler/integers/i128/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 14e51b70ecee1d7bbdd5c37abf0d03f2c620fc9d31d68135108e241d78f738a6 - initial_input_ast: d5462c67471a54461a3e8bdca815ec0700534c47e89ee9adc34f1243c53d1f11 - initial_ast: 190357900b121a5278ca1cd8174bc13a092dd3babf9727c03fd27ab51066ba29 + initial_ast: cce966361b86fd8bf430f42cbd5f5bef906c564c65e92747e695e4612de1520d diff --git a/tests/expectations/compiler/compiler/integers/i128/gt.out b/tests/expectations/compiler/compiler/integers/i128/gt.out index dcb3ed70fb..45f2c394ee 100644 --- a/tests/expectations/compiler/compiler/integers/i128/gt.out +++ b/tests/expectations/compiler/compiler/integers/i128/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: dfdb458d96c001da809b9b656e1f32b1b3936303033136bb8fd8c99d9732dde3 - initial_input_ast: 8687bd99746f218264adc45a810fb6e16cf8ead9f64d63faa7b376e4e3907f84 - initial_ast: 1b01fc5c167c9957c4f631fcf1e494444822f748f3abcc977d13263a0a74cb9f + initial_ast: 55e173966370eb4a0d417203ce23b57e2d864211ab052652591ab9e8167c97ab diff --git a/tests/expectations/compiler/compiler/integers/i128/le.out b/tests/expectations/compiler/compiler/integers/i128/le.out index d6c8f3c70e..57fb1b62eb 100644 --- a/tests/expectations/compiler/compiler/integers/i128/le.out +++ b/tests/expectations/compiler/compiler/integers/i128/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 14e51b70ecee1d7bbdd5c37abf0d03f2c620fc9d31d68135108e241d78f738a6 - initial_input_ast: e34798d157f456fecf7ceed2e406c6b76e0b1bcda3a7110f56de0df10472b3c4 - initial_ast: 3396a4771011467bf2f248f6346e7c2c5dae8dc8b14eddc39a58d180538a506d + initial_ast: 094189928b2fe606a3fdb12944cd9c47722b15d5bd663671c21ab829f5b251f4 diff --git a/tests/expectations/compiler/compiler/integers/i128/lt.out b/tests/expectations/compiler/compiler/integers/i128/lt.out index 894a172a3d..a4e5b55492 100644 --- a/tests/expectations/compiler/compiler/integers/i128/lt.out +++ b/tests/expectations/compiler/compiler/integers/i128/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 8ed1bfd98e5df545f33dfc3b622573a028950b9f44a6038d84d903839ce6b226 - initial_input_ast: bc33c98fd9b5eba7bd68ca76eea533e137e786f4b75b79421de10134b56585df - initial_ast: 66cb035a3d249a394e8dbbe19cbc02f5cddb844a78bc80c838c7cab191fe9701 + initial_ast: bd6eb0ac2633f90b1892060d423cc8a9c7783fa2489dcd0d8f6a7a7b91251e7d diff --git a/tests/expectations/compiler/compiler/integers/i128/max.out b/tests/expectations/compiler/compiler/integers/i128/max.out index 34c8c23fee..524729eb04 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max.out +++ b/tests/expectations/compiler/compiler/integers/i128/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a2ab6a89c5952a113fbecdeb630917b4699c38dcda5971528ab35cdd5e92c216 - initial_ast: 76fb816766ffe11700b4c2a7ebf8502f09b7a5ca9f616fcfb1fbfc083d70b91e + initial_ast: f38658b5b60348c5a535de0a66013da8d5de2be31d2573fcccb20faac9dcc55c diff --git a/tests/expectations/compiler/compiler/integers/i128/min.out b/tests/expectations/compiler/compiler/integers/i128/min.out index 129af93309..77f4d99c38 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min.out +++ b/tests/expectations/compiler/compiler/integers/i128/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 1480b753150538db3f133e6491506ee264d39be8d1c0dab484cd81a20f24cdd8 - initial_ast: 03f31393c00a98648f946675297b0c1bcefb2660ec10f96a955eec09fcdefecb + initial_ast: ecf48e98a9c58ee356d5e7d7949771eac4608e8f3f1e7742d1adc03b55a8196f diff --git a/tests/expectations/compiler/compiler/integers/i128/mul.out b/tests/expectations/compiler/compiler/integers/i128/mul.out index 9f96106379..6dcfc04013 100644 --- a/tests/expectations/compiler/compiler/integers/i128/mul.out +++ b/tests/expectations/compiler/compiler/integers/i128/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 42fddcefe5cf53169d184a40cd71b49276704e081253906c01f79604ade70767 - initial_ast: 275429c58b52b8d80540eeeffe81ea7182132b42bbcbf9314eb6d87cedf769e7 + initial_ast: 4f2a202ce2f4778996475b3157cb452648264661f75bbe10be2093684260a06d diff --git a/tests/expectations/compiler/compiler/integers/i128/ne.out b/tests/expectations/compiler/compiler/integers/i128/ne.out index 3464abe049..031bdd24ff 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ne.out +++ b/tests/expectations/compiler/compiler/integers/i128/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 63066c216028b02a42d2eac61498268917858ed1821c2ae0e58717b82d7bbf8d - initial_input_ast: 7446cc6978fba2a498bc55383084c51e05a9bdba1eb03ddb311d523be65585ce - initial_ast: c9f475f9bad29101a941423e97e83757441cc28efa410434f9ae27839f07bafa + initial_ast: 9a630ec8e00543d9ebb0fc32c9d3f0ec9adf5f9a20d0f7bf5ecb125afaeedeb9 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate.out b/tests/expectations/compiler/compiler/integers/i128/negate.out index 43f89ae728..ce6efc39b0 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: b7ef231f7dd6bc63f301a57ffd5da98fae92d14999aaf72c94c85aa28ee66ab1 - initial_input_ast: cfe2ed866172bc2b8ed033f9e5086dc5e518e7305631123537e5e7ce2697ec25 - initial_ast: fbb42eff2dd3ea8ef4e74f998d10ba76ea3dfb4f5789484fc876bc54c8b582f9 + initial_ast: 2af99741bb40050d0ec307259c2b83c7088122f68506e42d299afd81f220b6f2 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_min.out b/tests/expectations/compiler/compiler/integers/i128/negate_min.out index 08cc6784e5..d85c4f6f64 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_min.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: d2117e2d504b1c95edd7f81c2fb111787aba0b797e0f076fbb473971dc0d3639 - initial_ast: 656d8d0ee36bd258a452ad524cf0761e432dc5e39ff990dd8c1aff5246cfd81a + initial_ast: 2f5f144c8592083449a623488f31412c5565d6bc2802cd78a914fa680ea18362 diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_zero.out b/tests/expectations/compiler/compiler/integers/i128/negate_zero.out index d07878bbc4..158469897e 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_zero.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_zero.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 34fcde78f661247ade77dd607c349139ab960d39b6a5e10efb7102e0f52aa9de - initial_ast: 679872f43b04fdcfeb4cc560f3e2f95831adde9a40dea1cdaf28b73ce08aba90 + initial_ast: 949334b7fc163e0fa9ddaf3e2128ce5b95fae49711246eb59cfb01aff29858c3 diff --git a/tests/expectations/compiler/compiler/integers/i128/operator_methods.out b/tests/expectations/compiler/compiler/integers/i128/operator_methods.out index b715129d91..12939d26bb 100644 --- a/tests/expectations/compiler/compiler/integers/i128/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/i128/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 7a421e06f3d56a5ff35cde69dfc10576b6c08f46a54ba24a666faa06e05d22a6 - initial_ast: e7106189c908d27971e18c74d402859225869a735452ee6546d5c0958e459575 + initial_ast: 5803035f1b9e5808ed0075f3f3b6f1c8cd9f6796206b7761556f5577a1b1d554 diff --git a/tests/expectations/compiler/compiler/integers/i128/or.out b/tests/expectations/compiler/compiler/integers/i128/or.out index 793cdc3f77..b201ad291a 100644 --- a/tests/expectations/compiler/compiler/integers/i128/or.out +++ b/tests/expectations/compiler/compiler/integers/i128/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ca7500628480432228743b9eff2cac69e433bc0a9da6ce007cae38ef9c2b57a6 - initial_ast: da3f6e496c8765a7fd3bc91bac882ad9ff142b05b78d437161de77cfa9e93d77 + initial_ast: 09d3c1a70ad05c2e3622d7d056892aecb87a89c57b268936835fe0f012099ef5 diff --git a/tests/expectations/compiler/compiler/integers/i128/pow.out b/tests/expectations/compiler/compiler/integers/i128/pow.out index 82e73075e6..99e8d95207 100644 --- a/tests/expectations/compiler/compiler/integers/i128/pow.out +++ b/tests/expectations/compiler/compiler/integers/i128/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a2ddf46a6ab6a9ae23438bad4a04a03e699f74cf478054017008197940e1c816 - initial_ast: 40f8374b33869991660bf29065ce5a7bda015b3860e1d4d122ab47d6c9d8c527 + initial_ast: aa002a9a2016f5b449a8e1eab87dd8087ebab3475bc97f4bcf9d46020aab0ed0 diff --git a/tests/expectations/compiler/compiler/integers/i128/shl.out b/tests/expectations/compiler/compiler/integers/i128/shl.out index 7fb1e0e826..bed1c10b33 100644 --- a/tests/expectations/compiler/compiler/integers/i128/shl.out +++ b/tests/expectations/compiler/compiler/integers/i128/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ee62d8508ac57ff5e421f4524903e8a65375db4e08db14fcaf0cec4f11974ce6 - initial_ast: 48cf3da6026d7c545126575a39d3210415f1fcb1732d668c6d22cdd7c88878cc + initial_ast: 1bc2e196b536e2613a227622b612c93160c82e5e759f099446f1c23efb771783 diff --git a/tests/expectations/compiler/compiler/integers/i128/shr.out b/tests/expectations/compiler/compiler/integers/i128/shr.out index 9178045814..f5649afe67 100644 --- a/tests/expectations/compiler/compiler/integers/i128/shr.out +++ b/tests/expectations/compiler/compiler/integers/i128/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ee62d8508ac57ff5e421f4524903e8a65375db4e08db14fcaf0cec4f11974ce6 - initial_ast: a1995d34c2fc6bec480cef2270472ffed393936d5f6f6f72bf3d720d65336b20 + initial_ast: 8f0f47aa8cf65243991d809a2841907952447082e75da9996461f8a2e79c1478 diff --git a/tests/expectations/compiler/compiler/integers/i128/sub.out b/tests/expectations/compiler/compiler/integers/i128/sub.out index 7dba3a9d5b..71db6818fc 100644 --- a/tests/expectations/compiler/compiler/integers/i128/sub.out +++ b/tests/expectations/compiler/compiler/integers/i128/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 4b489f1abc0cef5123b21e23de7a754ec616820ece226c08584e511216a9bda1 - initial_ast: e4c37027d24f38f95598bdc92a184b6ac411eb63addfecc5869b5d241f5732d5 + initial_ast: b70663bf61d570b801a73a06917323d23f1e9b41a0af9706d557f6295c0f18a9 diff --git a/tests/expectations/compiler/compiler/integers/i128/ternary.out b/tests/expectations/compiler/compiler/integers/i128/ternary.out index f349b02fa1..d7d1887f33 100644 --- a/tests/expectations/compiler/compiler/integers/i128/ternary.out +++ b/tests/expectations/compiler/compiler/integers/i128/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 79fd283874b08961452d9a787c30439a1e551a2866a636368f4d17f8e88985de - initial_input_ast: 31e8d186f6c363350a67a31ede99b55c376ffc7a2ae779dcf0aedb43cb94979e - initial_ast: 4de7b18747a3626dc77775180ad482caff806b2a6cf88318956471407bf000a7 + initial_ast: 05c48a2f8bc807d402193b39f6e3345102679a02108e58f2beed05f30450f53a diff --git a/tests/expectations/compiler/compiler/integers/i128/xor.out b/tests/expectations/compiler/compiler/integers/i128/xor.out index e6e06b2439..d556396270 100644 --- a/tests/expectations/compiler/compiler/integers/i128/xor.out +++ b/tests/expectations/compiler/compiler/integers/i128/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 24836b073b76f7a0d3248569022711039180676965e828443fa77db4ca49de81 - initial_ast: 67682b0f37d8433be92c854d4a66d7d48b55d50143af3dae7880c3520ae7bde0 + initial_ast: c327b53ddd5cd34efd8e955bf5ff80cd1039c6c63b52735903c3cf9e1af70506 diff --git a/tests/expectations/compiler/compiler/integers/i16/add.out b/tests/expectations/compiler/compiler/integers/i16/add.out index e775707fe7..c048b622d2 100644 --- a/tests/expectations/compiler/compiler/integers/i16/add.out +++ b/tests/expectations/compiler/compiler/integers/i16/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ca6ab55d11bc84ae5e5442cbc17ecf2f2ff6d31041d98a43c9710c2e3a7f7ff9 - initial_ast: b869cd86791b366b69f05ea45ea7d37bf002fbbee22a6b08b319f9be9bf43597 + initial_ast: 18ba84b2123ae0b8f1c311480b3c807800560d649c918c330f4e3f30bd709ced diff --git a/tests/expectations/compiler/compiler/integers/i16/and.out b/tests/expectations/compiler/compiler/integers/i16/and.out index 64b82c7530..c6a6abc9d9 100644 --- a/tests/expectations/compiler/compiler/integers/i16/and.out +++ b/tests/expectations/compiler/compiler/integers/i16/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ca6ab55d11bc84ae5e5442cbc17ecf2f2ff6d31041d98a43c9710c2e3a7f7ff9 - initial_ast: 809452097bde742b77243261863cd9d5b404f9e87f271ff0c3a51d024d7a3277 + initial_ast: da7e4053576a155509b5dc277e42b905fefa80cf1ae545c00bc2fdce4fa04bf1 diff --git a/tests/expectations/compiler/compiler/integers/i16/console_assert.out b/tests/expectations/compiler/compiler/integers/i16/console_assert.out index 2f2cd3e106..d0671affed 100644 --- a/tests/expectations/compiler/compiler/integers/i16/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/i16/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 71d4c15605c3975991ba51378ef4148d6863656fdb491a93573bfc03dae3dc62 - initial_ast: d24648724406b90c1de2b9361bd80216082a2d7bc08613861cd84718c82f1b5f + initial_ast: 979c97c7fa002f421d61bd51a85cefca7418fd0c8e387152a755ae5d98ebd218 diff --git a/tests/expectations/compiler/compiler/integers/i16/div.out b/tests/expectations/compiler/compiler/integers/i16/div.out index fa7691fc4b..efb1c4b0fc 100644 --- a/tests/expectations/compiler/compiler/integers/i16/div.out +++ b/tests/expectations/compiler/compiler/integers/i16/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 17f36a9515beff0798792f878b29efd08dd2b9b1b34b08592dbf49709f48260c - initial_ast: 22557d30c694c0b0e91c73a967422e8f8ec668125008e1157d49cda1bf5558bd + initial_ast: bca7b46fa4e2da28c21fd50dbe093e504d8bab164bbfa0b31881fb07c6dddfda diff --git a/tests/expectations/compiler/compiler/integers/i16/eq.out b/tests/expectations/compiler/compiler/integers/i16/eq.out index 998f79ae60..6222e2354a 100644 --- a/tests/expectations/compiler/compiler/integers/i16/eq.out +++ b/tests/expectations/compiler/compiler/integers/i16/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 7c88546226f65808e9be3e925c8272f9583fbde6ae8b308116819664af8d9dd2 - initial_ast: edbc2daca6bb579a2f1b35b86eebd5f9e39768f8e3cc5ee4c92f2a2dd672af3d + initial_ast: db1321b24b972feb4d77b7d6aa12a89b21839fdff14f82ff60f266decf3cd3b6 diff --git a/tests/expectations/compiler/compiler/integers/i16/ge.out b/tests/expectations/compiler/compiler/integers/i16/ge.out index f0798d704e..36f8f69f9d 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ge.out +++ b/tests/expectations/compiler/compiler/integers/i16/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 671dbf588ac06c9aaa98a0b93ae310030698c4459bcc8f5007d0b34e7f5a2fe7 - initial_input_ast: 1fae972c153c7e83794ba4f2b497e92499b793ef1a746da5be203b6d31a06d46 - initial_ast: 8e3ffdad6178e550dc0cb3fb8b8591555c16f536b00015ede86e6f0540d3e610 + initial_ast: 2d2ef66483844856ea1fe64b3003697048b01ae8801a2fd0ea433ca97fc4c40f diff --git a/tests/expectations/compiler/compiler/integers/i16/gt.out b/tests/expectations/compiler/compiler/integers/i16/gt.out index 16693acfea..2df3823292 100644 --- a/tests/expectations/compiler/compiler/integers/i16/gt.out +++ b/tests/expectations/compiler/compiler/integers/i16/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 39fc24fd87f4bf15d0567508034c57f4de17a407812a715e62dc635b9b91dd8e - initial_input_ast: c5ffa1915a34f65b23e03c634e1941e89527338cd149ee5e4b9d0b4c0f36ba68 - initial_ast: e050abc2d6e8a404b96d2abea06aab386991334de50f563f48e14ca24f163000 + initial_ast: e00d7301e12aeb01771f2ac2440b14ccb2ef72cbd267555b0e469a830fee6e41 diff --git a/tests/expectations/compiler/compiler/integers/i16/le.out b/tests/expectations/compiler/compiler/integers/i16/le.out index 4acc87d7c1..852b8ff610 100644 --- a/tests/expectations/compiler/compiler/integers/i16/le.out +++ b/tests/expectations/compiler/compiler/integers/i16/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 671dbf588ac06c9aaa98a0b93ae310030698c4459bcc8f5007d0b34e7f5a2fe7 - initial_input_ast: 22a419208eeb7a661a55a2b61d7a3a9896af73320d4899320df9c830b3bb814a - initial_ast: e8ac37ec0185965b13ba25b6b43d6a2068cca9af6b2860dcdcf1fdbc462528ce + initial_ast: af52ea66c9b8889563adfbb25282f87c98390326813a5be1986a1472c558c762 diff --git a/tests/expectations/compiler/compiler/integers/i16/lt.out b/tests/expectations/compiler/compiler/integers/i16/lt.out index 9669f0010b..8d74534cc8 100644 --- a/tests/expectations/compiler/compiler/integers/i16/lt.out +++ b/tests/expectations/compiler/compiler/integers/i16/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: c1eedaa7c6583b87a4e6bfd9d3698ce378f3fbbed0a87419549f5e4124ce9d40 - initial_input_ast: 7b40e77aec02ca9b383339c98fb220828a90859f46c18b24a32ad22fc2884d35 - initial_ast: e6a44b63da2e6d70110b81ffad2b2ee38814f9baae5a19893bbd2bd12a0107c6 + initial_ast: 24603a4c7342ed91274710ea6164a1132675d0b673a447cdabcdcd33e52243a6 diff --git a/tests/expectations/compiler/compiler/integers/i16/max.out b/tests/expectations/compiler/compiler/integers/i16/max.out index d83788bc93..18f7b14c8e 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max.out +++ b/tests/expectations/compiler/compiler/integers/i16/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 940d740ba40284a1d3c3cf8737facd1e98968224dd93999dbcb336cb3f4ce571 - initial_ast: e29f17572c095f5b8d230666be1a5cb70204f6442b238e11e3751779eb9d12ba + initial_ast: d5a2f35f5420e39e2831588932fedbfcb44c31211594509d234eff9d49df3986 diff --git a/tests/expectations/compiler/compiler/integers/i16/min.out b/tests/expectations/compiler/compiler/integers/i16/min.out index 60f46f4169..aef44c107f 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min.out +++ b/tests/expectations/compiler/compiler/integers/i16/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 142f86218cc646677bedd5bdf510ff537782d7e60967de7ebe9fb1fb50d7026d - initial_ast: 3a12a3a89691c3f0fac7474e27a76c5b9827ec7eb99eac99787d82208d7a0c82 + initial_ast: 35fdc0cd37423bb352ec15d1bd4af6b3510a516fd97ae961d3e722938d0ab50f diff --git a/tests/expectations/compiler/compiler/integers/i16/mul.out b/tests/expectations/compiler/compiler/integers/i16/mul.out index 6309d9b10c..7cf28dc88a 100644 --- a/tests/expectations/compiler/compiler/integers/i16/mul.out +++ b/tests/expectations/compiler/compiler/integers/i16/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 745a2b9284f3287f347d81001af05f7aeb8b713cdc357bc5845f1827dcd8fd7f - initial_ast: 3ab1c6f4b724ebd5775fdb29630b9c5b976961d41d215ce31a1a90ca1c949c6d + initial_ast: bbe43a142819e2304287ae9b267e998c2c32e1b718c2dcdb7ef98f60298cd1a8 diff --git a/tests/expectations/compiler/compiler/integers/i16/ne.out b/tests/expectations/compiler/compiler/integers/i16/ne.out index 9f29db251b..8dbc9bb42e 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ne.out +++ b/tests/expectations/compiler/compiler/integers/i16/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 0f4ec75d633030e364406d8e84674688511acd657b3e40614f54e8af9bc7fa8d - initial_input_ast: f5ba26c4f397d3678ad4296f5149592d1310e4d94bc52a274601ec8454dac549 - initial_ast: e471222556c892e1fe10660f24a793473d5d2975ca0151ab705804b6b360a84c + initial_ast: 02b1dc8e048954a84d1b0dc7e010e63077c8d9218722eae05750c333fcff7e3c diff --git a/tests/expectations/compiler/compiler/integers/i16/negate.out b/tests/expectations/compiler/compiler/integers/i16/negate.out index 072855bea6..a00c89fd0e 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 664f047973ba9818641a3c6a85834963a8e757af1a449f6a797b9562a8b138de - initial_input_ast: 6efaf882a26d26eb45f16ca255bcb648f018f647dd15ed158e26e543836fb6cd - initial_ast: e6d527f134ba45e580a248e9dae401f7f71eaa5dd3c41548600fd10a8ac830ca + initial_ast: 66eecea36164dd3c143cf710baf041d26bb15ecd6f702ea6afcb477ed5374ef1 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min_fail.out b/tests/expectations/compiler/compiler/integers/i16/negate_min_fail.out index 2b0abe2d96..55b0bad7d1 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_min_fail.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min_fail.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 7643261a1792f68251258ad1b6be18e95528a86816b3772140d130b2784736cb - initial_ast: d36246adcfdf393eecf1ad64aecf858e960e22ba69c87369d53347392cbfb4a4 + initial_ast: 787edca38dbf5e1677361e2cee74615674e81a85c13e60115b58c946531dfc57 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_zero.out b/tests/expectations/compiler/compiler/integers/i16/negate_zero.out index 4e622626ca..1b4ceec93b 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_zero.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_zero.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 76a0fe2199754831329d9b089d2c02f73d7457aaed6548372169318675b85f48 - initial_ast: b748784d3716f6dd8f82c2d42ea826ec857a3f681756cac9ccd9b8c6e0c0a841 + initial_ast: 59018811b15f0cdf0a616d321dd311c69d2ef802927f578971f147f23b359b86 diff --git a/tests/expectations/compiler/compiler/integers/i16/operator_methods.out b/tests/expectations/compiler/compiler/integers/i16/operator_methods.out index 0fd53bc9d2..85785905ce 100644 --- a/tests/expectations/compiler/compiler/integers/i16/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/i16/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 1919858036addddfaeec6f7f5c06b8d4aad4e18f0167d9da1c61a7704dd51fe5 - initial_ast: 8b4dd434c9a8fde0e845bffa9a82369172093a71ce41c32b9fc98da93b1a1db5 + initial_ast: 3751aa582acc0b1536f3c420ace82af6e07fbd4d55f615dcdf1708c4adc93321 diff --git a/tests/expectations/compiler/compiler/integers/i16/or.out b/tests/expectations/compiler/compiler/integers/i16/or.out index bd42993f2a..a8ebd74751 100644 --- a/tests/expectations/compiler/compiler/integers/i16/or.out +++ b/tests/expectations/compiler/compiler/integers/i16/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ca6ab55d11bc84ae5e5442cbc17ecf2f2ff6d31041d98a43c9710c2e3a7f7ff9 - initial_ast: 50e3321589352a7adf53fee57319185cc20f0acaa43282637b79baab19b4f6a8 + initial_ast: 01de368a4cd5c70f71a71431667c0e03f081ab10bfc5e382207aab9c6c794647 diff --git a/tests/expectations/compiler/compiler/integers/i16/pow.out b/tests/expectations/compiler/compiler/integers/i16/pow.out index 359d43de40..cde76e6155 100644 --- a/tests/expectations/compiler/compiler/integers/i16/pow.out +++ b/tests/expectations/compiler/compiler/integers/i16/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 1c847e4cf1052419262e993cc6f50a0a8d49a4a219bef07de6916a788e2dbac3 - initial_ast: 716c8440a95e3b5c34f745dba8673afd75414a9e2350eebde49ae661ee42083d + initial_ast: 434ffed7f3a9a6d501333b89b0e5c746866932f2cf4ce9aa6dd43811708188f2 diff --git a/tests/expectations/compiler/compiler/integers/i16/shl.out b/tests/expectations/compiler/compiler/integers/i16/shl.out index 4135ea3d0f..6468f9b332 100644 --- a/tests/expectations/compiler/compiler/integers/i16/shl.out +++ b/tests/expectations/compiler/compiler/integers/i16/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: d147db0bf287fc9f96e67ec89e3839ffe5ee498b2d2e1c055df938d64fe9db59 - initial_ast: b08570e62709b72faf734d27cd4569de7b33605716fb4320cc141a02c35c43fc + initial_ast: e45b06d9a794fa53050ace463debfc63346d3d4e9ef3fd75583f01f16e233a51 diff --git a/tests/expectations/compiler/compiler/integers/i16/shr.out b/tests/expectations/compiler/compiler/integers/i16/shr.out index cb47893ce2..b51b28270c 100644 --- a/tests/expectations/compiler/compiler/integers/i16/shr.out +++ b/tests/expectations/compiler/compiler/integers/i16/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: d147db0bf287fc9f96e67ec89e3839ffe5ee498b2d2e1c055df938d64fe9db59 - initial_ast: c8a29025afc34fcb2dc833f9534adbfff15358e4d0f0b392218e8e84e0891705 + initial_ast: 743d6769e5e597e2cec1624b0fcb82e508da2040f773f4ed4a663d5a0c587f7b diff --git a/tests/expectations/compiler/compiler/integers/i16/sub.out b/tests/expectations/compiler/compiler/integers/i16/sub.out index ec20bd0aec..13f730ace0 100644 --- a/tests/expectations/compiler/compiler/integers/i16/sub.out +++ b/tests/expectations/compiler/compiler/integers/i16/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: b7ad97cd1531c1826eadf4c9c2b96d4d92ca02d158be18f4ebe1746ed99153aa - initial_ast: 3f1690cb0dc84ce45dfa66417c90c9be57369288de1c83ec6bbaf7575feae55b + initial_ast: 0f4cc580a980d19b427715a497b61f2c7089283b6f2d923910e8762d52868486 diff --git a/tests/expectations/compiler/compiler/integers/i16/ternary.out b/tests/expectations/compiler/compiler/integers/i16/ternary.out index cc2dda491f..05499d568e 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ternary.out +++ b/tests/expectations/compiler/compiler/integers/i16/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 41317d43452e14f1a4cdaefef0a9bb53149a3fde47bca46f2352dbd43c9ab881 - initial_input_ast: 56b6de335469ea51e45abf216b593b72fff3010892504485016a893f0a8ae182 - initial_ast: 36d350451b3be6c9b38f3b095fc7a0f7a4d11e4b3c007a14fd350e6cd032b323 + initial_ast: f46a70e98e25b8767c3fb608624906dd7bc4698293fa75599e881d7432836553 diff --git a/tests/expectations/compiler/compiler/integers/i16/xor.out b/tests/expectations/compiler/compiler/integers/i16/xor.out index 4bc02f7bcd..24008580c4 100644 --- a/tests/expectations/compiler/compiler/integers/i16/xor.out +++ b/tests/expectations/compiler/compiler/integers/i16/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 3166a0fdadb4026ed5652f84a4b701b19532a4c19904ad075455ec9a6fb2c724 - initial_ast: 3ea0d125b5c5aac27684dad2c55608ef8372c98964ec5c9c9d04ff4e9b648aeb + initial_ast: 30f5cfe0308fd6ba3831d04fa374398e6d9def3027ec3543850da8f3cf9c3042 diff --git a/tests/expectations/compiler/compiler/integers/i32/add.out b/tests/expectations/compiler/compiler/integers/i32/add.out index 2b961ebc20..871ea81f6c 100644 --- a/tests/expectations/compiler/compiler/integers/i32/add.out +++ b/tests/expectations/compiler/compiler/integers/i32/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c3f745ae09f3550b07ee1d548a4080fa602c77c54c8339d190755e61c041d9d0 - initial_ast: 1b3646ec051ebdd0571a6cc5e54dd88b494c24cd2c197045c413894dadcad587 + initial_ast: 972aa6ce1ae53e414c248974e830e7665f27dfb22cb91bc727776686a51545ce diff --git a/tests/expectations/compiler/compiler/integers/i32/and.out b/tests/expectations/compiler/compiler/integers/i32/and.out index adb9538768..aa05d63dd7 100644 --- a/tests/expectations/compiler/compiler/integers/i32/and.out +++ b/tests/expectations/compiler/compiler/integers/i32/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c3f745ae09f3550b07ee1d548a4080fa602c77c54c8339d190755e61c041d9d0 - initial_ast: 58eae139e14d45468ac3f8aa2de8eebec731aca1649fb9249ac572f0400c9f4b + initial_ast: 34b8386a7ff6aeee71b03fe3df9e7a3eb30305eb4518d1f1b7693b185d2e70ce diff --git a/tests/expectations/compiler/compiler/integers/i32/console_assert.out b/tests/expectations/compiler/compiler/integers/i32/console_assert.out index bf0493b0d1..048a9f034d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/i32/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 18e0670d3bdd1b94387381965ed18bb2f52da2fd25ed26303079ddd2ad532ec7 - initial_ast: f10907e6afbcd4f39d9c6397f684fb9e461d9b95863f22a177784121d3f79fdd + initial_ast: d56f871ffdf0d354259571240ebb16c5b8e5d873fe461c45bfa37d1563e42944 diff --git a/tests/expectations/compiler/compiler/integers/i32/div.out b/tests/expectations/compiler/compiler/integers/i32/div.out index 500a637271..a7273774a7 100644 --- a/tests/expectations/compiler/compiler/integers/i32/div.out +++ b/tests/expectations/compiler/compiler/integers/i32/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f4861b2879e1a7a0787897c313e56f53cf05f4ef416c1db99d650a7f50c0169c - initial_ast: 7cfd4cf2770cc577919934a24a8741844c365c2662852da408fb2b48536cd601 + initial_ast: a28d855f9050c900b21af1b89f041f53a474be238e726532f07600ebb7620903 diff --git a/tests/expectations/compiler/compiler/integers/i32/eq.out b/tests/expectations/compiler/compiler/integers/i32/eq.out index 5b9c8d82a3..052029f587 100644 --- a/tests/expectations/compiler/compiler/integers/i32/eq.out +++ b/tests/expectations/compiler/compiler/integers/i32/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 2310cea3660b80b688fc47915171d9804aea93a8e3a160020df15b78f2c44e92 - initial_ast: 4da18080cbf0f3f41dc8b853c4ee55e8020fbfe248c0c292ba4f8d043118baae + initial_ast: 0f484a1db93a26948d1bdb277b373aab527567317fb235d04a3d69654c3778b0 diff --git a/tests/expectations/compiler/compiler/integers/i32/ge.out b/tests/expectations/compiler/compiler/integers/i32/ge.out index d42f0d21da..95455c13fd 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ge.out +++ b/tests/expectations/compiler/compiler/integers/i32/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: d8b075a0c14b12b53de228108da7cf61ba2e7892b134075063684769996a7e45 - initial_input_ast: c12a655964529a33ba9795df3794474b3f6a9b9f5fe121fe688345d40d65bf00 - initial_ast: 99a0a40dcdc605b5a28d1ad78de6d98d81222b4fa70a50d4b907a7c454fec166 + initial_ast: 8662ee2e747454ef040e34a844e82eb60c1ea927da579af41fae48607741bad2 diff --git a/tests/expectations/compiler/compiler/integers/i32/gt.out b/tests/expectations/compiler/compiler/integers/i32/gt.out index bfee94a903..e08ac2827d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/gt.out +++ b/tests/expectations/compiler/compiler/integers/i32/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: a83eaf3c244972c04e15c0c911e9fb46ba56556d3ecfd5ec3561dd7d42341138 - initial_input_ast: fa3b9cb73dc9a270ba1167643daf66562ed80880be98fa7a0e34175792bea230 - initial_ast: 2011bf78585b33d3e4cf6d15c2f5e78cbe560164de5500498ccdb1992057189f + initial_ast: 276465095e0659f6ff889cf8745d310685ee85249736ec383e816509905eef71 diff --git a/tests/expectations/compiler/compiler/integers/i32/le.out b/tests/expectations/compiler/compiler/integers/i32/le.out index d3821a0707..6c5a5553d8 100644 --- a/tests/expectations/compiler/compiler/integers/i32/le.out +++ b/tests/expectations/compiler/compiler/integers/i32/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: d8b075a0c14b12b53de228108da7cf61ba2e7892b134075063684769996a7e45 - initial_input_ast: c4310c1bdce965b70f52ba768a13f976e0611adcec05feaffc3530c03dbcd8b5 - initial_ast: e3aecaf6a5adfcd4f82cde7fa2360ae63738141788c8de35eabedecf7da26dde + initial_ast: fdde71849715bec5085151bd7be39b9b941b33ee3c0dccc45c49db985210187f diff --git a/tests/expectations/compiler/compiler/integers/i32/lt.out b/tests/expectations/compiler/compiler/integers/i32/lt.out index 6b84731f8d..5fc5242478 100644 --- a/tests/expectations/compiler/compiler/integers/i32/lt.out +++ b/tests/expectations/compiler/compiler/integers/i32/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 30d30fdd6bab9733171c511d47c8617b4a54fd50c701260d2b7843635e4c734f - initial_input_ast: d3105d0be6b536c10caeff8d036665f6ca6b7f3fddc25d5fad126a82ba7a7ce9 - initial_ast: baeb8485c3dd4abc78da1a07b1847933d49d68a0628b86e94efb72f41caf77ca + initial_ast: 13441ca1734e972baf7ff3a7aefe663b12bde1b3eb1ff0cacf2cf05281417e72 diff --git a/tests/expectations/compiler/compiler/integers/i32/max.out b/tests/expectations/compiler/compiler/integers/i32/max.out index dde154adb8..056d518d1d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max.out +++ b/tests/expectations/compiler/compiler/integers/i32/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 76a0fe2199754831329d9b089d2c02f73d7457aaed6548372169318675b85f48 - initial_ast: 65641e2f97d65daaa4cb8b2ce4e64b36cf5df1d817877e4e4d93da09ae1377a2 + initial_ast: fa1cdd740f94856f5355ee35464f2d1e4f00e925f9133ba121731ac8f86266ec diff --git a/tests/expectations/compiler/compiler/integers/i32/min.out b/tests/expectations/compiler/compiler/integers/i32/min.out index 787539205e..bd1d2c8517 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min.out +++ b/tests/expectations/compiler/compiler/integers/i32/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: e6e80b1d0e3a62b708072dee54289625035fb2a2ad6f2128a4688166e1f2c830 - initial_ast: cc34252c82189a05725700a7ca8b244bc62516cae0e0f36818f2c23e144471a6 + initial_ast: eb4fbf7b0f6b478a1f2c852ba9625132ac9f91c4b81a5cab556064207afc8622 diff --git a/tests/expectations/compiler/compiler/integers/i32/mul.out b/tests/expectations/compiler/compiler/integers/i32/mul.out index acf197b1ee..1983719b2f 100644 --- a/tests/expectations/compiler/compiler/integers/i32/mul.out +++ b/tests/expectations/compiler/compiler/integers/i32/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 27614bbc1bce86a65fab168ceb3b6109b70aa5cdcd9d47fbccc665de98a8a8fa - initial_ast: 5e07edbe3d9d0cb4a197c0d3f50728c6749389efae49b82f4a026a8c104a8bc2 + initial_ast: ee8261f516b4b4f6f7132557c65a0407b1cd17b06a783dbe2d3b188b8320b7d3 diff --git a/tests/expectations/compiler/compiler/integers/i32/ne.out b/tests/expectations/compiler/compiler/integers/i32/ne.out index 11d1fd6788..8e3e3dc56f 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ne.out +++ b/tests/expectations/compiler/compiler/integers/i32/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 713c1cedf6fd5178e71d0fa26662b09e0ade6971c3587f89fc5a8e03a756e981 - initial_input_ast: 95e799eeb1e1cbc6c3f6fcd5c7a361d1c6476ae66a5ff09c0f5ad423129ff0b2 - initial_ast: acbc9b1bc845f51e1fab0706653740f027b1f921d4a2df8eb4ba7025040550a0 + initial_ast: eedec571c3f0d892c4a27dae7609ccab0aa8888584953bd3d6510177d5bc0749 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate.out b/tests/expectations/compiler/compiler/integers/i32/negate.out index 98d5eeff3f..7f12fd8bad 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 8b9feb5e8f0718841d67d61ff8add7ea9b6570873b6c4f404bf58c6da9e23c9c - initial_input_ast: 78e3a8bf17a0abcdc7dedd89d596366b20931da74e85add4ee8478e3086242e5 - initial_ast: 1487e617ff9efe4c253eb92d4157ed1dc0ec05f382ecc1c284f68054b039f3f1 + initial_ast: 1e2554b5815104a722932c8c42b3269a936af9427ee4c7a2f7a9e0b2285d5df9 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_min.out b/tests/expectations/compiler/compiler/integers/i32/negate_min.out index c4726c4201..3731037ab1 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_min.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: bdf7f8a6f92b7acd8c798becc30b2f6a8cf6b0ed714c168c5a9e5559988b2185 - initial_ast: 23557f6f914cfc80fc44061787663ccfda3e5e4a0c2d7d84fab1bf17dbed6bcf + initial_ast: 9b1285411f97049ef2e4ebeed1726aa94aacfca3a23d78c5fa5aa01ae7dea6a1 diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_zero.out b/tests/expectations/compiler/compiler/integers/i32/negate_zero.out index 5b97629ba4..6699d2285c 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_zero.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_zero.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 76a0fe2199754831329d9b089d2c02f73d7457aaed6548372169318675b85f48 - initial_ast: 71719649303efd4e908d722f9b11a29a0839ef0ee607e43c0258077ca8f250ae + initial_ast: 5d0282fa0b8f3eef39650a47227b088fca292329f62163ab025b5167006d3e66 diff --git a/tests/expectations/compiler/compiler/integers/i32/operator_methods.out b/tests/expectations/compiler/compiler/integers/i32/operator_methods.out index a56b286703..82b7d4e703 100644 --- a/tests/expectations/compiler/compiler/integers/i32/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/i32/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: baa9efa368cc52d60f6299586aa61afe1d88ddd2c80a289da7e5599765a9399c - initial_ast: 66b84e1d00a4a3f0d1b5f9d31b87164601ed43d42d53af7af93f2cc46ed7e015 + initial_ast: 78cb3027e00b3d527c5cdddf6088920bf4604979bc98a06aa5fe3c6a133dc244 diff --git a/tests/expectations/compiler/compiler/integers/i32/or.out b/tests/expectations/compiler/compiler/integers/i32/or.out index a8861da559..8c809f3282 100644 --- a/tests/expectations/compiler/compiler/integers/i32/or.out +++ b/tests/expectations/compiler/compiler/integers/i32/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c3f745ae09f3550b07ee1d548a4080fa602c77c54c8339d190755e61c041d9d0 - initial_ast: b4cb63dabed4bfc41eef6b18928a7daa040c785a7b492322b71d88262a6277a5 + initial_ast: 5e35f4639d58c809752ed399cace00b959d3afaa82f351eebe5e46ab78491f8c diff --git a/tests/expectations/compiler/compiler/integers/i32/pow.out b/tests/expectations/compiler/compiler/integers/i32/pow.out index ead2902794..cca0ce2309 100644 --- a/tests/expectations/compiler/compiler/integers/i32/pow.out +++ b/tests/expectations/compiler/compiler/integers/i32/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: db7a1f929101bb73938127dcaebc78bf1fd13c0b1f29b49c143c652c76513869 - initial_ast: a1201c174a83b160b07adad2ca0f5d454c272d3b3bf3dfbeeb6f46704906fc30 + initial_ast: 697223439d2aec69b2ab5c2c4870baaeb9f60d66a36695cbb9cdb80401aee262 diff --git a/tests/expectations/compiler/compiler/integers/i32/shl.out b/tests/expectations/compiler/compiler/integers/i32/shl.out index 1f3bbb24e8..fe50b012fb 100644 --- a/tests/expectations/compiler/compiler/integers/i32/shl.out +++ b/tests/expectations/compiler/compiler/integers/i32/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 3bc0aa0df75ae0548bec6bec2193fe1f94319ecb8d99f3d7367cd1ec29ee0519 - initial_ast: f5ff0fbfc9790c0c98e1191d737f01655ca758cdd7aa87be3eede353a9bb6728 + initial_ast: 3fc9e30596317abf5e64463cad6f14ee05f2b4c1a7e9fccb6d9b7903885e36ca diff --git a/tests/expectations/compiler/compiler/integers/i32/shr.out b/tests/expectations/compiler/compiler/integers/i32/shr.out index 22b7dec4f3..f7504b76a1 100644 --- a/tests/expectations/compiler/compiler/integers/i32/shr.out +++ b/tests/expectations/compiler/compiler/integers/i32/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 3bc0aa0df75ae0548bec6bec2193fe1f94319ecb8d99f3d7367cd1ec29ee0519 - initial_ast: 18f423e7006efa104ac7d3ea5b2022c8836829e331de264f52752ee567b5a3ce + initial_ast: 345508d724c654c5e78c6baef12270669a3ab22bec68408fa3a8f05e49fedb6b diff --git a/tests/expectations/compiler/compiler/integers/i32/sub.out b/tests/expectations/compiler/compiler/integers/i32/sub.out index 238e659b2f..de6549e8d4 100644 --- a/tests/expectations/compiler/compiler/integers/i32/sub.out +++ b/tests/expectations/compiler/compiler/integers/i32/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 65a577110ee76e6af14d3ee0ba6d8b3d43238bf40f0bf17ce5fb0d7db958c468 - initial_ast: ad55d6d9e395b2def76a7e6189ec3a600abbbc12b65878b668f869e44e9ade4a + initial_ast: d2e1cebf4c6a9617b6305beebb0bcac5d1aa9d976e3ff64a124e67ab49c8d972 diff --git a/tests/expectations/compiler/compiler/integers/i32/ternary.out b/tests/expectations/compiler/compiler/integers/i32/ternary.out index c209ec60e4..21b4dada2c 100644 --- a/tests/expectations/compiler/compiler/integers/i32/ternary.out +++ b/tests/expectations/compiler/compiler/integers/i32/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 496933437ac1f680efb3cf8c373ad409750a55f0587f1c9cd5ae89a3ff2fa9d7 - initial_input_ast: 26c16da9f3d023c364aceae392e4772d61d7c6e168b1b69df55ccb937e2f9b8b - initial_ast: 3c335651b8022514466d79e85c6c500f0abacfe9582bd407857789cd11e7bb45 + initial_ast: 32cfedad0c6c590e769ef1baf8238cc336773ea45d0efe4dbb85e12a5d916fb2 diff --git a/tests/expectations/compiler/compiler/integers/i32/xor.out b/tests/expectations/compiler/compiler/integers/i32/xor.out index 89eb731d3d..c270e3a472 100644 --- a/tests/expectations/compiler/compiler/integers/i32/xor.out +++ b/tests/expectations/compiler/compiler/integers/i32/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 782064ee84e1826a4cf4a19b4c68964e8f901a3fa86ad68f13fbee8b8d79fc5f - initial_ast: ccddbd9586431df0bd57644bdfaa123af18aef55d6257a802d06ee1b63555f10 + initial_ast: 59cb6b477d32761cf4a78069ad7012b45a8bf08e56fa06568caa824d7d00f11a diff --git a/tests/expectations/compiler/compiler/integers/i64/add.out b/tests/expectations/compiler/compiler/integers/i64/add.out index 3c2c3c7088..77fb28b783 100644 --- a/tests/expectations/compiler/compiler/integers/i64/add.out +++ b/tests/expectations/compiler/compiler/integers/i64/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 816e4f653059a71bcad0180283b41156a125963a270269574ccc2a89fa4db47d - initial_ast: a4aaa16ad2f02dde089066fe74a78413a372672a563e9cd63503c274e355660a + initial_ast: 73ec034b93698044c287320653cc444b60b669eb42fc67303e4799f5f451fdde diff --git a/tests/expectations/compiler/compiler/integers/i64/and.out b/tests/expectations/compiler/compiler/integers/i64/and.out index 19ad367032..9e9a4af3f3 100644 --- a/tests/expectations/compiler/compiler/integers/i64/and.out +++ b/tests/expectations/compiler/compiler/integers/i64/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 816e4f653059a71bcad0180283b41156a125963a270269574ccc2a89fa4db47d - initial_ast: e1fb9bd3be54e70a0856609f8843c639bd83cd4d8abda812d3b2fb229582fb2f + initial_ast: 16c69d9f256c21951a6f5319498b821ff1d245a6d828c05374935f67bdb0f1ee diff --git a/tests/expectations/compiler/compiler/integers/i64/console_assert.out b/tests/expectations/compiler/compiler/integers/i64/console_assert.out index f541176d19..4a32bcb9ca 100644 --- a/tests/expectations/compiler/compiler/integers/i64/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/i64/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 00d45fcaa517eaee18db545e00d5b07769a572368255b8300a14998d72601c18 - initial_ast: 09ec608f41abd9d671935f29c1cd7e201f33215833e4183f55a2fe79cf9afc21 + initial_ast: 2a50e6fe2c8dc5bbba7ea3553672859a497bbc366021c8dc64f9908298b1e0b3 diff --git a/tests/expectations/compiler/compiler/integers/i64/div.out b/tests/expectations/compiler/compiler/integers/i64/div.out index 1789a50954..7ffc1c953e 100644 --- a/tests/expectations/compiler/compiler/integers/i64/div.out +++ b/tests/expectations/compiler/compiler/integers/i64/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c2344cdff713dd1a5cdf911aa4586bafdb97a243fd34f3d719410013b47f4b2c - initial_ast: 4b98bdfa2620aaa5b98c134919ed5337914cc9f51855e162270f304c3509dfc8 + initial_ast: bc3f74de1cdc5455f527eddffadf9f5ed4026c20acd8b51293d1a54350925353 diff --git a/tests/expectations/compiler/compiler/integers/i64/eq.out b/tests/expectations/compiler/compiler/integers/i64/eq.out index d4e9f744dc..d06ffbec5e 100644 --- a/tests/expectations/compiler/compiler/integers/i64/eq.out +++ b/tests/expectations/compiler/compiler/integers/i64/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c682c45660fd69afe580acd3988f4329d87c63e43d553c36642a4e0ef6b210e3 - initial_ast: 8557928254d8c21c7e2058ae0d413a3565b37ce582ef10bbaee610c5b5c126c2 + initial_ast: 30136c46f23883ef5638f9b9114e91bf7dcca002ed833dde89d699f4072018fe diff --git a/tests/expectations/compiler/compiler/integers/i64/ge.out b/tests/expectations/compiler/compiler/integers/i64/ge.out index df403d91f7..d651a87f5e 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ge.out +++ b/tests/expectations/compiler/compiler/integers/i64/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 6857878da12ffbcc4376888a5b0a47e72cc06de198bf8b3581c462f6ac31dc5c - initial_input_ast: 7e434642385a187243e3e5753d8fbdde3fcd867e9243ffc54edc524b41737544 - initial_ast: f7f13ba671fd5c76a7ddaeb88e92b2ad524ab8068a1873d328ec3e118a304175 + initial_ast: d7478c42432128296c941560596fed8d1fa2b5d0900162bfe7d4a32ddb609bfb diff --git a/tests/expectations/compiler/compiler/integers/i64/gt.out b/tests/expectations/compiler/compiler/integers/i64/gt.out index 5485ad8d2b..06907d4602 100644 --- a/tests/expectations/compiler/compiler/integers/i64/gt.out +++ b/tests/expectations/compiler/compiler/integers/i64/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 2b0b85dc45e03a920d2bfbdbc540abe18b61f4435eea735300bfbbf1f5f3d8ea - initial_input_ast: 3fd4444b24b8e16c62ecf0b00fc49d32c65db6d13ed37bec5fbfe04848c9e6d1 - initial_ast: 3d74f258de200191d6ca014f3ebf770f84eb80733bc5e15297ace778ba7465c4 + initial_ast: 008e7fea339b339a8839bfaeb9da2a299bc5e21470815aa7f22b6ef7993b7915 diff --git a/tests/expectations/compiler/compiler/integers/i64/le.out b/tests/expectations/compiler/compiler/integers/i64/le.out index 0776413852..823f84a6ac 100644 --- a/tests/expectations/compiler/compiler/integers/i64/le.out +++ b/tests/expectations/compiler/compiler/integers/i64/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 6857878da12ffbcc4376888a5b0a47e72cc06de198bf8b3581c462f6ac31dc5c - initial_input_ast: 99afc178f7cdcbad22602eb65284213301656250e2210a665de43395fef85784 - initial_ast: c447a346374098a1f6c333904d3b42525fb51b165561996dfa24a2108680096b + initial_ast: 2132ce8c50cd53768fbe19b1eff58b4b028a56fb355845e7307ed2a4b52a6ae0 diff --git a/tests/expectations/compiler/compiler/integers/i64/lt.out b/tests/expectations/compiler/compiler/integers/i64/lt.out index 66a2b6df8c..07f7bcf476 100644 --- a/tests/expectations/compiler/compiler/integers/i64/lt.out +++ b/tests/expectations/compiler/compiler/integers/i64/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 6eecc6aa76c05b3cee492e00a5c7411070cfc056d6c96e29d4c87bddf049909b - initial_input_ast: f59d4a5626491f759e85846d2770353b534d95a1d2caed3fe97c029b3dfd848a - initial_ast: 0639333eba431ee73648e8d9a802db5e10cae59258e0bd3c157fe457213a6ca8 + initial_ast: 3fc88db749b6257cb29e55c6e35b3ab41a56d9a3480caf5b168f5f126251588a diff --git a/tests/expectations/compiler/compiler/integers/i64/max.out b/tests/expectations/compiler/compiler/integers/i64/max.out index d880971a13..cd4f29bdbe 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max.out +++ b/tests/expectations/compiler/compiler/integers/i64/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 632ec5f14f9e070c225d727c5fb5e6dd16d0f47d3ea0b408acb66142ed5eb233 - initial_ast: 441eb9e20bd64b6826895ad65408bb0bcf3fb9aa3041c5c582b8cb829ee5e3c5 + initial_ast: 4a447d02633d59fd35cc6d9846665f776b8f13b70e86c4d96d24338a93cfe15c diff --git a/tests/expectations/compiler/compiler/integers/i64/min.out b/tests/expectations/compiler/compiler/integers/i64/min.out index fea78cd234..3b1662a3e9 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min.out +++ b/tests/expectations/compiler/compiler/integers/i64/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ad738add6c03b6224ccba9d8d735b6645444f9c16f3b652ec4c0903fa4bb33aa - initial_ast: 1c37a6c11db9dc5ff7c2be6cb87d1900ea2302aecd66eb396cd1f768804a99da + initial_ast: 5499bd9512d64b5343a38f32395aa8e59ef1b672472474fc51d35269a73060af diff --git a/tests/expectations/compiler/compiler/integers/i64/mul.out b/tests/expectations/compiler/compiler/integers/i64/mul.out index e8069da548..631fae26f5 100644 --- a/tests/expectations/compiler/compiler/integers/i64/mul.out +++ b/tests/expectations/compiler/compiler/integers/i64/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f84b0604594bcebf725f53c7dae3609f276f916ecc9ada555d6984df08f2b13a - initial_ast: df201d064de97f5159dc972b93ff4b84206047722c9ce25554b7eef548a0a244 + initial_ast: ee48946200ecb534aad40fc7429201c6031b6446ecf76bb5c514af9987e2f3da diff --git a/tests/expectations/compiler/compiler/integers/i64/ne.out b/tests/expectations/compiler/compiler/integers/i64/ne.out index 0fe540a847..7d9015e54b 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ne.out +++ b/tests/expectations/compiler/compiler/integers/i64/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 53f7088f9b1246b2a5a4888f773a137266abcab7f86139e17ded34d7dfd8bad6 - initial_input_ast: d2e3ace89dca587a3f27a36d6ef8736dd713b541923835f2ac7ea5d4acd68c6d - initial_ast: f115cf62490b73b195fc75ac977786c450be243c2fddab88ef4435631b05a0c1 + initial_ast: f0eed0cde60db999c1ac15586e671cb22266a9b8308fecc5495c1b658e79d1b5 diff --git a/tests/expectations/compiler/compiler/integers/i64/negate.out b/tests/expectations/compiler/compiler/integers/i64/negate.out index c7869545d4..3c7a0941cd 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 5ac05e1cc879d60426482c7baa8678d1fb55ef8ac0900a901d6c2b7cddc30308 - initial_input_ast: d3ff584044e6a8a943927df5c394d0c8e776e1c99dcbcb24f15218edab344452 - initial_ast: 7e734992a702686fe2fc22ff9fac91c0b4db8ea4be9b54ac37f7e6ad161152dc + initial_ast: fcf8e2f2a67a82e3d08e9f79027ceb4882342246ee50d6d7a4ba6ebac1d3d1ea diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_min.out b/tests/expectations/compiler/compiler/integers/i64/negate_min.out index ad9194c8a2..a51123380e 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_min.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: d0a6313f717ff07413b8ba9109b9d055e1b4e12f56422335f82ba410137d2c00 - initial_ast: 13e221038b63fa5bdf940834c4cad59be102a27efa80faf50d9f15d94b580453 + initial_ast: 40e288f639b06d0b523663d700d19e19547647342b50f6799f45a39b8e9ca281 diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_zero.out b/tests/expectations/compiler/compiler/integers/i64/negate_zero.out index de26ea18f2..4f99a123b6 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_zero.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_zero.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 76a0fe2199754831329d9b089d2c02f73d7457aaed6548372169318675b85f48 - initial_ast: 45f4fc4debc5356e399c0d3a2f6386bd7b6c9a9e656ab85e031e3dfc2a3999f3 + initial_ast: 41aef42320de6c3891e0debb95f1c2fb92b5eff38bda65107c1e8e7aa9ddbd6f diff --git a/tests/expectations/compiler/compiler/integers/i64/operator_methods.out b/tests/expectations/compiler/compiler/integers/i64/operator_methods.out index 58a6182440..fb884926cc 100644 --- a/tests/expectations/compiler/compiler/integers/i64/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/i64/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 5e5277b920b7ba4bcffaa670a86bb6c45998ecc3540fa7392446bc050db795f4 - initial_ast: 6c43a1ad5bc369f5cd506e8609361278b9f07020b098f2d2e040e10b48e5b78e + initial_ast: bef6690496bc5de421fd20e78462ea08aae2dc3176f943227e483d079255c1ef diff --git a/tests/expectations/compiler/compiler/integers/i64/or.out b/tests/expectations/compiler/compiler/integers/i64/or.out index 35613010be..e59c24ca9d 100644 --- a/tests/expectations/compiler/compiler/integers/i64/or.out +++ b/tests/expectations/compiler/compiler/integers/i64/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 816e4f653059a71bcad0180283b41156a125963a270269574ccc2a89fa4db47d - initial_ast: c64fc87cc51f5307039246c26df461e6cb7e5d0a656f30bfdbce8fb4333dac87 + initial_ast: a869f4b64387deb5362c1a34e51ae7b35bdd99cf7a00242d102bdac409bb0f3e diff --git a/tests/expectations/compiler/compiler/integers/i64/pow.out b/tests/expectations/compiler/compiler/integers/i64/pow.out index 145275d8f9..01b1c11083 100644 --- a/tests/expectations/compiler/compiler/integers/i64/pow.out +++ b/tests/expectations/compiler/compiler/integers/i64/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 45ec89924eb54df73ffff462969863faebc2cae4f8c23fa42fa4a37796212bed - initial_ast: 4bfb62750517d6a76c99ae8101c9823bcbfdffc6fe8a221b152e7b5e47a14dad + initial_ast: 4464703775f3f37d757acc2f0b2fe6fbab74fda7e40432aa8b16b5a5e33cf303 diff --git a/tests/expectations/compiler/compiler/integers/i64/shl.out b/tests/expectations/compiler/compiler/integers/i64/shl.out index f9797e4e31..cf3485a828 100644 --- a/tests/expectations/compiler/compiler/integers/i64/shl.out +++ b/tests/expectations/compiler/compiler/integers/i64/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a6ff55c9144f97d22d9d2565f4f6501bdd12db6393c12af8765415175a8d4369 - initial_ast: e9b1d7e5a0c714dd6c8e4462b6da5226e1852805533f76df6ee8740eecc4f57e + initial_ast: 5d5cf9fb12e2456b4d05c00e55066a50c0979dbee116e44df37cbfdd1dbd3c0f diff --git a/tests/expectations/compiler/compiler/integers/i64/shr.out b/tests/expectations/compiler/compiler/integers/i64/shr.out index 5e8649e35c..029dc44c06 100644 --- a/tests/expectations/compiler/compiler/integers/i64/shr.out +++ b/tests/expectations/compiler/compiler/integers/i64/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a6ff55c9144f97d22d9d2565f4f6501bdd12db6393c12af8765415175a8d4369 - initial_ast: 62b4f3dcf7dd80633c305b8f271dcc96c006a533426de9372aabc38e02494b1b + initial_ast: 54782df5c55504be8723f2a60719e88fe4ff98bc2a373c9862ba363d661af0ec diff --git a/tests/expectations/compiler/compiler/integers/i64/sub.out b/tests/expectations/compiler/compiler/integers/i64/sub.out index 0b1d507fb5..369a7b948e 100644 --- a/tests/expectations/compiler/compiler/integers/i64/sub.out +++ b/tests/expectations/compiler/compiler/integers/i64/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 22e2a316ce039bd533d9624c4eeaa3a34ea4ef1fb53943386696048b8ab1411a - initial_ast: 04066970593aa644ae37df5e12ab27f199bf9c49985d74f9cefba65eb87a5b64 + initial_ast: 80559d902b27bfb0872b80e8e9cc03deae433417dd5d3f8f0944421f33333a56 diff --git a/tests/expectations/compiler/compiler/integers/i64/ternary.out b/tests/expectations/compiler/compiler/integers/i64/ternary.out index 928d3eca4a..dbcc1399de 100644 --- a/tests/expectations/compiler/compiler/integers/i64/ternary.out +++ b/tests/expectations/compiler/compiler/integers/i64/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 6e699c3a8f606d3dd85482128f5e1e9cdc1358657e9ce54b409966398c1719fa - initial_input_ast: 2a79896e2d6dc7c1c8ebd14ef9e00db1c124810f2c8e3fbbe23aed75ed1c0f44 - initial_ast: 33a63f44654f1d38cc148f07fb7e3d31371e26eefc50fc8b9a8e202ad9f3668a + initial_ast: a4dbd7cae2a073cd4d139364231532b57c3d297088c4a10cfaa5036c02982a5b diff --git a/tests/expectations/compiler/compiler/integers/i64/xor.out b/tests/expectations/compiler/compiler/integers/i64/xor.out index 16e4a7217c..ab65501972 100644 --- a/tests/expectations/compiler/compiler/integers/i64/xor.out +++ b/tests/expectations/compiler/compiler/integers/i64/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: afccd04ee03ff51a876dc0a22f1b0a330abdc5fc4f8399925121cf295f9ac97a - initial_ast: a96600037f54ccf79db839041ab69bd393839711d1fb238652b15d50df56bf3f + initial_ast: 7177c2273727c95f05361c49a37fb44868b8bc58362fec4f84f807acc11a5931 diff --git a/tests/expectations/compiler/compiler/integers/i8/add.out b/tests/expectations/compiler/compiler/integers/i8/add.out index e60e042400..32de94cdde 100644 --- a/tests/expectations/compiler/compiler/integers/i8/add.out +++ b/tests/expectations/compiler/compiler/integers/i8/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 418ca183b24a932ac3abf2861e019adc5050583c575b453b43ab155704f425ce - initial_ast: 63e2aafe9fb89024ad67fb1718bb06769c34704d5980f6ef641c895fedc11782 + initial_ast: 4beadfb77c7cdfc0e2ed2444fae79b306fd5a870ed0c3e716897983fd8fbcede diff --git a/tests/expectations/compiler/compiler/integers/i8/and.out b/tests/expectations/compiler/compiler/integers/i8/and.out index a1706662c5..b38bc9379c 100644 --- a/tests/expectations/compiler/compiler/integers/i8/and.out +++ b/tests/expectations/compiler/compiler/integers/i8/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 418ca183b24a932ac3abf2861e019adc5050583c575b453b43ab155704f425ce - initial_ast: 22143f41f383a6b56f36b26ea4bf59a204dd083cd7ba7746ae6089b68b506cbb + initial_ast: 4bad55e6170f431c2239c7ad69d5ff6faf60ef022479a543fc7ee362d3d5b92e diff --git a/tests/expectations/compiler/compiler/integers/i8/console_assert.out b/tests/expectations/compiler/compiler/integers/i8/console_assert.out index 950daa125f..65a66f87b4 100644 --- a/tests/expectations/compiler/compiler/integers/i8/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/i8/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: df994f50ec870c32faab82a33e242eb013d207ebd7646a04ebfe21f3f5715cd3 - initial_ast: 6b4636bdff1da74783315f0599c5c0b70f224fe56dd6dc44dfaf498862ea49d2 + initial_ast: b5bf2927f93d85f8b41b8592b439bcf853ece5a7e20db4f45e203bb4f60255fd diff --git a/tests/expectations/compiler/compiler/integers/i8/div.out b/tests/expectations/compiler/compiler/integers/i8/div.out index 5db6ca29a5..1ff09a0dbe 100644 --- a/tests/expectations/compiler/compiler/integers/i8/div.out +++ b/tests/expectations/compiler/compiler/integers/i8/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a2921e14c8159b911edd438049c7f2b1d85dfce9b4420abaa60049b687367e65 - initial_ast: a4c4475f9596674ad4ce8103520ed08e9f73d2d7aa8308fca18cae283782de32 + initial_ast: 45d23029df90bf746e073e48ca86c9368038bf010b6ffe94a963ffe4be7ab586 diff --git a/tests/expectations/compiler/compiler/integers/i8/eq.out b/tests/expectations/compiler/compiler/integers/i8/eq.out index beebda3646..57e51ce6e0 100644 --- a/tests/expectations/compiler/compiler/integers/i8/eq.out +++ b/tests/expectations/compiler/compiler/integers/i8/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 7a7da641486797f409636f344cbe4980b3bc61434b10e9666d5c173385e17373 - initial_ast: 9afabff955660379d53c088500039f578752a8c1871616a2d3992611dae70372 + initial_ast: e0bb5babe432d839742b6655e768e26f143d5134f6bf37882bb43b358c7854a4 diff --git a/tests/expectations/compiler/compiler/integers/i8/ge.out b/tests/expectations/compiler/compiler/integers/i8/ge.out index d8981efff9..8c8b0c24e7 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ge.out +++ b/tests/expectations/compiler/compiler/integers/i8/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: e35cd317b5834dad614daf0af362b96312bb2bc34c3ee3e4143530935351a9fc - initial_input_ast: d874a35e98cadeb480fbdbeffb5233394cba9406f9dfde4c638ddd34861ee0da - initial_ast: f61e842aa2128a10eac6eab0893e43e289b3fb32aba206da43668c7e6d04ad58 + initial_ast: 827ff492896225b36bc52dcb22b45379c380bce06c254ad4c3b4148217172f77 diff --git a/tests/expectations/compiler/compiler/integers/i8/gt.out b/tests/expectations/compiler/compiler/integers/i8/gt.out index 6a7d845cc4..6077e5bc56 100644 --- a/tests/expectations/compiler/compiler/integers/i8/gt.out +++ b/tests/expectations/compiler/compiler/integers/i8/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: e63b31415b8dcf4698a24700cdcc3669d89f860ed11f6c84923cd8f4d6bb527e - initial_input_ast: e0350ec947989025f7b5cd685b0cedcb493a58cd79b3da90553962ac33cefbf4 - initial_ast: 80a5075332b01642b12161eb2e7389d63b4756ab38cf4f1ea184fa58103152a2 + initial_ast: fa987b1396be2d74bbbf6af5c8c46c26ce09de591de4c39d39980b1060b0fd4e diff --git a/tests/expectations/compiler/compiler/integers/i8/le.out b/tests/expectations/compiler/compiler/integers/i8/le.out index c0ea80ac7e..b158371f7a 100644 --- a/tests/expectations/compiler/compiler/integers/i8/le.out +++ b/tests/expectations/compiler/compiler/integers/i8/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: e35cd317b5834dad614daf0af362b96312bb2bc34c3ee3e4143530935351a9fc - initial_input_ast: 1f482c22510f50d78c14b5d94b21ae05e514dec423caf02561297898b416c109 - initial_ast: 1fda31b30dffff030098220fd53e5e2811a2235aa49d93bb9cc9159b458a7da4 + initial_ast: a0348063a14d1d13ecde557cf2bd5b01cefba45c5f19dd4f47ea14430c137f0c diff --git a/tests/expectations/compiler/compiler/integers/i8/lt.out b/tests/expectations/compiler/compiler/integers/i8/lt.out index 275476d9f7..a16d74e0e1 100644 --- a/tests/expectations/compiler/compiler/integers/i8/lt.out +++ b/tests/expectations/compiler/compiler/integers/i8/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 19169cbb3c5a59a1e5490bd2bda1fdb09104022b499b31c3645c24ea109e9aa8 - initial_input_ast: 70185fa43618a91a29ca84dfc2d422c69a4a5da2e9055d7de54a13cdb5d4231a - initial_ast: 87fca23168c5112f92f906213d7c04d41da2f9e69f0c9b5f2bd2803e9c511597 + initial_ast: 697a37b5ef0854d910aa5e7c1accbd451abbdea96585f90c6ed04aa0edda55f2 diff --git a/tests/expectations/compiler/compiler/integers/i8/max.out b/tests/expectations/compiler/compiler/integers/i8/max.out index 663e07587e..6a267f86f6 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max.out +++ b/tests/expectations/compiler/compiler/integers/i8/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c7cfa681865a1c0623cfd356162d0c6750f3e06fb72126585eace0aeb21bae77 - initial_ast: 142c791a86d2da044a635ff809795467c0fe56fddab2da461701b86c962f24ba + initial_ast: 456d51079df92efa78adfd65dc7c36501c056189dc010efbfe4c81caa8c77189 diff --git a/tests/expectations/compiler/compiler/integers/i8/min.out b/tests/expectations/compiler/compiler/integers/i8/min.out index 0e1df12e4f..f0928f8ca8 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min.out +++ b/tests/expectations/compiler/compiler/integers/i8/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: bdf7f8a6f92b7acd8c798becc30b2f6a8cf6b0ed714c168c5a9e5559988b2185 - initial_ast: 1f4036acfcc74868d883a3a476bb7f0d2aaf54c0ea507f1afaefe03074479965 + initial_ast: a87d611260345b0b17dcdc2448f899d1695a6fa9c3a3be5e35e1ca8bd4b1b89b diff --git a/tests/expectations/compiler/compiler/integers/i8/mul.out b/tests/expectations/compiler/compiler/integers/i8/mul.out index aedf59076a..8691f266e8 100644 --- a/tests/expectations/compiler/compiler/integers/i8/mul.out +++ b/tests/expectations/compiler/compiler/integers/i8/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f94c9c57a09035126762720835869947bf4abb61f29f9e6ae15bed04e399338a - initial_ast: 1379ff6afd8de96e5215bd72dbedfd66c70514aa943a792b931e3133cd897416 + initial_ast: ee2c3101211e7de9540652196af5b3a136f2d7d73c17ea804fba1e51e0a9c1c7 diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.out b/tests/expectations/compiler/compiler/integers/i8/ne.out index 5f7c947f8a..452490bc03 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ne.out +++ b/tests/expectations/compiler/compiler/integers/i8/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: b1cd26a625c709bb94ee5913524afc6b1b83a8c1515922ba8b14dda385e0ca68 - initial_input_ast: 671b2b3f086c62570bf29a08fe2e5adc48f71725317b0e3803acebe92dc846d8 - initial_ast: a9aa58a0fe6c81df3487e38da263ed454ed0a1ce4dc47a9ba68d7b04c3c96588 + initial_ast: 320e52f6f0f3264608d06908d7243a1afd7211594528a1973b4d307a839c65da diff --git a/tests/expectations/compiler/compiler/integers/i8/negate.out b/tests/expectations/compiler/compiler/integers/i8/negate.out index 8ec3b713cc..ea1e8fbcbb 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 0e496fab37ba66e63b3906e0fbb11dd2449210b056394c910f90fb02c7c35ec2 - initial_input_ast: cc84f02e75bbc4ff7389b2e60e3fc598ebc32c9eaac36a43f8a4687a1ee5f1be - initial_ast: 5fb5076e1a8680b6c35c60533c57f33c7b05afe5a18cc467c03f26d308e341c7 + initial_ast: b2c65cb9355f641408bda8e5df7ca076934af0af1ce5d896de1d18a20926b4cd diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.out index ce967091d4..22ea120d5f 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a1bd925fa2e13279fba1cf269924a81f2dc45c5dff42f62c3d6a4f1e7a368613 - initial_ast: 5bdc65e289dac3fab12e24fe51e16b4a773b805e1034e9180e6b7275ec585a8e + initial_ast: 35e345d2a3a7be2f9cd8ca01307075aad0344cb172b4524693749b7a4bf7ba5c diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_zero.out b/tests/expectations/compiler/compiler/integers/i8/negate_zero.out index f7fbfaab9e..2d6c5f723d 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_zero.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_zero.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 2f8bdfd57bd177ef6ba420992c9b8246f27a332126ed41021cf718db1f89fce2 - initial_ast: 2e23e03a7908ff1bc84c11ddf13945d7fd25fc5084f5c60f1b9d5d95978714f8 + initial_ast: 59e77caa1c9176d7401574de0d21e9c465d974b9bcfd466bd8919906368418ac diff --git a/tests/expectations/compiler/compiler/integers/i8/operator_methods.out b/tests/expectations/compiler/compiler/integers/i8/operator_methods.out index 3c172b74e6..c9db356ff2 100644 --- a/tests/expectations/compiler/compiler/integers/i8/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/i8/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 15ad88e6dd28c72e4202ecef608cf1b1db73eceba4024607a1ece070f7f31942 - initial_ast: 6e44db0cf93401d21372b7dd688b0826efcb01036ff50b54862d12235201446e + initial_ast: 99ba18354ab8a7f5c96eb8a6bd8ccb86c68771b3c5be34f03b1fcfde0ddc7623 diff --git a/tests/expectations/compiler/compiler/integers/i8/or.out b/tests/expectations/compiler/compiler/integers/i8/or.out index 7efedce49d..85ce53d809 100644 --- a/tests/expectations/compiler/compiler/integers/i8/or.out +++ b/tests/expectations/compiler/compiler/integers/i8/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 418ca183b24a932ac3abf2861e019adc5050583c575b453b43ab155704f425ce - initial_ast: 18cfbf8e9f363d7477ee0c7509fd909c7f4929ffa2b4c2f46113d85c0f2b481d + initial_ast: e0215b8f5d66d6dcb12658cdcc77c95a0142211c8d3d6c51dc3bdb74be7793b9 diff --git a/tests/expectations/compiler/compiler/integers/i8/pow.out b/tests/expectations/compiler/compiler/integers/i8/pow.out index eec0df85fe..6c13575b32 100644 --- a/tests/expectations/compiler/compiler/integers/i8/pow.out +++ b/tests/expectations/compiler/compiler/integers/i8/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: fce55063674f3154f8ddb6d64c4fcdb82203cd3e19017c797e5509e75227d226 - initial_ast: b616f39c56d8c281d96a690906c8ba6bbc81831a653a2803cf92477bff148621 + initial_ast: 07d0db23066c1ecb719d65a00f0fd6e03a127b0d1597ff82ee1dbdab9a63ecb5 diff --git a/tests/expectations/compiler/compiler/integers/i8/shl.out b/tests/expectations/compiler/compiler/integers/i8/shl.out index a9159ad6f3..3e710a05cb 100644 --- a/tests/expectations/compiler/compiler/integers/i8/shl.out +++ b/tests/expectations/compiler/compiler/integers/i8/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 46761fa9dc62c5871413b18e0da193bb98f1401ebf32e057eb7afe369fddcc1a - initial_ast: 0e3218faca332771d9e3b01ec42562dfa4738b2452a97dbe0eba14c4ac22ca42 + initial_ast: ca0a5e4803cab760484979f93e3a01154472db490e48c9b7d4bb61db2c35d92b diff --git a/tests/expectations/compiler/compiler/integers/i8/shr.out b/tests/expectations/compiler/compiler/integers/i8/shr.out index 51671d76e4..a1837341ec 100644 --- a/tests/expectations/compiler/compiler/integers/i8/shr.out +++ b/tests/expectations/compiler/compiler/integers/i8/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 46761fa9dc62c5871413b18e0da193bb98f1401ebf32e057eb7afe369fddcc1a - initial_ast: 6ae8451b1b11dfaa8bcafd29c398c14ce99b3ee4a39f6d9758c9bbca5453c44d + initial_ast: 90767323aadbe72613a79f5949547e870b4cea91938bd1b51f84247e3af073b3 diff --git a/tests/expectations/compiler/compiler/integers/i8/sub.out b/tests/expectations/compiler/compiler/integers/i8/sub.out index c40136cc95..12d1e3cb61 100644 --- a/tests/expectations/compiler/compiler/integers/i8/sub.out +++ b/tests/expectations/compiler/compiler/integers/i8/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: d6ff175d17561f3b4a70c3b7b2dc6232593c77a2614e2161eeebe72d96cf9843 - initial_ast: f8bcaa0b34d642cb37c8be5ab7eb226dc565a5802d69795eb197e8b1e5b45d0c + initial_ast: fc1d8c3fb62adf91e50b0c48218b7051b55b71bfd1b66cb0b0015c089ed3b1b0 diff --git a/tests/expectations/compiler/compiler/integers/i8/ternary.out b/tests/expectations/compiler/compiler/integers/i8/ternary.out index 8d1cf6377a..4bd914db46 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ternary.out +++ b/tests/expectations/compiler/compiler/integers/i8/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: d9c9f985b366f3218f7a382946e2e661652a62c6cbd1c210e4bf283e9e45a0e4 - initial_input_ast: 9dddec9d0f1cac8c804a46cded65f8902bf28e181149c73bf6c4d5be8fe6e21f - initial_ast: fbeeedb9bf32f4014d27172da623e262db55ae27ad367d09e31cb71bc4b974cc + initial_ast: 7b05dfd7c9f156d40fa82e991c8f0962553c0aa6039f931ba2a63d0bcf9bc87b diff --git a/tests/expectations/compiler/compiler/integers/i8/xor.out b/tests/expectations/compiler/compiler/integers/i8/xor.out index 98103bf68e..ed55bce927 100644 --- a/tests/expectations/compiler/compiler/integers/i8/xor.out +++ b/tests/expectations/compiler/compiler/integers/i8/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 049a158cda473ea574f3a1a41b7b12044d952feaffcd7fe391507fbb542a51a9 - initial_ast: 8a8881ec1d45699722c00fb217887df56d7c5f6ba997c126829e9e2047592a60 + initial_ast: 11cdca423f0ecf3cb86911fc1b0a9d5023c00e4665cd82c7766eff5b69ce34bf diff --git a/tests/expectations/compiler/compiler/integers/u128/add.out b/tests/expectations/compiler/compiler/integers/u128/add.out index cc60359fb6..62fa864823 100644 --- a/tests/expectations/compiler/compiler/integers/u128/add.out +++ b/tests/expectations/compiler/compiler/integers/u128/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 0b4b4bf798b6f2dfcf78b0d4f72c37c8c8c240ba2668fcbbcaa29fff825a4cee - initial_ast: c09bcbdf96f73f93cdf12a30fcb17f317f484279ef95a405ac024b497d89e2ff + initial_ast: d8213e40ef9f34adc808439b8d25ac3b7069891ed4ffd8614d4b6838b75403d2 diff --git a/tests/expectations/compiler/compiler/integers/u128/and.out b/tests/expectations/compiler/compiler/integers/u128/and.out index 43bd6d1c90..3962241a2e 100644 --- a/tests/expectations/compiler/compiler/integers/u128/and.out +++ b/tests/expectations/compiler/compiler/integers/u128/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 0b4b4bf798b6f2dfcf78b0d4f72c37c8c8c240ba2668fcbbcaa29fff825a4cee - initial_ast: d09e17e06ecf81563bcf4cd91f0b1ff31683f7e76717aa9dbae3a38b6b0093cc + initial_ast: 31ab6057231f5301d431a4e16ce372949cf4f8b4fc5c02b948a511a7ff935f06 diff --git a/tests/expectations/compiler/compiler/integers/u128/console_assert.out b/tests/expectations/compiler/compiler/integers/u128/console_assert.out index fd95452fee..5cfd1e0675 100644 --- a/tests/expectations/compiler/compiler/integers/u128/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/u128/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: d33717e99abedf3d3ad1ca7e18212fafc940639a0005c934ee43b7ec10131e94 - initial_ast: c7ec9e92e0ac15c17db0c5d40b53c394d4da748f7f37ff2fee74baaa956165ad + initial_ast: 81dab9bcb0070c896c6251a47549e9aae904dbeb864ae9bac05e29b329f86f08 diff --git a/tests/expectations/compiler/compiler/integers/u128/div.out b/tests/expectations/compiler/compiler/integers/u128/div.out index 8e0da2312d..743d793248 100644 --- a/tests/expectations/compiler/compiler/integers/u128/div.out +++ b/tests/expectations/compiler/compiler/integers/u128/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 312caa259bb60c26c8e61169dcfa1dc94174d1a50c35a6d889ef1eed7880532e - initial_ast: 470aa930cedf15168fea1fcddd49d7cedd5410599ae372c5bea9948aef2bd7f0 + initial_ast: 314210c627bcf97d85414fd5850496cbc2d304b6d9f4522d3445959fb0f87c75 diff --git a/tests/expectations/compiler/compiler/integers/u128/eq.out b/tests/expectations/compiler/compiler/integers/u128/eq.out index 733dd1d0c2..fba0248ce5 100644 --- a/tests/expectations/compiler/compiler/integers/u128/eq.out +++ b/tests/expectations/compiler/compiler/integers/u128/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ed076eaaf99eeab4483cbe3f371ca5bead0ebb316e7b9e02708bf35dfdcc15e0 - initial_ast: fa1d49c14840d8af2266f95e90b0c7534afb43af6c8365a96796b88a1069f9f8 + initial_ast: 640606bb5737515aa09d2d3079df24dedbdb85c08b261502c615fdec5eb6c996 diff --git a/tests/expectations/compiler/compiler/integers/u128/ge.out b/tests/expectations/compiler/compiler/integers/u128/ge.out index 7f0fbc1247..a7654df748 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ge.out +++ b/tests/expectations/compiler/compiler/integers/u128/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 114a06e1bb4a0c3728adc7668365d8deea159ccffc14b1977ba2bba2b05f3987 - initial_input_ast: c8fc11e4265deb71385cf129d8cac917eecdc35c993f569bc339e49fc26e0dab - initial_ast: 22866aca009cd492205eb33e5de776e410d245afad2b944536236fc5ffc7becc + initial_ast: e1cd4706dfb32ac14471e4c52a395e13d2a1c5968d31f15efedb0ee625f39cad diff --git a/tests/expectations/compiler/compiler/integers/u128/gt.out b/tests/expectations/compiler/compiler/integers/u128/gt.out index 24610b78ab..cc9db4818d 100644 --- a/tests/expectations/compiler/compiler/integers/u128/gt.out +++ b/tests/expectations/compiler/compiler/integers/u128/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 490a83da761d8daffa5b10e1d9785fe301129b18eaa8b4be8550a1037c92e037 - initial_input_ast: a9fbdd31d60c3b135c46eb07ffc291d906e61283f66b5ddda81080adb1b72c4d - initial_ast: 97e1caf8274c2e27e34f2218ab5aadd7a14ce8e518e7adc021c5763b7ea3de42 + initial_ast: 41f6e4ed2e407a4f4651710aac6fe81318b6bff4c8970601fee3a6b0aaa55e84 diff --git a/tests/expectations/compiler/compiler/integers/u128/le.out b/tests/expectations/compiler/compiler/integers/u128/le.out index 7968b3aace..3c1e408a46 100644 --- a/tests/expectations/compiler/compiler/integers/u128/le.out +++ b/tests/expectations/compiler/compiler/integers/u128/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 114a06e1bb4a0c3728adc7668365d8deea159ccffc14b1977ba2bba2b05f3987 - initial_input_ast: d86e46eff4d53385160f9e227d120be02cff1d0bd25359f7dcd99cd98a7b6689 - initial_ast: aac1210ac91250cf116e6b8c4af27d042526704975d394f694b875ee7c7bdca4 + initial_ast: 44d5c99c22a9b93c2ca4d74a8db10c62dc150e72543681f47da4434eef0d42af diff --git a/tests/expectations/compiler/compiler/integers/u128/lt.out b/tests/expectations/compiler/compiler/integers/u128/lt.out index 3530391015..4777839396 100644 --- a/tests/expectations/compiler/compiler/integers/u128/lt.out +++ b/tests/expectations/compiler/compiler/integers/u128/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 81a226fee5bd7855328403195937bf7dbad374f94e29afa8b750b5b1a3aa47dd - initial_input_ast: d68bda01a4ba78c58809ac0c8286b56fafeb17702abf7a6cb9a7195a3aef8317 - initial_ast: 6e319b6448230333f01fcbc23928f2d07a7d52ecf356c42ba5a9f17f85030c6d + initial_ast: 18384f8300a7b24d7a65468a4ae281862623f5ddd10d0bd9fee30cfd994aa758 diff --git a/tests/expectations/compiler/compiler/integers/u128/max.out b/tests/expectations/compiler/compiler/integers/u128/max.out index 5d42ff29e8..db40b9aab5 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max.out +++ b/tests/expectations/compiler/compiler/integers/u128/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a2ab6a89c5952a113fbecdeb630917b4699c38dcda5971528ab35cdd5e92c216 - initial_ast: f74810c683ca376b62ab74f8c03d59de896c3463a348a2e7c83c2891fe11d235 + initial_ast: 3b90d1b25086cc99d6c202304a38704ccdfd408b7d33d168ea6224fa2d9f2a9a diff --git a/tests/expectations/compiler/compiler/integers/u128/min.out b/tests/expectations/compiler/compiler/integers/u128/min.out index 09bf4375c3..b1e0ecde6a 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min.out +++ b/tests/expectations/compiler/compiler/integers/u128/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 886b77241861e32ee76414a8f86e04b86943325113b6b28e9d6805ee61c936ef - initial_ast: c4ed389c216c8febadfda804cdfd5f84de0ed16592ad293434304819fcde32c2 + initial_ast: dbe921d83385a354f662bd00601356fd1cb42eed4e6dc445897f9a1e8e10f5d4 diff --git a/tests/expectations/compiler/compiler/integers/u128/mul.out b/tests/expectations/compiler/compiler/integers/u128/mul.out index 0856454e36..b07b4fcd75 100644 --- a/tests/expectations/compiler/compiler/integers/u128/mul.out +++ b/tests/expectations/compiler/compiler/integers/u128/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 55275f9363fdc61c58cf22cc7fea6f1c5314bf2d1c31866a9609b83b050983a3 - initial_ast: 5d6b4ef63ae8e4fe01ee2d19ca2de4f3183af25a84b9d9aa47c4759f9119e3a8 + initial_ast: 452b41a36f24f8a3752d0672a8ac864f283d022a20a5d1fae4283d8db0fd55c8 diff --git a/tests/expectations/compiler/compiler/integers/u128/ne.out b/tests/expectations/compiler/compiler/integers/u128/ne.out index 23e64a8ec4..069b941ac4 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ne.out +++ b/tests/expectations/compiler/compiler/integers/u128/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 6092164adf1cbb62c9bc7b5c9615deb73f2d4ca73eca6ae6fa732f7e8a2d6fae - initial_input_ast: 0a73021a07d37a00e70a521b9271d9849c871e4df9395fd866009d3770fc8b9e - initial_ast: 401daa77a0b0589d3eb44f7de5efd367afa3c2626463363aab1fde57eb5d90d2 + initial_ast: 669192876a4e598ba6ca717de6b7b9449439776e1c0095a0befaa5f700adb48d diff --git a/tests/expectations/compiler/compiler/integers/u128/operator_methods.out b/tests/expectations/compiler/compiler/integers/u128/operator_methods.out index 71a345188a..2f01cd33da 100644 --- a/tests/expectations/compiler/compiler/integers/u128/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/u128/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 90091db06f755dc2e8c920d26390f0dd6a9f7f5401148ab01e46dc77a3900582 - initial_ast: eb4bcc4d57f7f83b382b706f040d3a032a956cb9b262491d42ddfa39caada74b + initial_ast: d8fedd17ee5c2cc114de474a2d8c6cb49efe1aa9ed54df8670bffc143ddf09e3 diff --git a/tests/expectations/compiler/compiler/integers/u128/or.out b/tests/expectations/compiler/compiler/integers/u128/or.out index 898960aa4b..024c7f481b 100644 --- a/tests/expectations/compiler/compiler/integers/u128/or.out +++ b/tests/expectations/compiler/compiler/integers/u128/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 0b4b4bf798b6f2dfcf78b0d4f72c37c8c8c240ba2668fcbbcaa29fff825a4cee - initial_ast: 6532d8f436c711698a26f08331718f5cb61dfe1e3d41120d91b4039a5b7db683 + initial_ast: a62fe5383289e3d4e194c845dcad539592c5a3f2c45400068810ab58cbe6d210 diff --git a/tests/expectations/compiler/compiler/integers/u128/pow.out b/tests/expectations/compiler/compiler/integers/u128/pow.out index 0ca351073d..d29761959f 100644 --- a/tests/expectations/compiler/compiler/integers/u128/pow.out +++ b/tests/expectations/compiler/compiler/integers/u128/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 736df282a3b5ffff601dd67e443891125ca67486745f642c1a629df51f139651 + initial_ast: 5e7b71993f2917aa051a3e70f922c4d15e45176f0cac2b3dc8246430b58c36a7 diff --git a/tests/expectations/compiler/compiler/integers/u128/shl.out b/tests/expectations/compiler/compiler/integers/u128/shl.out index eb3bbae2ea..2ea786eece 100644 --- a/tests/expectations/compiler/compiler/integers/u128/shl.out +++ b/tests/expectations/compiler/compiler/integers/u128/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 7c048b2df7402d5ae82869bf59ed5e8e37dc37b297e6da315414cdf92f3fe47e - initial_ast: 8c4b9d867aa5af79625cf321b0fa23ba73d6903c50dcb0ef8a9793a30fdb6948 + initial_ast: 1acaeb880fde7b4bad4895ea4de6cfdc7879254905a915e03fba8d115deff230 diff --git a/tests/expectations/compiler/compiler/integers/u128/shr.out b/tests/expectations/compiler/compiler/integers/u128/shr.out index 9831afda99..1cfe24e448 100644 --- a/tests/expectations/compiler/compiler/integers/u128/shr.out +++ b/tests/expectations/compiler/compiler/integers/u128/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 7c048b2df7402d5ae82869bf59ed5e8e37dc37b297e6da315414cdf92f3fe47e - initial_ast: 7a81a139806e719f879fe3f93c6e2af93128c2fc36dda6650ae435ad18b36d99 + initial_ast: 2addca8fbbf6f0ae7463e82940f64e810dd478aab6fc3fdbc1a832afb1d4926e diff --git a/tests/expectations/compiler/compiler/integers/u128/sub.out b/tests/expectations/compiler/compiler/integers/u128/sub.out index 849b809998..3a5059469c 100644 --- a/tests/expectations/compiler/compiler/integers/u128/sub.out +++ b/tests/expectations/compiler/compiler/integers/u128/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 423b332f76b482591a7a7c3003662aea94e81ac3341e384e6ab510287a33fcd8 - initial_ast: f18ff230b4a7482f58667af30686b4010d20b119db1e3875d912efd8ffd83b4b + initial_ast: d53e111312f8c84a4eb56f7c51936e9731348230148cb37319948923cebb741c diff --git a/tests/expectations/compiler/compiler/integers/u128/ternary.out b/tests/expectations/compiler/compiler/integers/u128/ternary.out index f9034ba35e..2996aa8b93 100644 --- a/tests/expectations/compiler/compiler/integers/u128/ternary.out +++ b/tests/expectations/compiler/compiler/integers/u128/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: f8a5839bc3ebd5a43da88b4956a763ab9ab3bc2a08cce1e63b4bed90a372cc29 - initial_input_ast: 7791bee70cecfb5adf16a8d4e309a9cde2802bb110f038ded316b751d904e37d - initial_ast: 73d43529cae30694437cb5762150833c654639587f2e24df0a93312afc1e5b1a + initial_ast: 328479304de717477286e779dd13db1997072953bac12cce642f23dd050afd18 diff --git a/tests/expectations/compiler/compiler/integers/u128/xor.out b/tests/expectations/compiler/compiler/integers/u128/xor.out index c9953e8681..fe6f9c69e9 100644 --- a/tests/expectations/compiler/compiler/integers/u128/xor.out +++ b/tests/expectations/compiler/compiler/integers/u128/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 9994d676560e6f9ddec4a1b225e6fd50646f1b236db21dcf7dc04771bd2cafaa - initial_ast: f4d4a7bd9cdc74592091682ae635a0c6e34ce98fec41dc193f4353dca9840974 + initial_ast: d3170345ecaff45bc37d41e64e23b6730ff959715314224659f639141851e6cf diff --git a/tests/expectations/compiler/compiler/integers/u16/add.out b/tests/expectations/compiler/compiler/integers/u16/add.out index 03b8186fd0..15f7f07ac8 100644 --- a/tests/expectations/compiler/compiler/integers/u16/add.out +++ b/tests/expectations/compiler/compiler/integers/u16/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 645d8b76a8e35f3c5c40b8a8d7edaf61869ba567db8856ff407c6c6ca93e15ab - initial_ast: 0efce2048d443bc625ffe58dbc7af9d7cfcba635825a8dd3480708cc660ab57a + initial_ast: b1d940a16eb627820a17978243ec21425e4604b647a517b90e8f8c48b4afcebc diff --git a/tests/expectations/compiler/compiler/integers/u16/and.out b/tests/expectations/compiler/compiler/integers/u16/and.out index 7e7d860814..53dba99196 100644 --- a/tests/expectations/compiler/compiler/integers/u16/and.out +++ b/tests/expectations/compiler/compiler/integers/u16/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 645d8b76a8e35f3c5c40b8a8d7edaf61869ba567db8856ff407c6c6ca93e15ab - initial_ast: 520b6831317851ecf843501a2d1424b63829404ea50b0318b96045fda54bef1c + initial_ast: 5d5df427618d8cf70bb17ebc22a830a049522d42f53f84dbb37baef3b7dcc340 diff --git a/tests/expectations/compiler/compiler/integers/u16/console_assert.out b/tests/expectations/compiler/compiler/integers/u16/console_assert.out index 6e6d2416de..2f06b99f79 100644 --- a/tests/expectations/compiler/compiler/integers/u16/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/u16/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 93f0939fa8d2a71a8de2232636f6fbed581078acf2d6350b551a85b68d3a35f3 - initial_ast: 68df919b5fb7b992c5e900b16a3c02ef9e2fe737d0ec61d67859c5b22a3630c9 + initial_ast: 476d31643c22fe3ac80a7962f19bbb54d1c924de2d8ae0412cbf466542181743 diff --git a/tests/expectations/compiler/compiler/integers/u16/div.out b/tests/expectations/compiler/compiler/integers/u16/div.out index 001d1e2d9b..757af6af46 100644 --- a/tests/expectations/compiler/compiler/integers/u16/div.out +++ b/tests/expectations/compiler/compiler/integers/u16/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c5d860d9e16d54ba0e74b3d163c409c5ed8228f0716d439faca960550b23941c - initial_ast: f72e0c7991f49f2d668f6693a50615eec8a2ddf54f1a92e51f84c34be6b4b240 + initial_ast: 86432ce2a89647b4349c0daa5540051144c1890fd9d9124563425d1827f9ce60 diff --git a/tests/expectations/compiler/compiler/integers/u16/eq.out b/tests/expectations/compiler/compiler/integers/u16/eq.out index 118a6396c0..ac1d353ce5 100644 --- a/tests/expectations/compiler/compiler/integers/u16/eq.out +++ b/tests/expectations/compiler/compiler/integers/u16/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: aacc264ea8f875d044fe9d32dc074877f55b566fe3f5a95a1bbf7193797aa520 - initial_ast: d8ec08bd1f7422819148f21816252bb209fe01589464ac91d6129d459b27ddd7 + initial_ast: bcfbbea34bfbb160d8e10ff83f7d71bc35f8c9312cc3d4714390ccb4a6563b99 diff --git a/tests/expectations/compiler/compiler/integers/u16/ge.out b/tests/expectations/compiler/compiler/integers/u16/ge.out index eae08c2674..194998a219 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ge.out +++ b/tests/expectations/compiler/compiler/integers/u16/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: a0711a6ed49dec13228ba659a9b314d9ce6676d662813bd195dad9137ff9bc5b - initial_input_ast: c44e22bafbeb5729fbdbbfdce638ff6bccbcebb1ef4958a578915665a9251de9 - initial_ast: aaa4dc4173cb9fb0c05876f6fdee19e4a81d0c5afc82f7a8b488b0cdfc1e69ae + initial_ast: e39d41cbd5e813200dae488a78c961306779208730d6081ef970bdf7e3e028e5 diff --git a/tests/expectations/compiler/compiler/integers/u16/gt.out b/tests/expectations/compiler/compiler/integers/u16/gt.out index 1cd35dc2f9..80dbfb1646 100644 --- a/tests/expectations/compiler/compiler/integers/u16/gt.out +++ b/tests/expectations/compiler/compiler/integers/u16/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: bbcfb719bb3775418cdc7eacc87fea6bb4b463a8ee5baf1ca448115098de0442 - initial_input_ast: baaf3113b1461d0808023e5bcc59d482aa451aa5bff5815bdca2249c1a75515e - initial_ast: a142b4368f83dc792a96dfa115f4d8527acb2f87530b5693e26a40efcc9f1c8e + initial_ast: 47f3ba6aa0dd1b983b14db56348b1124e4236319358fb0712236efbb70431ce2 diff --git a/tests/expectations/compiler/compiler/integers/u16/le.out b/tests/expectations/compiler/compiler/integers/u16/le.out index 498844d1eb..66f9110765 100644 --- a/tests/expectations/compiler/compiler/integers/u16/le.out +++ b/tests/expectations/compiler/compiler/integers/u16/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: a0711a6ed49dec13228ba659a9b314d9ce6676d662813bd195dad9137ff9bc5b - initial_input_ast: da98deac955107d3b01e18edeaa906c66b216e029e09959f12a02c64c8b64259 - initial_ast: cccd56dfff8508f810dc3acae53bac2d3e03afaec697f83bf45cd922ad5a3a63 + initial_ast: d011fe0376ae8a75f76d88b0b7831b86c0ce58c9649e167bd74f18cc3a32d80e diff --git a/tests/expectations/compiler/compiler/integers/u16/lt.out b/tests/expectations/compiler/compiler/integers/u16/lt.out index 50dfa2bb8c..cb9b529268 100644 --- a/tests/expectations/compiler/compiler/integers/u16/lt.out +++ b/tests/expectations/compiler/compiler/integers/u16/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 9383a4837a0adb9b494229de1f4fd4cb519a0afcf273d83dbd78c25c568fada5 - initial_input_ast: 7bb6ab59dd3331f3e0121a736939323f73be4053f91859d186c620fd0e14244c - initial_ast: 811b1d04a4474b7f3b943caebe9e5fcca1f9fe7e77cc84e6fb85d40d0d66cb55 + initial_ast: 3d21680078eb1d342dc7dad388ed8fa73eae397db4eafa3edabea7ba9bfa005f diff --git a/tests/expectations/compiler/compiler/integers/u16/max.out b/tests/expectations/compiler/compiler/integers/u16/max.out index 9cc2221707..c5b021d79f 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max.out +++ b/tests/expectations/compiler/compiler/integers/u16/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 940d740ba40284a1d3c3cf8737facd1e98968224dd93999dbcb336cb3f4ce571 - initial_ast: 09d4426d341f39c8164181d9793ffc37acc5a43f2148d5f0d646f146c24d00fb + initial_ast: af30158ef5ed1d7e0e30a3ddb5b1488881e74620aa4be2480ade62520c195c2e diff --git a/tests/expectations/compiler/compiler/integers/u16/min.out b/tests/expectations/compiler/compiler/integers/u16/min.out index 7e9f3bd43e..a33f334230 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min.out +++ b/tests/expectations/compiler/compiler/integers/u16/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c7cfa681865a1c0623cfd356162d0c6750f3e06fb72126585eace0aeb21bae77 - initial_ast: 4dcfa3acfc7cf76ebcdb36fcb337052b62b0f5855559845cd1ed70942a89dc64 + initial_ast: 292631954d10387f9427fca040c5b56a98e69b0abb4c53777b8606a45c285468 diff --git a/tests/expectations/compiler/compiler/integers/u16/mul.out b/tests/expectations/compiler/compiler/integers/u16/mul.out index ec879e6607..843a1b2d44 100644 --- a/tests/expectations/compiler/compiler/integers/u16/mul.out +++ b/tests/expectations/compiler/compiler/integers/u16/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 2189415cb99cd7a07d28f5b9fd1f3d5e0da2150942d12da98fe8109c4988b6a3 - initial_ast: 56f9a8d2c0275f7dfd5894d5a5511a528bef0c016fc5569030c8f83d31fb76a6 + initial_ast: 89d225552959b3e359eff98dc3ea98258cc4026a744358fca4f4a1c5e0ceeab8 diff --git a/tests/expectations/compiler/compiler/integers/u16/ne.out b/tests/expectations/compiler/compiler/integers/u16/ne.out index fd9f703071..fe440f7134 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ne.out +++ b/tests/expectations/compiler/compiler/integers/u16/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: c044ccf036223e8e8de1b69ffc11755c88021eb7d6fe33f1f51afafeb8b88999 - initial_input_ast: 1927266ff190c94fb9739e2a59c73f17d4ad9cd9b47ef4022c9905087dbe8eac - initial_ast: 142411669f9231a6caf241a77f9b0382d071adb97f38057cef33152035bd8d57 + initial_ast: 2fd3c35fc143b9a032c9b6e2283a165dbc0a71b7a576a073f3e1f96f5582d9ec diff --git a/tests/expectations/compiler/compiler/integers/u16/operator_methods.out b/tests/expectations/compiler/compiler/integers/u16/operator_methods.out index 698c9dbdb9..a2c4f191f8 100644 --- a/tests/expectations/compiler/compiler/integers/u16/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/u16/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: fd9e082741dbeb3963fd5ef3d4fd4c242176c66b4e502b71e92a0832ec5afb43 - initial_ast: f600a9703875417713535777834d9185aa0423dc52202d8509a47c24a3ff0845 + initial_ast: 017ea274380a618b95f603249bc923101b4ccac19a79b75566c6ba87b6028a5c diff --git a/tests/expectations/compiler/compiler/integers/u16/or.out b/tests/expectations/compiler/compiler/integers/u16/or.out index b31088880b..689ed064f9 100644 --- a/tests/expectations/compiler/compiler/integers/u16/or.out +++ b/tests/expectations/compiler/compiler/integers/u16/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 645d8b76a8e35f3c5c40b8a8d7edaf61869ba567db8856ff407c6c6ca93e15ab - initial_ast: b4885ba3ede33a33d77dd109dadd3eeedb830964f2c2be6342e1181b7a91642c + initial_ast: 8edc006c36673a93d5f5f03b2d16bdb33860c94d724b21d7ed5e7c689dbd8cbe diff --git a/tests/expectations/compiler/compiler/integers/u16/pow.out b/tests/expectations/compiler/compiler/integers/u16/pow.out index f2cf7fbd4e..83452334f4 100644 --- a/tests/expectations/compiler/compiler/integers/u16/pow.out +++ b/tests/expectations/compiler/compiler/integers/u16/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 2c0abac302ea0ac78650b87145d06eef89469d5fa6234bddc566bc5e918863d3 - initial_ast: 70419a837c7fe4db7f045518fa2ae6be9f4dd22a2db46d3385f91c2ac22f9952 + initial_ast: fe188c5dee5d9ce561dbe48bffa405fde632e71489eecf0f1bea8c205ff7ab74 diff --git a/tests/expectations/compiler/compiler/integers/u16/shl.out b/tests/expectations/compiler/compiler/integers/u16/shl.out index 4f27d1e014..59814a8a03 100644 --- a/tests/expectations/compiler/compiler/integers/u16/shl.out +++ b/tests/expectations/compiler/compiler/integers/u16/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a84132ffbda80301c620b10a61957c60ff0cf52c846824353d74deb4b8fb95aa - initial_ast: 4c9bdb19e63c3defb3b2217d2aecf610702dc309860a3a28af4fc26ea2b32e95 + initial_ast: 3f2eb88b83d7fda17c7e4bd0b9762b014761947769362eb8894a3047abd1d84c diff --git a/tests/expectations/compiler/compiler/integers/u16/shr.out b/tests/expectations/compiler/compiler/integers/u16/shr.out index 83f9a026f5..e5183e6ba5 100644 --- a/tests/expectations/compiler/compiler/integers/u16/shr.out +++ b/tests/expectations/compiler/compiler/integers/u16/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a84132ffbda80301c620b10a61957c60ff0cf52c846824353d74deb4b8fb95aa - initial_ast: 6397eb7568ea82b82d5a91f7ea15e15d393418d756ae018d855bf09246261986 + initial_ast: 2c8d64ef1e566abbdd2e18f30c413e9fcce79d40ebfc3d8bf7e384c74b67196d diff --git a/tests/expectations/compiler/compiler/integers/u16/sub.out b/tests/expectations/compiler/compiler/integers/u16/sub.out index 5b97426fea..59807161d0 100644 --- a/tests/expectations/compiler/compiler/integers/u16/sub.out +++ b/tests/expectations/compiler/compiler/integers/u16/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 6fb34b6b6c6597f200d98d39d7ec66d5026257323f6e11cea02a2c07d3a482bd - initial_ast: ec2e2b4718488d2d07cbe5758260ae2d9d68c827177bd76cc1e5457f65017566 + initial_ast: 7719d1a448b885dea1450f2c183cc049373895ce537733bf6c5842316390c03a diff --git a/tests/expectations/compiler/compiler/integers/u16/ternary.out b/tests/expectations/compiler/compiler/integers/u16/ternary.out index 49b14c90bc..25a18dd2fe 100644 --- a/tests/expectations/compiler/compiler/integers/u16/ternary.out +++ b/tests/expectations/compiler/compiler/integers/u16/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: d61da749e968cb3fb5ff715944606a2fbfe0e9e82a5505eb6de502b12061612d - initial_input_ast: 6058927814d865491ab33221eebd68e6b860e154845faf69e17ccca306817367 - initial_ast: 80358eaf5d798403150ea7b58b5b45cf3d3a42f1f37152450d359afe309f2b31 + initial_ast: 48939f01004ba87b84b309c441a421410fb74822980eb5d80c3044ce2f1aef43 diff --git a/tests/expectations/compiler/compiler/integers/u16/xor.out b/tests/expectations/compiler/compiler/integers/u16/xor.out index 761d984d62..704c31a7fd 100644 --- a/tests/expectations/compiler/compiler/integers/u16/xor.out +++ b/tests/expectations/compiler/compiler/integers/u16/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c3ec83ed5d2dac98587cbb57952a6dec4a77fe4079c02d69813b75e4c7688dd9 - initial_ast: 8fa7fafe1a99b406cc460d5ef0e6c50ea4397c25e7c36997db4cc23810ef4465 + initial_ast: 495faf9a0bd9d01996ef5c3664ebf3ef20c2ff903370fc0a0ee02b4eba1be751 diff --git a/tests/expectations/compiler/compiler/integers/u32/add.out b/tests/expectations/compiler/compiler/integers/u32/add.out index b0161a6d7f..2643a145e7 100644 --- a/tests/expectations/compiler/compiler/integers/u32/add.out +++ b/tests/expectations/compiler/compiler/integers/u32/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 24ab39bf0500a015a0573619c40908da20bfbd3bfd4546bb65b6332033c44ac5 - initial_ast: fc9b2c59dcc3901aa963eb618fc50a6d32f778010863b35e1b06a63d15fb695d + initial_ast: c34229de82312363c96b7628bab33c4710969113ea67a3e94fcd2f8a0822ae46 diff --git a/tests/expectations/compiler/compiler/integers/u32/and.out b/tests/expectations/compiler/compiler/integers/u32/and.out index c23906b557..903ccd0abe 100644 --- a/tests/expectations/compiler/compiler/integers/u32/and.out +++ b/tests/expectations/compiler/compiler/integers/u32/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 24ab39bf0500a015a0573619c40908da20bfbd3bfd4546bb65b6332033c44ac5 - initial_ast: daa2a43799f16cb796d6b97c170c600e42b550ac37a9494edc30b52612843358 + initial_ast: c8bdc0cefca1faf9c7b21729ba3702937fd95a731f22e428684672dad00b5c66 diff --git a/tests/expectations/compiler/compiler/integers/u32/console_assert.out b/tests/expectations/compiler/compiler/integers/u32/console_assert.out index 3a6aece283..3fde345d41 100644 --- a/tests/expectations/compiler/compiler/integers/u32/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/u32/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 03bbcc62085e4dd3fea97b5ab55d5a69ee2195c016c5142a591e2c560e531cf7 - initial_ast: 09903ab2024e24699030dd6f922b1cc87885a491ebe86bb1d59d157380233f9a + initial_ast: cd000fad4452f02efc31155d8b50220d8c13fa0d142584d33b6321b00ba9b18d diff --git a/tests/expectations/compiler/compiler/integers/u32/div.out b/tests/expectations/compiler/compiler/integers/u32/div.out index 88cee9ceb4..0d905278ee 100644 --- a/tests/expectations/compiler/compiler/integers/u32/div.out +++ b/tests/expectations/compiler/compiler/integers/u32/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 6087c103d4a36793c6956bbc15e83d950a3dfd699a67af67371b24b5eb4f54ca - initial_ast: e6a1184fcf21d1fb2539eeacaabeebfbb8c99e8b588f0c09ae95b6fa60ba77fa + initial_ast: bfe8611b83f9d446a6d161dbb91aea90590a3ee3a64e60f12fe5a56bb4489073 diff --git a/tests/expectations/compiler/compiler/integers/u32/eq.out b/tests/expectations/compiler/compiler/integers/u32/eq.out index 7ed2669342..0a6c114b7e 100644 --- a/tests/expectations/compiler/compiler/integers/u32/eq.out +++ b/tests/expectations/compiler/compiler/integers/u32/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: d1acfd7d802258ef14c025fc36ff6a50cd2d47b9ebca5a6bfb6c9050a343ca5b - initial_ast: 3930060cab3cda894f9b46576de10b68e7413c6a1779df7f89d4a825d8c33dfa + initial_ast: 0928f551c514c68026fcb99250fe0cfe1ce8d7f8f7ed43ab3ae3c9e25f1dc73d diff --git a/tests/expectations/compiler/compiler/integers/u32/ge.out b/tests/expectations/compiler/compiler/integers/u32/ge.out index de6d292a16..9349287f67 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ge.out +++ b/tests/expectations/compiler/compiler/integers/u32/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: d153359c184e6f986eca5f61efb1e108490d7cdc3243494aa38c099ccdfe9a23 - initial_input_ast: a256bf07a585892d533066903adb8ad5052c091f8075646f85301faac29269bd - initial_ast: e061368c428c10ca120d110797fa08fd3b1a5e38a272ee6d5c1da7e9da39cb4d + initial_ast: 1508219003689bb913e2e63d423fe70eb3f9752e072127feea6c4d36a08f4ebc diff --git a/tests/expectations/compiler/compiler/integers/u32/gt.out b/tests/expectations/compiler/compiler/integers/u32/gt.out index d0c66a86e2..2673241efc 100644 --- a/tests/expectations/compiler/compiler/integers/u32/gt.out +++ b/tests/expectations/compiler/compiler/integers/u32/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: c23e9a8097d2aef46d355bb51082c0160068704c7116cc887e28293d14ea69b8 - initial_input_ast: 2ac67c7a3a56989674505fd4862927415cbc16cdefb72d7d3eb3e6ac1d7ad43f - initial_ast: a9de078a8c6ea3a6ad5543eb56b15f866207d25faddbd8b0240aa37da2d45749 + initial_ast: 26eb31be1087b4fe0ec4418507d1da1f1cea6bb950f9ce27e8fc7927457faed8 diff --git a/tests/expectations/compiler/compiler/integers/u32/le.out b/tests/expectations/compiler/compiler/integers/u32/le.out index 17a343199e..480c50fb2e 100644 --- a/tests/expectations/compiler/compiler/integers/u32/le.out +++ b/tests/expectations/compiler/compiler/integers/u32/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: d153359c184e6f986eca5f61efb1e108490d7cdc3243494aa38c099ccdfe9a23 - initial_input_ast: f51ca874221687df1657767748ac98387250608d7f0e5c8102d944dbafbbee34 - initial_ast: 3d9967a1c55dfea678430b673ef71f117719a2d239f170843a6ead8d5c6a61db + initial_ast: ea08e29d7f5913d1324868567c41da130b2299af0d6745247f6c65435679abcd diff --git a/tests/expectations/compiler/compiler/integers/u32/lt.out b/tests/expectations/compiler/compiler/integers/u32/lt.out index 77730627fd..605dab36c2 100644 --- a/tests/expectations/compiler/compiler/integers/u32/lt.out +++ b/tests/expectations/compiler/compiler/integers/u32/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 6af82ba7cfaa60ee0dfa8db6a145d2459bb5255acb4e175329a31d16723b58eb - initial_input_ast: 7d3520f07675ac488044c92eec0b2ee1dc38cfe2f9ec850fe020aea60eeb7a3b - initial_ast: 7111e358e69cfc0bf425c821b892ed379ddeb7e704053f660a7149b633f09f18 + initial_ast: 59ac6c28204cb5244582dc76f9ed1deb1701601eb789811892468abb87d7174f diff --git a/tests/expectations/compiler/compiler/integers/u32/max.out b/tests/expectations/compiler/compiler/integers/u32/max.out index dfdc5c54fd..c91297764e 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max.out +++ b/tests/expectations/compiler/compiler/integers/u32/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 76a0fe2199754831329d9b089d2c02f73d7457aaed6548372169318675b85f48 - initial_ast: c05447aab11b1d797ac4b137dd2a62b15cf2473d296c70c3bf4b0e39ad943cff + initial_ast: dd35f5b4ca3153046b53693b953dd2ae9f19f78649354c0709ed5223d35d4203 diff --git a/tests/expectations/compiler/compiler/integers/u32/min.out b/tests/expectations/compiler/compiler/integers/u32/min.out index b46a45ab9b..bd1710ee0a 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min.out +++ b/tests/expectations/compiler/compiler/integers/u32/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c7cfa681865a1c0623cfd356162d0c6750f3e06fb72126585eace0aeb21bae77 - initial_ast: 84a1b63182db76d7e1ecf8bf85011f71337b4c756abc57f4eed16d6ccd7404f7 + initial_ast: a8b4318aebc69c664a330a655cdccd0d3de0e12257d8e033856e0c34c9c1a46f diff --git a/tests/expectations/compiler/compiler/integers/u32/mul.out b/tests/expectations/compiler/compiler/integers/u32/mul.out index a3db93650c..97a97ebc25 100644 --- a/tests/expectations/compiler/compiler/integers/u32/mul.out +++ b/tests/expectations/compiler/compiler/integers/u32/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f8b5b2b0523a7b105beca036d64e7faafd2f3565269eed4ab47b57a4552f803b - initial_ast: 445a52143c5561473e614674752bbfc1f0ab670b799713d2006989dece28d8d5 + initial_ast: 4b03aeccb7ba3084e85abdbc514f17aaebce84027b4f910d88d99e7dc738be5a diff --git a/tests/expectations/compiler/compiler/integers/u32/ne.out b/tests/expectations/compiler/compiler/integers/u32/ne.out index 81bffa7f26..da4aabc603 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ne.out +++ b/tests/expectations/compiler/compiler/integers/u32/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: c36a3ceeb3e7d90b2bf76e7cbce130286c71a0cb86e6671f64bffa99f48e6491 - initial_input_ast: 8c66de958fbaa62572701b17e8fee53c7c5a51473c5deabd7d3279a73b271f21 - initial_ast: a2fce2693c1000822f5e3841994646404df0ffa0f343354362ab19d1da92ce22 + initial_ast: d89565fd4c010b22e02232fe782c53be06eed5120d1caf91f2c80f2a52189fc9 diff --git a/tests/expectations/compiler/compiler/integers/u32/operator_methods.out b/tests/expectations/compiler/compiler/integers/u32/operator_methods.out index 383a8fd3db..c775831d06 100644 --- a/tests/expectations/compiler/compiler/integers/u32/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/u32/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ea9df7ef3cc00db98b36855cf13c1091b7d8270ac2b9fe72b36bb7001e93e807 - initial_ast: 21b59fe60396056673a2f23d87a7544ec9be134f4a5ec02a922a6a0c3ee120ff + initial_ast: c0aca95fa5abba5b972907a07e67f54c7a05b611c9f43ad9abd8a0bc9fd8e0e3 diff --git a/tests/expectations/compiler/compiler/integers/u32/or.out b/tests/expectations/compiler/compiler/integers/u32/or.out index b32b08b3ae..b9cb99d7d3 100644 --- a/tests/expectations/compiler/compiler/integers/u32/or.out +++ b/tests/expectations/compiler/compiler/integers/u32/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 24ab39bf0500a015a0573619c40908da20bfbd3bfd4546bb65b6332033c44ac5 - initial_ast: 135d3a6df58371792424ff8dc87d24b7938aef33f4e13cb016a39de0c9aba20f + initial_ast: fd7ed4bc51c8614bcbf826e5faef351215ebca20ec2026888400a72a2b368f3c diff --git a/tests/expectations/compiler/compiler/integers/u32/pow.out b/tests/expectations/compiler/compiler/integers/u32/pow.out index 7756ada02a..636d825a0c 100644 --- a/tests/expectations/compiler/compiler/integers/u32/pow.out +++ b/tests/expectations/compiler/compiler/integers/u32/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 1b21a26a6e63949b68f60b4d8d5aceddd14582b1e7a97b8170c0575ec9b8c62d - initial_ast: 2daddd8a1b6d1fc3bd84b9b72a59f711fe6e2afaed0bf248796ad4f967f8a6bf + initial_ast: 82b226a9264ce7abefebf9171704cd6e495ae07d2792e33634f7948470230306 diff --git a/tests/expectations/compiler/compiler/integers/u32/shl.out b/tests/expectations/compiler/compiler/integers/u32/shl.out index 4c5758d6d2..2cb2ad9830 100644 --- a/tests/expectations/compiler/compiler/integers/u32/shl.out +++ b/tests/expectations/compiler/compiler/integers/u32/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 0942fc3a0aaa64dd019acd4dcd23a548b11ad692ed1af1703201286bf3474552 - initial_ast: fe46e8d2f3a5f44c9e0298175ee1a9afdea56eb55cc7d959be20dba5cabf5c04 + initial_ast: a5dfc20f106fb945376bfd3adffbf100297129e61740ac028503da3908ef94b8 diff --git a/tests/expectations/compiler/compiler/integers/u32/shr.out b/tests/expectations/compiler/compiler/integers/u32/shr.out index fc0ce334cb..e36a0f15b9 100644 --- a/tests/expectations/compiler/compiler/integers/u32/shr.out +++ b/tests/expectations/compiler/compiler/integers/u32/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 0942fc3a0aaa64dd019acd4dcd23a548b11ad692ed1af1703201286bf3474552 - initial_ast: 9289596bee932cb6a10e55ecf4f8fae109c4ee8f1b450c212546d9887014e618 + initial_ast: 05059c513ba81bb9c17880e6b84ab7c89e1b4287db43b5eefd3a7b9beb71f27a diff --git a/tests/expectations/compiler/compiler/integers/u32/sub.out b/tests/expectations/compiler/compiler/integers/u32/sub.out index 39eb6d9b13..0e297f7a7d 100644 --- a/tests/expectations/compiler/compiler/integers/u32/sub.out +++ b/tests/expectations/compiler/compiler/integers/u32/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 8bea12e1a0f364a123045ecb496654c9448a99278cc875dae01f17b2d9fb3485 - initial_ast: dbd7ac04b429e55feb60410fa01f02152ca2b763ee1a6d7d3324314991838072 + initial_ast: ecd4592fb7d2423f9cdee0577be59cf89ea781c612bb17e310bbc658906f45d2 diff --git a/tests/expectations/compiler/compiler/integers/u32/ternary.out b/tests/expectations/compiler/compiler/integers/u32/ternary.out index e24d2b2e91..2726e47f78 100644 --- a/tests/expectations/compiler/compiler/integers/u32/ternary.out +++ b/tests/expectations/compiler/compiler/integers/u32/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 27f7025a824f61583d50487c11fc97bd272d7dd79c002f0123252457885d7aef - initial_input_ast: ee9d28f19ee516c2adbca501a7e239df0a8c55189994a7480fabfa1baa79cb54 - initial_ast: a501d6b24248229cc476db3c38556aacb27ad8a2aa6398569a13c2fc87cb122b + initial_ast: 74b91a1c2ed9bd5070ab35cc376cd9fc2a6f1f4bbfcea0007521e25887d29821 diff --git a/tests/expectations/compiler/compiler/integers/u32/xor.out b/tests/expectations/compiler/compiler/integers/u32/xor.out index 1b99ce2a75..77150c41e4 100644 --- a/tests/expectations/compiler/compiler/integers/u32/xor.out +++ b/tests/expectations/compiler/compiler/integers/u32/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 7c48dc804dbb838ac85e31f9d913f494e82e941e19a7d0488f8017aa5b421d43 - initial_ast: 1a2b553b70b259e98ab8a4ec91d4b9561894f243239b881cc05a5b25243d6363 + initial_ast: 933271b0643750c3c0c95ca7f2505e2527082290f7323cecfd9178d5f4867f43 diff --git a/tests/expectations/compiler/compiler/integers/u64/add.out b/tests/expectations/compiler/compiler/integers/u64/add.out index 4ba34021cb..85892337cf 100644 --- a/tests/expectations/compiler/compiler/integers/u64/add.out +++ b/tests/expectations/compiler/compiler/integers/u64/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: b50fe7e5fcca4c73fff46b376e3eedec9ae02e15ca9f2d4f33f3a1b77b3f9168 - initial_ast: 340164d2eb54080cf67f584148ece7d5873c20a570a6bb0173d2d7fe8512e97b + initial_ast: bd64b6b17e08c6b9c370154dfefa376c7b79878f691820fc8ffd625da7199cab diff --git a/tests/expectations/compiler/compiler/integers/u64/and.out b/tests/expectations/compiler/compiler/integers/u64/and.out index 2f08874eaa..f44460f0bb 100644 --- a/tests/expectations/compiler/compiler/integers/u64/and.out +++ b/tests/expectations/compiler/compiler/integers/u64/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: b50fe7e5fcca4c73fff46b376e3eedec9ae02e15ca9f2d4f33f3a1b77b3f9168 - initial_ast: 17d5fbf0845373e1b8b4dad54571cfc95015715414cb1b11e89ec0b3e2e2116d + initial_ast: e76ff2df63d5cec970d7b8a11fb639e5285692fdaf57cf9811c657f1ec06efb9 diff --git a/tests/expectations/compiler/compiler/integers/u64/console_assert.out b/tests/expectations/compiler/compiler/integers/u64/console_assert.out index 0f2a422195..80bf10545d 100644 --- a/tests/expectations/compiler/compiler/integers/u64/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/u64/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 3d51bf3df58d2d1681a5d016d678cc89b339975bd257812cd4cd60160fb433ee - initial_ast: 5b3f45f81f96fd2606f09a1936b302b896a610c3f72f4d1549648cf506fe65b4 + initial_ast: f53d168c65d8389d9b99013525fb5a07b907cd0d73fec1e7cb144662e8a6daed diff --git a/tests/expectations/compiler/compiler/integers/u64/div.out b/tests/expectations/compiler/compiler/integers/u64/div.out index 0f8619f1cf..fad6f0d67c 100644 --- a/tests/expectations/compiler/compiler/integers/u64/div.out +++ b/tests/expectations/compiler/compiler/integers/u64/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: beeb0a9eacf523f7e10c566f746ffb272b789646ba1a471cea54faeeeb535464 - initial_ast: a79fed9ce5b7424f09ebfab59dc874c2b43cc71955d4c8d0d8c1f9277288d5be + initial_ast: 8427a9e17639ab6e623015f49001d83c37188382101506b615a752a6ac82cf17 diff --git a/tests/expectations/compiler/compiler/integers/u64/eq.out b/tests/expectations/compiler/compiler/integers/u64/eq.out index a8e4b02884..11c1c3b4db 100644 --- a/tests/expectations/compiler/compiler/integers/u64/eq.out +++ b/tests/expectations/compiler/compiler/integers/u64/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 1e05ac8daa4ebb9edbb2929a2a30db4a0f38a0bce1498d8b3a2983566ba73f2a - initial_ast: 0b87059e5a0ea16416c02be3dbf974dadaa25fcb273aa5095300bb86eb9c9a14 + initial_ast: d0dfbca5520ff3fd0b37577362ab04d015fe6017fedd9fd8148dc0950d4f22de diff --git a/tests/expectations/compiler/compiler/integers/u64/ge.out b/tests/expectations/compiler/compiler/integers/u64/ge.out index 2c98ebc635..f20e7fd745 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ge.out +++ b/tests/expectations/compiler/compiler/integers/u64/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: c93814cf63d02ad8a937f8b60f81eae00e522352861e2fd10a2188a0384646d4 - initial_input_ast: 2d62b4fb5f26898f99626d4ed69d0b4a24ee08262caf04bcbb1867b462f451f9 - initial_ast: c7c41443c2274ec7eab0282ab90404692aabe60fb959d9797f5ed93295740ac8 + initial_ast: e95b6df749bc2af90b55f0477235e39ba6e07906433d151a53b194958b032f24 diff --git a/tests/expectations/compiler/compiler/integers/u64/gt.out b/tests/expectations/compiler/compiler/integers/u64/gt.out index 24cf46662a..12eccd6a61 100644 --- a/tests/expectations/compiler/compiler/integers/u64/gt.out +++ b/tests/expectations/compiler/compiler/integers/u64/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 9ee8856bfaf5e7fc4d635092b4f7ea9501e3ce319694acebe8cbcaa3783e866c - initial_input_ast: 2430f4c73831f48ad743c32463ad9a84e3e9039bec5ff8332dcc98932363fd66 - initial_ast: 2fddc57755bd974f2e5a7e605edbcca484741fdd7e04b9eb4c661e848c1f728d + initial_ast: dee2ed829b767d0dbb0109e4f25999ec5c135de3eda90e6760e5e9a0337664a2 diff --git a/tests/expectations/compiler/compiler/integers/u64/le.out b/tests/expectations/compiler/compiler/integers/u64/le.out index a3de59285f..973b2ea571 100644 --- a/tests/expectations/compiler/compiler/integers/u64/le.out +++ b/tests/expectations/compiler/compiler/integers/u64/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: c93814cf63d02ad8a937f8b60f81eae00e522352861e2fd10a2188a0384646d4 - initial_input_ast: 9fdfa77c361e0f36264bdc79549782e5c4accc35538700d984cd89863f9e2683 - initial_ast: 8324cc493c146c4b8265d86573e0c5d6ca185040fc0dd24398f43711d43839cd + initial_ast: 12a101440e4d78a0adf48d37a29eba7ecf9d5316c138261d5a1aeaf2dc1ca6c0 diff --git a/tests/expectations/compiler/compiler/integers/u64/lt.out b/tests/expectations/compiler/compiler/integers/u64/lt.out index 071c46603a..5af930835d 100644 --- a/tests/expectations/compiler/compiler/integers/u64/lt.out +++ b/tests/expectations/compiler/compiler/integers/u64/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 7f5c6e459e8b00635226d3719b7d729913c93525e47053278a015fd24079c37d - initial_input_ast: 35ef77a451dbc9df83934e68b1407ab2f8fe9014a8a59704475ec3c3942ef89f - initial_ast: fa31b24abd921d4af729dc4d00df07a76b4eba1b58c83d68287c1dc4fd3effce + initial_ast: 110ab4c99e2b66f44464cf8914fa7fe4c60d7c081d0726df1a0a92438a69a2df diff --git a/tests/expectations/compiler/compiler/integers/u64/max.out b/tests/expectations/compiler/compiler/integers/u64/max.out index 3ede96b564..6f09c20bac 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max.out +++ b/tests/expectations/compiler/compiler/integers/u64/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ad738add6c03b6224ccba9d8d735b6645444f9c16f3b652ec4c0903fa4bb33aa - initial_ast: ed6f4f209a48619099bbc178763027c1cb6de50f7e4eb7db9ec359e917b67322 + initial_ast: ab38d72be5bb52d4732c8bc797e46c019294a1289a9c31dd47dd3d8733cdc0fd diff --git a/tests/expectations/compiler/compiler/integers/u64/min.out b/tests/expectations/compiler/compiler/integers/u64/min.out index 72392385c6..46937eef5d 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min.out +++ b/tests/expectations/compiler/compiler/integers/u64/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c7cfa681865a1c0623cfd356162d0c6750f3e06fb72126585eace0aeb21bae77 - initial_ast: 12ba9963cb5250d4d1d98a9fee0b7dd116e5065f8a83f5e79cdd623bf24307aa + initial_ast: 172b679353b96a72c360c2b245628a8bd5e8dc1bcc0da20693607cd2d5656889 diff --git a/tests/expectations/compiler/compiler/integers/u64/mul.out b/tests/expectations/compiler/compiler/integers/u64/mul.out index ab5fe28d10..3ace5fd64e 100644 --- a/tests/expectations/compiler/compiler/integers/u64/mul.out +++ b/tests/expectations/compiler/compiler/integers/u64/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 0758dc997baa1ce2e35b7680289f58b145801d64671f55b98a163d84b76982a2 - initial_ast: 7d318ef8d005392a4bc79f3316f5847ead2d452787a5ad0c057b0b48e150baa3 + initial_ast: c3d551cb4dce3a71d92eef036422f9236000b773881b095bdcbcc28f4e97633a diff --git a/tests/expectations/compiler/compiler/integers/u64/ne.out b/tests/expectations/compiler/compiler/integers/u64/ne.out index 6a425d2870..151ed003aa 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ne.out +++ b/tests/expectations/compiler/compiler/integers/u64/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 2c6f07fb52fcadfd42be53ab06838ce4ddc609995c7f4cbc3799f6daf92cc32b - initial_input_ast: a090b0a76971eb5a83b3460b0e9ad051e293b1adc169b8a59eece9a7bcda4e56 - initial_ast: 824860fcd0efb5e8f59935166bd2c810068f6bffa23e5e0c02d6d95b6d88ec21 + initial_ast: 8860497983071bea8c50202f83836213874304ea078d07a79aece5dfb3625f40 diff --git a/tests/expectations/compiler/compiler/integers/u64/operator_methods.out b/tests/expectations/compiler/compiler/integers/u64/operator_methods.out index ff0fc73679..df438a3673 100644 --- a/tests/expectations/compiler/compiler/integers/u64/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/u64/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: e5791e3381c49b3897104d9715a9e452f7009eb7fe621d5a63280dbbe50b3c54 - initial_ast: 25d05cdcdbaf148b060a54daa3de4b7d87a1b7189d667b0831bdb12cd0a28af3 + initial_ast: 474002499ffcb79d701586fe0628e6c15a216b31be8dabd957e32ba9818ef02a diff --git a/tests/expectations/compiler/compiler/integers/u64/or.out b/tests/expectations/compiler/compiler/integers/u64/or.out index 0fbcd6c85a..6e94d64a8f 100644 --- a/tests/expectations/compiler/compiler/integers/u64/or.out +++ b/tests/expectations/compiler/compiler/integers/u64/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: b50fe7e5fcca4c73fff46b376e3eedec9ae02e15ca9f2d4f33f3a1b77b3f9168 - initial_ast: f9763d0d8b774b35e807316ae6dd33dbe858881d7e4c45f80d05639c4c0c46bb + initial_ast: 755724fa2fa3c8402b734438aa4ebd604fd7d7b2f9dd7a5b20fa3255ecdc1569 diff --git a/tests/expectations/compiler/compiler/integers/u64/pow.out b/tests/expectations/compiler/compiler/integers/u64/pow.out index 60d8e0c043..25a06032bb 100644 --- a/tests/expectations/compiler/compiler/integers/u64/pow.out +++ b/tests/expectations/compiler/compiler/integers/u64/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 21f494ba0942bd81a0971d1c7d591585cb72d198a89963e561baf0a1b007ac87 - initial_ast: 8fb5e2247aeac433dd36ae4239d96120b5720ab6d95670531b020b5c0d5ca1dc + initial_ast: 37143cb70d627af7179ab12dc8c6fa766007883995ba59ec03cbf3efec1b03c8 diff --git a/tests/expectations/compiler/compiler/integers/u64/shl.out b/tests/expectations/compiler/compiler/integers/u64/shl.out index 66bd178f9c..e31ba44f23 100644 --- a/tests/expectations/compiler/compiler/integers/u64/shl.out +++ b/tests/expectations/compiler/compiler/integers/u64/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 429335969b6c3ba968362b30d24c4aac270bc21f7675ac64235e979c324549b3 - initial_ast: 6886e667f1d6755f4de7173442beb567647c923e341a8d2be04557b6c6c951ef + initial_ast: b81f9b6190ea9fa8bc246b1620adfdc427dbe7e8b28412469a170078dc1440c9 diff --git a/tests/expectations/compiler/compiler/integers/u64/shr.out b/tests/expectations/compiler/compiler/integers/u64/shr.out index ee9dbeaa9d..f29d2ec493 100644 --- a/tests/expectations/compiler/compiler/integers/u64/shr.out +++ b/tests/expectations/compiler/compiler/integers/u64/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 429335969b6c3ba968362b30d24c4aac270bc21f7675ac64235e979c324549b3 - initial_ast: bf9740eebdc55fe0c35c7ec027c0ef328ab92e2a5228489a20911bbbe7deab37 + initial_ast: e5fcc74f7457c45fbf3ee6eaf54ff95559034817f4db4f11608982fdf971a6c6 diff --git a/tests/expectations/compiler/compiler/integers/u64/sub.out b/tests/expectations/compiler/compiler/integers/u64/sub.out index a7174469fb..3ef3b5abd5 100644 --- a/tests/expectations/compiler/compiler/integers/u64/sub.out +++ b/tests/expectations/compiler/compiler/integers/u64/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 083ead671da49260e9309556752e7e3bed665ae954c744b8d067a9919fb01222 - initial_ast: d5e74554cc310acf5a55a5d5a1bdd53eb03af925ea01be634ee8afe84639a505 + initial_ast: 255a9fb739a6559d36c394ca23db5a8c20ba77cce3d945986f87782b3162edee diff --git a/tests/expectations/compiler/compiler/integers/u64/ternary.out b/tests/expectations/compiler/compiler/integers/u64/ternary.out index 59fd86535d..1d55be3d3a 100644 --- a/tests/expectations/compiler/compiler/integers/u64/ternary.out +++ b/tests/expectations/compiler/compiler/integers/u64/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: c016901c75fdf8a1f458788af0598e582030b2957dd8c630b74148e2f3c908f6 - initial_input_ast: 1d4cb77c5bba30e598cca54089f1530603af93a6feebc53229a968978036eb1c - initial_ast: ece173da72d8938a75fc6b467b37c3e2345ebe5fb679292bc256067c06011a34 + initial_ast: 6eeabe45651a48f76de3c5b179153e1194c63a06a8add4e2a860bc17e9272037 diff --git a/tests/expectations/compiler/compiler/integers/u64/xor.out b/tests/expectations/compiler/compiler/integers/u64/xor.out index 74d9b633de..7cc3fd5782 100644 --- a/tests/expectations/compiler/compiler/integers/u64/xor.out +++ b/tests/expectations/compiler/compiler/integers/u64/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f76d83befbe9326bc314867d02931b7ad78ca30ffcb9031997dfda28bfd5133e - initial_ast: 9a85f40d0e502c8e4cb423ba9ae2806a015ae0c46f1fce4f888898029707b461 + initial_ast: bf20cca85d667b78fcea3b5fda359daa928233887199718dcdc4aae3af9e7d00 diff --git a/tests/expectations/compiler/compiler/integers/u8/add.out b/tests/expectations/compiler/compiler/integers/u8/add.out index a03dd32099..a7ca80d2cd 100644 --- a/tests/expectations/compiler/compiler/integers/u8/add.out +++ b/tests/expectations/compiler/compiler/integers/u8/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: b568f017162b4870af580492723986dac02d17b61cec3cec52cc8651e7d4dec8 - initial_ast: 754c6fc632d72724bb2447829ea6470d444fda41b7f4677635839184bd39e658 + initial_ast: def4930f6696d3d3742ff7e98fd537a61fb49b4e4b78d9c8fbff89f93c895b57 diff --git a/tests/expectations/compiler/compiler/integers/u8/and.out b/tests/expectations/compiler/compiler/integers/u8/and.out index c3d6c2154b..c84370be1c 100644 --- a/tests/expectations/compiler/compiler/integers/u8/and.out +++ b/tests/expectations/compiler/compiler/integers/u8/and.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: b568f017162b4870af580492723986dac02d17b61cec3cec52cc8651e7d4dec8 - initial_ast: 988ae827a3cfcadeb7c89bf40a4c2c37f78ed97fe9e76dfb3aa74270f056b8ea + initial_ast: 783113ba8eedd13a6ad248faa2fb001937be2aac8a1481889155bc4e3aec59d6 diff --git a/tests/expectations/compiler/compiler/integers/u8/console_assert.out b/tests/expectations/compiler/compiler/integers/u8/console_assert.out index a2464b1e74..f49e56aba8 100644 --- a/tests/expectations/compiler/compiler/integers/u8/console_assert.out +++ b/tests/expectations/compiler/compiler/integers/u8/console_assert.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 8dd4987c574614c5154b47c61e6eafec80b878d6c4949bc95d8ee2eb96170add - initial_ast: b3a25f9933cbba508f01723126eba657c8317c2bc235d659c30fc9d9ec66f58f + initial_ast: e8bf5dd6a62c2befd18a6dcace2b17108035bd0ddeded3765b092efb1bd40155 diff --git a/tests/expectations/compiler/compiler/integers/u8/div.out b/tests/expectations/compiler/compiler/integers/u8/div.out index 2baec7e291..94864a3ff5 100644 --- a/tests/expectations/compiler/compiler/integers/u8/div.out +++ b/tests/expectations/compiler/compiler/integers/u8/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 09d9e73603d60f95eb727839ce98545e429b63ca34293d14ffaac126d6dd381e - initial_ast: 0d9ff3ac45a9e6fd5e03221953a7e07500f93d3245e90b94145bcf2970e24070 + initial_ast: c9b5e774134ac2ce54d4f76b57d8f409dee23bf1afff437f82142839a6b6169e diff --git a/tests/expectations/compiler/compiler/integers/u8/eq.out b/tests/expectations/compiler/compiler/integers/u8/eq.out index 07bf3b5f6e..54cb8a76ae 100644 --- a/tests/expectations/compiler/compiler/integers/u8/eq.out +++ b/tests/expectations/compiler/compiler/integers/u8/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a4cd0750e35f81754a218922dd8a55d208009d236296668eaafa6aa8d60fdcb4 - initial_ast: afcc42569de04d0b1672a244a675e13b9ad998991488da9fa986860fb0468dc1 + initial_ast: 989fc1af077f1e737de28bea4d6a0e592ce5875eb362c30b3ca9ec2310ef2c19 diff --git a/tests/expectations/compiler/compiler/integers/u8/ge.out b/tests/expectations/compiler/compiler/integers/u8/ge.out index 817be0e9ac..bbdcaf05fa 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ge.out +++ b/tests/expectations/compiler/compiler/integers/u8/ge.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: d0e7d4b75881411834839b3822bf80914e6018ba2729ff717c851ce34aa7eead - initial_input_ast: 8eedbf6e59fef91aeee2f91f13799ccb1d990cc041268bdf7f7be526fd4c0b87 - initial_ast: 0387eb47ffc2188fee255556743ac7030b4a61ef5afc2b9bc4d13818d8d08740 + initial_ast: c7e147765a311ac2c9d9f92dfe1e893cf9318846839daffbbd76d50b7baad9ca diff --git a/tests/expectations/compiler/compiler/integers/u8/gt.out b/tests/expectations/compiler/compiler/integers/u8/gt.out index 1bdf699bf4..c05ac70357 100644 --- a/tests/expectations/compiler/compiler/integers/u8/gt.out +++ b/tests/expectations/compiler/compiler/integers/u8/gt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: be7952b3d9074f7a048ca1e95dc8749bb9fe03c3c1f4d1666cc81e16eaaed3dd - initial_input_ast: e2a63d49a7e6c95f5f8eb00440e098d690e4223244b80b8790b5593be295e612 - initial_ast: 246b63815a2edb7ad0e09567170205f09ed8b805924efc8665d427ad575ae1d4 + initial_ast: 51656d19aacba5fa087aef1c804b68da7bfe25d88491010d90c97dccaaf9c268 diff --git a/tests/expectations/compiler/compiler/integers/u8/le.out b/tests/expectations/compiler/compiler/integers/u8/le.out index 1853bf6c70..dd75bc4af4 100644 --- a/tests/expectations/compiler/compiler/integers/u8/le.out +++ b/tests/expectations/compiler/compiler/integers/u8/le.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: d0e7d4b75881411834839b3822bf80914e6018ba2729ff717c851ce34aa7eead - initial_input_ast: e83f3d1b68e9e42f5f4ef9ac8fa11c9f048661148dffd1f2337ec7a4fe7c7b70 - initial_ast: c77395e7a7c11b5e29249ff2e0458d8e0a3ddb160510522ec37c9679433587f7 + initial_ast: 0d11297d720c92608ee42114a1fd4a5c5298a8b6a86ef69d93a6c14874aa0f8a diff --git a/tests/expectations/compiler/compiler/integers/u8/lt.out b/tests/expectations/compiler/compiler/integers/u8/lt.out index da380bf49b..a2db7f77a1 100644 --- a/tests/expectations/compiler/compiler/integers/u8/lt.out +++ b/tests/expectations/compiler/compiler/integers/u8/lt.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 1b0305de2d2ddda28ff605bd26a4f6dd8edaaa1dd3db97f00ad53a4cd3cceb23 - initial_input_ast: 9033a0de0826b7e572951e2dcf8e83f4f6515205058b7432ccff29a065cc2a49 - initial_ast: e80f2965d7b6bc3f51e6115f53f20968b14276fc1920428f458ff998032676bc + initial_ast: 0e41affa408df942abce132b769b922d58077cd5c191fc813a3c4163eb4007c3 diff --git a/tests/expectations/compiler/compiler/integers/u8/max.out b/tests/expectations/compiler/compiler/integers/u8/max.out index 9ba2c76738..5283b50e34 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max.out +++ b/tests/expectations/compiler/compiler/integers/u8/max.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c7cfa681865a1c0623cfd356162d0c6750f3e06fb72126585eace0aeb21bae77 - initial_ast: 76d2cd4e27f5746d6ab065808ae83a73e60b4798d30181e8a12ff9ae20194c94 + initial_ast: 7443024bab671ea7124ab886e6dc19778387f328164a4de345ebeed12e0efceb diff --git a/tests/expectations/compiler/compiler/integers/u8/min.out b/tests/expectations/compiler/compiler/integers/u8/min.out index d6aa9e50b3..a3ac4e7f87 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min.out +++ b/tests/expectations/compiler/compiler/integers/u8/min.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 13720f61f86be3462e6829a230cb85abd2ea7a3e406c03bad349c0580839fd1b - initial_ast: 8c02652cea84f945daccc6578e4cb7ac701ab8c80ede22f74a441d04cb8be1a0 + initial_ast: c785619834202d7538c45f44a72e57f7b437ab2a65f760836229787ff13a67d4 diff --git a/tests/expectations/compiler/compiler/integers/u8/mul.out b/tests/expectations/compiler/compiler/integers/u8/mul.out index 69bcb61580..ec3fa12953 100644 --- a/tests/expectations/compiler/compiler/integers/u8/mul.out +++ b/tests/expectations/compiler/compiler/integers/u8/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 1a47105e4a0a77e18f9e0109084a0c0b81cbf04bf4e449a86d0f9a214bbe297b - initial_ast: e70485ca8bf749103e8706c3d5df55005794f1fcb49ccd81487e7f8796c20290 + initial_ast: 41929c6d9bd9673f5b34ae9ed5a11da3edbf40bfa9c74320c7db48651cff0041 diff --git a/tests/expectations/compiler/compiler/integers/u8/ne.out b/tests/expectations/compiler/compiler/integers/u8/ne.out index 4eac71727d..6dcf006243 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ne.out +++ b/tests/expectations/compiler/compiler/integers/u8/ne.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: c40e8d5ce21623a727dc9b6404c0d7f6f251d36f82d30b9ba4f1f2804531a2a7 - initial_input_ast: 699f3079ce1ae41896a7817fc10cba7d28e3ad1445c47f7a892a4867cd597be0 - initial_ast: af6fd0946705136e76fff48bc531292c128bf3d6f534b85129da2fceb2f153cc + initial_ast: 559f1ed173a20cf063f9e1f9fc8cc45a9c6e599fc910d30a4a7a6d5aa61d8aeb diff --git a/tests/expectations/compiler/compiler/integers/u8/operator_methods.out b/tests/expectations/compiler/compiler/integers/u8/operator_methods.out index 438630eaf9..0ddb438fa1 100644 --- a/tests/expectations/compiler/compiler/integers/u8/operator_methods.out +++ b/tests/expectations/compiler/compiler/integers/u8/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 746d49d0a4fc6fd3bf0b001693187c5a4986b06b5e257fdb30778862abdd51fa - initial_ast: d498ddf01de9af370a6db1d6bc5f981e558d51ad6cab51ebb6cf50d2ccaef3d2 + initial_ast: 1434ffd2b0f55362ff8cfd06101af476e685e354e05cb5174327566237814808 diff --git a/tests/expectations/compiler/compiler/integers/u8/or.out b/tests/expectations/compiler/compiler/integers/u8/or.out index f11f6e360e..895d49a520 100644 --- a/tests/expectations/compiler/compiler/integers/u8/or.out +++ b/tests/expectations/compiler/compiler/integers/u8/or.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: b568f017162b4870af580492723986dac02d17b61cec3cec52cc8651e7d4dec8 - initial_ast: a45e30bb089e822608fa0c82be0139e781161e182dfe0e526b5d3aa4f74fb3e6 + initial_ast: 6beb0e3b760e8e2c657c59207c665e88974d36289daf1277db624fa9d54d1bff diff --git a/tests/expectations/compiler/compiler/integers/u8/pow.out b/tests/expectations/compiler/compiler/integers/u8/pow.out index 9ca29dc992..ae00c5103e 100644 --- a/tests/expectations/compiler/compiler/integers/u8/pow.out +++ b/tests/expectations/compiler/compiler/integers/u8/pow.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 9b6010040efa42a21face2e7a08f92bb764fc497738c0211887c06d195a41d16 - initial_ast: a397579f1ed7d54e9d6a2be47a517abaef1e751598c3c0d975f2e1811c8db72e + initial_ast: 58885a1a0bf3cc69c79849b7ed87165ae0611cf952c8af4dfe79fdaf60d14f17 diff --git a/tests/expectations/compiler/compiler/integers/u8/shl.out b/tests/expectations/compiler/compiler/integers/u8/shl.out index ca79553d76..2e982c0823 100644 --- a/tests/expectations/compiler/compiler/integers/u8/shl.out +++ b/tests/expectations/compiler/compiler/integers/u8/shl.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 122462c0f087ef8b63c453544666f10f38e2cce33fbd6f4d84b9585177077077 - initial_ast: 0bfbbd577c1680dc314a933dd553c5b8f923a6500b993641aa289d09e6fa7b2d + initial_ast: c307dc2d2e56826a579fbbd2877cf45b10c4c28027a569bc4423346c3dd211e4 diff --git a/tests/expectations/compiler/compiler/integers/u8/shr.out b/tests/expectations/compiler/compiler/integers/u8/shr.out index 41f12d306f..69a572d3a8 100644 --- a/tests/expectations/compiler/compiler/integers/u8/shr.out +++ b/tests/expectations/compiler/compiler/integers/u8/shr.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 122462c0f087ef8b63c453544666f10f38e2cce33fbd6f4d84b9585177077077 - initial_ast: b310c8d522c70768838543087c884a8785081de31ef2302a20176dd697d57914 + initial_ast: e143f5922a2a6dca891fe89d790991f716f1a77d9807566b3332785ef45fe074 diff --git a/tests/expectations/compiler/compiler/integers/u8/sub.out b/tests/expectations/compiler/compiler/integers/u8/sub.out index ad3ba55e97..d03ea5ff47 100644 --- a/tests/expectations/compiler/compiler/integers/u8/sub.out +++ b/tests/expectations/compiler/compiler/integers/u8/sub.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: e0a14c313387c27690fe95a691990d9a82c0d189ebe6510a209984a817907fb0 - initial_ast: 9b629c94d7ea45e415591d9dda63fbff07a93ec777b9b99be437ba2aff883bd1 + initial_ast: 8d4017c5227cc04eec1f8219864a5bb5b7eb09ba7623cd3a429049f13be7a8f4 diff --git a/tests/expectations/compiler/compiler/integers/u8/ternary.out b/tests/expectations/compiler/compiler/integers/u8/ternary.out index 6672b00311..d97b62e014 100644 --- a/tests/expectations/compiler/compiler/integers/u8/ternary.out +++ b/tests/expectations/compiler/compiler/integers/u8/ternary.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 92a421ad9700284ef509658bad78166f5931b333e9f838bb141501a617e49cc7 - initial_input_ast: c6e61d82e8081ec02c9363b22a0b5496a417885254c4e178d21597c39de6d95a - initial_ast: 9ed0471710e7c1109adac89e209ea157c5c0cb642661bb24bfd109537159b2e6 + initial_ast: e297487589929cbd994388ce988530b210c7497821932bfb42383379e8818c86 diff --git a/tests/expectations/compiler/compiler/integers/u8/xor.out b/tests/expectations/compiler/compiler/integers/u8/xor.out index 61ac7e22c5..60ac981119 100644 --- a/tests/expectations/compiler/compiler/integers/u8/xor.out +++ b/tests/expectations/compiler/compiler/integers/u8/xor.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f3f4106ac9259a15289bec28ed917f5781227eb13d1e0eafb3e9f8644727e119 - initial_ast: 79255bfd6845fac131d7d3ea97624ef9a0076305ddeb40447e531c38044357d9 + initial_ast: 5a670ca97878c20e0207d0aa4a2fb0eafb03fb4b7aa63559c2abe07cc1a89522 diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.out b/tests/expectations/compiler/compiler/mutability/cond_mut.out index bc847a27a2..994ef80d91 100644 --- a/tests/expectations/compiler/compiler/mutability/cond_mut.out +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 4450d380390e4b22d69c9b44ee782266384b84ba991347c0f96e8f624d6512e7 - initial_ast: 2d05e70558b1a34ac0778929dc306c177ae344de02feca3f1ed7be554f3da944 + initial_ast: 2e7485c231d3386d9fe1227cbff57efdb8ba36e139e9335d7934706a3a5b6d13 diff --git a/tests/expectations/compiler/compiler/mutability/function_input_mut.out b/tests/expectations/compiler/compiler/mutability/function_input_mut.out index 878104cd6d..f193d42968 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input_mut.out +++ b/tests/expectations/compiler/compiler/mutability/function_input_mut.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: f8e3ad3747d61bdfd59afdc58ad9f7bfb6ffba275f9c5f22e12e1607bb06af85 - initial_ast: 5647851e72bb49bf865c8025c525333f4ea4751e1b8f9e68b72660aa91e8c435 + initial_ast: 7b467b21118a9a20a946ea5f662314960619182f14dcee15b7324ad1c7f6e264 diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.out index 1b6a02ce32..64ea7beb26 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut_nested.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 0ef14a72e85eff8a241f34061899762d2fee7906cc3505475f0dac47b9458f8a - initial_ast: e25b363c3583b46fa1a8e10eef94717ca4b87128c8578a4b44ad344ff113eef8 + initial_ast: e3f3637e1b1e77247bbe62786081a4cca3244762cffcb53c15913c13d1e16802 diff --git a/tests/expectations/compiler/compiler/records/declaration.out b/tests/expectations/compiler/compiler/records/declaration.out index d211d59a8e..0cd528e6e2 100644 --- a/tests/expectations/compiler/compiler/records/declaration.out +++ b/tests/expectations/compiler/compiler/records/declaration.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: ed6dbb2a60da9a91da4b3845e3919b0520666cf4d7223e5634e1e8e38dd9243d + initial_ast: d9e88dfe4fd58efbde56c46af688e938b40cc14aba9b212215eb5f3bec220edf diff --git a/tests/expectations/compiler/compiler/records/init_expression.out b/tests/expectations/compiler/compiler/records/init_expression.out index 619a6bb82a..b7e6fc8f51 100644 --- a/tests/expectations/compiler/compiler/records/init_expression.out +++ b/tests/expectations/compiler/compiler/records/init_expression.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 209ec3cdd48655115bca90839ebe91260044d8ee9edb4c7c4542497427cb1d76 + initial_ast: 672d31f98d7d1a61d0ffa0ce364b7df84e03e1e769fad9f14c3a45e66f8654d0 diff --git a/tests/expectations/compiler/compiler/records/init_expression_shorthand.out b/tests/expectations/compiler/compiler/records/init_expression_shorthand.out index 7bc575d766..b61b75211e 100644 --- a/tests/expectations/compiler/compiler/records/init_expression_shorthand.out +++ b/tests/expectations/compiler/compiler/records/init_expression_shorthand.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 73452a5c1cd8fc44277d025eb18a42529e4cc9f97282b508e996912c6b8753d3 + initial_ast: 78f8fddf1f1afd737f3fe14e30f5b260ec20da6c41f9c224c432b0a35c6bef28 diff --git a/tests/expectations/compiler/compiler/scalar/add.out b/tests/expectations/compiler/compiler/scalar/add.out index 9abb7e9862..6f861bf9f6 100644 --- a/tests/expectations/compiler/compiler/scalar/add.out +++ b/tests/expectations/compiler/compiler/scalar/add.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c528268c53f01e78fbbc8af3ed5e0dc1d4e9b9f28644c597167971edef764cf0 - initial_ast: 5b3ef7dce7c2ffe2777c5b2a9545daead2f38e2b8707477db03e87faec6da7d2 + initial_ast: b1a4a6ba4f7dc8abbd1f3ff44e62dc21c7fb402c9ed0f0ded1e22b7f26077a62 diff --git a/tests/expectations/compiler/compiler/scalar/cmp.out b/tests/expectations/compiler/compiler/scalar/cmp.out index b52102aabe..c0e19dc997 100644 --- a/tests/expectations/compiler/compiler/scalar/cmp.out +++ b/tests/expectations/compiler/compiler/scalar/cmp.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 8b51ce00d3448cda6f763ac1fbc6d14a2588dc0bc0d24eb423b5f417029b28c5 - initial_ast: 95590d79b6c281e99c71474d30c610d1f455254ad478a8c12f83e76bb624424e + initial_ast: e01d7fba70fc322d8beab1f300fe12bcda127b2b3f0aa52411fd2ce1fbe41e90 diff --git a/tests/expectations/compiler/compiler/scalar/div.out b/tests/expectations/compiler/compiler/scalar/div.out index 1974b6032c..fcc7633106 100644 --- a/tests/expectations/compiler/compiler/scalar/div.out +++ b/tests/expectations/compiler/compiler/scalar/div.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 3a7c59d773f33e6827986b770fb0a3434917ccb094cab158d5ae8dead74fa8c2 - initial_ast: 8cc7803f72770ff9c129a32350e365aa18958bf0ef991cb2a7793075b90da062 + initial_ast: 3c0ab3d0f6277d4a03b46b872b6ccb9a29015eb653f22d678463e412ef0267e0 diff --git a/tests/expectations/compiler/compiler/scalar/eq.out b/tests/expectations/compiler/compiler/scalar/eq.out index ccc78b91bf..768b712f68 100644 --- a/tests/expectations/compiler/compiler/scalar/eq.out +++ b/tests/expectations/compiler/compiler/scalar/eq.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: fbb9f33bc5cf7fd11341e6dc1d12d4899274f3bee34dd64590ffd3c9438a61a5 - initial_ast: 110f00451cdf3af4c1befda6c1a97f4b09fa1d1656ac037f225249e3a3e6000e + initial_ast: 3c6fedc6ebc9745fecaace4a3ab6a8b4c09f7308340bb6501888d30f8e2614af diff --git a/tests/expectations/compiler/compiler/scalar/group_mul.out b/tests/expectations/compiler/compiler/scalar/group_mul.out index 82338f84f6..56511f9e20 100644 --- a/tests/expectations/compiler/compiler/scalar/group_mul.out +++ b/tests/expectations/compiler/compiler/scalar/group_mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: cb1157ee8277e48e0316befc327c4f0504659c2fd64e6efeedb7dcd9722c7a7e - initial_ast: e1964446af946d772d62558a03503a43f8ddc7a1c6e517ee30e7305a140c09db + initial_ast: b9c152b866e00dc8f2acc299c4044ba29d6ece834741192b006e411af5dc57bf diff --git a/tests/expectations/compiler/compiler/scalar/mul.out b/tests/expectations/compiler/compiler/scalar/mul.out index a264363a5a..04bca964fd 100644 --- a/tests/expectations/compiler/compiler/scalar/mul.out +++ b/tests/expectations/compiler/compiler/scalar/mul.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c528268c53f01e78fbbc8af3ed5e0dc1d4e9b9f28644c597167971edef764cf0 - initial_ast: 9ebc007363e99914d5b5ab3519ee40d49fabb61db7ae8a68395a5ff25afc3a1a + initial_ast: 5035ac94ab6b76456669953d6e1f458a3e9979b954590613f08b5e27ad077421 diff --git a/tests/expectations/compiler/compiler/scalar/operator_methods.out b/tests/expectations/compiler/compiler/scalar/operator_methods.out index 6dcdbe210d..e07a90a969 100644 --- a/tests/expectations/compiler/compiler/scalar/operator_methods.out +++ b/tests/expectations/compiler/compiler/scalar/operator_methods.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 351e1f9f8fc577b89a037d3e52eddc9c932782274c1b19b090efb266439d7ab5 - initial_ast: ad1ba77e3c854d91bfa578b068a35036f3043e8312ebf9c86db6104c4d25e0c9 + initial_ast: a2a89edd24ae97d03e29ca80cd3e7053356935dd45854b2a0df4bc8d7d6746bf diff --git a/tests/expectations/compiler/compiler/scalar/scalar.out b/tests/expectations/compiler/compiler/scalar/scalar.out index 25e40a9976..877fbe2053 100644 --- a/tests/expectations/compiler/compiler/scalar/scalar.out +++ b/tests/expectations/compiler/compiler/scalar/scalar.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 28228b87fcb43040ca2c4a6c9e6539642323a9f64d837a6de7f579b17ceb1da4 - initial_ast: 501cd588698e4c37e5e5f2ed272903f6e2277ec865c059df1a2a4526a35ccfcd + initial_ast: ec2b0687b2c29d8015db91638571e7d8f99b6f61e9b4ec944f15452298c361cf diff --git a/tests/expectations/compiler/compiler/scalar/ternary.out b/tests/expectations/compiler/compiler/scalar/ternary.out index f84108ed64..b0e80f4319 100644 --- a/tests/expectations/compiler/compiler/scalar/ternary.out +++ b/tests/expectations/compiler/compiler/scalar/ternary.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: fbb9f33bc5cf7fd11341e6dc1d12d4899274f3bee34dd64590ffd3c9438a61a5 - initial_ast: 6b5149b93e9b42a66dabf3a1e041f6fa506c41d7c37eb14d7699c33abdac247b + initial_ast: e60e13c0a9b417c9b1ef8cbc14cf239fa1a7eefdad4b1a7dca288953ad3d6ffb diff --git a/tests/expectations/compiler/compiler/statements/all_loops.out b/tests/expectations/compiler/compiler/statements/all_loops.out index 835fd8db4e..9fd63d0708 100644 --- a/tests/expectations/compiler/compiler/statements/all_loops.out +++ b/tests/expectations/compiler/compiler/statements/all_loops.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 2f21b4d5dc1058106889da0975de69c33e29bb184dace42559ad3e4da5140d21 - initial_ast: 72d72a8e2719419f4fde8b2ef6b4600d9056efe736df419c8c426e9279dfe807 + initial_ast: 14600ee95a2b8b251154d6ecb939fbaa47c1528b35bba30c27cd2838f70c3bca diff --git a/tests/expectations/compiler/compiler/statements/block.out b/tests/expectations/compiler/compiler/statements/block.out index 15abdae716..5de3b35aa8 100644 --- a/tests/expectations/compiler/compiler/statements/block.out +++ b/tests/expectations/compiler/compiler/statements/block.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 198eb7d80bc19a6592fb460e0cebcbe3f5078d54990fffc59c7df12b184b7f45 - initial_ast: cf7ed47dfec89e9218f8ccb717a749c9477392dbfc53de8f32627490312ff7cb + initial_ast: cfcefc8cbabd3998a381143316bed9df0f5509551c3cd78c9cc2f59dd208194a diff --git a/tests/expectations/compiler/compiler/statements/chain.out b/tests/expectations/compiler/compiler/statements/chain.out index 7af3db9192..44f48c9735 100644 --- a/tests/expectations/compiler/compiler/statements/chain.out +++ b/tests/expectations/compiler/compiler/statements/chain.out @@ -6,4 +6,4 @@ outputs: - initial_input_ast: fe5796b8d715bb6171a2512556ac35483e41e87c7ea0245d879d4af6a2cc5a53 - initial_input_ast: 96ab541d4a0830d109dd74d3f3bff3b1e50a1ecea05334bb6042b71a6f15cf94 - initial_input_ast: f2d89f71957ad254e7693b39d829d0728443e2fe3a2664295fa83fe97bda12ca - initial_ast: 932158cc78956ff54049a8372c266737c8eb0ea98268a818691877412739d59a + initial_ast: 3b8e9273f2950ced7d696579c95f91ba884c1daa58a44eb71d6271b4083a89f1 diff --git a/tests/expectations/compiler/compiler/statements/compare_diff_types_fail.out b/tests/expectations/compiler/compiler/statements/compare_diff_types_fail.out index b752c331a9..4930a49eb8 100644 --- a/tests/expectations/compiler/compiler/statements/compare_diff_types_fail.out +++ b/tests/expectations/compiler/compiler/statements/compare_diff_types_fail.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: fb915314d9b78be969b79981f55977bf7ef662c72c93184cf0e60788575f763a - initial_ast: 0a313845582b4929789b314c5b8ac3f516b1aa01e34f1ec6009c0dc144f92616 + initial_ast: 954ca3d5be05532fe75bcafef966d946bcdd203a48664f5542fd169c729396d1 diff --git a/tests/expectations/compiler/compiler/statements/for_loop.out b/tests/expectations/compiler/compiler/statements/for_loop.out index d0836a69dc..f2491c2111 100644 --- a/tests/expectations/compiler/compiler/statements/for_loop.out +++ b/tests/expectations/compiler/compiler/statements/for_loop.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 9fe934b08244cf726123179e290ddfd645bb8b283579741664055ea576b4800f - initial_ast: 59e060022eb735e5e9c9391f9da56dd48c463ed1b2c0b14ec89d6db80859d2ac + initial_ast: ee96997df4407cf737b75a6697f8ebf56e1955806416e36d3b95ab80b50def0c diff --git a/tests/expectations/compiler/compiler/statements/iteration_basic.out b/tests/expectations/compiler/compiler/statements/iteration_basic.out index 14d5114a54..0cb083ac07 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_basic.out +++ b/tests/expectations/compiler/compiler/statements/iteration_basic.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: a07781bcb6b37246cd6b048878a0951cc90bb0f2a4fc05e2fb36b0e16928f37f - initial_ast: c7a14971408cb0fff82d8c45417c93dfa2d36254b21c1b55610a3527a49f6afe + initial_ast: e3071f3dad06091b65b3bd013683438812745d44d8a1700c58e818c3758a8a79 diff --git a/tests/expectations/compiler/compiler/statements/iteration_variable.out b/tests/expectations/compiler/compiler/statements/iteration_variable.out index c24c057927..060356b4b9 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_variable.out +++ b/tests/expectations/compiler/compiler/statements/iteration_variable.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: c918ce1ffc15cd823113a571123910dde670829e3fd04a22ca6f3fed8fd16eb4 - initial_ast: 3ff81ead4edb3474008c23b7c146d12138cd4c19d3bb6479fe2e45965ea12eb7 + initial_ast: e0a4ec3f7c0f3d6f1944ad7828da40cc547b20f5f239d22b9289a16f3e1d2677 diff --git a/tests/expectations/compiler/compiler/statements/multiple_returns.out b/tests/expectations/compiler/compiler/statements/multiple_returns.out index 9193685f78..466a6f39d0 100644 --- a/tests/expectations/compiler/compiler/statements/multiple_returns.out +++ b/tests/expectations/compiler/compiler/statements/multiple_returns.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 198eb7d80bc19a6592fb460e0cebcbe3f5078d54990fffc59c7df12b184b7f45 - initial_input_ast: e8c168b68e9259dd1cbe1810a54c0523005878e57bbeaa9d4493191347d62fe2 - initial_ast: 00624c4b4091d0e5812c3682e44b6973f327a74df02482434edbda0b10f71371 + initial_ast: dc17ebd4b209abfb96468197e8d580f8f85ea39fca3874707aa3c2e012f727c4 diff --git a/tests/expectations/compiler/compiler/statements/mutate.out b/tests/expectations/compiler/compiler/statements/mutate.out index afb4371e2b..a823f00025 100644 --- a/tests/expectations/compiler/compiler/statements/mutate.out +++ b/tests/expectations/compiler/compiler/statements/mutate.out @@ -5,4 +5,4 @@ outputs: - output: - initial_input_ast: 1616955974a4cb7c759158043772f241d043e67ed0063818c456aa1fae054b0c - initial_input_ast: 9ebf6d54b77d669ce67d3574d054a2bab06b159b077cb1b30e9014575badbc3b - initial_ast: 62081a8f0aba9dae78c9baae1b8333743581880f37eb051147b48789d929551b + initial_ast: b7a080bb04b8a6d17ea14ecd8137818eed0b2bdeda52290f606da68a3f8a9d74 diff --git a/tests/expectations/compiler/compiler/statements/ternary_explicit_and_implicit.out b/tests/expectations/compiler/compiler/statements/ternary_explicit_and_implicit.out index 88c9a9ad9c..686560630e 100644 --- a/tests/expectations/compiler/compiler/statements/ternary_explicit_and_implicit.out +++ b/tests/expectations/compiler/compiler/statements/ternary_explicit_and_implicit.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: ecc54967dfe1b2c067baa1fe6d2dfababe2a728338906c482b6582c25dd5cb0f - initial_ast: 2810ef0ebe18a03a525672e448d6ed0d949fd9f3b2ddaea971f1785537d7ca4b + initial_ast: 9cbdcd59c50ea1d3e3b94a18fa500afe6be0162f3a4cde22410fa92277252c51 diff --git a/tests/expectations/compiler/compiler/tuple/access.out b/tests/expectations/compiler/compiler/tuple/access.out index fda1595286..46c3986459 100644 --- a/tests/expectations/compiler/compiler/tuple/access.out +++ b/tests/expectations/compiler/compiler/tuple/access.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 28dc123e02031e0415c48db81dce6750f03d8b4e47f97038dd3a1e808cc9b255 - initial_ast: d539e763bc9610a6090f222c2e73908ed607e40fc326f6f2a639ef762aeb8b58 + initial_ast: 154029c2cd9828133be092298c3df5dfc263c252f95662ad3cf92dc0be7f4508 diff --git a/tests/expectations/compiler/compiler/tuple/function_return.out b/tests/expectations/compiler/compiler/tuple/function_return.out index bffddad618..04727aa747 100644 --- a/tests/expectations/compiler/compiler/tuple/function_return.out +++ b/tests/expectations/compiler/compiler/tuple/function_return.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 99be02d0d987d66d7bcac961871997df93d22a28989a08cb71ce2ea65528b6e6 - initial_ast: 6f8a109c723a892e2b3dc61071a5330fa6827fb15bea0ed6e1f52bf40f60f8cf + initial_ast: c6bfa13ff08db306494c455281d27628dcee1f3f73291de210b690c6e652d522 diff --git a/tests/expectations/parser/parser/expression/literal/comment.out b/tests/expectations/parser/parser/expression/literal/comment.out index 21d676cd77..c191af45a8 100644 --- a/tests/expectations/parser/parser/expression/literal/comment.out +++ b/tests/expectations/parser/parser/expression/literal/comment.out @@ -3,6 +3,7 @@ namespace: Parse expectation: Pass outputs: - name: "" + network: "" expected_input: [] functions: {} circuits: {} diff --git a/tests/expectations/parser/parser/functions/const_input.out b/tests/expectations/parser/parser/functions/const_input.out index 03dfda29f0..2837120d8a 100644 --- a/tests/expectations/parser/parser/functions/const_input.out +++ b/tests/expectations/parser/parser/functions/const_input.out @@ -3,6 +3,7 @@ namespace: Parse expectation: Pass outputs: - name: "" + network: "" expected_input: [] functions: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":12}\"}": diff --git a/tests/expectations/parser/parser/functions/const_param.out b/tests/expectations/parser/parser/functions/const_param.out index aee1679873..031a69bc3e 100644 --- a/tests/expectations/parser/parser/functions/const_param.out +++ b/tests/expectations/parser/parser/functions/const_param.out @@ -3,6 +3,7 @@ namespace: Parse expectation: Pass outputs: - name: "" + network: "" expected_input: [] functions: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":12}\"}": diff --git a/tests/expectations/parser/parser/functions/empty2.out b/tests/expectations/parser/parser/functions/empty2.out index e44e4c6b66..65e0d7242e 100644 --- a/tests/expectations/parser/parser/functions/empty2.out +++ b/tests/expectations/parser/parser/functions/empty2.out @@ -3,6 +3,7 @@ namespace: Parse expectation: Pass outputs: - name: "" + network: "" expected_input: [] functions: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":12}\"}": diff --git a/tests/expectations/parser/parser/functions/params.out b/tests/expectations/parser/parser/functions/params.out index 4e0e4b6ff3..058a81d6fd 100644 --- a/tests/expectations/parser/parser/functions/params.out +++ b/tests/expectations/parser/parser/functions/params.out @@ -3,6 +3,7 @@ namespace: Parse expectation: Pass outputs: - name: "" + network: "" expected_input: [] functions: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":12}\"}": diff --git a/tests/expectations/parser/parser/functions/params_return.out b/tests/expectations/parser/parser/functions/params_return.out index 36c9a9f248..b91bff254c 100644 --- a/tests/expectations/parser/parser/functions/params_return.out +++ b/tests/expectations/parser/parser/functions/params_return.out @@ -3,6 +3,7 @@ namespace: Parse expectation: Pass outputs: - name: "" + network: "" expected_input: [] functions: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":12}\"}": diff --git a/tests/expectations/parser/parser/functions/public_param.out b/tests/expectations/parser/parser/functions/public_param.out index 7db82ec75c..d71bfd336f 100644 --- a/tests/expectations/parser/parser/functions/public_param.out +++ b/tests/expectations/parser/parser/functions/public_param.out @@ -3,6 +3,7 @@ namespace: Parse expectation: Pass outputs: - name: "" + network: "" expected_input: [] functions: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":12}\"}": diff --git a/tests/expectations/parser/parser/functions/return.out b/tests/expectations/parser/parser/functions/return.out index 2a7224c915..742d76d96a 100644 --- a/tests/expectations/parser/parser/functions/return.out +++ b/tests/expectations/parser/parser/functions/return.out @@ -3,6 +3,7 @@ namespace: Parse expectation: Pass outputs: - name: "" + network: "" expected_input: [] functions: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":12}\"}": diff --git a/tests/expectations/parser/parser/serialize/one_plus_one.out b/tests/expectations/parser/parser/serialize/one_plus_one.out index 68f2c1f0a1..05235385a8 100644 --- a/tests/expectations/parser/parser/serialize/one_plus_one.out +++ b/tests/expectations/parser/parser/serialize/one_plus_one.out @@ -3,6 +3,7 @@ namespace: Serialize expectation: Pass outputs: - name: "" + network: "" expected_input: [] functions: "{\"name\":\"main\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":15}\"}": From 7bbd70423d168e16e5bc386d0d65d0d1c4eb43f9 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 15:47:56 -0700 Subject: [PATCH 26/43] fix panic hook --- leo/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leo/main.rs b/leo/main.rs index 9550b06e42..368cd2b0e5 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -108,7 +108,7 @@ fn set_panic_hook() { "note: compiler args: {}\n", std::env::args().collect::>().join(" ") ); - eprintln!("note: compiler flags: {:?}\n", Opt::parse()); + eprintln!("note: compiler flags: {:?}\n", CLI::parse()); }) }); } From a9992bc6d40d0dff92788e7b3994cf416894c2fc Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:19:58 -0700 Subject: [PATCH 27/43] remove unused code --- .../disabled_tests/compiler/address/index.leo | 12 - .../alias_circuit_namespace_conflict_fail.leo | 17 - ...alias_function_namespace_conflict_fail.leo | 14 - ...bal_const_namespace_conflict_fail copy.leo | 14 - .../disabled_tests/compiler/aliases/arith.leo | 17 - .../disabled_tests/compiler/aliases/basic.leo | 19 - .../compiler/aliases/circuit.leo | 25 - .../compiler/aliases/duplicate_name_fail.leo | 13 - .../compiler/aliases/fn_return.leo | 23 - .../compiler/aliases/inputs/basic.in | 6 - .../compiler/aliases/inputs/dummy.in | 5 - .../aliases/inputs/wrong_type_assign_fail.in | 6 - .../compiler/aliases/shadowing_arg.leo | 12 - .../aliases/shadowing_var_allowed.leo | 14 - .../aliases/wrong_type_assign_fail.leo | 14 - .../array/array_range_access_fail.leo | 12 - .../compiler/array/array_size_zero_fail.leo | 9 - .../compiler/array/complex_access.leo | 35 - .../compiler/array/equal_initializer.leo | 11 - .../compiler/array/equal_initializer_2.leo | 11 - .../array/input/array_range_access_fail.in | 2 - .../compiler/array/input/complex_access.in | 9 - .../compiler/array/input/count_to_6.in | 5 - .../compiler/array/input/dummy.in | 6 - .../compiler/array/input/initializer_fail.in | 5 - .../compiler/array/input/input_nested_3x2.in | 5 - .../array/input/input_nested_3x2_fail.in | 5 - .../compiler/array/input/input_tuple_3x2.in | 5 - .../array/input/input_tuple_3x2_fail.in | 5 - .../compiler/array/input/registers_ones.in | 8 - .../compiler/array/input/registers_zeros.in | 8 - .../compiler/array/input/six_zeros.in | 5 - .../compiler/array/input/three_ones.in | 5 - .../input/type_nested_value_nested_3x2.in | 6 - .../type_nested_value_nested_3x2_fail.in | 5 - .../input/type_nested_value_nested_4x3x2.in | 5 - .../type_nested_value_nested_4x3x2_fail.in | 5 - .../input/type_nested_value_tuple_3x2.in | 5 - .../input/type_nested_value_tuple_3x2_fail.in | 5 - .../input/type_nested_value_tuple_4x3x2.in | 5 - .../type_nested_value_tuple_4x3x2_fail.in | 5 - .../input/type_tuple_value_nested_3x2.in | 5 - .../input/type_tuple_value_nested_3x2_fail.in | 5 - .../input/type_tuple_value_nested_4x3x2.in | 5 - .../type_tuple_value_nested_4x3x2_fail.in | 5 - .../array/input/type_tuple_value_tuple_3x2.in | 5 - .../input/type_tuple_value_tuple_3x2_fail.in | 5 - .../input/type_tuple_value_tuple_4x3x2.in | 5 - .../type_tuple_value_tuple_4x3x2_fail.in | 5 - .../compiler/array/input_nested_3x2.leo | 9 - .../compiler/array/input_nested_3x2_fail.leo | 9 - .../compiler/array/input_tuple_3x2.leo | 9 - .../compiler/array/input_tuple_3x2_fail.leo | 9 - .../compiler/array/multi_fail_initializer.leo | 10 - .../compiler/array/multi_fail_inline.leo | 11 - .../compiler/array/multi_initializer.leo | 12 - .../compiler/array/multi_initializer_fail.leo | 10 - .../disabled_tests/compiler/array/nested.leo | 12 - .../compiler/array/nested_3x2_value.leo | 13 - .../compiler/array/nested_3x2_value_fail.leo | 12 - .../compiler/array/registers.leo | 11 - .../disabled_tests/compiler/array/slice.leo | 11 - .../compiler/array/slice_lower.leo | 14 - .../disabled_tests/compiler/array/spread.leo | 14 - .../compiler/array/ternary_in_array.leo | 10 - .../compiler/array/tuple_3x2_value.leo | 13 - .../compiler/array/tuple_3x2_value_fail.leo | 9 - .../compiler/array/type_fail.leo | 8 - .../compiler/array/type_input_3x2.leo | 11 - .../compiler/array/type_input_4x3x2.leo | 14 - .../array/type_nested_value_nested_3x2.leo | 12 - .../type_nested_value_nested_3x2_fail.leo | 8 - .../array/type_nested_value_nested_4x3x2.leo | 16 - .../type_nested_value_nested_4x3x2_fail.leo | 8 - .../array/type_nested_value_tuple_3x2.leo | 12 - .../type_nested_value_tuple_3x2_fail.leo | 8 - .../array/type_nested_value_tuple_4x3x2.leo | 16 - .../type_nested_value_tuple_4x3x2_fail.leo | 8 - .../array/type_tuple_value_nested_3x2.leo | 13 - .../type_tuple_value_nested_3x2_fail.leo | 9 - .../array/type_tuple_value_nested_4x3x2.leo | 16 - .../type_tuple_value_nested_4x3x2_fail.leo | 8 - .../array/type_tuple_value_tuple_3x2.leo | 13 - .../array/type_tuple_value_tuple_3x2_fail.leo | 8 - .../array/type_tuple_value_tuple_4x3x2.leo | 16 - .../type_tuple_value_tuple_4x3x2_fail.leo | 8 - .../compiler/array/variable_slice_fail.leo | 12 - .../disabled_tests/compiler/char/circuit.leo | 31 - .../compiler/char/nonprinting.leo | 79 -- .../compiler/char/output/output_char.out | 2 - .../big_self_in_circuit_replacement.leo | 33 - .../big_self_outside_circuit_fail.leo | 21 - .../circuit_alias_namespace_conflict_fail.leo | 16 - ...rcuit_function_namespace_conflict_fail.leo | 16 - ...bal_const_namespace_conflict_fail copy.leo | 16 - .../compiler/circuits/const_self_variable.leo | 19 - .../circuits/const_self_variable_fail.leo | 18 - ...define_circuit_inside_circuit_function.leo | 27 - .../circuits/duplicate_name_context.leo | 21 - .../compiler/circuits/inline.leo | 20 - .../compiler/circuits/inline_fail.leo | 13 - .../compiler/circuits/inline_member_fail.leo | 13 - .../compiler/circuits/inline_member_pass.leo | 29 - .../compiler/circuits/inline_undefined.leo | 8 - .../compiler/circuits/input/dummy.in | 6 - .../compiler/circuits/member_function.leo | 19 - .../circuits/member_function_fail.leo | 15 - .../circuits/member_function_invalid.leo | 15 - .../circuits/member_function_nested.leo | 30 - .../circuits/member_static_function.leo | 17 - .../member_static_function_invalid.leo | 14 - .../member_static_function_nested.leo | 23 - .../member_static_function_undefined.leo | 14 - .../compiler/circuits/member_variable.leo | 15 - .../circuits/member_variable_and_function.leo | 20 - .../circuits/member_variable_fail.leo | 13 - .../compiler/circuits/mut_function_fail.leo | 16 - .../circuits/mut_self_function_fail.leo | 20 - .../mut_self_static_function_fail.leo | 20 - .../compiler/circuits/mut_self_variable.leo | 22 - .../circuits/mut_self_variable_branch.leo | 26 - .../mut_self_variable_conditional.leo | 23 - .../circuits/mut_self_variable_fail.leo | 18 - .../circuits/mut_static_function_fail.leo | 14 - .../compiler/circuits/mut_variable.leo | 18 - .../compiler/circuits/mut_variable_fail.leo | 14 - .../mutable_call_immutable_context.leo | 29 - .../compiler/circuits/pedersen_mock.leo | 37 - .../circuits/return_self_type_array.leo | 15 - .../circuits/return_self_type_tuple.leo | 15 - .../compiler/circuits/self_circuit.leo | 15 - .../compiler/circuits/self_fail.leo | 8 - .../compiler/circuits/self_member.leo | 20 - .../compiler/circuits/self_member_invalid.leo | 17 - .../circuits/self_member_undefined.leo | 15 - .../console/log_parameter_empty_fail.leo | 8 - .../console/log_parameter_none_fail.leo | 8 - .../compiler/function/array_input.leo | 13 - .../function/array_params_direct_call.leo | 17 - .../compiler/function/empty.leo | 12 - ...function_alias_namespace_conflict_fail.leo | 14 - ...nction_circuit_namespace_conflict_fail.leo | 16 - ...bal_const_namespace_conflict_fail copy.leo | 14 - .../compiler/function/multiple_returns.leo | 15 - .../function/multiple_returns_fail.leo | 10 - .../multiple_returns_fail_conditional.leo | 15 - .../function/multiple_returns_main.leo | 9 - .../compiler/function/newlines.leo | 15 - .../function/return_array_nested_fail.leo | 13 - .../function/return_array_nested_pass.leo | 19 - .../function/return_array_tuple_fail.leo | 13 - .../function/return_array_tuple_pass.leo | 19 - .../compiler/function/return_tuple.leo | 25 - .../function/return_tuple_conditional.leo | 23 - .../shadow_global_const_input_fail copy.leo | 12 - .../function/shadow_global_const_var_fail.leo | 13 - .../compiler/function/value_unchanged.leo | 25 - ...al_const_alias_namespace_conflict_fail.leo | 14 - ...t_circuit_namespace_conflict_fail copy.leo | 16 - ...const_function_namespace_conflict_fail.leo | 14 - .../global_consts/global_const_types.leo | 55 -- .../compiler/global_consts/inputs/dummy.in | 6 - .../global_consts/modify_global_const.leo | 11 - .../imports/dependency/inputs/dependency.in | 3 - .../imports/dependency/src/main.leo | 5 - .../compiler/import_dependency/input/dummy.in | 6 - .../compiler/import_dependency/readme.md | 8 - .../tests/import_dependency_folder.leo | 12 - .../compiler/import_local/import_all.leo | 18 - .../compiler/import_local/import_as.leo | 12 - .../compiler/import_local/import_dir.leo | 12 - .../compiler/import_local/import_files.leo | 12 - .../compiler/import_local/import_many.leo | 17 - .../import_local/import_weird_names.leo | 12 - .../import_weird_names_nested.leo | 12 - .../compiler/import_local/input/dummy.in | 6 - .../import_local/local_imports/a-9.leo | 0 .../import_local/local_imports/circuits.leo | 18 - .../import_local/local_imports/lib.leo | 3 - .../import_local/local_imports/nested/c-d.leo | 7 - .../local_imports/nested/hello.leo | 3 - .../compiler/import_old/alias.leo | 10 - .../compiler/import_old/basic.leo | 10 - .../compiler/import_old/imports/a-9.leo | 1 - .../compiler/import_old/imports/a0-f.leo | 1 - .../import_old/imports/bar/.gitignore | 1 - .../compiler/import_old/imports/bar/Leo.toml | 3 - .../import_old/imports/bar/src/bat/bat.leo | 3 - .../import_old/imports/bar/src/baz.leo | 9 - .../import_old/imports/bar/src/lib.leo | 3 - .../import_old/imports/car/.gitignore | 1 - .../compiler/import_old/imports/car/Leo.toml | 3 - .../import_old/imports/car/src/lib.leo | 3 - .../import_old/imports/hello-world.leo | 1 - .../compiler/import_old/imports/lib.leo | 3 - .../import_old/imports/test-import.leo | 11 - .../compiler/import_old/input/dummy.in | 5 - .../compiler/import_old/many_import.leo | 31 - .../compiler/import_old/many_import_star.leo | 24 - .../compiler/import_old/multiple.leo | 15 - .../compiler/import_old/names.leo | 12 - .../compiler/import_old/names_a_dash_fail.leo | 10 - .../compiler/import_old/names_dash_a_fail.leo | 10 - .../compiler/import_old/names_dollar_fail.leo | 10 - .../import_old/names_underscore_fail.leo | 10 - .../compiler/import_old/star.leo | 12 - .../compiler/import_old/star_fail.leo | 9 - .../compiler/import_old/string_import.leo | 12 - .../different_types_const_signed_fail.leo | 9 - .../different_types_fail_signed.leo | 9 - .../different_types_unsigned_fail.leo | 9 - .../input_files/program_input/main_array.leo | 9 - .../program_input/main_array_fail.leo | 9 - .../input_files/program_input/main_char.leo | 9 - .../main_multi_dimension_array.leo | 14 - .../program_input/main_multiple.leo | 9 - .../input_files/program_input/main_string.leo | 9 - .../input_files/program_input/main_tuple.leo | 9 - .../program_input/main_tuple_fail.leo | 9 - .../program_input/non_const_input_const.leo | 9 - .../program_input_and_program_state/basic.leo | 10 - .../input/basic.in | 5 - .../input/basic.state | 12 - .../input/token_withdraw.in | 7 - .../input/token_withdraw.state | 24 - .../token_withdraw.leo | 14 - .../program_input_constants/input/main.in | 8 - .../input/main_array.in | 8 - .../input/main_array_fail.in | 2 - .../input/main_char.in | 8 - .../input/main_fail_name.in | 2 - .../input/main_fail_type.in | 2 - .../input/main_field.in | 9 - .../input/main_group.in | 10 - .../input/main_multi_dimension_array.in | 8 - .../input/main_multiple.in | 9 - .../input/main_string.in | 8 - .../input/main_tuple.in | 8 - .../input/main_tuple_fail.in | 2 - .../program_input_constants/main_array.leo | 10 - .../main_array_fail.leo | 9 - .../program_input_constants/main_char.leo | 9 - .../main_multi_dimension_array.leo | 9 - .../program_input_constants/main_multiple.leo | 9 - .../program_input_constants/main_string.leo | 9 - .../main_tuple_fail.leo | 9 - .../program_registers/input/array.in | 5 - .../program_registers/input/main.in | 5 - .../program_registers/registers_array.leo | 9 - .../program_registers/registers_fail.leo | 9 - .../program_registers/registers_pass.leo | 9 - .../input_files/program_state/access_all.leo | 13 - .../program_state/access_state.leo | 10 - .../input_files/program_state/basic.leo | 10 - .../program_state/input/basic.state | 10 - .../input_files/program_state/input/dummy.in | 5 - .../program_state/input/section_invalid.state | 4 - .../input/section_undefined.state | 4 - .../program_state/input/token_withdraw.state | 24 - .../program_state/input/visibility_fail.state | 1 - .../program_state/section_invalid.leo | 10 - .../program_state/section_undefined.leo | 10 - .../program_state/visibility_fail.leo | 10 - .../compiler/integers/i128/max_fail.leo | 8 - .../compiler/integers/i128/min_fail.leo | 8 - .../compiler/integers/i128/negate_min.leo | 11 - .../compiler/integers/i16/max_fail.leo | 8 - .../compiler/integers/i16/min_fail.leo | 8 - .../compiler/integers/i16/negate_min_fail.leo | 11 - .../compiler/integers/i32/max_fail.leo | 8 - .../compiler/integers/i32/min_fail.leo | 8 - .../compiler/integers/i32/negate_min.leo | 11 - .../compiler/integers/i64/max_fail.leo | 8 - .../compiler/integers/i64/min_fail.leo | 8 - .../compiler/integers/i64/negate_min.leo | 11 - .../compiler/integers/i8/max_fail.leo | 8 - .../compiler/integers/i8/min_fail.leo | 8 - .../compiler/integers/i8/negate_min.leo | 12 - .../compiler/integers/u16/max_fail.leo | 8 - .../compiler/integers/u16/min_fail.leo | 8 - .../compiler/integers/u32/max_fail.leo | 8 - .../compiler/integers/u32/min_fail.leo | 8 - .../compiler/integers/u64/max_fail.leo | 8 - .../compiler/integers/u64/min_fail.leo | 8 - .../compiler/integers/u8/max_fail.leo | 8 - .../compiler/integers/u8/min_fail.leo | 8 - .../compiler/mutability/array_dyn_mut.leo | 15 - .../mutability/array_dyn_mut_indirect.leo | 15 - .../compiler/mutability/array_fail.leo | 9 - .../compiler/mutability/array_mut.leo | 12 - .../compiler/mutability/array_splice_mut.leo | 15 - .../compiler/mutability/array_tuple_mut.leo | 14 - .../compiler/mutability/circuit_fail.leo | 14 - .../mutability/circuit_function_const.leo | 22 - .../mutability/circuit_function_mut.leo | 22 - .../circuit_static_function_mut_fail.leo | 13 - .../mutability/circuit_variable_mut.leo | 17 - .../compiler/mutability/const.leo | 10 - .../compiler/mutability/function_input.leo | 10 - .../compiler/mutability/let_fail.leo | 10 - .../compiler/mutability/swap.leo | 21 - .../statements/compound_assignment.leo | 45 -- .../compiler/statements/nested_mutate.leo | 21 - .../compiler/statements/reverse_loops.leo | 19 - .../compiler/statements/reverse_one.leo | 19 - .../statements/ternary_non_const_fail.leo | 9 - .../stdlib/core_circuit_star_fail.leo | 8 - .../compiler/stdlib/core_package_invalid.leo | 8 - .../stdlib/core_unstable_package_invalid.leo | 8 - .../compiler/stdlib/strings.leo | 15 - .../compiler/string/circuit.leo | 22 - .../compiler/string/equality.leo | 17 - .../compiler/string/inputs/string.in | 6 - .../compiler/string/inputs/string_out.in | 5 - .../compiler/string/inputs/two.in | 5 - .../compiler/string/inputs/weird.in | 6 - .../compiler/string/replace.leo | 12 - .../compiler/string/string_transformation.leo | 14 - .../disabled_tests/compiler/tuples/access.leo | 13 - .../disabled_tests/compiler/tuples/basic.leo | 11 - .../compiler/tuples/dependent.leo | 11 - .../compiler/tuples/destructured.leo | 11 - .../compiler/tuples/inputs/true_true.in | 6 - .../compiler/tuples/nested_access.leo | 11 - .../disabled_tests/parser/circuits/consts.leo | 9 - .../parser/circuits/field_and_functions.leo | 16 - .../parser/expression/access/array_access.leo | 14 - .../expression/access/array_range_access.leo | 22 - .../parser/expression/access/call.leo | 15 - .../parser/expression/access/circuit.leo | 11 - .../expression/access/circuit_static.leo | 11 - .../parser/expression/array_init.leo | 18 - .../parser/expression/array_inline.leo | 24 - .../parser/expression/array_len.leo | 16 - .../parser/expression/tuple.leo | 19 - .../disabled_tests/parser/import/alias.leo | 6 - .../disabled_tests/parser/import/basic.leo | 8 - .../parser/import/import_empty_list_fail.leo | 8 - .../disabled_tests/parser/import/invalid.leo | 7 - .../parser/import/keyword_fail.leo | 8 - .../parser/import/many_import.leo | 15 - .../parser/import/many_import_star.leo | 14 - .../disabled_tests/parser/import/names.leo | 10 - .../parser/import/names_underscore.leo | 6 - .../disabled_tests/parser/import/star.leo | 6 - .../parser/input/input_success.leo | 34 - .../parser/serialize/linear_regression.leo | 70 -- .../parser/serialize/palindrome.leo | 64 -- .../parser/serialize/pedersen_hash.leo | 30 - .../src/canonicalization/canonicalizer.rs | 707 ------------------ compiler/passes/src/canonicalization/mod.rs | 31 - .../passes/src/import_resolution/importer.rs | 129 ---- compiler/passes/src/import_resolution/mod.rs | 21 - .../passes/src/import_resolution/resolver.rs | 63 -- compiler/passes/src/lib.rs | 10 - leo/commands/unused/README.md | 3 - leo/commands/unused/deploy.rs | 43 -- leo/commands/unused/init.rs | 66 -- leo/commands/unused/lint.rs | 43 -- leo/commands/unused/package/add.rs | 163 ---- leo/commands/unused/package/clone.rs | 157 ---- leo/commands/unused/package/fetch.rs | 144 ---- leo/commands/unused/package/login.rs | 125 ---- leo/commands/unused/package/logout.rs | 47 -- leo/commands/unused/package/mod.rs | 38 - leo/commands/unused/package/publish.rs | 99 --- leo/commands/unused/package/remove.rs | 57 -- leo/commands/unused/prove.rs | 80 -- leo/commands/unused/setup.rs | 143 ---- leo/commands/unused/test.rs | 140 ---- leo/commands/unused/update.rs | 101 --- leo/commands/unused/watch.rs | 87 --- leo/package/src/unused/directory.rs | 54 -- leo/package/src/unused/lock_file.rs | 159 ---- leo/package/src/unused/manifest.rs | 271 ------- leo/package/src/unused/pairs.rs | 103 --- leo/package/src/unused/proof.rs | 94 --- leo/package/src/unused/proving_key.rs | 96 --- leo/package/src/unused/state.rs | 118 --- leo/package/src/unused/verification_key.rs | 97 --- leo/unused/api.rs | 292 -------- leo/unused/config.rs | 177 ----- 382 files changed, 8264 deletions(-) delete mode 100644 compiler/disabled_tests/compiler/address/index.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/alias_circuit_namespace_conflict_fail.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/alias_function_namespace_conflict_fail.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/alias_global_const_namespace_conflict_fail copy.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/arith.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/basic.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/circuit.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/duplicate_name_fail.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/fn_return.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/inputs/basic.in delete mode 100644 compiler/disabled_tests/compiler/aliases/inputs/dummy.in delete mode 100644 compiler/disabled_tests/compiler/aliases/inputs/wrong_type_assign_fail.in delete mode 100644 compiler/disabled_tests/compiler/aliases/shadowing_arg.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/shadowing_var_allowed.leo delete mode 100644 compiler/disabled_tests/compiler/aliases/wrong_type_assign_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/array_range_access_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/array_size_zero_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/complex_access.leo delete mode 100644 compiler/disabled_tests/compiler/array/equal_initializer.leo delete mode 100644 compiler/disabled_tests/compiler/array/equal_initializer_2.leo delete mode 100644 compiler/disabled_tests/compiler/array/input/array_range_access_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/complex_access.in delete mode 100644 compiler/disabled_tests/compiler/array/input/count_to_6.in delete mode 100644 compiler/disabled_tests/compiler/array/input/dummy.in delete mode 100644 compiler/disabled_tests/compiler/array/input/initializer_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/input_nested_3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/input_nested_3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/input_tuple_3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/input_tuple_3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/registers_ones.in delete mode 100644 compiler/disabled_tests/compiler/array/input/registers_zeros.in delete mode 100644 compiler/disabled_tests/compiler/array/input/six_zeros.in delete mode 100644 compiler/disabled_tests/compiler/array/input/three_ones.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_nested_value_nested_3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_nested_value_nested_3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_nested_value_nested_4x3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_4x3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_4x3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in delete mode 100644 compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in delete mode 100644 compiler/disabled_tests/compiler/array/input_nested_3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/input_nested_3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/input_tuple_3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/input_tuple_3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/multi_fail_initializer.leo delete mode 100644 compiler/disabled_tests/compiler/array/multi_fail_inline.leo delete mode 100644 compiler/disabled_tests/compiler/array/multi_initializer.leo delete mode 100644 compiler/disabled_tests/compiler/array/multi_initializer_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/nested.leo delete mode 100644 compiler/disabled_tests/compiler/array/nested_3x2_value.leo delete mode 100644 compiler/disabled_tests/compiler/array/nested_3x2_value_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/registers.leo delete mode 100644 compiler/disabled_tests/compiler/array/slice.leo delete mode 100644 compiler/disabled_tests/compiler/array/slice_lower.leo delete mode 100644 compiler/disabled_tests/compiler/array/spread.leo delete mode 100644 compiler/disabled_tests/compiler/array/ternary_in_array.leo delete mode 100644 compiler/disabled_tests/compiler/array/tuple_3x2_value.leo delete mode 100644 compiler/disabled_tests/compiler/array/tuple_3x2_value_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_input_3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_input_4x3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_nested_value_nested_3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_nested_value_nested_3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_nested_value_nested_4x3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_nested_value_tuple_3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_nested_value_tuple_3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_nested_value_tuple_4x3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_tuple_value_nested_3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_tuple_value_nested_3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_tuple_value_nested_4x3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_tuple_value_tuple_3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_tuple_value_tuple_4x3x2.leo delete mode 100644 compiler/disabled_tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo delete mode 100644 compiler/disabled_tests/compiler/array/variable_slice_fail.leo delete mode 100644 compiler/disabled_tests/compiler/char/circuit.leo delete mode 100644 compiler/disabled_tests/compiler/char/nonprinting.leo delete mode 100644 compiler/disabled_tests/compiler/char/output/output_char.out delete mode 100644 compiler/disabled_tests/compiler/circuits/big_self_in_circuit_replacement.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/big_self_outside_circuit_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/circuit_alias_namespace_conflict_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/circuit_function_namespace_conflict_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/circuit_global_const_namespace_conflict_fail copy.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/const_self_variable.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/const_self_variable_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/define_circuit_inside_circuit_function.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/duplicate_name_context.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/inline.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/inline_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/inline_member_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/inline_member_pass.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/inline_undefined.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/input/dummy.in delete mode 100644 compiler/disabled_tests/compiler/circuits/member_function.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_function_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_function_invalid.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_function_nested.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_static_function.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_static_function_invalid.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_static_function_nested.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_static_function_undefined.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_variable.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_variable_and_function.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/member_variable_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_function_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_self_function_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_self_static_function_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_self_variable.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_self_variable_branch.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_self_variable_conditional.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_self_variable_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_static_function_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_variable.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mut_variable_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/mutable_call_immutable_context.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/pedersen_mock.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/return_self_type_array.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/return_self_type_tuple.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/self_circuit.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/self_fail.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/self_member.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/self_member_invalid.leo delete mode 100644 compiler/disabled_tests/compiler/circuits/self_member_undefined.leo delete mode 100644 compiler/disabled_tests/compiler/console/log_parameter_empty_fail.leo delete mode 100644 compiler/disabled_tests/compiler/console/log_parameter_none_fail.leo delete mode 100644 compiler/disabled_tests/compiler/function/array_input.leo delete mode 100644 compiler/disabled_tests/compiler/function/array_params_direct_call.leo delete mode 100644 compiler/disabled_tests/compiler/function/empty.leo delete mode 100644 compiler/disabled_tests/compiler/function/function_alias_namespace_conflict_fail.leo delete mode 100644 compiler/disabled_tests/compiler/function/function_circuit_namespace_conflict_fail.leo delete mode 100644 compiler/disabled_tests/compiler/function/function_global_const_namespace_conflict_fail copy.leo delete mode 100644 compiler/disabled_tests/compiler/function/multiple_returns.leo delete mode 100644 compiler/disabled_tests/compiler/function/multiple_returns_fail.leo delete mode 100644 compiler/disabled_tests/compiler/function/multiple_returns_fail_conditional.leo delete mode 100644 compiler/disabled_tests/compiler/function/multiple_returns_main.leo delete mode 100644 compiler/disabled_tests/compiler/function/newlines.leo delete mode 100644 compiler/disabled_tests/compiler/function/return_array_nested_fail.leo delete mode 100644 compiler/disabled_tests/compiler/function/return_array_nested_pass.leo delete mode 100644 compiler/disabled_tests/compiler/function/return_array_tuple_fail.leo delete mode 100644 compiler/disabled_tests/compiler/function/return_array_tuple_pass.leo delete mode 100644 compiler/disabled_tests/compiler/function/return_tuple.leo delete mode 100644 compiler/disabled_tests/compiler/function/return_tuple_conditional.leo delete mode 100644 compiler/disabled_tests/compiler/function/shadow_global_const_input_fail copy.leo delete mode 100644 compiler/disabled_tests/compiler/function/shadow_global_const_var_fail.leo delete mode 100644 compiler/disabled_tests/compiler/function/value_unchanged.leo delete mode 100644 compiler/disabled_tests/compiler/global_consts/global_const_alias_namespace_conflict_fail.leo delete mode 100644 compiler/disabled_tests/compiler/global_consts/global_const_circuit_namespace_conflict_fail copy.leo delete mode 100644 compiler/disabled_tests/compiler/global_consts/global_const_function_namespace_conflict_fail.leo delete mode 100644 compiler/disabled_tests/compiler/global_consts/global_const_types.leo delete mode 100644 compiler/disabled_tests/compiler/global_consts/inputs/dummy.in delete mode 100644 compiler/disabled_tests/compiler/global_consts/modify_global_const.leo delete mode 100644 compiler/disabled_tests/compiler/import_dependency/imports/dependency/inputs/dependency.in delete mode 100644 compiler/disabled_tests/compiler/import_dependency/imports/dependency/src/main.leo delete mode 100644 compiler/disabled_tests/compiler/import_dependency/input/dummy.in delete mode 100644 compiler/disabled_tests/compiler/import_dependency/readme.md delete mode 100644 compiler/disabled_tests/compiler/import_dependency/tests/import_dependency_folder.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/import_all.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/import_as.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/import_dir.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/import_files.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/import_many.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/import_weird_names.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/import_weird_names_nested.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/input/dummy.in delete mode 100644 compiler/disabled_tests/compiler/import_local/local_imports/a-9.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/local_imports/circuits.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/local_imports/lib.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/local_imports/nested/c-d.leo delete mode 100644 compiler/disabled_tests/compiler/import_local/local_imports/nested/hello.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/alias.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/basic.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/a-9.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/a0-f.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/bar/.gitignore delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/bar/Leo.toml delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/bar/src/bat/bat.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/bar/src/baz.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/bar/src/lib.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/car/.gitignore delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/car/Leo.toml delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/car/src/lib.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/hello-world.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/lib.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/imports/test-import.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/input/dummy.in delete mode 100644 compiler/disabled_tests/compiler/import_old/many_import.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/many_import_star.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/multiple.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/names.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/names_a_dash_fail.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/names_dash_a_fail.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/names_dollar_fail.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/names_underscore_fail.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/star.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/star_fail.leo delete mode 100644 compiler/disabled_tests/compiler/import_old/string_import.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/different_types_const_signed_fail.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/different_types_fail_signed.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/different_types_unsigned_fail.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/main_array.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/main_array_fail.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/main_char.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/main_multi_dimension_array.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/main_multiple.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/main_string.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/main_tuple.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/main_tuple_fail.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input/non_const_input_const.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_and_program_state/basic.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/basic.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/basic.state delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_and_program_state/token_withdraw.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_array.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_array_fail.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_char.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_fail_name.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_fail_type.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_field.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_group.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_multiple.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_string.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_tuple.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/main_array.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/main_array_fail.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/main_char.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/main_multiple.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/main_string.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_input_constants/main_tuple_fail.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_registers/input/array.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_registers/input/main.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_registers/registers_array.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_registers/registers_fail.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_registers/registers_pass.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/access_all.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/access_state.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/basic.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/input/basic.state delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/input/dummy.in delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/input/section_invalid.state delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/input/section_undefined.state delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/input/token_withdraw.state delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/input/visibility_fail.state delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/section_invalid.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/section_undefined.leo delete mode 100644 compiler/disabled_tests/compiler/input_files/program_state/visibility_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i128/max_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i128/min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i128/negate_min.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i16/max_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i16/min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i16/negate_min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i32/max_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i32/min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i32/negate_min.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i64/max_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i64/min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i64/negate_min.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i8/max_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i8/min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/i8/negate_min.leo delete mode 100644 compiler/disabled_tests/compiler/integers/u16/max_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/u16/min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/u32/max_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/u32/min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/u64/max_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/u64/min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/u8/max_fail.leo delete mode 100644 compiler/disabled_tests/compiler/integers/u8/min_fail.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/array_dyn_mut.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/array_dyn_mut_indirect.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/array_fail.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/array_mut.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/array_splice_mut.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/array_tuple_mut.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/circuit_fail.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/circuit_function_const.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/circuit_function_mut.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/circuit_static_function_mut_fail.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/circuit_variable_mut.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/const.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/function_input.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/let_fail.leo delete mode 100644 compiler/disabled_tests/compiler/mutability/swap.leo delete mode 100644 compiler/disabled_tests/compiler/statements/compound_assignment.leo delete mode 100644 compiler/disabled_tests/compiler/statements/nested_mutate.leo delete mode 100644 compiler/disabled_tests/compiler/statements/reverse_loops.leo delete mode 100644 compiler/disabled_tests/compiler/statements/reverse_one.leo delete mode 100644 compiler/disabled_tests/compiler/statements/ternary_non_const_fail.leo delete mode 100644 compiler/disabled_tests/compiler/stdlib/core_circuit_star_fail.leo delete mode 100644 compiler/disabled_tests/compiler/stdlib/core_package_invalid.leo delete mode 100644 compiler/disabled_tests/compiler/stdlib/core_unstable_package_invalid.leo delete mode 100644 compiler/disabled_tests/compiler/stdlib/strings.leo delete mode 100644 compiler/disabled_tests/compiler/string/circuit.leo delete mode 100644 compiler/disabled_tests/compiler/string/equality.leo delete mode 100644 compiler/disabled_tests/compiler/string/inputs/string.in delete mode 100644 compiler/disabled_tests/compiler/string/inputs/string_out.in delete mode 100644 compiler/disabled_tests/compiler/string/inputs/two.in delete mode 100644 compiler/disabled_tests/compiler/string/inputs/weird.in delete mode 100644 compiler/disabled_tests/compiler/string/replace.leo delete mode 100644 compiler/disabled_tests/compiler/string/string_transformation.leo delete mode 100644 compiler/disabled_tests/compiler/tuples/access.leo delete mode 100644 compiler/disabled_tests/compiler/tuples/basic.leo delete mode 100644 compiler/disabled_tests/compiler/tuples/dependent.leo delete mode 100644 compiler/disabled_tests/compiler/tuples/destructured.leo delete mode 100644 compiler/disabled_tests/compiler/tuples/inputs/true_true.in delete mode 100644 compiler/disabled_tests/compiler/tuples/nested_access.leo delete mode 100644 compiler/disabled_tests/parser/circuits/consts.leo delete mode 100644 compiler/disabled_tests/parser/circuits/field_and_functions.leo delete mode 100644 compiler/disabled_tests/parser/expression/access/array_access.leo delete mode 100644 compiler/disabled_tests/parser/expression/access/array_range_access.leo delete mode 100644 compiler/disabled_tests/parser/expression/access/call.leo delete mode 100644 compiler/disabled_tests/parser/expression/access/circuit.leo delete mode 100644 compiler/disabled_tests/parser/expression/access/circuit_static.leo delete mode 100644 compiler/disabled_tests/parser/expression/array_init.leo delete mode 100644 compiler/disabled_tests/parser/expression/array_inline.leo delete mode 100644 compiler/disabled_tests/parser/expression/array_len.leo delete mode 100644 compiler/disabled_tests/parser/expression/tuple.leo delete mode 100644 compiler/disabled_tests/parser/import/alias.leo delete mode 100644 compiler/disabled_tests/parser/import/basic.leo delete mode 100644 compiler/disabled_tests/parser/import/import_empty_list_fail.leo delete mode 100644 compiler/disabled_tests/parser/import/invalid.leo delete mode 100644 compiler/disabled_tests/parser/import/keyword_fail.leo delete mode 100644 compiler/disabled_tests/parser/import/many_import.leo delete mode 100644 compiler/disabled_tests/parser/import/many_import_star.leo delete mode 100644 compiler/disabled_tests/parser/import/names.leo delete mode 100644 compiler/disabled_tests/parser/import/names_underscore.leo delete mode 100644 compiler/disabled_tests/parser/import/star.leo delete mode 100644 compiler/disabled_tests/parser/input/input_success.leo delete mode 100644 compiler/disabled_tests/parser/serialize/linear_regression.leo delete mode 100644 compiler/disabled_tests/parser/serialize/palindrome.leo delete mode 100644 compiler/disabled_tests/parser/serialize/pedersen_hash.leo delete mode 100644 compiler/passes/src/canonicalization/canonicalizer.rs delete mode 100644 compiler/passes/src/canonicalization/mod.rs delete mode 100644 compiler/passes/src/import_resolution/importer.rs delete mode 100644 compiler/passes/src/import_resolution/mod.rs delete mode 100644 compiler/passes/src/import_resolution/resolver.rs delete mode 100644 leo/commands/unused/README.md delete mode 100644 leo/commands/unused/deploy.rs delete mode 100644 leo/commands/unused/init.rs delete mode 100644 leo/commands/unused/lint.rs delete mode 100644 leo/commands/unused/package/add.rs delete mode 100644 leo/commands/unused/package/clone.rs delete mode 100644 leo/commands/unused/package/fetch.rs delete mode 100644 leo/commands/unused/package/login.rs delete mode 100644 leo/commands/unused/package/logout.rs delete mode 100644 leo/commands/unused/package/mod.rs delete mode 100644 leo/commands/unused/package/publish.rs delete mode 100644 leo/commands/unused/package/remove.rs delete mode 100644 leo/commands/unused/prove.rs delete mode 100644 leo/commands/unused/setup.rs delete mode 100644 leo/commands/unused/test.rs delete mode 100644 leo/commands/unused/update.rs delete mode 100644 leo/commands/unused/watch.rs delete mode 100644 leo/package/src/unused/directory.rs delete mode 100644 leo/package/src/unused/lock_file.rs delete mode 100644 leo/package/src/unused/manifest.rs delete mode 100644 leo/package/src/unused/pairs.rs delete mode 100644 leo/package/src/unused/proof.rs delete mode 100644 leo/package/src/unused/proving_key.rs delete mode 100644 leo/package/src/unused/state.rs delete mode 100644 leo/package/src/unused/verification_key.rs delete mode 100644 leo/unused/api.rs delete mode 100644 leo/unused/config.rs diff --git a/compiler/disabled_tests/compiler/address/index.leo b/compiler/disabled_tests/compiler/address/index.leo deleted file mode 100644 index 5d7cb2b389..0000000000 --- a/compiler/disabled_tests/compiler/address/index.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/index.in -*/ - -function main (x: u32) -> bool { - const y = [aleo1x0rh2cudq93fhukrsce8sgvcphddv4qs0clph64stpg0hstfds9qjvxcg6; 3]; - let z = y[x]; - - return z == y[0]; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/alias_circuit_namespace_conflict_fail.leo b/compiler/disabled_tests/compiler/aliases/alias_circuit_namespace_conflict_fail.leo deleted file mode 100644 index f2396a5878..0000000000 --- a/compiler/disabled_tests/compiler/aliases/alias_circuit_namespace_conflict_fail.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - - -type Int = u32; - -circuit Int { - x: u8; -} - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/alias_function_namespace_conflict_fail.leo b/compiler/disabled_tests/compiler/aliases/alias_function_namespace_conflict_fail.leo deleted file mode 100644 index 272d53e519..0000000000 --- a/compiler/disabled_tests/compiler/aliases/alias_function_namespace_conflict_fail.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -type int = u32; - -function int() {} - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/alias_global_const_namespace_conflict_fail copy.leo b/compiler/disabled_tests/compiler/aliases/alias_global_const_namespace_conflict_fail copy.leo deleted file mode 100644 index 6a12761425..0000000000 --- a/compiler/disabled_tests/compiler/aliases/alias_global_const_namespace_conflict_fail copy.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -type int = u32; - -const int = 8u8; - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/arith.leo b/compiler/disabled_tests/compiler/aliases/arith.leo deleted file mode 100644 index d29470955f..0000000000 --- a/compiler/disabled_tests/compiler/aliases/arith.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/basic.in -*/ - -type int = u32; - -function main(x: u32, y: bool) -> bool { - let a: int = x; - let b: int = 2; - let c: int = a + b; - - return a == 1u32 && b == 2u32 - && c == 3u32 && y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/basic.leo b/compiler/disabled_tests/compiler/aliases/basic.leo deleted file mode 100644 index 507dc56c01..0000000000 --- a/compiler/disabled_tests/compiler/aliases/basic.leo +++ /dev/null @@ -1,19 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/basic.in -*/ - -type int = u32; -type number = int; - -function main(x: u32, y: bool) -> bool { - let a: int = x; - let b: number = 2u32; - let c: number = 3; - let d: u32 = a + b + c; - - return a == 1u32 && b == 2u32 - && c == 3u32 && d == 6u32 && y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/circuit.leo b/compiler/disabled_tests/compiler/aliases/circuit.leo deleted file mode 100644 index a2ce8b2dde..0000000000 --- a/compiler/disabled_tests/compiler/aliases/circuit.leo +++ /dev/null @@ -1,25 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/basic.in -*/ - -type int = u32; - -circuit Foo { - a: u32; -} - -circuit Bar { - a: int; -} - -function main(x: u32, y: bool) -> bool { - let a: int = x; - let f: Foo = Foo { a }; - let b: Bar = Bar { a }; - - return a == 1u32 && f.a == 1u32 - && b.a == 1u32 && y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/duplicate_name_fail.leo b/compiler/disabled_tests/compiler/aliases/duplicate_name_fail.leo deleted file mode 100644 index d281d8d6b0..0000000000 --- a/compiler/disabled_tests/compiler/aliases/duplicate_name_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -type int = u32; -type int = u8; - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/fn_return.leo b/compiler/disabled_tests/compiler/aliases/fn_return.leo deleted file mode 100644 index 6c29561e09..0000000000 --- a/compiler/disabled_tests/compiler/aliases/fn_return.leo +++ /dev/null @@ -1,23 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/dummy.in -*/ - -type int = u32; - -function return_int_triary() -> (int, int, int) { - return (1, 2, 3); -} - -function return_int_array() -> [int; 3] { - return [0u32; 3]; -} - -function main(y: bool) -> bool { - let a: (int, int, int) = return_int_triary(); - let b: [int; 3] = return_int_array(); - - return y; -} diff --git a/compiler/disabled_tests/compiler/aliases/inputs/basic.in b/compiler/disabled_tests/compiler/aliases/inputs/basic.in deleted file mode 100644 index b525a87658..0000000000 --- a/compiler/disabled_tests/compiler/aliases/inputs/basic.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -x: u32 = 1; -y: bool = true; - -[registers] -r0: bool = false; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/inputs/dummy.in b/compiler/disabled_tests/compiler/aliases/inputs/dummy.in deleted file mode 100644 index cc343fbcce..0000000000 --- a/compiler/disabled_tests/compiler/aliases/inputs/dummy.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -y: bool = true; - -[registers] -r0: bool = false; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/inputs/wrong_type_assign_fail.in b/compiler/disabled_tests/compiler/aliases/inputs/wrong_type_assign_fail.in deleted file mode 100644 index 74f1ab0b7f..0000000000 --- a/compiler/disabled_tests/compiler/aliases/inputs/wrong_type_assign_fail.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -x: u8 = 1; -y: bool = true; - -[registers] -r0: bool = false; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/shadowing_arg.leo b/compiler/disabled_tests/compiler/aliases/shadowing_arg.leo deleted file mode 100644 index 9e7af089d3..0000000000 --- a/compiler/disabled_tests/compiler/aliases/shadowing_arg.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/basic.in -*/ - -type x = u32; - -function main(x: x, y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/shadowing_var_allowed.leo b/compiler/disabled_tests/compiler/aliases/shadowing_var_allowed.leo deleted file mode 100644 index a1399f0473..0000000000 --- a/compiler/disabled_tests/compiler/aliases/shadowing_var_allowed.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/dummy.in -*/ - -type int = u32; - -function main(y: bool) -> bool { - let int: int = 1u32; - - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/aliases/wrong_type_assign_fail.leo b/compiler/disabled_tests/compiler/aliases/wrong_type_assign_fail.leo deleted file mode 100644 index 0047935c1c..0000000000 --- a/compiler/disabled_tests/compiler/aliases/wrong_type_assign_fail.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/wrong_type_fail.in -*/ - -type int = u32; - -function main(x: u8, y: bool) -> bool { - let a: int = x; - - return a == 1u32 && y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/array_range_access_fail.leo b/compiler/disabled_tests/compiler/array/array_range_access_fail.leo deleted file mode 100644 index a73127b571..0000000000 --- a/compiler/disabled_tests/compiler/array/array_range_access_fail.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/array_range_access_fail.in -*/ - -function main ( - const x: u32 -) { - const y = [1u8; 3]; - const z: [u8; 2] = y[..1u32][..x]; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/array_size_zero_fail.leo b/compiler/disabled_tests/compiler/array/array_size_zero_fail.leo deleted file mode 100644 index a93c71d1df..0000000000 --- a/compiler/disabled_tests/compiler/array/array_size_zero_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function main() { - let a = [true; (0)]; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/complex_access.leo b/compiler/disabled_tests/compiler/array/complex_access.leo deleted file mode 100644 index b6af9aa6e3..0000000000 --- a/compiler/disabled_tests/compiler/array/complex_access.leo +++ /dev/null @@ -1,35 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - input/complex_access.in -*/ - -circuit Circ { - f: u32 -} - -function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool { - a[0..3][b] = 93; - a[2..6][1] = 87; - a[2..6][1] *= 2; - a[2..3] = [42u8]; - a[6..][0] = 43u8; - a[0..1][0..1] = [200]; - - c[0..2][0] = [1u8; 3]; - c[1..][1][1..2][0] = 126; - c[1..][0] = [42, 43, 44]; - c[Circ {f: 0}.f..1][0][0] += 2; - - d[..1][0].1 = 1; - - e[0..][0] = [22; 4]; - e[0..][0][0] = 33; - - return - a == [200u8, 93, 42, 174, 5, 6, 43, 8] - && c == [[3u8, 1, 1], [42, 43, 44], [7, 126, 9]] - && d == [(0u8, 1u32)] - && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]]; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/equal_initializer.leo b/compiler/disabled_tests/compiler/array/equal_initializer.leo deleted file mode 100644 index dda9dfc250..0000000000 --- a/compiler/disabled_tests/compiler/array/equal_initializer.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - input/six_zeros.in - - input/count_to_6.in -*/ - -function main(a: [u8; (3, 2)]) -> bool { - return a == [0u8; (3, 2)]; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/equal_initializer_2.leo b/compiler/disabled_tests/compiler/array/equal_initializer_2.leo deleted file mode 100644 index db7b7be89c..0000000000 --- a/compiler/disabled_tests/compiler/array/equal_initializer_2.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - input/six_zeros.in - - input/count_to_6.in -*/ - -function main(a: [u8; (3, 2)]) -> bool { - return a == [[1u8, 2], [3, 4], [5, 6]]; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/input/array_range_access_fail.in b/compiler/disabled_tests/compiler/array/input/array_range_access_fail.in deleted file mode 100644 index 5bea7d78d8..0000000000 --- a/compiler/disabled_tests/compiler/array/input/array_range_access_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -x: u32 = 1u32; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/input/complex_access.in b/compiler/disabled_tests/compiler/array/input/complex_access.in deleted file mode 100644 index 41b2dfabb4..0000000000 --- a/compiler/disabled_tests/compiler/array/input/complex_access.in +++ /dev/null @@ -1,9 +0,0 @@ -[main] -a: [u8; 8] = [1u8, 2, 3, 4, 5, 6, 7, 8]; -b: u32 = 1; -c: [[u8; 3]; 3] = [[1u8, 2, 3], [4, 5, 6], [7, 8, 9]]; -d: [(u8, u32); 1] = [(0u8, 0u32)]; -e: [u8; (3, 4)] = [0u8; (3, 4)]; - -[registers] -out: bool = true; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/input/count_to_6.in b/compiler/disabled_tests/compiler/array/input/count_to_6.in deleted file mode 100644 index 21ce3837d0..0000000000 --- a/compiler/disabled_tests/compiler/array/input/count_to_6.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [[u8; 2]; 3] = [[1, 2], [3, 4], [5, 6]]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/dummy.in b/compiler/disabled_tests/compiler/array/input/dummy.in deleted file mode 100644 index 6e43b49ecc..0000000000 --- a/compiler/disabled_tests/compiler/array/input/dummy.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -y: bool = true; -n: bool = false; - -[registers] -r0: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/initializer_fail.in b/compiler/disabled_tests/compiler/array/input/initializer_fail.in deleted file mode 100644 index 822f21634b..0000000000 --- a/compiler/disabled_tests/compiler/array/input/initializer_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0u8; (2, 2)]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/input_nested_3x2.in b/compiler/disabled_tests/compiler/array/input/input_nested_3x2.in deleted file mode 100644 index fbe64e3a1d..0000000000 --- a/compiler/disabled_tests/compiler/array/input/input_nested_3x2.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [[0u8; 2]; 3]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/input_nested_3x2_fail.in b/compiler/disabled_tests/compiler/array/input/input_nested_3x2_fail.in deleted file mode 100644 index aac88582f7..0000000000 --- a/compiler/disabled_tests/compiler/array/input/input_nested_3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [[0u8; 3]; 2)]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/input_tuple_3x2.in b/compiler/disabled_tests/compiler/array/input/input_tuple_3x2.in deleted file mode 100644 index 718fcaa89e..0000000000 --- a/compiler/disabled_tests/compiler/array/input/input_tuple_3x2.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0u8; (3, 2)]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/input_tuple_3x2_fail.in b/compiler/disabled_tests/compiler/array/input/input_tuple_3x2_fail.in deleted file mode 100644 index eb5a8962bf..0000000000 --- a/compiler/disabled_tests/compiler/array/input/input_tuple_3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0u8; (2, 3)]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/registers_ones.in b/compiler/disabled_tests/compiler/array/input/registers_ones.in deleted file mode 100644 index 7320577a6c..0000000000 --- a/compiler/disabled_tests/compiler/array/input/registers_ones.in +++ /dev/null @@ -1,8 +0,0 @@ -[main] -a: [u8; 3] = [1, 1, 1]; - -[registers] -r: [u8; 3] = [1u8, 1u8, 1u8]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/registers_zeros.in b/compiler/disabled_tests/compiler/array/input/registers_zeros.in deleted file mode 100644 index c24270c956..0000000000 --- a/compiler/disabled_tests/compiler/array/input/registers_zeros.in +++ /dev/null @@ -1,8 +0,0 @@ -[main] -a: [u8; 3] = [1, 1, 1]; // doesn't match arr below - -[registers] -r: [u8; 3] = [0u8, 0u8, 0u8]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/six_zeros.in b/compiler/disabled_tests/compiler/array/input/six_zeros.in deleted file mode 100644 index 1f46c17666..0000000000 --- a/compiler/disabled_tests/compiler/array/input/six_zeros.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0; (3, 2)]; - -[registers] -x: bool = false; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/input/three_ones.in b/compiler/disabled_tests/compiler/array/input/three_ones.in deleted file mode 100644 index c6b803e634..0000000000 --- a/compiler/disabled_tests/compiler/array/input/three_ones.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; 3] = [1, 1, 1]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_3x2.in b/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_3x2.in deleted file mode 100644 index 3374d1d96b..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_3x2.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -a: [[u8; 2]; 3] = [[0; 2]; 3]; - - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_3x2_fail.in b/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_3x2_fail.in deleted file mode 100644 index 13ae01334a..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_4x3x2.in b/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_4x3x2.in deleted file mode 100644 index 2f3f390024..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_4x3x2.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in b/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in deleted file mode 100644 index c94c4f6522..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_3x2.in b/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_3x2.in deleted file mode 100644 index 03eed3b54f..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_3x2.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [[u8; 2]; 3] = [0; (3, 2)]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in b/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in deleted file mode 100644 index 93f080d5bf..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_4x3x2.in b/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_4x3x2.in deleted file mode 100644 index dce1923bc6..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_4x3x2.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in b/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in deleted file mode 100644 index 9b69718907..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_3x2.in b/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_3x2.in deleted file mode 100644 index 30b1b7bcad..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_3x2.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [[0; 2]; 3]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in b/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in deleted file mode 100644 index ede7f5c9f8..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_4x3x2.in b/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_4x3x2.in deleted file mode 100644 index a03583d029..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_4x3x2.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in b/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in deleted file mode 100644 index ffb85a2230..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_3x2.in b/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_3x2.in deleted file mode 100644 index f5d315cfc7..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_3x2.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0; (3, 2)]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in b/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in deleted file mode 100644 index 36001b82ff..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in b/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in deleted file mode 100644 index 0a6975de8e..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in b/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in deleted file mode 100644 index 9b6a46c114..0000000000 --- a/compiler/disabled_tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) - -[registers] -x: bool = false; diff --git a/compiler/disabled_tests/compiler/array/input_nested_3x2.leo b/compiler/disabled_tests/compiler/array/input_nested_3x2.leo deleted file mode 100644 index 0c2d7d8663..0000000000 --- a/compiler/disabled_tests/compiler/array/input_nested_3x2.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/input_nested_3x2.in -*/ - -function main(a: [u8; (3, 2)]) -> bool { - return a == [[0u8; 2]; 3]; -} diff --git a/compiler/disabled_tests/compiler/array/input_nested_3x2_fail.leo b/compiler/disabled_tests/compiler/array/input_nested_3x2_fail.leo deleted file mode 100644 index ff208f4124..0000000000 --- a/compiler/disabled_tests/compiler/array/input_nested_3x2_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/input_nested_3x2_fail.in -*/ - -function main(a: [u8; (3, 2)]) -> bool { - return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file. -} diff --git a/compiler/disabled_tests/compiler/array/input_tuple_3x2.leo b/compiler/disabled_tests/compiler/array/input_tuple_3x2.leo deleted file mode 100644 index 4db78940f6..0000000000 --- a/compiler/disabled_tests/compiler/array/input_tuple_3x2.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/input_tuple_3x2.in -*/ - -function main(a: [u8; (3, 2)]) -> bool { - return a == [0u8; (3, 2)]; -} diff --git a/compiler/disabled_tests/compiler/array/input_tuple_3x2_fail.leo b/compiler/disabled_tests/compiler/array/input_tuple_3x2_fail.leo deleted file mode 100644 index b1d48fef02..0000000000 --- a/compiler/disabled_tests/compiler/array/input_tuple_3x2_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/input_tuple_3x2_fail.in -*/ - -function main(a: [u8; (3, 2)]) -> bool { - return a == [0u8; (3, 2)]; -} diff --git a/compiler/disabled_tests/compiler/array/multi_fail_initializer.leo b/compiler/disabled_tests/compiler/array/multi_fail_initializer.leo deleted file mode 100644 index 464736f85f..0000000000 --- a/compiler/disabled_tests/compiler/array/multi_fail_initializer.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function main() -> bool { - const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions - return false; -} diff --git a/compiler/disabled_tests/compiler/array/multi_fail_inline.leo b/compiler/disabled_tests/compiler/array/multi_fail_inline.leo deleted file mode 100644 index 10ee6634ab..0000000000 --- a/compiler/disabled_tests/compiler/array/multi_fail_inline.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function main() -> bool { - const arr: [u8; (2, 2)] = [[1u8, 1u8], - [1u8]]; // incorrect dimensions - return false; -} diff --git a/compiler/disabled_tests/compiler/array/multi_initializer.leo b/compiler/disabled_tests/compiler/array/multi_initializer.leo deleted file mode 100644 index bb523f4043..0000000000 --- a/compiler/disabled_tests/compiler/array/multi_initializer.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)]; - const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2]; - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/multi_initializer_fail.leo b/compiler/disabled_tests/compiler/array/multi_initializer_fail.leo deleted file mode 100644 index b99fcee93c..0000000000 --- a/compiler/disabled_tests/compiler/array/multi_initializer_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function main() -> bool { - const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions - return false; -} diff --git a/compiler/disabled_tests/compiler/array/nested.leo b/compiler/disabled_tests/compiler/array/nested.leo deleted file mode 100644 index e384518b01..0000000000 --- a/compiler/disabled_tests/compiler/array/nested.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(n: bool) -> bool { - const x = [false; (2, 2)]; - const z: bool = x[0][0]; - - return n == z; -} diff --git a/compiler/disabled_tests/compiler/array/nested_3x2_value.leo b/compiler/disabled_tests/compiler/array/nested_3x2_value.leo deleted file mode 100644 index 0a3d67912e..0000000000 --- a/compiler/disabled_tests/compiler/array/nested_3x2_value.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -// Multidimensional array syntax in leo -function main(y: bool) -> bool { - const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline - const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/nested_3x2_value_fail.leo b/compiler/disabled_tests/compiler/array/nested_3x2_value_fail.leo deleted file mode 100644 index f05d9517a3..0000000000 --- a/compiler/disabled_tests/compiler/array/nested_3x2_value_fail.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - - -// Multidimensional array syntax in leo -function main(y: bool) -> bool { - const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) - return false; -} diff --git a/compiler/disabled_tests/compiler/array/registers.leo b/compiler/disabled_tests/compiler/array/registers.leo deleted file mode 100644 index 254c8a8d22..0000000000 --- a/compiler/disabled_tests/compiler/array/registers.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - input/registers_ones.in - - input/registers_zeros.in -*/ - -function main(a: [u8; 3]) -> [u8; 3] { - return input.registers.r == a ? [3,2,1] : [1,2,3]; -} diff --git a/compiler/disabled_tests/compiler/array/slice.leo b/compiler/disabled_tests/compiler/array/slice.leo deleted file mode 100644 index 9841cf4c52..0000000000 --- a/compiler/disabled_tests/compiler/array/slice.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/three_ones.in -*/ - -// `{from}..{to}` copies the elements of one array into another exclusively -function main(a: [u8; 3]) -> bool { - const b = [1u8; 4]; - return a == b[0..3]; -} diff --git a/compiler/disabled_tests/compiler/array/slice_lower.leo b/compiler/disabled_tests/compiler/array/slice_lower.leo deleted file mode 100644 index bc62c00e85..0000000000 --- a/compiler/disabled_tests/compiler/array/slice_lower.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8]; - const expected: [u32; 2] = [0, 1]; - - const actual = arr[..2]; // Should produce [0, 1] - - return (expected == actual) == y; -} diff --git a/compiler/disabled_tests/compiler/array/spread.leo b/compiler/disabled_tests/compiler/array/spread.leo deleted file mode 100644 index 0e94b2b2f8..0000000000 --- a/compiler/disabled_tests/compiler/array/spread.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/three_ones.in -*/ - -// A spread operator `...` copies the elements of one array into another -function main(a: [u8; 3]) -> bool { - const b = [1u8, 1u8]; - const c = [1u8, ...b]; - const d = [...b, 1u8]; - - return a == c && d == a; -} diff --git a/compiler/disabled_tests/compiler/array/ternary_in_array.leo b/compiler/disabled_tests/compiler/array/ternary_in_array.leo deleted file mode 100644 index 5fd2498473..0000000000 --- a/compiler/disabled_tests/compiler/array/ternary_in_array.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/three_ones.in -*/ - -function main (a: [u8; 3]) -> bool { - let y = a[0..[0u8; 2] == [0u8; 2]? 2u8 : 2u8]; - return y == [1u8, 1]; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/array/tuple_3x2_value.leo b/compiler/disabled_tests/compiler/array/tuple_3x2_value.leo deleted file mode 100644 index 72b7a588ad..0000000000 --- a/compiler/disabled_tests/compiler/array/tuple_3x2_value.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -// Multidimensional array syntax in leo -function main(y: bool) -> bool { - const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline - const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/tuple_3x2_value_fail.leo b/compiler/disabled_tests/compiler/array/tuple_3x2_value_fail.leo deleted file mode 100644 index 204226ff47..0000000000 --- a/compiler/disabled_tests/compiler/array/tuple_3x2_value_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -// Multidimensional array syntax in leo -function main() { - const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/disabled_tests/compiler/array/type_fail.leo b/compiler/disabled_tests/compiler/array/type_fail.leo deleted file mode 100644 index 603871544b..0000000000 --- a/compiler/disabled_tests/compiler/array/type_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: [u8; -2] = [0u32; 2]; -} diff --git a/compiler/disabled_tests/compiler/array/type_input_3x2.leo b/compiler/disabled_tests/compiler/array/type_input_3x2.leo deleted file mode 100644 index 7b3cb6d1a5..0000000000 --- a/compiler/disabled_tests/compiler/array/type_input_3x2.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/input_tuple_3x2.in -*/ - -function main(a: [[u8; 2]; 3]) -> bool { - const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - - return a == b; -} diff --git a/compiler/disabled_tests/compiler/array/type_input_4x3x2.leo b/compiler/disabled_tests/compiler/array/type_input_4x3x2.leo deleted file mode 100644 index cc5afdce3e..0000000000 --- a/compiler/disabled_tests/compiler/array/type_input_4x3x2.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/type_tuple_value_nested_4x3x2.in -*/ - -function main(a: [[[u8; 2]; 3]; 4]) -> bool { - const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - return a == b; -} diff --git a/compiler/disabled_tests/compiler/array/type_nested_value_nested_3x2.leo b/compiler/disabled_tests/compiler/array/type_nested_value_nested_3x2.leo deleted file mode 100644 index 1334df22d8..0000000000 --- a/compiler/disabled_tests/compiler/array/type_nested_value_nested_3x2.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/type_nested_value_nested_3x2.in -*/ - -function main(a: [[u8; 2]; 3]) -> bool { - const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer - - return b == a && a == c; -} diff --git a/compiler/disabled_tests/compiler/array/type_nested_value_nested_3x2_fail.leo b/compiler/disabled_tests/compiler/array/type_nested_value_nested_3x2_fail.leo deleted file mode 100644 index ab5e620209..0000000000 --- a/compiler/disabled_tests/compiler/array/type_nested_value_nested_3x2_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/disabled_tests/compiler/array/type_nested_value_nested_4x3x2.leo b/compiler/disabled_tests/compiler/array/type_nested_value_nested_4x3x2.leo deleted file mode 100644 index 52746e70a7..0000000000 --- a/compiler/disabled_tests/compiler/array/type_nested_value_nested_4x3x2.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo b/compiler/disabled_tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo deleted file mode 100644 index ab0447eb50..0000000000 --- a/compiler/disabled_tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/disabled_tests/compiler/array/type_nested_value_tuple_3x2.leo b/compiler/disabled_tests/compiler/array/type_nested_value_tuple_3x2.leo deleted file mode 100644 index 933b1959f5..0000000000 --- a/compiler/disabled_tests/compiler/array/type_nested_value_tuple_3x2.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/type_nested_value_tuple_3x2_fail.leo b/compiler/disabled_tests/compiler/array/type_nested_value_tuple_3x2_fail.leo deleted file mode 100644 index 24e66bb059..0000000000 --- a/compiler/disabled_tests/compiler/array/type_nested_value_tuple_3x2_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/disabled_tests/compiler/array/type_nested_value_tuple_4x3x2.leo b/compiler/disabled_tests/compiler/array/type_nested_value_tuple_4x3x2.leo deleted file mode 100644 index 0e6edc880f..0000000000 --- a/compiler/disabled_tests/compiler/array/type_nested_value_tuple_4x3x2.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo b/compiler/disabled_tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo deleted file mode 100644 index e28f9d0c96..0000000000 --- a/compiler/disabled_tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/disabled_tests/compiler/array/type_tuple_value_nested_3x2.leo b/compiler/disabled_tests/compiler/array/type_tuple_value_nested_3x2.leo deleted file mode 100644 index 9beb94b036..0000000000 --- a/compiler/disabled_tests/compiler/array/type_tuple_value_nested_3x2.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - - const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/type_tuple_value_nested_3x2_fail.leo b/compiler/disabled_tests/compiler/array/type_tuple_value_nested_3x2_fail.leo deleted file mode 100644 index e11ae71dad..0000000000 --- a/compiler/disabled_tests/compiler/array/type_tuple_value_nested_3x2_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function main() { - const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/disabled_tests/compiler/array/type_tuple_value_nested_4x3x2.leo b/compiler/disabled_tests/compiler/array/type_tuple_value_nested_4x3x2.leo deleted file mode 100644 index 61ce947207..0000000000 --- a/compiler/disabled_tests/compiler/array/type_tuple_value_nested_4x3x2.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo b/compiler/disabled_tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo deleted file mode 100644 index 63d7724c7c..0000000000 --- a/compiler/disabled_tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_3x2.leo b/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_3x2.leo deleted file mode 100644 index 6a78f1793a..0000000000 --- a/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_3x2.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - - const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo b/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo deleted file mode 100644 index 2c010bb604..0000000000 --- a/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_4x3x2.leo b/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_4x3x2.leo deleted file mode 100644 index de0ca7f419..0000000000 --- a/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_4x3x2.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool{ - const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer - - return (a == b) == y; -} diff --git a/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo b/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo deleted file mode 100644 index 4ab68f8a40..0000000000 --- a/compiler/disabled_tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order) -} diff --git a/compiler/disabled_tests/compiler/array/variable_slice_fail.leo b/compiler/disabled_tests/compiler/array/variable_slice_fail.leo deleted file mode 100644 index 1751b2b845..0000000000 --- a/compiler/disabled_tests/compiler/array/variable_slice_fail.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a = [1u8; 10]; - for i in 0..10 { - const x = a[i..10]; - console.debug("{}", x); - } -} diff --git a/compiler/disabled_tests/compiler/char/circuit.leo b/compiler/disabled_tests/compiler/char/circuit.leo deleted file mode 100644 index ab40365545..0000000000 --- a/compiler/disabled_tests/compiler/char/circuit.leo +++ /dev/null @@ -1,31 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/ascii.in - - inputs/escaped_unicode1.in - - inputs/escaped_unicode2.in - - inputs/escaped_unicode3.in - - inputs/escaped_unicode4.in - - inputs/escaped_unicode5.in - - inputs/escaped_unicode6.in - - inputs/escaped.in - - inputs/hex1.in - - inputs/hex2.in - - inputs/unicode1.in - - inputs/unicode2.in - - inputs/unicode3.in - - inputs/unicode4.in - - inputs/unicode5.in -*/ - -circuit Foo { - character: char; -} - -function main(character: char) -> char { - let f = Foo { character }; - - let character2 = f.character == 'a' ? 'a' : f.character; - return character2; -} diff --git a/compiler/disabled_tests/compiler/char/nonprinting.leo b/compiler/disabled_tests/compiler/char/nonprinting.leo deleted file mode 100644 index 2c91babb7c..0000000000 --- a/compiler/disabled_tests/compiler/char/nonprinting.leo +++ /dev/null @@ -1,79 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/nonprinting.in -*/ -function main( - in1: char, - in2: char, - in3: char, - in4: char, - in5: char, - in6: char, - in7: char, - in8: char, - in9: char, - in10: char, - in11: char, - in12: char, - in13: char, - in14: char, - in15: char, - in16: char, - in17: char, - in18: char, - in19: char, - in20: char, - in21: char, - in22: char, - in23: char, - in24: char, - in25: char, - in26: char, - in27: char, - in28: char, - in29: char, - in30: char, - in31: char, - in32: char, - in33: char, -) -> ([char; 33], bool) { - let str = [ - in1, - in2, - in3, - in4, - in5, - in6, - in7, - in8, - in9, - in10, - in11, - in12, - in13, - in14, - in15, - in16, - in17, - in18, - in19, - in20, - in21, - in22, - in23, - in24, - in25, - in26, - in27, - in28, - in29, - in30, - in31, - in32, - in33, - ]; - console.log("{}", str); - return (str, in1 == '\x00'); -} diff --git a/compiler/disabled_tests/compiler/char/output/output_char.out b/compiler/disabled_tests/compiler/char/output/output_char.out deleted file mode 100644 index 323925e081..0000000000 --- a/compiler/disabled_tests/compiler/char/output/output_char.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: char = 'a'; diff --git a/compiler/disabled_tests/compiler/circuits/big_self_in_circuit_replacement.leo b/compiler/disabled_tests/compiler/circuits/big_self_in_circuit_replacement.leo deleted file mode 100644 index 74ebb27854..0000000000 --- a/compiler/disabled_tests/compiler/circuits/big_self_in_circuit_replacement.leo +++ /dev/null @@ -1,33 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - x: u32; - - function new() -> Self { - let new: Self = Self { - x: 1u32 - }; - - return new; - } - - function etc() { - let y = [0u32, 1, 2, 3]; - y[Self {x: 0}.x] += 2; - } - - function func(a: [Self; 3], y: (Self)) { - const x: Self = Foo {x: Self {x: 1}.x}; - } - - function self_circ(x: Self) {} -} - -function main(y: bool) -> bool { - let foo: Foo = Foo::new(); - return foo.x == 1u32 && y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/circuits/big_self_outside_circuit_fail.leo b/compiler/disabled_tests/compiler/circuits/big_self_outside_circuit_fail.leo deleted file mode 100644 index 1b99e6b268..0000000000 --- a/compiler/disabled_tests/compiler/circuits/big_self_outside_circuit_fail.leo +++ /dev/null @@ -1,21 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -circuit Foo { - x: u32; - - function new() -> Self { - let new: Self = Self { - x: 1u32 - }; - - return new; - } -} - -function main() { - let foo: Self = Foo::new(); -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/circuits/circuit_alias_namespace_conflict_fail.leo b/compiler/disabled_tests/compiler/circuits/circuit_alias_namespace_conflict_fail.leo deleted file mode 100644 index 6a16938b37..0000000000 --- a/compiler/disabled_tests/compiler/circuits/circuit_alias_namespace_conflict_fail.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -circuit Int { - x: u8; -} - -type Int = u32; - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/circuits/circuit_function_namespace_conflict_fail.leo b/compiler/disabled_tests/compiler/circuits/circuit_function_namespace_conflict_fail.leo deleted file mode 100644 index 5ced98b02d..0000000000 --- a/compiler/disabled_tests/compiler/circuits/circuit_function_namespace_conflict_fail.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -circuit Foo { - x: u8; -} - -function Foo() {} - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/circuits/circuit_global_const_namespace_conflict_fail copy.leo b/compiler/disabled_tests/compiler/circuits/circuit_global_const_namespace_conflict_fail copy.leo deleted file mode 100644 index 53e363a137..0000000000 --- a/compiler/disabled_tests/compiler/circuits/circuit_global_const_namespace_conflict_fail copy.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -circuit Foo { - x: u8; -} - -const Foo = 8u8; - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/circuits/const_self_variable.leo b/compiler/disabled_tests/compiler/circuits/const_self_variable.leo deleted file mode 100644 index 80a5474f13..0000000000 --- a/compiler/disabled_tests/compiler/circuits/const_self_variable.leo +++ /dev/null @@ -1,19 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - a: u8; - - function use_a(const self) -> u8 { - return self.a + 1; - } -} - -function main(y: bool) -> bool { - let f = Foo { a: 0u8 }; - - return (1u8 == f.use_a()) == true; -} diff --git a/compiler/disabled_tests/compiler/circuits/const_self_variable_fail.leo b/compiler/disabled_tests/compiler/circuits/const_self_variable_fail.leo deleted file mode 100644 index d7f7b0ce75..0000000000 --- a/compiler/disabled_tests/compiler/circuits/const_self_variable_fail.leo +++ /dev/null @@ -1,18 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - a: u8; - - function set_a(const self, new: u8) { - self.a = new; - } -} - -function main() { - let f = Foo { a: 0u8 }; - - f.set_a(1u8); -} diff --git a/compiler/disabled_tests/compiler/circuits/define_circuit_inside_circuit_function.leo b/compiler/disabled_tests/compiler/circuits/define_circuit_inside_circuit_function.leo deleted file mode 100644 index e04eb547c6..0000000000 --- a/compiler/disabled_tests/compiler/circuits/define_circuit_inside_circuit_function.leo +++ /dev/null @@ -1,27 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - func_circ.in: | - [main] - a: u32 = 100; - - [registers] - r0: bool = false; -*/ - -circuit Foo { - a: u32, -} - -circuit Bar { - function bar(a: u32) -> u32 { - let f = Foo { a: a }; - return f.a; - } -} - -function main(a: u32) -> bool { - let b = Bar::bar(a); - return a == b; -} diff --git a/compiler/disabled_tests/compiler/circuits/duplicate_name_context.leo b/compiler/disabled_tests/compiler/circuits/duplicate_name_context.leo deleted file mode 100644 index 7b64611861..0000000000 --- a/compiler/disabled_tests/compiler/circuits/duplicate_name_context.leo +++ /dev/null @@ -1,21 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Bar { - b2: u32 - - function add_five(z: u32) -> u32 { - return z + 5u32; - } -} - -function main(y: bool) -> bool { - const Bar = 66u32; - const k1 = Bar { b2: 30u32 }; - const k2 = Bar::add_five(55u32); - - return y == true; -} diff --git a/compiler/disabled_tests/compiler/circuits/inline.leo b/compiler/disabled_tests/compiler/circuits/inline.leo deleted file mode 100644 index 332aa5aa2e..0000000000 --- a/compiler/disabled_tests/compiler/circuits/inline.leo +++ /dev/null @@ -1,20 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - inline.in: | - [main] - x: u32 = 100; - - [registers] - r0: u32 = 0; -*/ - -circuit Foo { - x: u32 -} - -function main(x: u32) -> u32 { - let a = Foo { x: x }; - return a.x; -} diff --git a/compiler/disabled_tests/compiler/circuits/inline_fail.leo b/compiler/disabled_tests/compiler/circuits/inline_fail.leo deleted file mode 100644 index 929976ae1b..0000000000 --- a/compiler/disabled_tests/compiler/circuits/inline_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - x: u32; -} - -function main() { - // no member y in Foo - const a = Foo { y: 0u32 }; -} diff --git a/compiler/disabled_tests/compiler/circuits/inline_member_fail.leo b/compiler/disabled_tests/compiler/circuits/inline_member_fail.leo deleted file mode 100644 index b451af9d77..0000000000 --- a/compiler/disabled_tests/compiler/circuits/inline_member_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - x: u8; -} - -function main() { - const y: u8 = 1; - const a = Foo { y }; -} diff --git a/compiler/disabled_tests/compiler/circuits/inline_member_pass.leo b/compiler/disabled_tests/compiler/circuits/inline_member_pass.leo deleted file mode 100644 index 8d56383dab..0000000000 --- a/compiler/disabled_tests/compiler/circuits/inline_member_pass.leo +++ /dev/null @@ -1,29 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - inline.in: | - [main] - y: bool = true; - - [constants] - x: u8 = 10; - - [registers] - r0: bool = false; -*/ - -circuit Foo { - x: u8 - - function new(x: u8) -> Self { - return Self { x }; - } -} - -function main(const x: u8, y: bool) -> bool { - const a = Foo { x }; - const b = Foo::new(x); - - return (b.x == a.x) == y; -} diff --git a/compiler/disabled_tests/compiler/circuits/inline_undefined.leo b/compiler/disabled_tests/compiler/circuits/inline_undefined.leo deleted file mode 100644 index f7b9e40eaa..0000000000 --- a/compiler/disabled_tests/compiler/circuits/inline_undefined.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a = Foo { }; -} diff --git a/compiler/disabled_tests/compiler/circuits/input/dummy.in b/compiler/disabled_tests/compiler/circuits/input/dummy.in deleted file mode 100644 index d63f21e6b5..0000000000 --- a/compiler/disabled_tests/compiler/circuits/input/dummy.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -y: bool = true; -x: bool = false; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/circuits/member_function.leo b/compiler/disabled_tests/compiler/circuits/member_function.leo deleted file mode 100644 index 81b513d38c..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_function.leo +++ /dev/null @@ -1,19 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - x: u32, - - function echo(self) -> u32 { - return self.x; - } -} - -function main(y: bool) -> bool { - const a = Foo { x: 1u32 }; - - return (a.echo() == 1u32) == true; -} diff --git a/compiler/disabled_tests/compiler/circuits/member_function_fail.leo b/compiler/disabled_tests/compiler/circuits/member_function_fail.leo deleted file mode 100644 index 4409fa88bb..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_function_fail.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main() { - const a = Foo { }; - const err = a.echoed(1u32); -} diff --git a/compiler/disabled_tests/compiler/circuits/member_function_invalid.leo b/compiler/disabled_tests/compiler/circuits/member_function_invalid.leo deleted file mode 100644 index d116dc3b6c..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_function_invalid.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main() { - const a = Foo { }; - const err = a.echo(1u32); // echo is a static function and must be accessed using `::` -} diff --git a/compiler/disabled_tests/compiler/circuits/member_function_nested.leo b/compiler/disabled_tests/compiler/circuits/member_function_nested.leo deleted file mode 100644 index f464f9cb6e..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_function_nested.leo +++ /dev/null @@ -1,30 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - inline.in: | - [main] - x: u32 = 10; - - [registers] - r0: bool = false; -*/ - -circuit Foo { - x: u32, - - function add_x(self, y: u32) -> u32 { - return self.x + y; - } - - function call_add_x(self, y: u32) -> u32 { - return self.add_x(y); - } -} - -function main(x: u32) -> bool { - let a = Foo { x }; - let b = a.add_x(1u32); - - return b == x + 1; -} diff --git a/compiler/disabled_tests/compiler/circuits/member_static_function.leo b/compiler/disabled_tests/compiler/circuits/member_static_function.leo deleted file mode 100644 index b9947f7007..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_static_function.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main(y: bool) -> bool { - const a = Foo::echo(1u32); - - return (a == 1u32) == y; -} diff --git a/compiler/disabled_tests/compiler/circuits/member_static_function_invalid.leo b/compiler/disabled_tests/compiler/circuits/member_static_function_invalid.leo deleted file mode 100644 index c7f3efea3a..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_static_function_invalid.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main() { - const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::` -} diff --git a/compiler/disabled_tests/compiler/circuits/member_static_function_nested.leo b/compiler/disabled_tests/compiler/circuits/member_static_function_nested.leo deleted file mode 100644 index 25c309670e..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_static_function_nested.leo +++ /dev/null @@ -1,23 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - function qux() {} - - function bar() { - Self::qux(); - } - - function baz() { - Self::bar(); - } -} - -function main(y: bool) -> bool { - Foo::baz(); - - return y == true; -} diff --git a/compiler/disabled_tests/compiler/circuits/member_static_function_undefined.leo b/compiler/disabled_tests/compiler/circuits/member_static_function_undefined.leo deleted file mode 100644 index 11e33b4166..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_static_function_undefined.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main() { - const err = Foo::echoed(1u32); -} diff --git a/compiler/disabled_tests/compiler/circuits/member_variable.leo b/compiler/disabled_tests/compiler/circuits/member_variable.leo deleted file mode 100644 index 53d49315c8..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_variable.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - x: u32, -} - -function main(y: bool) -> bool { - const a = Foo { x: 1u32 }; - - return (a.x == 1u32) == y; -} diff --git a/compiler/disabled_tests/compiler/circuits/member_variable_and_function.leo b/compiler/disabled_tests/compiler/circuits/member_variable_and_function.leo deleted file mode 100644 index 0b9a38c1b6..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_variable_and_function.leo +++ /dev/null @@ -1,20 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - foo: u32; - - function bar() -> u32 { - return 1u32; - } -} - -function main(y: bool) -> bool { - const a = Foo { foo: 1 }; - const b = a.foo + Foo::bar(); - - return (b == 2u32) == y; -} diff --git a/compiler/disabled_tests/compiler/circuits/member_variable_fail.leo b/compiler/disabled_tests/compiler/circuits/member_variable_fail.leo deleted file mode 100644 index 110cba7fa9..0000000000 --- a/compiler/disabled_tests/compiler/circuits/member_variable_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - x: u32; -} - -function main() { - const a = Foo { x: 1u32 }; - const err = a.y; -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_function_fail.leo b/compiler/disabled_tests/compiler/circuits/mut_function_fail.leo deleted file mode 100644 index cb92fcc6f9..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_function_fail.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - a: u8; - - function bar() {} -} - -function main() { - let f = Foo { a: 0u8 }; - - f.bar = 1u8; -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_self_function_fail.leo b/compiler/disabled_tests/compiler/circuits/mut_self_function_fail.leo deleted file mode 100644 index 7d699a14fb..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_self_function_fail.leo +++ /dev/null @@ -1,20 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - a: u8; - - function bar() {} - - function set_a(mut self, new: u8) { - self.bar = new; - } -} - -function main() { - let f = Foo { a: 0u8 }; - - f.set_a(1u8); -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_self_static_function_fail.leo b/compiler/disabled_tests/compiler/circuits/mut_self_static_function_fail.leo deleted file mode 100644 index 7d699a14fb..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_self_static_function_fail.leo +++ /dev/null @@ -1,20 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - a: u8; - - function bar() {} - - function set_a(mut self, new: u8) { - self.bar = new; - } -} - -function main() { - let f = Foo { a: 0u8 }; - - f.set_a(1u8); -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_self_variable.leo b/compiler/disabled_tests/compiler/circuits/mut_self_variable.leo deleted file mode 100644 index 4781cf6d20..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_self_variable.leo +++ /dev/null @@ -1,22 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - a: u8; - - function set_a(mut self, new: u8) { - self.a = new; - } -} - -function main(y: bool) -> bool { - let f = Foo { a: 0u8 }; - - f.set_a(1u8); - f.set_a(2u8); - - return (f.a == 2u8) == y; -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_self_variable_branch.leo b/compiler/disabled_tests/compiler/circuits/mut_self_variable_branch.leo deleted file mode 100644 index 6e8cd83be7..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_self_variable_branch.leo +++ /dev/null @@ -1,26 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - a: u8; - - function set_a(mut self, condition: bool, new: u8) { - if condition { - self.a = new; - } - } -} - -function main(y: bool) -> bool { - let f = Foo { a: 0u8 }; - - f.set_a(false, 1u8); - f.set_a(true, 1u8); - f.set_a(false, 2u8); - f.set_a(true, 2u8); - - return (f.a == 2u8) == y; -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_self_variable_conditional.leo b/compiler/disabled_tests/compiler/circuits/mut_self_variable_conditional.leo deleted file mode 100644 index 625460fa97..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_self_variable_conditional.leo +++ /dev/null @@ -1,23 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - let f = Foo { a: 0u32 }; - - f.bar(); - - return y == true; -} - -circuit Foo { - a: u32; - - function bar(mut self) { - if true { - self.a = 5u32; // Mutating a variable inside a conditional statement should work. - } - } -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_self_variable_fail.leo b/compiler/disabled_tests/compiler/circuits/mut_self_variable_fail.leo deleted file mode 100644 index 7234cafd05..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_self_variable_fail.leo +++ /dev/null @@ -1,18 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - a: u8; - - function set_a(self, new: u8) { - self.a = new; - } -} - -function main() { - let f = Foo { a: 0u8 }; - - f.set_a(1u8); -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_static_function_fail.leo b/compiler/disabled_tests/compiler/circuits/mut_static_function_fail.leo deleted file mode 100644 index 8e70eb1ca0..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_static_function_fail.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - function bar() {} -} - -function main() { - let f = Foo { a: 0u8 }; - - f.bar = 1u8; -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_variable.leo b/compiler/disabled_tests/compiler/circuits/mut_variable.leo deleted file mode 100644 index 640010a4b4..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_variable.leo +++ /dev/null @@ -1,18 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - a: u8; -} - -function main(y: bool) -> bool { - let f = Foo { a: 0u8 }; - - f.a = 1u8; - f.a = 2u8; - - return (f.a == 2u8) == true; -} diff --git a/compiler/disabled_tests/compiler/circuits/mut_variable_fail.leo b/compiler/disabled_tests/compiler/circuits/mut_variable_fail.leo deleted file mode 100644 index bb948654a7..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mut_variable_fail.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - a: u8; -} - -function main() { - const f = Foo { a: 0u8 }; - - f.a = 1u8; -} diff --git a/compiler/disabled_tests/compiler/circuits/mutable_call_immutable_context.leo b/compiler/disabled_tests/compiler/circuits/mutable_call_immutable_context.leo deleted file mode 100644 index acb90ce0fc..0000000000 --- a/compiler/disabled_tests/compiler/circuits/mutable_call_immutable_context.leo +++ /dev/null @@ -1,29 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit TestMe { - x: u8; - - function test_me(mut self) -> u8 { - self.x += 1; - return self.x; - } - - function new() -> Self { - return Self { x: 1u8 }; - } -} - -function my_fn() -> TestMe { - return TestMe { x: 0u8 }; -} - -function main(y: bool) -> bool { - const t = TestMe {x: 6u8}.test_me(); - const u = my_fn().test_me(); - const v = TestMe::new().test_me(); - return (v == 2u8) == y; -} diff --git a/compiler/disabled_tests/compiler/circuits/pedersen_mock.leo b/compiler/disabled_tests/compiler/circuits/pedersen_mock.leo deleted file mode 100644 index 76b29d7291..0000000000 --- a/compiler/disabled_tests/compiler/circuits/pedersen_mock.leo +++ /dev/null @@ -1,37 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - pedersen.in: | - [main] - hash_input: [bool; 512] = [true; 512]; - - [registers] - r0: bool = false; -*/ - -circuit PedersenHash { - parameters: [u32; 512]; - - function new(parameters: [u32; 512]) -> Self { - return Self { parameters: parameters }; - } - - function hash(const self, bits: [bool; 512]) -> u32 { - let digest: u32 = 0; - for i in 0..512 { - let base = bits[i] ? self.parameters[i] : 0u32; - digest += base; - } - return digest; - } -} - -// The 'pedersen_hash' main function. -function main(hash_input: [bool; 512]) -> bool { - const parameters = [0u32; 512]; - const pedersen = PedersenHash::new(parameters); - let res = pedersen.hash(hash_input); - - return res == 0u32; -} diff --git a/compiler/disabled_tests/compiler/circuits/return_self_type_array.leo b/compiler/disabled_tests/compiler/circuits/return_self_type_array.leo deleted file mode 100644 index 9ce1800a16..0000000000 --- a/compiler/disabled_tests/compiler/circuits/return_self_type_array.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Circ { - function fn () -> [Self; 1] { - return [Self {}]; - } -} - -function main (y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/circuits/return_self_type_tuple.leo b/compiler/disabled_tests/compiler/circuits/return_self_type_tuple.leo deleted file mode 100644 index 20fcae98c5..0000000000 --- a/compiler/disabled_tests/compiler/circuits/return_self_type_tuple.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Circ { - function fn () -> (Self,u8) { - return (Self {}, 1); - } -} - -function main (y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/circuits/self_circuit.leo b/compiler/disabled_tests/compiler/circuits/self_circuit.leo deleted file mode 100644 index 3ec141db2f..0000000000 --- a/compiler/disabled_tests/compiler/circuits/self_circuit.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - // static is deprecated - static function new() -> Self { - return Self { }; - } -} - -function main() { - const a = Foo::new(); -} diff --git a/compiler/disabled_tests/compiler/circuits/self_fail.leo b/compiler/disabled_tests/compiler/circuits/self_fail.leo deleted file mode 100644 index 8cc50d3aae..0000000000 --- a/compiler/disabled_tests/compiler/circuits/self_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - Self::main(); -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/circuits/self_member.leo b/compiler/disabled_tests/compiler/circuits/self_member.leo deleted file mode 100644 index fc92fc989c..0000000000 --- a/compiler/disabled_tests/compiler/circuits/self_member.leo +++ /dev/null @@ -1,20 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - f: u32; - - function bar(self) -> u32 { - return self.f; - } -} - -function main(y: bool) -> bool { - const a = Foo { f: 1u32 }; - const b = a.bar(); - - return (b == 1u32) == y; -} diff --git a/compiler/disabled_tests/compiler/circuits/self_member_invalid.leo b/compiler/disabled_tests/compiler/circuits/self_member_invalid.leo deleted file mode 100644 index cfd079b58e..0000000000 --- a/compiler/disabled_tests/compiler/circuits/self_member_invalid.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - f: u32; - - function bar() -> u32 { - return f; - } -} - -function main() -> u32 { - const foo = Foo { f: 1u32 }; - const err = foo.bar(); -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/circuits/self_member_undefined.leo b/compiler/disabled_tests/compiler/circuits/self_member_undefined.leo deleted file mode 100644 index 5674da414b..0000000000 --- a/compiler/disabled_tests/compiler/circuits/self_member_undefined.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - function bar() -> u32 { - return self.f; - } -} - -function main() { - const foo = Foo { }; - const err = foo.bar(); -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/console/log_parameter_empty_fail.leo b/compiler/disabled_tests/compiler/console/log_parameter_empty_fail.leo deleted file mode 100644 index 663431bd24..0000000000 --- a/compiler/disabled_tests/compiler/console/log_parameter_empty_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - console.log("{}"); -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/console/log_parameter_none_fail.leo b/compiler/disabled_tests/compiler/console/log_parameter_none_fail.leo deleted file mode 100644 index 70b2710388..0000000000 --- a/compiler/disabled_tests/compiler/console/log_parameter_none_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - console.log("", 1u32); -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/function/array_input.leo b/compiler/disabled_tests/compiler/function/array_input.leo deleted file mode 100644 index 1f6f35b01b..0000000000 --- a/compiler/disabled_tests/compiler/function/array_input.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function foo(a: [u8; 1]) {} - -function main(y: bool) -> bool { - const a: [u8; 1] = [1; 1]; - foo(a); - return y == true; -} diff --git a/compiler/disabled_tests/compiler/function/array_params_direct_call.leo b/compiler/disabled_tests/compiler/function/array_params_direct_call.leo deleted file mode 100644 index 7cf090e2ff..0000000000 --- a/compiler/disabled_tests/compiler/function/array_params_direct_call.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function do_nothing(arr: [u32; 2]) {} - -function main(y: bool) -> bool { - const arr: [u32; 2] = [0; 2]; - - do_nothing(arr); - do_nothing([...arr]); - do_nothing(arr[0u32..]); - - return y == true; -} diff --git a/compiler/disabled_tests/compiler/function/empty.leo b/compiler/disabled_tests/compiler/function/empty.leo deleted file mode 100644 index f101d15fcc..0000000000 --- a/compiler/disabled_tests/compiler/function/empty.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function empty() {} - -function main(y: bool) -> bool { - empty(); - return y == true; -} diff --git a/compiler/disabled_tests/compiler/function/function_alias_namespace_conflict_fail.leo b/compiler/disabled_tests/compiler/function/function_alias_namespace_conflict_fail.leo deleted file mode 100644 index b8cad08251..0000000000 --- a/compiler/disabled_tests/compiler/function/function_alias_namespace_conflict_fail.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -function int() {} - -type int = u32; - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/function/function_circuit_namespace_conflict_fail.leo b/compiler/disabled_tests/compiler/function/function_circuit_namespace_conflict_fail.leo deleted file mode 100644 index 3ddbb6c8c2..0000000000 --- a/compiler/disabled_tests/compiler/function/function_circuit_namespace_conflict_fail.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -function Foo() {} - -circuit Foo { - x: u8; -} - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/function/function_global_const_namespace_conflict_fail copy.leo b/compiler/disabled_tests/compiler/function/function_global_const_namespace_conflict_fail copy.leo deleted file mode 100644 index 1f3fd2880f..0000000000 --- a/compiler/disabled_tests/compiler/function/function_global_const_namespace_conflict_fail copy.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -function foo() {} - -const foo = 8u8; - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/function/multiple_returns.leo b/compiler/disabled_tests/compiler/function/multiple_returns.leo deleted file mode 100644 index 6ea5112459..0000000000 --- a/compiler/disabled_tests/compiler/function/multiple_returns.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function tuple() -> (bool, bool) { - return (true, false); -} - -function main(y: bool) -> bool { - const (a, b) = tuple(); - - return a == true && b == false && y == true; -} diff --git a/compiler/disabled_tests/compiler/function/multiple_returns_fail.leo b/compiler/disabled_tests/compiler/function/multiple_returns_fail.leo deleted file mode 100644 index 2f956ea1d1..0000000000 --- a/compiler/disabled_tests/compiler/function/multiple_returns_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function main() -> i8 { - return 2i8; - return 3i8; -} diff --git a/compiler/disabled_tests/compiler/function/multiple_returns_fail_conditional.leo b/compiler/disabled_tests/compiler/function/multiple_returns_fail_conditional.leo deleted file mode 100644 index 29ce76b882..0000000000 --- a/compiler/disabled_tests/compiler/function/multiple_returns_fail_conditional.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function main() -> bool { - if false { - const a = 1u16; - const b = a + 1u16; - return b == 2u16; - } else if false { - return true; - } -} diff --git a/compiler/disabled_tests/compiler/function/multiple_returns_main.leo b/compiler/disabled_tests/compiler/function/multiple_returns_main.leo deleted file mode 100644 index f0ae21e232..0000000000 --- a/compiler/disabled_tests/compiler/function/multiple_returns_main.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main() -> (bool, bool) { - return (input.registers.r0, input.registers.r1); -} diff --git a/compiler/disabled_tests/compiler/function/newlines.leo b/compiler/disabled_tests/compiler/function/newlines.leo deleted file mode 100644 index f783569809..0000000000 --- a/compiler/disabled_tests/compiler/function/newlines.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/integers.in -*/ - -function main( - a: u32, - b: u32, -) -> ( - u32, - u32, -) { - return (a, b); -} diff --git a/compiler/disabled_tests/compiler/function/return_array_nested_fail.leo b/compiler/disabled_tests/compiler/function/return_array_nested_fail.leo deleted file mode 100644 index 6e1bd15458..0000000000 --- a/compiler/disabled_tests/compiler/function/return_array_nested_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function array_3x2_tuple() -> [[u8; 2]; 3] { - return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]` -} - -function main() { - const b = array_3x2_tuple(); -} diff --git a/compiler/disabled_tests/compiler/function/return_array_nested_pass.leo b/compiler/disabled_tests/compiler/function/return_array_nested_pass.leo deleted file mode 100644 index fa373586b1..0000000000 --- a/compiler/disabled_tests/compiler/function/return_array_nested_pass.leo +++ /dev/null @@ -1,19 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function array_3x2_nested() -> [[u8; 2]; 3] { - return [[0u8; 2]; 3]; -} - -function array_3x2_tuple() -> [[u8; 2]; 3] { - return [0u8; (3, 2)]; -} - -function main(y: bool) -> bool { - const a = array_3x2_nested(); - const b = array_3x2_tuple(); - return y == true; -} diff --git a/compiler/disabled_tests/compiler/function/return_array_tuple_fail.leo b/compiler/disabled_tests/compiler/function/return_array_tuple_fail.leo deleted file mode 100644 index c5d3a9fd20..0000000000 --- a/compiler/disabled_tests/compiler/function/return_array_tuple_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function array_3x2_nested() -> [u8; (3, 2)] { - return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]` -} - -function main() { - const a = array_3x2_nested(); -} diff --git a/compiler/disabled_tests/compiler/function/return_array_tuple_pass.leo b/compiler/disabled_tests/compiler/function/return_array_tuple_pass.leo deleted file mode 100644 index 0ff56abe29..0000000000 --- a/compiler/disabled_tests/compiler/function/return_array_tuple_pass.leo +++ /dev/null @@ -1,19 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function array_3x2_nested() -> [u8; (3, 2)] { - return [[0u8; 2]; 3]; -} - -function array_3x2_tuple() -> [u8; (3, 2)] { - return [0u8; (3, 2)]; -} - -function main(y: bool) -> bool { - const a = array_3x2_nested(); - const b = array_3x2_tuple(); - return y == true; -} diff --git a/compiler/disabled_tests/compiler/function/return_tuple.leo b/compiler/disabled_tests/compiler/function/return_tuple.leo deleted file mode 100644 index f36a41997a..0000000000 --- a/compiler/disabled_tests/compiler/function/return_tuple.leo +++ /dev/null @@ -1,25 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - tuple.in: | - [main] - a: u32 = 100; - - [registers] - r0: (u8, u8) = (0, 0); - r1: u32 = 100; -*/ - -// Returns a tuple of tuples. -function tuples() -> ((u8, u8), u32) { - const a: (u8, u8) = (1, 2); - const b: u32 = 3; - - return (a, b); -} - -function main(a: u32) -> ((u8, u8), u32) { - const (t1, b) = tuples(); - return (t1, a + b); -} diff --git a/compiler/disabled_tests/compiler/function/return_tuple_conditional.leo b/compiler/disabled_tests/compiler/function/return_tuple_conditional.leo deleted file mode 100644 index 55cc2b14cb..0000000000 --- a/compiler/disabled_tests/compiler/function/return_tuple_conditional.leo +++ /dev/null @@ -1,23 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/integers.in -*/ - -// Returns a tuple using a conditional "if" statement. -function tuple_conditional () -> ( - u32, - u32 -) { - if true { - return (1, 1); - } else { - return (2, 2); - } -} - -function main(a: u32, b: u32) -> (u32, u32) { - let (a1, b1) = tuple_conditional(); - - return (a + a1, b + b1); -} diff --git a/compiler/disabled_tests/compiler/function/shadow_global_const_input_fail copy.leo b/compiler/disabled_tests/compiler/function/shadow_global_const_input_fail copy.leo deleted file mode 100644 index 288c4ba829..0000000000 --- a/compiler/disabled_tests/compiler/function/shadow_global_const_input_fail copy.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -const hi = 1u32; - -function tester(hi: u8) {} - -function main (y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/function/shadow_global_const_var_fail.leo b/compiler/disabled_tests/compiler/function/shadow_global_const_var_fail.leo deleted file mode 100644 index e2d340f2e8..0000000000 --- a/compiler/disabled_tests/compiler/function/shadow_global_const_var_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -function tester(hi: u8) { - const hi = 1u8; -} - -function main (y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/function/value_unchanged.leo b/compiler/disabled_tests/compiler/function/value_unchanged.leo deleted file mode 100644 index df1f5e03dd..0000000000 --- a/compiler/disabled_tests/compiler/function/value_unchanged.leo +++ /dev/null @@ -1,25 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -// Functions input in leo are pass-by-value. -// -// Program execution: -// line 15: variable `a` is defined with value `1`. -// line 16: value `1` is copied and passed into function `bad_mutate()`. -// line 10: variable `x` is defined with value `1`. -// line 11: variable `x` is set to value `0`. -// line 18: program returns the value of `a`. - -function bad_mutate(x: u32) { - x = 0; // <- does not change `a` -} - -function main(y: bool) -> bool { - const a = 1u32; - bad_mutate(a); - - return (a == 1u32) == y; // <- value `a` is still `1u32` -} diff --git a/compiler/disabled_tests/compiler/global_consts/global_const_alias_namespace_conflict_fail.leo b/compiler/disabled_tests/compiler/global_consts/global_const_alias_namespace_conflict_fail.leo deleted file mode 100644 index e76d422fe6..0000000000 --- a/compiler/disabled_tests/compiler/global_consts/global_const_alias_namespace_conflict_fail.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -const int = 8u8; - -type int = u32; - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/global_consts/global_const_circuit_namespace_conflict_fail copy.leo b/compiler/disabled_tests/compiler/global_consts/global_const_circuit_namespace_conflict_fail copy.leo deleted file mode 100644 index 855aacc400..0000000000 --- a/compiler/disabled_tests/compiler/global_consts/global_const_circuit_namespace_conflict_fail copy.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -const Foo = 8u8; - -circuit Foo { - x: u8; -} - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/global_consts/global_const_function_namespace_conflict_fail.leo b/compiler/disabled_tests/compiler/global_consts/global_const_function_namespace_conflict_fail.leo deleted file mode 100644 index 81e3fa489f..0000000000 --- a/compiler/disabled_tests/compiler/global_consts/global_const_function_namespace_conflict_fail.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: - - inputs/dummy.in -*/ - -const two = 2u8; - -function two() {} - -function main(y: bool) -> bool { - return y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/global_consts/global_const_types.leo b/compiler/disabled_tests/compiler/global_consts/global_const_types.leo deleted file mode 100644 index db73b8cc04..0000000000 --- a/compiler/disabled_tests/compiler/global_consts/global_const_types.leo +++ /dev/null @@ -1,55 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - globals.in: | - [main] - a: u32 = 0; - - [registers] - r0: bool = false; -*/ - -const basic: u32 = 8; -const array: [u8; (3, 2)] = [[0u8; 2]; 3]; -const tuple = (1u32, 2u32); -const (a, b) = (1u32, 2u32); -const simple_group: group = 1group; -const complex_group = (_, 1)group; -const field_test: field = 2; -const use_another_const = basic + 1; -const foo = Foo { width: 10, height: 20 }; -const one = uno(); -const character = 'a'; -const hello = "Hello, World!"; - -circuit Foo { - width: u32, - height: u32, -} - -function uno() -> u32 { - return 1u32; -} - -function main(a: u32) -> bool { - let (x, y) = (1u32, 2u32); - - return a == basic - && basic == 8u32 - && array[0][0] == 0 // arrays - && array[2][1] == 0 - && x == 1u32 // tuple test - && y == 2u32 - && a == 1u32 // tuple extraction test - && b == 2u32 - && simple_group == 1group // group test - && complex_group == (_, 1)group - && field_test == 2field // field test - && use_another_const == 9u32 // use another const test - && foo.width == 10u32 // circuit test - && foo.height == 20u32 - && one == 1u32 // function test - && character == 'a' // char test - && hello == "Hello, World!"; -} diff --git a/compiler/disabled_tests/compiler/global_consts/inputs/dummy.in b/compiler/disabled_tests/compiler/global_consts/inputs/dummy.in deleted file mode 100644 index d63f21e6b5..0000000000 --- a/compiler/disabled_tests/compiler/global_consts/inputs/dummy.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -y: bool = true; -x: bool = false; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/global_consts/modify_global_const.leo b/compiler/disabled_tests/compiler/global_consts/modify_global_const.leo deleted file mode 100644 index cc4b3c447f..0000000000 --- a/compiler/disabled_tests/compiler/global_consts/modify_global_const.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -const basic: u32 = 8; - -function main() { - // Cannot re-assign! - basic = 2u32; -} diff --git a/compiler/disabled_tests/compiler/import_dependency/imports/dependency/inputs/dependency.in b/compiler/disabled_tests/compiler/import_dependency/imports/dependency/inputs/dependency.in deleted file mode 100644 index 03eacdd3ad..0000000000 --- a/compiler/disabled_tests/compiler/import_dependency/imports/dependency/inputs/dependency.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] - -[registers] diff --git a/compiler/disabled_tests/compiler/import_dependency/imports/dependency/src/main.leo b/compiler/disabled_tests/compiler/import_dependency/imports/dependency/src/main.leo deleted file mode 100644 index 72ea6c10fc..0000000000 --- a/compiler/disabled_tests/compiler/import_dependency/imports/dependency/src/main.leo +++ /dev/null @@ -1,5 +0,0 @@ -circuit Cave { - function name() -> [char; 4] { - return "cave"; - } -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/import_dependency/input/dummy.in b/compiler/disabled_tests/compiler/import_dependency/input/dummy.in deleted file mode 100644 index 5686421617..0000000000 --- a/compiler/disabled_tests/compiler/import_dependency/input/dummy.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -y: bool = true; -n: bool = false; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/import_dependency/readme.md b/compiler/disabled_tests/compiler/import_dependency/readme.md deleted file mode 100644 index 276f8fe3e9..0000000000 --- a/compiler/disabled_tests/compiler/import_dependency/readme.md +++ /dev/null @@ -1,8 +0,0 @@ -Tests in this folder test external dependencies that were imported. To mock that we -need to have structure similar to typical Leo package: source files must be in the -directory next to `imports/`; but instead of `src/` we have `tests/` here. - -Option `cwd` param in these tests must point to the `tests/`, so having it as `.` -should be enough. - -Have fun testing! diff --git a/compiler/disabled_tests/compiler/import_dependency/tests/import_dependency_folder.leo b/compiler/disabled_tests/compiler/import_dependency/tests/import_dependency_folder.leo deleted file mode 100644 index 2b67b4af14..0000000000 --- a/compiler/disabled_tests/compiler/import_dependency/tests/import_dependency_folder.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: ../input/dummy.in -cwd: . -*/ - -import dependency.*; - -function main(y: bool) -> bool { - return y == (Cave::name() == "cave"); -} diff --git a/compiler/disabled_tests/compiler/import_local/import_all.leo b/compiler/disabled_tests/compiler/import_local/import_all.leo deleted file mode 100644 index 9839a6d139..0000000000 --- a/compiler/disabled_tests/compiler/import_local/import_all.leo +++ /dev/null @@ -1,18 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: local_imports -*/ - -import circuits.*; - -function main(y: bool) -> bool { - const a = Point { x: 1u32, y: 0u32 }; - const hello_alias: char5 = "hello"; - const hello = "hello"; - const eight = 8u8; - const fab = fab_gen(); - - return( (foo() == 1u32) && hello_alias == hello && EIGHT == eight) == y; -} diff --git a/compiler/disabled_tests/compiler/import_local/import_as.leo b/compiler/disabled_tests/compiler/import_local/import_as.leo deleted file mode 100644 index 36629594f9..0000000000 --- a/compiler/disabled_tests/compiler/import_local/import_as.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: local_imports -*/ - -import lib.say_hello as howdy; - -function main(y: bool) -> bool { - return y == (howdy() == "hello"); -} diff --git a/compiler/disabled_tests/compiler/import_local/import_dir.leo b/compiler/disabled_tests/compiler/import_local/import_dir.leo deleted file mode 100644 index 229b4a90e9..0000000000 --- a/compiler/disabled_tests/compiler/import_local/import_dir.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: local_imports -*/ - -import nested.hello.say_hello; - -function main(y: bool) -> bool { - return y == (say_hello() == "hello"); -} diff --git a/compiler/disabled_tests/compiler/import_local/import_files.leo b/compiler/disabled_tests/compiler/import_local/import_files.leo deleted file mode 100644 index 05c1b68a97..0000000000 --- a/compiler/disabled_tests/compiler/import_local/import_files.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: local_imports -*/ - -import lib.say_hello; - -function main(y: bool) -> bool { - return y == (say_hello() == "hello"); -} diff --git a/compiler/disabled_tests/compiler/import_local/import_many.leo b/compiler/disabled_tests/compiler/import_local/import_many.leo deleted file mode 100644 index 139deea8d2..0000000000 --- a/compiler/disabled_tests/compiler/import_local/import_many.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: local_imports -*/ - -import circuits.( - Point, - foo -); - -function main(y: bool) -> bool { - const a = Point { x: 1u32, y: 0u32 }; - - return (foo() == 1u32) == y; -} diff --git a/compiler/disabled_tests/compiler/import_local/import_weird_names.leo b/compiler/disabled_tests/compiler/import_local/import_weird_names.leo deleted file mode 100644 index 2a2e169d7f..0000000000 --- a/compiler/disabled_tests/compiler/import_local/import_weird_names.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: local_imports -*/ - -import a-9.*; - -function main(y: bool) -> bool { - return y == true; -} diff --git a/compiler/disabled_tests/compiler/import_local/import_weird_names_nested.leo b/compiler/disabled_tests/compiler/import_local/import_weird_names_nested.leo deleted file mode 100644 index 303035844d..0000000000 --- a/compiler/disabled_tests/compiler/import_local/import_weird_names_nested.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: local_imports -*/ - -import a-9.nested.c-d.*; - -function main(y: bool) -> bool { - return y == cd(); -} diff --git a/compiler/disabled_tests/compiler/import_local/input/dummy.in b/compiler/disabled_tests/compiler/import_local/input/dummy.in deleted file mode 100644 index 5686421617..0000000000 --- a/compiler/disabled_tests/compiler/import_local/input/dummy.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -y: bool = true; -n: bool = false; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/import_local/local_imports/a-9.leo b/compiler/disabled_tests/compiler/import_local/local_imports/a-9.leo deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/compiler/disabled_tests/compiler/import_local/local_imports/circuits.leo b/compiler/disabled_tests/compiler/import_local/local_imports/circuits.leo deleted file mode 100644 index 0a6857c965..0000000000 --- a/compiler/disabled_tests/compiler/import_local/local_imports/circuits.leo +++ /dev/null @@ -1,18 +0,0 @@ -circuit Point { - x: u32 - y: u32 -} - -function foo() -> u32 { - return 1u32; -} - -type char5 = [char; 5]; - -const EIGHT = 8u8; - -import nested.c-d.Fab; - -function fab_gen() -> Fab { - return Fab { x: 3 }; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/import_local/local_imports/lib.leo b/compiler/disabled_tests/compiler/import_local/local_imports/lib.leo deleted file mode 100644 index a32e24032a..0000000000 --- a/compiler/disabled_tests/compiler/import_local/local_imports/lib.leo +++ /dev/null @@ -1,3 +0,0 @@ -function say_hello() -> [char; 5] { - return "hello"; -} diff --git a/compiler/disabled_tests/compiler/import_local/local_imports/nested/c-d.leo b/compiler/disabled_tests/compiler/import_local/local_imports/nested/c-d.leo deleted file mode 100644 index e06de190df..0000000000 --- a/compiler/disabled_tests/compiler/import_local/local_imports/nested/c-d.leo +++ /dev/null @@ -1,7 +0,0 @@ -circuit Fab { - x: u8; -} - -function cd() -> bool { - return true; -} diff --git a/compiler/disabled_tests/compiler/import_local/local_imports/nested/hello.leo b/compiler/disabled_tests/compiler/import_local/local_imports/nested/hello.leo deleted file mode 100644 index a32e24032a..0000000000 --- a/compiler/disabled_tests/compiler/import_local/local_imports/nested/hello.leo +++ /dev/null @@ -1,3 +0,0 @@ -function say_hello() -> [char; 5] { - return "hello"; -} diff --git a/compiler/disabled_tests/compiler/import_old/alias.leo b/compiler/disabled_tests/compiler/import_old/alias.leo deleted file mode 100644 index 6d3db96c1b..0000000000 --- a/compiler/disabled_tests/compiler/import_old/alias.leo +++ /dev/null @@ -1,10 +0,0 @@ -// namespace: Compile -// expectation: Pass -// input_file: input/dummy.in -// cwd: imports - -import test-import.foo as bar; - -function main(y: bool) -> bool { - return (bar() == 1u32) == y; -} diff --git a/compiler/disabled_tests/compiler/import_old/basic.leo b/compiler/disabled_tests/compiler/import_old/basic.leo deleted file mode 100644 index e1996bfb90..0000000000 --- a/compiler/disabled_tests/compiler/import_old/basic.leo +++ /dev/null @@ -1,10 +0,0 @@ -// namespace: Compile -// expectation: Pass -// input_file: input/dummy.in -// cwd: imports - -import test-import.foo; - -function main(y: bool) -> bool { - return (foo() == 1u32) == true; -} diff --git a/compiler/disabled_tests/compiler/import_old/imports/a-9.leo b/compiler/disabled_tests/compiler/import_old/imports/a-9.leo deleted file mode 100644 index 8cd9f87f14..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/a-9.leo +++ /dev/null @@ -1 +0,0 @@ -function bar() {} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/import_old/imports/a0-f.leo b/compiler/disabled_tests/compiler/import_old/imports/a0-f.leo deleted file mode 100644 index c99ad3b713..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/a0-f.leo +++ /dev/null @@ -1 +0,0 @@ -function foo() {} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/import_old/imports/bar/.gitignore b/compiler/disabled_tests/compiler/import_old/imports/bar/.gitignore deleted file mode 100644 index ea1472ec1f..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/bar/.gitignore +++ /dev/null @@ -1 +0,0 @@ -output/ diff --git a/compiler/disabled_tests/compiler/import_old/imports/bar/Leo.toml b/compiler/disabled_tests/compiler/import_old/imports/bar/Leo.toml deleted file mode 100644 index 8e22d51a95..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/bar/Leo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[package] -name = "bar" -version = "0.1.0" diff --git a/compiler/disabled_tests/compiler/import_old/imports/bar/src/bat/bat.leo b/compiler/disabled_tests/compiler/import_old/imports/bar/src/bat/bat.leo deleted file mode 100644 index f76edfe54e..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/bar/src/bat/bat.leo +++ /dev/null @@ -1,3 +0,0 @@ -circuit Bat { - t: u32; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/import_old/imports/bar/src/baz.leo b/compiler/disabled_tests/compiler/import_old/imports/bar/src/baz.leo deleted file mode 100644 index 9f18594ae9..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/bar/src/baz.leo +++ /dev/null @@ -1,9 +0,0 @@ -circuit Baz { - z: u32; -} - -circuit Bazzar { - a: u32; -} - -const ONE: u8 = 1; diff --git a/compiler/disabled_tests/compiler/import_old/imports/bar/src/lib.leo b/compiler/disabled_tests/compiler/import_old/imports/bar/src/lib.leo deleted file mode 100644 index 845b6e5fd3..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/bar/src/lib.leo +++ /dev/null @@ -1,3 +0,0 @@ -circuit Bar { - r: u32; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/import_old/imports/car/.gitignore b/compiler/disabled_tests/compiler/import_old/imports/car/.gitignore deleted file mode 100644 index ea1472ec1f..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/car/.gitignore +++ /dev/null @@ -1 +0,0 @@ -output/ diff --git a/compiler/disabled_tests/compiler/import_old/imports/car/Leo.toml b/compiler/disabled_tests/compiler/import_old/imports/car/Leo.toml deleted file mode 100644 index 15b76f1d76..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/car/Leo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[package] -name = "car" -version = "0.1.0" diff --git a/compiler/disabled_tests/compiler/import_old/imports/car/src/lib.leo b/compiler/disabled_tests/compiler/import_old/imports/car/src/lib.leo deleted file mode 100644 index 58a10e4067..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/car/src/lib.leo +++ /dev/null @@ -1,3 +0,0 @@ -circuit Car { - c: u32; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/import_old/imports/hello-world.leo b/compiler/disabled_tests/compiler/import_old/imports/hello-world.leo deleted file mode 100644 index 2d96e74c4c..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/hello-world.leo +++ /dev/null @@ -1 +0,0 @@ -function hello() {} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/import_old/imports/lib.leo b/compiler/disabled_tests/compiler/import_old/imports/lib.leo deleted file mode 100644 index 68d62cfc4b..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/lib.leo +++ /dev/null @@ -1,3 +0,0 @@ -function ello() -> [char; 4] { - return "ello"; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/import_old/imports/test-import.leo b/compiler/disabled_tests/compiler/import_old/imports/test-import.leo deleted file mode 100644 index 0a3c1aa06a..0000000000 --- a/compiler/disabled_tests/compiler/import_old/imports/test-import.leo +++ /dev/null @@ -1,11 +0,0 @@ -// test: ignore -// TODO: add some tag for ignored files - -circuit Point { - x: u32 - y: u32 -} - -function foo() -> u32 { - return 1u32; -} diff --git a/compiler/disabled_tests/compiler/import_old/input/dummy.in b/compiler/disabled_tests/compiler/import_old/input/dummy.in deleted file mode 100644 index c962c1fd35..0000000000 --- a/compiler/disabled_tests/compiler/import_old/input/dummy.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -y: bool = true; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/import_old/many_import.leo b/compiler/disabled_tests/compiler/import_old/many_import.leo deleted file mode 100644 index f0d1958377..0000000000 --- a/compiler/disabled_tests/compiler/import_old/many_import.leo +++ /dev/null @@ -1,31 +0,0 @@ -// namespace: Compile -// expectation: Pass -// input_file: input/dummy.in -// cwd: imports - -import test-import.( // local import - Point, - foo, -); - -import bar.( // imports directory import - Bar, - baz.(Baz, Bazzar), - bat.bat.Bat, -); - -import car.Car; // imports directory import - -function main(y: bool) -> bool { - const point = Point { x: 1u32, y: 1u32 }; - const foo = foo(); - - const bar = Bar { r: 1u32 }; - const baz = Baz { z: 1u32 }; - const bazzar = Bazzar { a: 1u32 }; - const bat = Bat { t: 1u32 }; - - const car = Car { c: 1u32 }; - - return (car.c == 1u32) == y; -} diff --git a/compiler/disabled_tests/compiler/import_old/many_import_star.leo b/compiler/disabled_tests/compiler/import_old/many_import_star.leo deleted file mode 100644 index 0076078903..0000000000 --- a/compiler/disabled_tests/compiler/import_old/many_import_star.leo +++ /dev/null @@ -1,24 +0,0 @@ -// namespace: Compile -// expectation: Pass -// input_file: input/dummy.in -// cwd: imports - -import test-import.*; // local import - -import bar.*; // imports directory import -import bar.baz.*; // imports directory import -import bar.bat.bat.*; // imports directory import -import car.*; // imports directory import - -function main(y: bool) -> bool { - const point = Point { x: 1u32, y: 1u32 }; - const foo = foo(); - - const bar = Bar { r: 1u32 }; - const bat = Bat { t: 1u32 }; - const baz = Baz { z: 1u32 }; - - const car = Car { c: 1u32 }; - - return (car.c == 1u32) == y; -} diff --git a/compiler/disabled_tests/compiler/import_old/multiple.leo b/compiler/disabled_tests/compiler/import_old/multiple.leo deleted file mode 100644 index 9c4eb1e5a7..0000000000 --- a/compiler/disabled_tests/compiler/import_old/multiple.leo +++ /dev/null @@ -1,15 +0,0 @@ -// namespace: Compile -// expectation: Pass -// input_file: input/dummy.in -// cwd: imports - -import test-import.( - Point, - foo -); - -function main(y: bool) -> bool { - const a = Point { x: 1u32, y: 0u32 }; - - return (a.x == 1u32) == y; -} diff --git a/compiler/disabled_tests/compiler/import_old/names.leo b/compiler/disabled_tests/compiler/import_old/names.leo deleted file mode 100644 index 1ea277e570..0000000000 --- a/compiler/disabled_tests/compiler/import_old/names.leo +++ /dev/null @@ -1,12 +0,0 @@ -// namespace: Compile -// expectation: Pass -// input_file: input/dummy.in -// cwd: imports - -import a0-f.foo; -import a-9.bar; -import hello-world.hello; - -function main(y: bool) -> bool { - return y == true; -} diff --git a/compiler/disabled_tests/compiler/import_old/names_a_dash_fail.leo b/compiler/disabled_tests/compiler/import_old/names_a_dash_fail.leo deleted file mode 100644 index 6b04ecc05c..0000000000 --- a/compiler/disabled_tests/compiler/import_old/names_a_dash_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -// namespace: Compile -// expectation: Fail -// input_file: input/dummy.in -// cwd: imports - -import a-.foo; - -function main() -> bool { - return false; -} diff --git a/compiler/disabled_tests/compiler/import_old/names_dash_a_fail.leo b/compiler/disabled_tests/compiler/import_old/names_dash_a_fail.leo deleted file mode 100644 index cb9ca59090..0000000000 --- a/compiler/disabled_tests/compiler/import_old/names_dash_a_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -// namespace: Compile -// expectation: Fail -// input_file: input/dummy.in -// cwd: imports - -import -a.foo; - -function main() -> bool { - return false; -} diff --git a/compiler/disabled_tests/compiler/import_old/names_dollar_fail.leo b/compiler/disabled_tests/compiler/import_old/names_dollar_fail.leo deleted file mode 100644 index bb24413a0b..0000000000 --- a/compiler/disabled_tests/compiler/import_old/names_dollar_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -// namespace: Compile -// expectation: Fail -// input_file: input/dummy.in -// cwd: imports - -import money$.foo; - -function main() -> bool { - return false; -} diff --git a/compiler/disabled_tests/compiler/import_old/names_underscore_fail.leo b/compiler/disabled_tests/compiler/import_old/names_underscore_fail.leo deleted file mode 100644 index 02a612ec75..0000000000 --- a/compiler/disabled_tests/compiler/import_old/names_underscore_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -// namespace: Compile -// expectation: Fail -// input_file: input/dummy.in -// cwd: imports - -import hello_world.foo; - -function main() -> bool { - return true; -} diff --git a/compiler/disabled_tests/compiler/import_old/star.leo b/compiler/disabled_tests/compiler/import_old/star.leo deleted file mode 100644 index 295ec2e199..0000000000 --- a/compiler/disabled_tests/compiler/import_old/star.leo +++ /dev/null @@ -1,12 +0,0 @@ -// namespace: Compile -// expectation: Pass -// input_file: input/dummy.in -// cwd: imports - -import test-import.*; - -function main(y: bool) -> bool { - const a = Point { x: 1u32, y: 0u32 }; - - return (foo() == 1u32) == y; -} diff --git a/compiler/disabled_tests/compiler/import_old/star_fail.leo b/compiler/disabled_tests/compiler/import_old/star_fail.leo deleted file mode 100644 index 746b654eac..0000000000 --- a/compiler/disabled_tests/compiler/import_old/star_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -// namespace: Compile -// expectation: Fail -// input_file: input/dummy.in -// cwd: imports - -// importing `*` from a directory is illegal -import bar.bat.*; - -function main() {} diff --git a/compiler/disabled_tests/compiler/import_old/string_import.leo b/compiler/disabled_tests/compiler/import_old/string_import.leo deleted file mode 100644 index b073b36fc9..0000000000 --- a/compiler/disabled_tests/compiler/import_old/string_import.leo +++ /dev/null @@ -1,12 +0,0 @@ -// namespace: Compile -// expectation: Pass -// input_file: input/dummy.in -// cwd: imports - -import lib.ello; - -function main(y: bool) -> bool { - let ello_str = ello(); - console.log("{}", ello_str); - return ello_str == "ello" && y; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/input_files/program_input/different_types_const_signed_fail.leo b/compiler/disabled_tests/compiler/input_files/program_input/different_types_const_signed_fail.leo deleted file mode 100644 index 5dd05e89dc..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/different_types_const_signed_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/different_types_const_signed_fail.in -*/ - -function main(const a: i32) { - let b = a * 2; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/different_types_fail_signed.leo b/compiler/disabled_tests/compiler/input_files/program_input/different_types_fail_signed.leo deleted file mode 100644 index 9d6b88c294..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/different_types_fail_signed.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/different_types_fail_signed.in -*/ - -function main(a: i32) { - let b = a * 2; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/different_types_unsigned_fail.leo b/compiler/disabled_tests/compiler/input_files/program_input/different_types_unsigned_fail.leo deleted file mode 100644 index 50d5965c0d..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/different_types_unsigned_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/different_types_unsigned_fail.in -*/ - -function main(a: u32) { - let b = a * 2; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/main_array.leo b/compiler/disabled_tests/compiler/input_files/program_input/main_array.leo deleted file mode 100644 index 349b05380a..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/main_array.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_array.in -*/ - -function main(x: [i16; 1]) -> bool{ - return x[0] == 0; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/main_array_fail.leo b/compiler/disabled_tests/compiler/input_files/program_input/main_array_fail.leo deleted file mode 100644 index 569f0d1ba9..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/main_array_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/main_array_fail.in -*/ - -function main(x: [i16; 2]) { - console.log("x: {}", x); -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/main_char.leo b/compiler/disabled_tests/compiler/input_files/program_input/main_char.leo deleted file mode 100644 index 6aea9e263a..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/main_char.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_char.in -*/ - -function main(a: char, y: bool) -> bool { - return y == true && a == '👍'; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/main_multi_dimension_array.leo b/compiler/disabled_tests/compiler/input_files/program_input/main_multi_dimension_array.leo deleted file mode 100644 index 78d35029ee..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/main_multi_dimension_array.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_multi_dimension_array.in -*/ - -function main(x: [i16; (2, 2, 3)]) -> bool { - console.log("x: {}", x); - - const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; - console.log("y: {}", y); - - return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2]; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/main_multiple.leo b/compiler/disabled_tests/compiler/input_files/program_input/main_multiple.leo deleted file mode 100644 index 2360bc99ec..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/main_multiple.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_multiple.in -*/ - -function main(a: bool, b: bool) -> bool { - return a != b; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/main_string.leo b/compiler/disabled_tests/compiler/input_files/program_input/main_string.leo deleted file mode 100644 index 00ce479118..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/main_string.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_string.in -*/ - -function main(a: [char; 5], y: bool) -> bool { - return y == true && a == "😭😂👍😁😘"; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/main_tuple.leo b/compiler/disabled_tests/compiler/input_files/program_input/main_tuple.leo deleted file mode 100644 index dece56e532..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/main_tuple.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_tuple.in -*/ - -function main(x: (u8, bool, u8)) -> bool { - return x.0 == 10 && x.1 == true && x.2 == 10; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/main_tuple_fail.leo b/compiler/disabled_tests/compiler/input_files/program_input/main_tuple_fail.leo deleted file mode 100644 index 06d55e925e..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/main_tuple_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/main_tuple_fail.in -*/ - -function main(x: (u8, bool, u8)) { - console.log("x: {}", x); -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input/non_const_input_const.leo b/compiler/disabled_tests/compiler/input_files/program_input/non_const_input_const.leo deleted file mode 100644 index ec7cc478e6..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input/non_const_input_const.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/non_const_input_const.in -*/ - -function main(aconst : u32) { - let b = a * 2; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/basic.leo b/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/basic.leo deleted file mode 100644 index a2c57486eb..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/basic.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Pass -state_file: input/basic.state -input_file: input/basic.in -*/ - -function main(a: bool) -> bool { - return a == input.registers.b; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/basic.in b/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/basic.in deleted file mode 100644 index 18a27f2ea4..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/basic.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: bool = true; - -[registers] -b: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/basic.state b/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/basic.state deleted file mode 100644 index 6482a905c8..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/basic.state +++ /dev/null @@ -1,12 +0,0 @@ -[[public]] - -[state] -a: bool = true; - -[[private]] - -[record] -a: bool = true; - -[state_leaf] -a: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in b/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in deleted file mode 100644 index 498c587ec9..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in +++ /dev/null @@ -1,7 +0,0 @@ -[main] -data: [u8; 32] = [0u8; 32]; - -[registers] -r0: bool = true; -token_id: [u8; 32] = [0u8; 32]; -value_balance: u64 = 0; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state b/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state deleted file mode 100644 index 4de7ba1328..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state +++ /dev/null @@ -1,24 +0,0 @@ -[[public]] - -[state] -leaf_index: u32 = 0; -root: [u8; 32] = [0u8; 32]; - -[[private]] - -[record] -serial_number: [u8; 32] = [0u8; 32]; -commitment: [u8; 32] = [0u8; 32]; -owner: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8s7pyjh9; -value: u64 = 5; -payload: [u8; 32] = [0u8; 32]; -birth_program_id: [u8; 32] = [0u8; 32]; -death_program_id: [u8; 32] = [0u8; 32]; -serial_number_nonce: [u8; 32] = [0u8; 32]; -commitment_randomness: [u8; 32] = [0u8; 32]; - -[state_leaf] -path: [u8; 128] = [0u8; 128]; -memo: [u8; 32] = [0u8; 32]; -network_id: u8 = 0; -leaf_randomness: [u8; 32] = [0u8; 32]; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/token_withdraw.leo b/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/token_withdraw.leo deleted file mode 100644 index 6374554308..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_and_program_state/token_withdraw.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Pass -state_file: input/token_withdraw.state -input_file: input/token_withdraw.in -*/ - -function main(data: [u8; 32]) -> bool { - return input.registers.value_balance == 0u64 - && input.state.leaf_index == 0u32 - && input.record.value == 5u64 - && input.state_leaf.network_id == 0u8 - && data == [0u8; 32]; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main.in deleted file mode 100644 index 3b9dcc2a87..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main.in +++ /dev/null @@ -1,8 +0,0 @@ -[main] -b: bool = true; - -[constants] -a: bool = true; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_array.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_array.in deleted file mode 100644 index 6f7e331085..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_array.in +++ /dev/null @@ -1,8 +0,0 @@ -[main] -y: bool = true; - -[constants] -x: [i16; 1] = [0i16; 1]; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_array_fail.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_array_fail.in deleted file mode 100644 index 3fe6502e8f..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_array_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -x: [i16; 1] = [0i16; 1]; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_char.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_char.in deleted file mode 100644 index fd975f08aa..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_char.in +++ /dev/null @@ -1,8 +0,0 @@ -[main] -y: bool = true; - -[constants] -a: char = '👍'; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_fail_name.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_fail_name.in deleted file mode 100644 index 5c7bcd0957..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_fail_name.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -bad_name: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_fail_type.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_fail_type.in deleted file mode 100644 index 8ea9b7fbf5..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_fail_type.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -a: u8 = 1; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_field.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_field.in deleted file mode 100644 index 5f581d8ee1..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_field.in +++ /dev/null @@ -1,9 +0,0 @@ -[main] -y: bool = true; - -[constants] -a: field = 1; -b: field = -1; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_group.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_group.in deleted file mode 100644 index 65922026c4..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_group.in +++ /dev/null @@ -1,10 +0,0 @@ -[main] -y: bool = true; - -[constants] -a: group = 1group; -b: group = -1group; -c: group = (0, -1)group; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in deleted file mode 100644 index dc39e2d92c..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in +++ /dev/null @@ -1,8 +0,0 @@ -[main] -y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; - -[constants] -x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_multiple.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_multiple.in deleted file mode 100644 index 92c9e7b192..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_multiple.in +++ /dev/null @@ -1,9 +0,0 @@ -[main] -y: bool = true; - -[constants] -a: bool = true; -b: bool = false; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_string.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_string.in deleted file mode 100644 index ba500531cc..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_string.in +++ /dev/null @@ -1,8 +0,0 @@ -[main] -y: bool = true; - -[constants] -a: [char; 5] = "😭😂👍😁😘"; - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_tuple.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_tuple.in deleted file mode 100644 index de4cb26a2f..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_tuple.in +++ /dev/null @@ -1,8 +0,0 @@ -[main] -y: bool = true; - -[constants] -x: (u8, bool, u8) = (10, true, 10); - -[registers] -r0: bool = true; diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in b/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in deleted file mode 100644 index 0c1cad5312..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -x: (u8, bool) = (10, true); // wrong size here; main expects (u8, bool, u8) diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_array.leo b/compiler/disabled_tests/compiler/input_files/program_input_constants/main_array.leo deleted file mode 100644 index 8de1cc7550..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_array.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_array.in -*/ - -function main(const x: [i16; 1], y: bool) -> bool { - console.log("{}", x); - return (x[0] == 0) == y; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_array_fail.leo b/compiler/disabled_tests/compiler/input_files/program_input_constants/main_array_fail.leo deleted file mode 100644 index ccf9fab94d..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_array_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/main_array_fail.in -*/ - -function main(const x: [i16; 2]) { - console.log("x: {}", x); -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_char.leo b/compiler/disabled_tests/compiler/input_files/program_input_constants/main_char.leo deleted file mode 100644 index a1c9ea6e8e..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_char.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_char.in -*/ - -function main(const a: char, y: bool) -> bool { - return y == true && a == '👍'; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo b/compiler/disabled_tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo deleted file mode 100644 index f13e8da635..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_multi_dimension_array.in -*/ - -function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool { - return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2]; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_multiple.leo b/compiler/disabled_tests/compiler/input_files/program_input_constants/main_multiple.leo deleted file mode 100644 index e06775ea4b..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_multiple.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_multiple.in -*/ - -function main(const a: bool, const b: bool, y: bool) -> bool { - return (a != b) == y; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_string.leo b/compiler/disabled_tests/compiler/input_files/program_input_constants/main_string.leo deleted file mode 100644 index 8dc8135ec1..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_string.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main_string.in -*/ - -function main(const a: [char; 5], y: bool) -> bool { - return y == true && a == "😭😂👍😁😘"; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_tuple_fail.leo b/compiler/disabled_tests/compiler/input_files/program_input_constants/main_tuple_fail.leo deleted file mode 100644 index 08e9b93d1c..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_input_constants/main_tuple_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/main_tuple_fail.in -*/ - -function main(const x: (u8, bool, u8)) { - console.log("x: {}", x); -} diff --git a/compiler/disabled_tests/compiler/input_files/program_registers/input/array.in b/compiler/disabled_tests/compiler/input_files/program_registers/input/array.in deleted file mode 100644 index 17e2571df7..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_registers/input/array.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: [[u8; 4]; 2] = [[0u8, 0u8, 0u8, 0u8], [0u8, 0u8, 0u8, 0u8]]; - -[registers] -r2: [[u8; 4]; 2] = [[0u8, 0u8, 0u8, 0u8], [0u8, 0u8, 0u8, 0u8]]; diff --git a/compiler/disabled_tests/compiler/input_files/program_registers/input/main.in b/compiler/disabled_tests/compiler/input_files/program_registers/input/main.in deleted file mode 100644 index c026a6e223..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_registers/input/main.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: u8 = 100; - -[registers] -r: u8 = 0u8; diff --git a/compiler/disabled_tests/compiler/input_files/program_registers/registers_array.leo b/compiler/disabled_tests/compiler/input_files/program_registers/registers_array.leo deleted file mode 100644 index 520718dbfc..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_registers/registers_array.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/array.in -*/ - -function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] { - return a; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_registers/registers_fail.leo b/compiler/disabled_tests/compiler/input_files/program_registers/registers_fail.leo deleted file mode 100644 index cbc8dd4de2..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_registers/registers_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/main.in -*/ - -function main() -> bool { - return false; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_registers/registers_pass.leo b/compiler/disabled_tests/compiler/input_files/program_registers/registers_pass.leo deleted file mode 100644 index 2e1bafb304..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_registers/registers_pass.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/main.in -*/ - -function main(a: u8) -> u8 { - return 1u8 + a; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_state/access_all.leo b/compiler/disabled_tests/compiler/input_files/program_state/access_all.leo deleted file mode 100644 index 773341e765..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/access_all.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Pass -state_file: input/token_withdraw.state -input_file: input/dummy.in -*/ - -function main() -> bool { - const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8s7pyjh9; - - return input.state.root == [0u8; 32] - && input.state_leaf.network_id == 0u8; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_state/access_state.leo b/compiler/disabled_tests/compiler/input_files/program_state/access_state.leo deleted file mode 100644 index d345e4d1db..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/access_state.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Pass -state_file: input/token_withdraw.state -input_file: input/dummy.in -*/ - -function main() -> bool { - return input.state.root == [0u8; 32]; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_state/basic.leo b/compiler/disabled_tests/compiler/input_files/program_state/basic.leo deleted file mode 100644 index a9ee0ed49d..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/basic.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Pass -state_file: input/basic.state -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - return true == y; // hey Yoda -} diff --git a/compiler/disabled_tests/compiler/input_files/program_state/input/basic.state b/compiler/disabled_tests/compiler/input_files/program_state/input/basic.state deleted file mode 100644 index 2f40f7f1c4..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/input/basic.state +++ /dev/null @@ -1,10 +0,0 @@ -[[public]] -[state] -root: bool = true; - -[[private]] -[record] -id: bool = false; - -[state_leaf] -leaf: bool = true; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/input_files/program_state/input/dummy.in b/compiler/disabled_tests/compiler/input_files/program_state/input/dummy.in deleted file mode 100644 index b62f1de0c4..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/input/dummy.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -y: bool = true; - -[registers] -r0: bool = false; diff --git a/compiler/disabled_tests/compiler/input_files/program_state/input/section_invalid.state b/compiler/disabled_tests/compiler/input_files/program_state/input/section_invalid.state deleted file mode 100644 index 955b881192..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/input/section_invalid.state +++ /dev/null @@ -1,4 +0,0 @@ -[[public]] - -[record] -a: bool = true; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/input_files/program_state/input/section_undefined.state b/compiler/disabled_tests/compiler/input_files/program_state/input/section_undefined.state deleted file mode 100644 index 5f881cbb29..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/input/section_undefined.state +++ /dev/null @@ -1,4 +0,0 @@ -[[public]] - -[invalid] -a: bool = true; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/input_files/program_state/input/token_withdraw.state b/compiler/disabled_tests/compiler/input_files/program_state/input/token_withdraw.state deleted file mode 100644 index 21e245b864..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/input/token_withdraw.state +++ /dev/null @@ -1,24 +0,0 @@ -[[public]] - -[state] -leaf_index: u32 = 0; -root: [u8; 32] = [0u8; 32]; - -[[private]] - -[record] -serial_number: [u8; 32] = [0u8; 32]; -commitment: [u8; 32] = [0u8; 32]; -owner: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8s7pyjh9; -value: u64 = 5; -payload: [u8; 32] = [0u8; 32]; -birth_program_id: [u8; 32] = [0u8; 32]; -death_program_id: [u8; 32] = [0u8; 32]; -serial_number_nonce: [u8; 32] = [0u8; 32]; -commitment_randomness: [u8; 32] = [0u8; 32]; - -[state_leaf] -path: [u8; 128] = [0u8; 128]; -memo: [u8; 32] = [0u8; 32]; -network_id: u8 = 0; -leaf_randomness: [u8; 32] = [0u8; 32]; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/input_files/program_state/input/visibility_fail.state b/compiler/disabled_tests/compiler/input_files/program_state/input/visibility_fail.state deleted file mode 100644 index c5928ddcbd..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/input/visibility_fail.state +++ /dev/null @@ -1 +0,0 @@ -[[pure]] \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/input_files/program_state/section_invalid.leo b/compiler/disabled_tests/compiler/input_files/program_state/section_invalid.leo deleted file mode 100644 index 109f311a98..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/section_invalid.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Fail -state_file: input/section_invalid.state -input_file: input/dummy.in -*/ - -function main() -> bool { - return true; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_state/section_undefined.leo b/compiler/disabled_tests/compiler/input_files/program_state/section_undefined.leo deleted file mode 100644 index 78195b0194..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/section_undefined.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Fail -state_file: input/section_undefined.state -input_file: input/dummy.in -*/ - -function main() -> bool { - return true; -} diff --git a/compiler/disabled_tests/compiler/input_files/program_state/visibility_fail.leo b/compiler/disabled_tests/compiler/input_files/program_state/visibility_fail.leo deleted file mode 100644 index ea296f0ea2..0000000000 --- a/compiler/disabled_tests/compiler/input_files/program_state/visibility_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Fail -state_file: input/visibility_fail.state -input_file: input/dummy.in -*/ - -function main() -> bool { - return true; -} diff --git a/compiler/disabled_tests/compiler/integers/i128/max_fail.leo b/compiler/disabled_tests/compiler/integers/i128/max_fail.leo deleted file mode 100644 index 17b4ea31b9..0000000000 --- a/compiler/disabled_tests/compiler/integers/i128/max_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i128 = 170141183460469231731687303715884105728; -} diff --git a/compiler/disabled_tests/compiler/integers/i128/min_fail.leo b/compiler/disabled_tests/compiler/integers/i128/min_fail.leo deleted file mode 100644 index 903d41ff96..0000000000 --- a/compiler/disabled_tests/compiler/integers/i128/min_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i128 = -170141183460469231731687303715884105729; -} diff --git a/compiler/disabled_tests/compiler/integers/i128/negate_min.leo b/compiler/disabled_tests/compiler/integers/i128/negate_min.leo deleted file mode 100644 index d3163b0e0f..0000000000 --- a/compiler/disabled_tests/compiler/integers/i128/negate_min.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: ../input/dummy.in -*/ - -function main(y: bool) -> bool{ - const a = -128i128; - const b = -a; - return (b == -a) == y; -} diff --git a/compiler/disabled_tests/compiler/integers/i16/max_fail.leo b/compiler/disabled_tests/compiler/integers/i16/max_fail.leo deleted file mode 100644 index d16dae260d..0000000000 --- a/compiler/disabled_tests/compiler/integers/i16/max_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i16 = 32768; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/integers/i16/min_fail.leo b/compiler/disabled_tests/compiler/integers/i16/min_fail.leo deleted file mode 100644 index 52551ece05..0000000000 --- a/compiler/disabled_tests/compiler/integers/i16/min_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i16 = -32769; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/integers/i16/negate_min_fail.leo b/compiler/disabled_tests/compiler/integers/i16/negate_min_fail.leo deleted file mode 100644 index 8f89f8f091..0000000000 --- a/compiler/disabled_tests/compiler/integers/i16/negate_min_fail.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: ../input/dummy.in -*/ - -function main(y: bool) -> bool { - const a = -128i16; - const b = -a; - return (b == -a) == y; -} diff --git a/compiler/disabled_tests/compiler/integers/i32/max_fail.leo b/compiler/disabled_tests/compiler/integers/i32/max_fail.leo deleted file mode 100644 index a3cd62c112..0000000000 --- a/compiler/disabled_tests/compiler/integers/i32/max_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i32 = 2147483648; -} diff --git a/compiler/disabled_tests/compiler/integers/i32/min_fail.leo b/compiler/disabled_tests/compiler/integers/i32/min_fail.leo deleted file mode 100644 index bed96206bd..0000000000 --- a/compiler/disabled_tests/compiler/integers/i32/min_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i32 = -2147483649; -} diff --git a/compiler/disabled_tests/compiler/integers/i32/negate_min.leo b/compiler/disabled_tests/compiler/integers/i32/negate_min.leo deleted file mode 100644 index 0f3d6f306d..0000000000 --- a/compiler/disabled_tests/compiler/integers/i32/negate_min.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: ../input/dummy.in -*/ - -function main(y: bool) -> bool{ - const a = -128i32; - const b = -a; - return (b == -a) == y; -} diff --git a/compiler/disabled_tests/compiler/integers/i64/max_fail.leo b/compiler/disabled_tests/compiler/integers/i64/max_fail.leo deleted file mode 100644 index ca8157dd4e..0000000000 --- a/compiler/disabled_tests/compiler/integers/i64/max_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i64 = 9223372036854775808; -} diff --git a/compiler/disabled_tests/compiler/integers/i64/min_fail.leo b/compiler/disabled_tests/compiler/integers/i64/min_fail.leo deleted file mode 100644 index 186aa74cdb..0000000000 --- a/compiler/disabled_tests/compiler/integers/i64/min_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i64 = -9223372036854775809; -} diff --git a/compiler/disabled_tests/compiler/integers/i64/negate_min.leo b/compiler/disabled_tests/compiler/integers/i64/negate_min.leo deleted file mode 100644 index df00c0b9b1..0000000000 --- a/compiler/disabled_tests/compiler/integers/i64/negate_min.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: ../input/dummy.in -*/ - -function main(y: bool) -> bool{ - const a = -128i64; - const b = -a; - return (b == -a) == y; -} diff --git a/compiler/disabled_tests/compiler/integers/i8/max_fail.leo b/compiler/disabled_tests/compiler/integers/i8/max_fail.leo deleted file mode 100644 index be2922f4fd..0000000000 --- a/compiler/disabled_tests/compiler/integers/i8/max_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i8 = 128; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/integers/i8/min_fail.leo b/compiler/disabled_tests/compiler/integers/i8/min_fail.leo deleted file mode 100644 index 6a1c58fe00..0000000000 --- a/compiler/disabled_tests/compiler/integers/i8/min_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: i8 = -129; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/integers/i8/negate_min.leo b/compiler/disabled_tests/compiler/integers/i8/negate_min.leo deleted file mode 100644 index 4e85c5d49c..0000000000 --- a/compiler/disabled_tests/compiler/integers/i8/negate_min.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: ../input/dummy.in -*/ - -function main(y: bool) -> bool { - const a: = -128i8; - const b: = -a; - - return (b == -a) == y; -} diff --git a/compiler/disabled_tests/compiler/integers/u16/max_fail.leo b/compiler/disabled_tests/compiler/integers/u16/max_fail.leo deleted file mode 100644 index 5e5c8e84fd..0000000000 --- a/compiler/disabled_tests/compiler/integers/u16/max_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: u16 = 65536; -} diff --git a/compiler/disabled_tests/compiler/integers/u16/min_fail.leo b/compiler/disabled_tests/compiler/integers/u16/min_fail.leo deleted file mode 100644 index d5bd1ff3c7..0000000000 --- a/compiler/disabled_tests/compiler/integers/u16/min_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: u16 = -1; -} diff --git a/compiler/disabled_tests/compiler/integers/u32/max_fail.leo b/compiler/disabled_tests/compiler/integers/u32/max_fail.leo deleted file mode 100644 index 276ccb3bab..0000000000 --- a/compiler/disabled_tests/compiler/integers/u32/max_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: u32 = 4294967296; -} diff --git a/compiler/disabled_tests/compiler/integers/u32/min_fail.leo b/compiler/disabled_tests/compiler/integers/u32/min_fail.leo deleted file mode 100644 index ca62f4a0df..0000000000 --- a/compiler/disabled_tests/compiler/integers/u32/min_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: u32 = -1; -} diff --git a/compiler/disabled_tests/compiler/integers/u64/max_fail.leo b/compiler/disabled_tests/compiler/integers/u64/max_fail.leo deleted file mode 100644 index 7755551729..0000000000 --- a/compiler/disabled_tests/compiler/integers/u64/max_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: u64 = 18446744073709551616; -} diff --git a/compiler/disabled_tests/compiler/integers/u64/min_fail.leo b/compiler/disabled_tests/compiler/integers/u64/min_fail.leo deleted file mode 100644 index d35f6cb787..0000000000 --- a/compiler/disabled_tests/compiler/integers/u64/min_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: u64 = -1; -} diff --git a/compiler/disabled_tests/compiler/integers/u8/max_fail.leo b/compiler/disabled_tests/compiler/integers/u8/max_fail.leo deleted file mode 100644 index 59151c571a..0000000000 --- a/compiler/disabled_tests/compiler/integers/u8/max_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: u8 = 256; -} diff --git a/compiler/disabled_tests/compiler/integers/u8/min_fail.leo b/compiler/disabled_tests/compiler/integers/u8/min_fail.leo deleted file mode 100644 index a2b2df1de9..0000000000 --- a/compiler/disabled_tests/compiler/integers/u8/min_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a: u8 = -1; -} diff --git a/compiler/disabled_tests/compiler/mutability/array_dyn_mut.leo b/compiler/disabled_tests/compiler/mutability/array_dyn_mut.leo deleted file mode 100644 index 072f310757..0000000000 --- a/compiler/disabled_tests/compiler/mutability/array_dyn_mut.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - input/index1.in - - input/index2.in -*/ - -function main(i: u32) -> [u32; 3] { - let a = [1u32, 2u32, 3u32]; - a[i - 1] += a[i]; - a[i] = 0; - - return a; -} diff --git a/compiler/disabled_tests/compiler/mutability/array_dyn_mut_indirect.leo b/compiler/disabled_tests/compiler/mutability/array_dyn_mut_indirect.leo deleted file mode 100644 index 21292550c9..0000000000 --- a/compiler/disabled_tests/compiler/mutability/array_dyn_mut_indirect.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - input/index1_tuple.in - - input/index2_tuple.in -*/ - -function main(i: u32) -> [(u32, u32); 3] { - let a = [(1u32, 1u32), (2u32, 2u32), (3u32, 3u32)]; - a[i].0 = 0; - a[i].1 = 1; - - return a; -} diff --git a/compiler/disabled_tests/compiler/mutability/array_fail.leo b/compiler/disabled_tests/compiler/mutability/array_fail.leo deleted file mode 100644 index 7f24d16bae..0000000000 --- a/compiler/disabled_tests/compiler/mutability/array_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - const a = [1u32]; - a[0] = 0; -} diff --git a/compiler/disabled_tests/compiler/mutability/array_mut.leo b/compiler/disabled_tests/compiler/mutability/array_mut.leo deleted file mode 100644 index 3d2fc40d6f..0000000000 --- a/compiler/disabled_tests/compiler/mutability/array_mut.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - let a = [1u32]; - a[0] = 0; - - return (a[0] == 0u32) == y; -} diff --git a/compiler/disabled_tests/compiler/mutability/array_splice_mut.leo b/compiler/disabled_tests/compiler/mutability/array_splice_mut.leo deleted file mode 100644 index 3de1585cd7..0000000000 --- a/compiler/disabled_tests/compiler/mutability/array_splice_mut.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - let a = [1u32, 2u32, 3u32]; - a[0u32..2u32] = [4u32, 5u32]; - - return a[0] == 4u32 - && a[1] == 5u32 - && a[2] == 3u32 - && y == true; -} diff --git a/compiler/disabled_tests/compiler/mutability/array_tuple_mut.leo b/compiler/disabled_tests/compiler/mutability/array_tuple_mut.leo deleted file mode 100644 index 07d8b5db79..0000000000 --- a/compiler/disabled_tests/compiler/mutability/array_tuple_mut.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(y: bool) -> bool { - let a = [(1u32, 2u32)]; - a[0u32].1 = 3u32; - - return a[0u32].0 == 1u32 - && a[0u32].1 == 3u32 - && y == true; -} diff --git a/compiler/disabled_tests/compiler/mutability/circuit_fail.leo b/compiler/disabled_tests/compiler/mutability/circuit_fail.leo deleted file mode 100644 index 8d3c10583c..0000000000 --- a/compiler/disabled_tests/compiler/mutability/circuit_fail.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - x: u32; -} - -// const variable is immutable -function main() { - const a = Foo { x: 1 }; - a.x = 0; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/mutability/circuit_function_const.leo b/compiler/disabled_tests/compiler/mutability/circuit_function_const.leo deleted file mode 100644 index 25cbf1f789..0000000000 --- a/compiler/disabled_tests/compiler/mutability/circuit_function_const.leo +++ /dev/null @@ -1,22 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -circuit Foo { - x: u32 - - function foo(mut self) { - self.x = 10; - } -} - -// cannot call mutable member function 'foo' of circuit 'Foo' from immutable context -function main() -> bool { - const a = Foo { x: 1 }; - - a.foo(); - - return a.x == 10u32; -} diff --git a/compiler/disabled_tests/compiler/mutability/circuit_function_mut.leo b/compiler/disabled_tests/compiler/mutability/circuit_function_mut.leo deleted file mode 100644 index 5321f0203c..0000000000 --- a/compiler/disabled_tests/compiler/mutability/circuit_function_mut.leo +++ /dev/null @@ -1,22 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - x: u32 - - function foo(mut self) { - self.x = 10; - } -} - - -function main(y: bool) -> bool { - let a = Foo { x: 1 }; - - a.foo(); - - return (a.x == 10u32) == y; -} diff --git a/compiler/disabled_tests/compiler/mutability/circuit_static_function_mut_fail.leo b/compiler/disabled_tests/compiler/mutability/circuit_static_function_mut_fail.leo deleted file mode 100644 index a311ed6305..0000000000 --- a/compiler/disabled_tests/compiler/mutability/circuit_static_function_mut_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -circuit Foo { - function bar() {} -} - -function main() { - let a = Foo { x: 1 }; - a.bar = 0; -} diff --git a/compiler/disabled_tests/compiler/mutability/circuit_variable_mut.leo b/compiler/disabled_tests/compiler/mutability/circuit_variable_mut.leo deleted file mode 100644 index 20ebe63f9e..0000000000 --- a/compiler/disabled_tests/compiler/mutability/circuit_variable_mut.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -circuit Foo { - x: u32 -} - -// Using let makes a circuit variable mutable. -function main(y: bool) -> bool{ - let a = Foo { x: 1 }; - a.x = 0; - - return (a.x == 0u32) == y; -} diff --git a/compiler/disabled_tests/compiler/mutability/const.leo b/compiler/disabled_tests/compiler/mutability/const.leo deleted file mode 100644 index 59de930123..0000000000 --- a/compiler/disabled_tests/compiler/mutability/const.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -// Let variables are immutable by default. -function main() { - const a = 1u32; - a = 0; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/mutability/function_input.leo b/compiler/disabled_tests/compiler/mutability/function_input.leo deleted file mode 100644 index 65153d31e9..0000000000 --- a/compiler/disabled_tests/compiler/mutability/function_input.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -*/ - -// Const function input are immutable. -function main(const b: bool) { - a = false; -} diff --git a/compiler/disabled_tests/compiler/mutability/let_fail.leo b/compiler/disabled_tests/compiler/mutability/let_fail.leo deleted file mode 100644 index 7e0c2d6520..0000000000 --- a/compiler/disabled_tests/compiler/mutability/let_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -// Variables are immutable by default. -function main() { - const a = 1u32; - a = 0; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/mutability/swap.leo b/compiler/disabled_tests/compiler/mutability/swap.leo deleted file mode 100644 index 964c368cdd..0000000000 --- a/compiler/disabled_tests/compiler/mutability/swap.leo +++ /dev/null @@ -1,21 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -// Swap two elements of an array. -function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] { - let t = a[i]; - a[i] = a[j]; - a[j] = t; - return a; -} - -function main(arr: [u32; 2]) -> bool { - const expected: [u32; 2] = [1, 0]; - let actual = swap(arr, 0, 1); - - // Do swap. - return expected[0] == actual[0] && expected[1] == actual[1]; -} diff --git a/compiler/disabled_tests/compiler/statements/compound_assignment.leo b/compiler/disabled_tests/compiler/statements/compound_assignment.leo deleted file mode 100644 index c3d697404c..0000000000 --- a/compiler/disabled_tests/compiler/statements/compound_assignment.leo +++ /dev/null @@ -1,45 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/dummy.in -*/ - -circuit Foo { - f: u8; - y: (u8, u8); - - function z (mut self) -> u16 { - self.y.0 += 1u8; - return 1u16; - } -} - -function main(k: bool) -> bool { - let x = 10u32; - x += 20; - - let w = 3u32; - w += x; - - let y = [1u8, 2u8, 3, 4]; - y[0] += 3u8; - y[0..3][1] *= 3; - - let z = (1u8, 2u8); - z.1 += 3u8; - - let foo = Foo { f: 6u8, y: (1u8, 1u8) }; - foo.f += 2u8; - - let complex = 2u8; - complex += 22u8 - 2u8+ 1u8; - let a = [[0u8; 1]; 4]; - a[2][0] += 1u8; - - let b = [0u8; (4, 1)]; - b[2][0] += 1u8; - - return x == 30u32 && w == 33u32 && y[0] == 4u8 && y[1] == 6u8 - && z.1 == 5u8 && foo.f == 8u8 && a[2][0] == 1u8 && a[2][0] == 1u8 - && k; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/statements/nested_mutate.leo b/compiler/disabled_tests/compiler/statements/nested_mutate.leo deleted file mode 100644 index 1a5b7475ed..0000000000 --- a/compiler/disabled_tests/compiler/statements/nested_mutate.leo +++ /dev/null @@ -1,21 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/u32_3.in - - inputs/u32_5.in - - inputs/u32_6.in -*/ - -function main(x: u32) -> bool { - let d = x; - - if x == 3 || x == 5 { - d += 1; - if x == 3 { - d += 2; - } - } - - return d > x; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/statements/reverse_loops.leo b/compiler/disabled_tests/compiler/statements/reverse_loops.leo deleted file mode 100644 index 9e28299f68..0000000000 --- a/compiler/disabled_tests/compiler/statements/reverse_loops.leo +++ /dev/null @@ -1,19 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/dummy.in -*/ - -function main(k: bool) -> bool { - let reverse: u32 = 0; - for i in 25..1 { - reverse += i; - } - - let reverse_inclusive: u32 = 0; - for a in 25..=1 { - reverse_inclusive += a; - } - - return (reverse + 1 == reverse_inclusive) && k; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/statements/reverse_one.leo b/compiler/disabled_tests/compiler/statements/reverse_one.leo deleted file mode 100644 index c8273669c8..0000000000 --- a/compiler/disabled_tests/compiler/statements/reverse_one.leo +++ /dev/null @@ -1,19 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/dummy.in -*/ - -function main(k: bool) -> bool { - let reverse: u32 = 0; - for i in 1..0 { - reverse += i; - } - - let reverse_inclusive: u32 = 0; - for a in 1..=0 { - reverse_inclusive += a; - } - - return (reverse == 1) && (reverse_inclusive == 1) && k; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/statements/ternary_non_const_fail.leo b/compiler/disabled_tests/compiler/statements/ternary_non_const_fail.leo deleted file mode 100644 index 4f1638e00a..0000000000 --- a/compiler/disabled_tests/compiler/statements/ternary_non_const_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -function main() { - let x = 3u8; - const y = x > 2u8? 1u8 : 2u8; -} diff --git a/compiler/disabled_tests/compiler/stdlib/core_circuit_star_fail.leo b/compiler/disabled_tests/compiler/stdlib/core_circuit_star_fail.leo deleted file mode 100644 index c3446ab5dc..0000000000 --- a/compiler/disabled_tests/compiler/stdlib/core_circuit_star_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -import std.*; // You cannot import all dependencies from core at once - -function main() {} diff --git a/compiler/disabled_tests/compiler/stdlib/core_package_invalid.leo b/compiler/disabled_tests/compiler/stdlib/core_package_invalid.leo deleted file mode 100644 index 8f797c9cb7..0000000000 --- a/compiler/disabled_tests/compiler/stdlib/core_package_invalid.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -import std.bad_circuit; // `bad_circuit` is not a core package - -function main() {} diff --git a/compiler/disabled_tests/compiler/stdlib/core_unstable_package_invalid.leo b/compiler/disabled_tests/compiler/stdlib/core_unstable_package_invalid.leo deleted file mode 100644 index d01040a92c..0000000000 --- a/compiler/disabled_tests/compiler/stdlib/core_unstable_package_invalid.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: Compile -expectation: Fail -*/ - -import std.unstable.bad_circuit; // `bad_circuit` is not a core unstable package - -function main() {} diff --git a/compiler/disabled_tests/compiler/stdlib/strings.leo b/compiler/disabled_tests/compiler/stdlib/strings.leo deleted file mode 100644 index fb821df58c..0000000000 --- a/compiler/disabled_tests/compiler/stdlib/strings.leo +++ /dev/null @@ -1,15 +0,0 @@ -// namespace: Compile -// expectation: Pass -// inputs: -// - hello.in: | -// [main] -// hello: [char; 5] = "hello"; - -// [registers] -// r0: bool = true; - -function main(hello: [char; 5]) -> bool { - let hello2: string = "hello"; - - return hello == hello2; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/string/circuit.leo b/compiler/disabled_tests/compiler/string/circuit.leo deleted file mode 100644 index 9905975b15..0000000000 --- a/compiler/disabled_tests/compiler/string/circuit.leo +++ /dev/null @@ -1,22 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/string_out.in -*/ - -circuit Foo { - s1: [char; 13]; -} - -function takes_string(s: [char; 13]) -> bool { - return s == "Hello, World!"; -} - -function main(s1: [char; 13]) -> [char; 13] { - let f = Foo { s1 }; - let b = takes_string(s1); - - let result = f.s1 == "Hello, World!" ? s1 : "abcdefghjklmn"; - return result; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/string/equality.leo b/compiler/disabled_tests/compiler/string/equality.leo deleted file mode 100644 index 4cd3af4db6..0000000000 --- a/compiler/disabled_tests/compiler/string/equality.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/string.in - - inputs/weird.in -*/ - -function main(s1: [char; 13], s2: [char; 4]) -> bool { - let hello: [char; 13] = "Hello, World!"; - let part1 = "Good"; - let part2 = " dog!"; - let concat: [char; 9] = [...part1, ...part2]; - let x = false; - x = "test1" == "test2"; - return hello == s1 && "nope" != s2 && "es" == s2[1..3] && concat == "Good dog!"; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/string/inputs/string.in b/compiler/disabled_tests/compiler/string/inputs/string.in deleted file mode 100644 index caf5c3fbb3..0000000000 --- a/compiler/disabled_tests/compiler/string/inputs/string.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -s1: [char; 13] = "Hello, World!"; -s2: [char; 4] = "test"; - -[registers] -out: bool = true; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/string/inputs/string_out.in b/compiler/disabled_tests/compiler/string/inputs/string_out.in deleted file mode 100644 index b35cb990e7..0000000000 --- a/compiler/disabled_tests/compiler/string/inputs/string_out.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -s1: [char; 13] = "Hello, World!"; - -[registers] -out: [char; 13] = "Hello, World!"; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/string/inputs/two.in b/compiler/disabled_tests/compiler/string/inputs/two.in deleted file mode 100644 index 983244f22d..0000000000 --- a/compiler/disabled_tests/compiler/string/inputs/two.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -s2: [char; 2] = "he"; - -[registers] -out: bool = true; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/string/inputs/weird.in b/compiler/disabled_tests/compiler/string/inputs/weird.in deleted file mode 100644 index 321bed9bae..0000000000 --- a/compiler/disabled_tests/compiler/string/inputs/weird.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -s1: [char; 13] = "\"ello, World\""; -s2: [char; 4] = "\u{2764}\x2A\x09\u{2764}"; - -[registers] -out: bool = true; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/string/replace.leo b/compiler/disabled_tests/compiler/string/replace.leo deleted file mode 100644 index 175c9a585d..0000000000 --- a/compiler/disabled_tests/compiler/string/replace.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: - - inputs/string.in - - inputs/weird.in -*/ - -function main(s1: [char; 13], s2: [char; 4]) -> bool { - s1[..4] = s2; - return s1 != "Hello, World!"; -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/string/string_transformation.leo b/compiler/disabled_tests/compiler/string/string_transformation.leo deleted file mode 100644 index 23417bd67e..0000000000 --- a/compiler/disabled_tests/compiler/string/string_transformation.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/two.in -*/ - -function main(s2: [char; 2]) -> bool { - let s = "\u{2764}ello, World!\u{DDDD}"; - s[..2] = s2; - let x = "test1"; - let z = [1u8, 2u8, 3u8, 4u8]; - z[0.."test" == "test" ? 2 : 2] = [10u8, 10]; - return z == [10u8, 10, 3, 4] && s == "hello, World!\u{DDDD}"; -} diff --git a/compiler/disabled_tests/compiler/tuples/access.leo b/compiler/disabled_tests/compiler/tuples/access.leo deleted file mode 100644 index 07b6585022..0000000000 --- a/compiler/disabled_tests/compiler/tuples/access.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/true_true.in -*/ - -function main(a: (bool, bool)) -> (bool, bool) { - let b = (false, false, true).0; - let c = (false, true, false).1; - let d = (true, false, false).2; - - return (a.0 == b, (a.1 == c) == d); -} diff --git a/compiler/disabled_tests/compiler/tuples/basic.leo b/compiler/disabled_tests/compiler/tuples/basic.leo deleted file mode 100644 index 51dbfaa7c2..0000000000 --- a/compiler/disabled_tests/compiler/tuples/basic.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/true_true.in -*/ - -function main(a: (bool, bool)) -> (bool, bool) { - const b = (true, false); - - return (b.0, b.1); -} \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/tuples/dependent.leo b/compiler/disabled_tests/compiler/tuples/dependent.leo deleted file mode 100644 index 7ba2b59dd1..0000000000 --- a/compiler/disabled_tests/compiler/tuples/dependent.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/true_true.in -*/ - -function main(a: (bool, bool)) -> (bool, bool) { - let b = (a.0 ? false : true, a.1 ? false : true); - - return (b.0, b.1); -} diff --git a/compiler/disabled_tests/compiler/tuples/destructured.leo b/compiler/disabled_tests/compiler/tuples/destructured.leo deleted file mode 100644 index 8810a989d5..0000000000 --- a/compiler/disabled_tests/compiler/tuples/destructured.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/true_true.in -*/ - -function main(a: (bool, bool)) -> (bool, bool) { - let (b, c) = (a.0 ? false : true, a.1 ? false : true); - - return (c, b); -} diff --git a/compiler/disabled_tests/compiler/tuples/inputs/true_true.in b/compiler/disabled_tests/compiler/tuples/inputs/true_true.in deleted file mode 100644 index f8671a956f..0000000000 --- a/compiler/disabled_tests/compiler/tuples/inputs/true_true.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -a: (bool, bool) = (false, true); - -[registers] -b: bool = true; -c: bool = false; \ No newline at end of file diff --git a/compiler/disabled_tests/compiler/tuples/nested_access.leo b/compiler/disabled_tests/compiler/tuples/nested_access.leo deleted file mode 100644 index ea42b7e358..0000000000 --- a/compiler/disabled_tests/compiler/tuples/nested_access.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/true_true.in -*/ - -function main(a: (bool, bool)) -> (bool, bool) { - let b = (a, false); - - return (b.1 || b.0.0, b.1 && b.0.1); -} diff --git a/compiler/disabled_tests/parser/circuits/consts.leo b/compiler/disabled_tests/parser/circuits/consts.leo deleted file mode 100644 index 24a22db25d..0000000000 --- a/compiler/disabled_tests/parser/circuits/consts.leo +++ /dev/null @@ -1,9 +0,0 @@ -/* -namespace: Parse -expectation: Pass -*/ - -circuit X { - static const x: u32 = 2u32; - static const y: u32 = 5u32; -} \ No newline at end of file diff --git a/compiler/disabled_tests/parser/circuits/field_and_functions.leo b/compiler/disabled_tests/parser/circuits/field_and_functions.leo deleted file mode 100644 index de26e8e364..0000000000 --- a/compiler/disabled_tests/parser/circuits/field_and_functions.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Parse -expectation: Pass -*/ - -circuit X { - static const a: u8 = 10u8; - x: u32, - y: u32 - function x() { - return (); - } - function y() { - return (); - } -} \ No newline at end of file diff --git a/compiler/disabled_tests/parser/expression/access/array_access.leo b/compiler/disabled_tests/parser/expression/access/array_access.leo deleted file mode 100644 index 5ab81bde49..0000000000 --- a/compiler/disabled_tests/parser/expression/access/array_access.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: ParseExpression -expectation: Pass -*/ - -x[0u8] -X[1u8] -x[0u8] -x[1u8][2u8] -x[x][y][z] -x[0u8]() -x()[0u8] -x(y)::y(x) -x[x].0[x] diff --git a/compiler/disabled_tests/parser/expression/access/array_range_access.leo b/compiler/disabled_tests/parser/expression/access/array_range_access.leo deleted file mode 100644 index 7a3a8f3a3b..0000000000 --- a/compiler/disabled_tests/parser/expression/access/array_range_access.leo +++ /dev/null @@ -1,22 +0,0 @@ -/* -namespace: ParseExpression -expectation: Pass -*/ - -x[..] -x[1u8..] -x[..1u8] -x[1u8..1u8] -x[0u8..100u8] - -x[323452345u8.2345234523453453][323452345u8.2345234523453453] - -x[0u8..1u8] -x[0u8..] -x[..0u8] - -x[..] -x[x.y..] -x[..y.x] -x[x.y..y.x] -x[x.y.x..y.x.y] diff --git a/compiler/disabled_tests/parser/expression/access/call.leo b/compiler/disabled_tests/parser/expression/access/call.leo deleted file mode 100644 index 5330891073..0000000000 --- a/compiler/disabled_tests/parser/expression/access/call.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: ParseExpression -expectation: Pass -*/ - -x() -X() -x(y) -x(y, z) -x(x, y, z) - -x::y() -x::y(x) -x.0(x) -x[0u32](x) diff --git a/compiler/disabled_tests/parser/expression/access/circuit.leo b/compiler/disabled_tests/parser/expression/access/circuit.leo deleted file mode 100644 index e4c4b43632..0000000000 --- a/compiler/disabled_tests/parser/expression/access/circuit.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: ParseExpression -expectation: Pass -*/ - -x.y -X.Y -x.y.z -x.y() -x.y.0 -x.y[1u8] \ No newline at end of file diff --git a/compiler/disabled_tests/parser/expression/access/circuit_static.leo b/compiler/disabled_tests/parser/expression/access/circuit_static.leo deleted file mode 100644 index 4c911a7172..0000000000 --- a/compiler/disabled_tests/parser/expression/access/circuit_static.leo +++ /dev/null @@ -1,11 +0,0 @@ -/* -namespace: ParseExpression -expectation: Pass -*/ - -x::y -X::Y -x::y::z -x::y() -x::y.0 -x::y[1u8] \ No newline at end of file diff --git a/compiler/disabled_tests/parser/expression/array_init.leo b/compiler/disabled_tests/parser/expression/array_init.leo deleted file mode 100644 index 3bbf232c94..0000000000 --- a/compiler/disabled_tests/parser/expression/array_init.leo +++ /dev/null @@ -1,18 +0,0 @@ -/* -namespace: ParseExpression -expectation: Pass -*/ - -[0u8; 1] - -[0u8; 1] - -[0u8; (1)] - -[0u8; (1, 2)] - -[0u8; (1, 2,)] - -[0u8; (1, 2, 3)] - -[[[0u8; 3]; 2]; 1] diff --git a/compiler/disabled_tests/parser/expression/array_inline.leo b/compiler/disabled_tests/parser/expression/array_inline.leo deleted file mode 100644 index c0327b8774..0000000000 --- a/compiler/disabled_tests/parser/expression/array_inline.leo +++ /dev/null @@ -1,24 +0,0 @@ -/* -namespace: ParseExpression -expectation: Pass -*/ - -[0u8, 1u8, 2u8, 3u8] - -[1u8] - -[1u8] - -[1u8,] - -[0u8, 1u8,] - -[0u8,1u8,] - -[] - -[[1u8,2u8,3u8],[1u8,2u8,3u8]] - -[[]] - -[[], []] \ No newline at end of file diff --git a/compiler/disabled_tests/parser/expression/array_len.leo b/compiler/disabled_tests/parser/expression/array_len.leo deleted file mode 100644 index ed7506f6ff..0000000000 --- a/compiler/disabled_tests/parser/expression/array_len.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: ParseExpression -expectation: Pass -*/ - -[0u8; 1].len() - -[0u8; 1].len() - -[0u8; (1)].len() - -[0u8; (1, 2)].len() - -[0u8; (1, 2, 3)].len() - -[[[0u8; 3]; 2]; 1].len() diff --git a/compiler/disabled_tests/parser/expression/tuple.leo b/compiler/disabled_tests/parser/expression/tuple.leo deleted file mode 100644 index 3ea444bcbf..0000000000 --- a/compiler/disabled_tests/parser/expression/tuple.leo +++ /dev/null @@ -1,19 +0,0 @@ -/* -namespace: ParseExpression -expectation: Pass -*/ - -//not tuples -(x) -(y) -(z) - -//tuples -(x,) -(x,y) -(x,y,z) -(123u32,123u8) - -() - -(()) \ No newline at end of file diff --git a/compiler/disabled_tests/parser/import/alias.leo b/compiler/disabled_tests/parser/import/alias.leo deleted file mode 100644 index ba0956bd77..0000000000 --- a/compiler/disabled_tests/parser/import/alias.leo +++ /dev/null @@ -1,6 +0,0 @@ -/* -namespace: ParseImport -expectation: Pass -*/ - -import a.b as bar; diff --git a/compiler/disabled_tests/parser/import/basic.leo b/compiler/disabled_tests/parser/import/basic.leo deleted file mode 100644 index 11f4b70672..0000000000 --- a/compiler/disabled_tests/parser/import/basic.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: ParseImport -expectation: Pass -*/ - -import a.b; - -import AB.c; \ No newline at end of file diff --git a/compiler/disabled_tests/parser/import/import_empty_list_fail.leo b/compiler/disabled_tests/parser/import/import_empty_list_fail.leo deleted file mode 100644 index ca14b5fe0d..0000000000 --- a/compiler/disabled_tests/parser/import/import_empty_list_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: ParseImport -expectation: Fail -*/ - -import a.(); - -import a.(); diff --git a/compiler/disabled_tests/parser/import/invalid.leo b/compiler/disabled_tests/parser/import/invalid.leo deleted file mode 100644 index ab4f073b5f..0000000000 --- a/compiler/disabled_tests/parser/import/invalid.leo +++ /dev/null @@ -1,7 +0,0 @@ -/* -namespace: ParseImport -expectation: Fail -*/ - -import foo as bar; -import *; \ No newline at end of file diff --git a/compiler/disabled_tests/parser/import/keyword_fail.leo b/compiler/disabled_tests/parser/import/keyword_fail.leo deleted file mode 100644 index fd12e8c7ff..0000000000 --- a/compiler/disabled_tests/parser/import/keyword_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -/* -namespace: ParseImport -expectation: Fail -*/ - -import function.a; - -import import.a; diff --git a/compiler/disabled_tests/parser/import/many_import.leo b/compiler/disabled_tests/parser/import/many_import.leo deleted file mode 100644 index a9cf5fa9b2..0000000000 --- a/compiler/disabled_tests/parser/import/many_import.leo +++ /dev/null @@ -1,15 +0,0 @@ -/* -namespace: ParseImport -expectation: Pass -*/ - -import tes_import.( - Point, - foo, -); - -import bar.( - Bar, - baz.(Baz, Bazzar), - bat.bat.Bat, -); diff --git a/compiler/disabled_tests/parser/import/many_import_star.leo b/compiler/disabled_tests/parser/import/many_import_star.leo deleted file mode 100644 index 2a4fa63366..0000000000 --- a/compiler/disabled_tests/parser/import/many_import_star.leo +++ /dev/null @@ -1,14 +0,0 @@ -/* -namespace: ParseImport -expectation: Pass -*/ - -import test_import.*; // local import - -import bar.*; // imports directory import - -import bar.baz.*; // imports directory import - -import bar.bat.bat.*; // imports directory import - -import car.*; // imports directory import diff --git a/compiler/disabled_tests/parser/import/names.leo b/compiler/disabled_tests/parser/import/names.leo deleted file mode 100644 index 6538138cbb..0000000000 --- a/compiler/disabled_tests/parser/import/names.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: ParseImport -expectation: Pass -*/ - -import a0_f.foo; - -import a_9.bar; - -import hello_world.hello; diff --git a/compiler/disabled_tests/parser/import/names_underscore.leo b/compiler/disabled_tests/parser/import/names_underscore.leo deleted file mode 100644 index d730848799..0000000000 --- a/compiler/disabled_tests/parser/import/names_underscore.leo +++ /dev/null @@ -1,6 +0,0 @@ -/* -namespace: ParseImport -expectation: Pass -*/ - -import hello_world.foo; diff --git a/compiler/disabled_tests/parser/import/star.leo b/compiler/disabled_tests/parser/import/star.leo deleted file mode 100644 index e7da78de66..0000000000 --- a/compiler/disabled_tests/parser/import/star.leo +++ /dev/null @@ -1,6 +0,0 @@ -/* -namespace: ParseImport -expectation: Fail -*/ - -import test-import.*; diff --git a/compiler/disabled_tests/parser/input/input_success.leo b/compiler/disabled_tests/parser/input/input_success.leo deleted file mode 100644 index 2a1401eded..0000000000 --- a/compiler/disabled_tests/parser/input/input_success.leo +++ /dev/null @@ -1,34 +0,0 @@ -/* -namespace: Input -expectation: Pass -*/ - -[main] -a: bool = true; -b: u8 = 2u8; -c: field = 0field; -d: group = (0, 1)group; -e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; -f: [u8; 32] = [0u8; 32]; -g: [[u8; 2]; 3] = [[0u8; 2]; 3]; -h: (bool, bool) = (true, false); - -[registers] -r0: bool = true; -r1: u8 = 2u8; -r2: field = 0field; -r3: group = (0, 1)group; -r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; -r5: [u8; 32] = [0u8; 32]; -r6: [[u8; 2]; 3] = [[0u8; 2]; 3]; -r7: (bool, bool) = (true, false); - -[constants] -c0: bool = true; -c1: u8 = 2u8; -c2: field = 0field; -c3: group = (0, 1)group; -c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; -c5: [u8; 32] = [0u8; 32]; -c6: [[u8; 2]; 3] = [[0u8; 2]; 3]; -c7: (bool, bool) = (true, false); diff --git a/compiler/disabled_tests/parser/serialize/linear_regression.leo b/compiler/disabled_tests/parser/serialize/linear_regression.leo deleted file mode 100644 index 7b6541cbc7..0000000000 --- a/compiler/disabled_tests/parser/serialize/linear_regression.leo +++ /dev/null @@ -1,70 +0,0 @@ -/* -namespace: Serialize -expectation: Pass -*/ - -circuit Point { - x: i32, - y: i32, - - function new(x: i32, y: i32) -> Self { - return Self { x, y }; - } -} - -circuit LinearRegression { - points: [Point; 5], - - // Instantiates a linear regression circuit. - function new(points: [Point; 5]) -> Self { - return Self { points }; - } - - // Return the slope of the linear regression. - function slope(self) -> i32 { - - let num_points: i32 = 5i32; - // Calculate the sums. - let x_sum: i32 = 0i32; - let y_sum: i32 = 0i32; - let xy_sum: i32 = 0i32; - let x2_sum: i32 = 0i32; - for i: u32 in 0u32..5u32 { - x_sum += self.points[i].x; - y_sum += self.points[i].y; - xy_sum += self.points[i].x * self.points[i].y; - x2_sum += self.points[i].x * self.points[i].x; - } - let numerator: i32 = (num_points * xy_sum) - (x_sum * y_sum); - let denominator: i32 = (num_points * x2_sum) - (x_sum * x_sum); - let slope: i32 = numerator / denominator; - return slope; - } - // Return the offset of the linear regression. - function offset(self, slope: i32) -> i32 { - let num_points: i32 = 5i32; - // Calculate the sum. - let x_sum: i32 = 0i32; - let y_sum: i32 = 0i32; - for i: u32 in 0u32..5u32 { - x_sum += self.points[i].x; - y_sum += self.points[i].y; - } - return (y_sum - slope * x_sum) / num_points; - } -} - - -function main (x: i32, y: i32) -> [i32; 2] { - let points: [Point; 5] = [ - Point{x: x + 1i32, y: y + 1i32}, - Point{x: x + 2i32, y: y + 2i32}, - Point{x: x + 3i32, y: y + 3i32}, - Point{x: x + 4i32, y: y + 4i32}, - Point{x: x + 5i32, y: y + 5i32} - ]; - let reg: LinearRegression = LinearRegression::new(points); - let slope: i32 = reg.slope(); - let offset: i32 = reg.offset(slope); - return [slope, offset]; -} diff --git a/compiler/disabled_tests/parser/serialize/palindrome.leo b/compiler/disabled_tests/parser/serialize/palindrome.leo deleted file mode 100644 index 6b7d94c80b..0000000000 --- a/compiler/disabled_tests/parser/serialize/palindrome.leo +++ /dev/null @@ -1,64 +0,0 @@ -/* -namespace: Serialize -expectation: Pass -*/ - -// This Program takes in any 20-byte low register string and tells -// whether a string is a palindrome ignoring any spaces. - -function main(str: [char; 20]) -> bool { - return is_palindrome(str); -} - -function is_palindrome(str: [char; 20]) -> bool { - const str_len: u32 = 20u32; // saving const for convenience - - // By default we assume that input is a palindrome. - let result: bool = true; - let processed: u8 = 0u8; - - for start: u32 in 0u32..(str_len / 2u32) { - let start_sym: char = str[start]; - if start_sym != ' ' { - let skipped: u8 = 0u8; - let end_empty: u8 = 0u8; - let end_sym: char = ' '; - - for end: u32 in (str_len - 1u32)..start { - if str[end] != ' ' && skipped == processed && end_sym == ' ' { - end_sym = str[end]; - } else { - end_empty = end_empty + 1u8; - if str[end] != ' ' { - skipped = skipped + 1u8; - } - } - } - - // If there are symbols left to the right from the start. - if end_sym != ' ' { - console.log("Comparing: {} ? {}", start_sym, end_sym); - - if result { - result = (start_sym == end_sym); - } - - processed = processed + 1u8; - } - } - } - - console.log("Result is: {}", result); - - return result; -} - -@test -function test_is_palindrome() { - console.assert(is_palindrome("a b a ")); - console.assert(is_palindrome("😀😀😀😀😀 😀😀😀😀😀")); - console.assert(is_palindrome("borrow or rob ")); - console.assert(is_palindrome("bbbb aaaa aaaa bbbb")); - console.assert(is_palindrome("aaaaaaaaaaaaaaaaaaaa")); - console.assert(is_palindrome("taco cat ")); -} diff --git a/compiler/disabled_tests/parser/serialize/pedersen_hash.leo b/compiler/disabled_tests/parser/serialize/pedersen_hash.leo deleted file mode 100644 index 8ea05d82c6..0000000000 --- a/compiler/disabled_tests/parser/serialize/pedersen_hash.leo +++ /dev/null @@ -1,30 +0,0 @@ -/* -namespace: Serialize -expectation: Pass -*/ - -circuit PedersenHash { - parameters: [group; 256]; - - // Instantiates a Pedersen hash circuit - function new(parameters: [group; 256]) -> Self { - return Self { parameters: parameters }; - } - - function hash(self, bits: [bool; 256]) -> group { - let digest: group = 0group; - for i: u32 in u32..256u32 { - if bits[i] { - digest += self.parameters[i]; - } - } - return digest; - } -} - -// The 'pedersen-hash' main function. -function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group { - const pedersen: PerdesenHash = PedersenHash::new(parameters); - return pedersen.hash(hash_input); -} - diff --git a/compiler/passes/src/canonicalization/canonicalizer.rs b/compiler/passes/src/canonicalization/canonicalizer.rs deleted file mode 100644 index f7690bdad4..0000000000 --- a/compiler/passes/src/canonicalization/canonicalizer.rs +++ /dev/null @@ -1,707 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -//! Creates a struct that implements a ReconstructingReducer -//! such that it applies changes to the AST nodes for canonicalization. -//! An example of these changes are transforming Self -> to the circuit name. - -use std::cell::RefCell; - -use leo_ast::*; -use leo_errors::{AstError, Result}; -use leo_span::{sym, Span, Symbol}; - -use indexmap::IndexMap; - -/// Replace Self when it is in a enclosing circuit type. -/// Error when Self is outside an enclosing circuit type. -/// Tuple array types and expressions expand to nested arrays. -/// Tuple array types and expressions error if a size of 0 is given. -/// Compound operators become simple assignments. -/// Functions missing output type return a empty tuple. -#[derive(Default)] -pub struct Canonicalizer { - // If we are in a circuit keep track of the circuit name. - circuit_name: Option, - in_circuit: bool, -} - -impl Canonicalizer { - pub fn canonicalize_accesses( - &mut self, - start: Expression, - accesses: &[AssigneeAccess], - span: &Span, - ) -> Result> { - let mut left = Box::new(start); - - for access in accesses.iter() { - match self.canonicalize_assignee_access(access) { - AssigneeAccess::ArrayIndex(index) => { - left = Box::new(Expression::Access(AccessExpression::Array(ArrayAccess { - array: left, - index: Box::new(index), - span: span.clone(), - }))); - } - AssigneeAccess::ArrayRange(start, stop) => { - left = Box::new(Expression::Access(AccessExpression::ArrayRange(ArrayRangeAccess { - array: left, - left: start.map(Box::new), - right: stop.map(Box::new), - span: span.clone(), - }))); - } - AssigneeAccess::Tuple(positive_number, _) => { - left = Box::new(Expression::Access(AccessExpression::Tuple(TupleAccess { - tuple: left, - index: positive_number, - span: span.clone(), - }))); - } - AssigneeAccess::Member(identifier) => { - left = Box::new(Expression::Access(AccessExpression::Member(MemberAccess { - inner: left, - name: identifier, - span: span.clone(), - type_: None, - }))); - } - } - } - - Ok(left) - } - - pub fn compound_operation_conversion(&mut self, operation: &AssignOperation) -> Result { - match operation { - AssignOperation::Assign => unreachable!(), - AssignOperation::Add => Ok(BinaryOperation::Add), - AssignOperation::Sub => Ok(BinaryOperation::Sub), - AssignOperation::Mul => Ok(BinaryOperation::Mul), - AssignOperation::Div => Ok(BinaryOperation::Div), - AssignOperation::Pow => Ok(BinaryOperation::Pow), - AssignOperation::Or => Ok(BinaryOperation::Or), - AssignOperation::And => Ok(BinaryOperation::And), - AssignOperation::BitOr => Ok(BinaryOperation::BitOr), - AssignOperation::BitAnd => Ok(BinaryOperation::BitAnd), - AssignOperation::BitXor => Ok(BinaryOperation::BitXor), - AssignOperation::Shr => Ok(BinaryOperation::Shr), - AssignOperation::ShrSigned => Ok(BinaryOperation::ShrSigned), - AssignOperation::Shl => Ok(BinaryOperation::Shl), - AssignOperation::Mod => Ok(BinaryOperation::Mod), - } - } - - fn canonicalize_self_type(&self, type_: &Type) -> Type { - match type_ { - Type::SelfType => Type::Identifier(self.circuit_name.as_ref().unwrap().clone()), - Type::Array(type_, dimensions) => { - Type::Array(Box::new(self.canonicalize_self_type(type_)), dimensions.clone()) - } - Type::Tuple(types) => Type::Tuple(types.iter().map(|type_| self.canonicalize_self_type(type_)).collect()), - _ => type_.clone(), - } - } - - fn canonicalize_circuit_variable_initializer( - &mut self, - member: &CircuitVariableInitializer, - ) -> CircuitVariableInitializer { - CircuitVariableInitializer { - identifier: member.identifier.clone(), - expression: member - .expression - .as_ref() - .map(|expr| self.canonicalize_expression(expr)), - } - } - - fn canonicalize_expression(&mut self, expression: &Expression) -> Expression { - match expression { - Expression::Unary(unary) => { - let inner = Box::new(self.canonicalize_expression(&unary.inner)); - - return Expression::Unary(UnaryExpression { - inner, - op: unary.op.clone(), - span: unary.span.clone(), - }); - } - Expression::Binary(binary) => { - let left = Box::new(self.canonicalize_expression(&binary.left)); - let right = Box::new(self.canonicalize_expression(&binary.right)); - - return Expression::Binary(BinaryExpression { - left, - right, - op: binary.op, - span: binary.span.clone(), - }); - } - Expression::Ternary(ternary) => { - let condition = Box::new(self.canonicalize_expression(&ternary.condition)); - let if_true = Box::new(self.canonicalize_expression(&ternary.if_true)); - let if_false = Box::new(self.canonicalize_expression(&ternary.if_false)); - - return Expression::Ternary(TernaryExpression { - condition, - if_true, - if_false, - span: ternary.span.clone(), - }); - } - - Expression::Cast(cast) => { - let inner = Box::new(self.canonicalize_expression(&cast.inner)); - let target_type = self.canonicalize_self_type(&cast.target_type); - - return Expression::Cast(CastExpression { - inner, - target_type, - span: cast.span.clone(), - }); - } - - Expression::Access(access) => { - let access = match access { - AccessExpression::Array(array_access) => { - let array = Box::new(self.canonicalize_expression(&array_access.array)); - let index = Box::new(self.canonicalize_expression(&array_access.index)); - - AccessExpression::Array(ArrayAccess { - array, - index, - span: array_access.span.clone(), - }) - } - AccessExpression::ArrayRange(array_range_access) => { - let array = Box::new(self.canonicalize_expression(&array_range_access.array)); - let left = array_range_access - .left - .as_ref() - .map(|left| Box::new(self.canonicalize_expression(left))); - let right = array_range_access - .right - .as_ref() - .map(|right| Box::new(self.canonicalize_expression(right))); - - AccessExpression::ArrayRange(ArrayRangeAccess { - array, - left, - right, - span: array_range_access.span.clone(), - }) - } - AccessExpression::Member(member_access) => AccessExpression::Member(MemberAccess { - inner: Box::new(self.canonicalize_expression(&member_access.inner)), - name: member_access.name.clone(), - span: member_access.span.clone(), - type_: None, - }), - AccessExpression::Tuple(tuple_access) => { - let tuple = Box::new(self.canonicalize_expression(&tuple_access.tuple)); - - AccessExpression::Tuple(TupleAccess { - tuple, - index: tuple_access.index.clone(), - span: tuple_access.span.clone(), - }) - } - AccessExpression::Static(static_access) => AccessExpression::Static(StaticAccess { - inner: Box::new(self.canonicalize_expression(&static_access.inner)), - name: static_access.name.clone(), - type_: RefCell::new(self.canonicalize_self_type(&static_access.type_.borrow())), - span: static_access.span.clone(), - }), - }; - - return Expression::Access(access); - } - - Expression::ArrayInline(array_inline) => { - let elements = array_inline - .elements - .iter() - .map(|element| match element { - SpreadOrExpression::Expression(expression) => { - SpreadOrExpression::Expression(self.canonicalize_expression(expression)) - } - SpreadOrExpression::Spread(expression) => { - SpreadOrExpression::Spread(self.canonicalize_expression(expression)) - } - }) - .collect(); - - return Expression::ArrayInline(ArrayInlineExpression { - elements, - span: array_inline.span.clone(), - }); - } - - Expression::ArrayInit(array_init) => { - let element = Box::new(self.canonicalize_expression(&array_init.element)); - - return Expression::ArrayInit(ArrayInitExpression { - dimensions: array_init.dimensions.clone(), - element, - span: array_init.span.clone(), - }); - } - - Expression::TupleInit(tuple_init) => { - let elements = tuple_init - .elements - .iter() - .map(|element| self.canonicalize_expression(element)) - .collect(); - - return Expression::TupleInit(TupleInitExpression { - elements, - span: tuple_init.span.clone(), - }); - } - - Expression::CircuitInit(circuit_init) => { - let mut name = circuit_init.name.clone(); - if name.name == sym::SelfUpper && self.circuit_name.is_some() { - name = self.circuit_name.clone().unwrap(); - } - - return Expression::CircuitInit(CircuitInitExpression { - name, - members: circuit_init - .members - .iter() - .map(|member| self.canonicalize_circuit_variable_initializer(member)) - .collect(), - span: circuit_init.span.clone(), - }); - } - Expression::Call(call) => { - return Expression::Call(CallExpression { - function: Box::new(self.canonicalize_expression(&call.function)), - arguments: call - .arguments - .iter() - .map(|arg| self.canonicalize_expression(arg)) - .collect(), - span: call.span.clone(), - }); - } - Expression::Identifier(identifier) => { - if identifier.name == sym::SelfUpper && self.circuit_name.is_some() { - return Expression::Identifier(self.circuit_name.as_ref().unwrap().clone()); - } - } - _ => (), - } - - expression.clone() - } - - fn canonicalize_assignee_access(&mut self, access: &AssigneeAccess) -> AssigneeAccess { - match access { - AssigneeAccess::ArrayRange(left, right) => { - let left = left.as_ref().map(|left| self.canonicalize_expression(left)); - let right = right.as_ref().map(|right| self.canonicalize_expression(right)); - - AssigneeAccess::ArrayRange(left, right) - } - AssigneeAccess::ArrayIndex(index) => AssigneeAccess::ArrayIndex(self.canonicalize_expression(index)), - _ => access.clone(), - } - } - - fn canonicalize_assignee(&mut self, assignee: &Assignee) -> Assignee { - let accesses = assignee - .accesses - .iter() - .map(|access| self.canonicalize_assignee_access(access)) - .collect(); - - Assignee { - identifier: assignee.identifier.clone(), - accesses, - span: assignee.span.clone(), - } - } - - fn canonicalize_block(&mut self, block: &Block) -> Block { - let statements = block - .statements - .iter() - .map(|block_statement| self.canonicalize_statement(block_statement)) - .collect(); - - Block { - statements, - span: block.span.clone(), - } - } - - fn canonicalize_statement(&mut self, statement: &Statement) -> Statement { - match statement { - Statement::Return(return_statement) => { - let expression = self.canonicalize_expression(&return_statement.expression); - Statement::Return(ReturnStatement { - expression, - span: return_statement.span.clone(), - }) - } - Statement::Definition(definition) => { - let value = self.canonicalize_expression(&definition.value); - let type_ = self.canonicalize_self_type(&definition.type_); - - Statement::Definition(DefinitionStatement { - declaration_type: definition.declaration_type.clone(), - variable_names: definition.variable_names.clone(), - type_, - value, - span: definition.span.clone(), - }) - } - Statement::Assign(assign) => { - let assignee = self.canonicalize_assignee(&assign.assignee); - let value = self.canonicalize_expression(&assign.value); - - Statement::Assign(Box::new(AssignStatement { - assignee, - value, - operation: assign.operation, - span: assign.span.clone(), - })) - } - Statement::Conditional(conditional) => { - let condition = self.canonicalize_expression(&conditional.condition); - let block = self.canonicalize_block(&conditional.block); - let next = conditional - .next - .as_ref() - .map(|condition| Box::new(self.canonicalize_statement(condition))); - - Statement::Conditional(ConditionalStatement { - condition, - block, - next, - span: conditional.span.clone(), - }) - } - Statement::Iteration(iteration) => { - let type_ = self.canonicalize_self_type(&iteration.type_); - let start = self.canonicalize_expression(&iteration.start); - let stop = self.canonicalize_expression(&iteration.stop); - let block = self.canonicalize_block(&iteration.block); - - Statement::Iteration(Box::new(IterationStatement { - variable: iteration.variable.clone(), - type_, - start, - stop, - inclusive: iteration.inclusive, - block, - span: iteration.span.clone(), - })) - } - Statement::Console(console_function_call) => { - let function = match &console_function_call.function { - ConsoleFunction::Assert(expression) => { - ConsoleFunction::Assert(self.canonicalize_expression(expression)) - } - ConsoleFunction::Error(args) | ConsoleFunction::Log(args) => { - let parameters = args - .parameters - .iter() - .map(|parameter| self.canonicalize_expression(parameter)) - .collect(); - - let console_args = ConsoleArgs { - string: args.string.clone(), - parameters, - span: args.span.clone(), - }; - - match &console_function_call.function { - ConsoleFunction::Error(_) => ConsoleFunction::Error(console_args), - ConsoleFunction::Log(_) => ConsoleFunction::Log(console_args), - _ => unimplemented!(), - } - } - }; - - Statement::Console(ConsoleStatement { - function, - span: console_function_call.span.clone(), - }) - } - Statement::Expression(expression) => Statement::Expression(ExpressionStatement { - expression: self.canonicalize_expression(&expression.expression), - span: expression.span.clone(), - }), - Statement::Block(block) => Statement::Block(self.canonicalize_block(block)), - } - } - - fn canonicalize_function_input(&mut self, input: &FunctionInput) -> FunctionInput { - if let FunctionInput::Variable(variable) = input { - let type_ = self.canonicalize_self_type(&variable.type_); - - return FunctionInput::Variable(FunctionInputVariable { - identifier: variable.identifier.clone(), - const_: variable.const_, - mutable: variable.mutable, - type_, - span: variable.span.clone(), - }); - } - - input.clone() - } - - fn canonicalize_circuit_member(&mut self, circuit_member: &CircuitMember) -> CircuitMember { - match circuit_member { - CircuitMember::CircuitConst(identifier, type_, value) => { - return CircuitMember::CircuitConst( - identifier.clone(), - type_.clone(), - self.canonicalize_expression(value), - ); - } - CircuitMember::CircuitVariable(_, _) => {} - CircuitMember::CircuitFunction(function) => { - let input = function - .input - .iter() - .map(|input| self.canonicalize_function_input(input)) - .collect(); - let output = self.canonicalize_self_type(&function.output); - let block = self.canonicalize_block(&function.block); - - return CircuitMember::CircuitFunction(Box::new(Function { - annotations: function.annotations.clone(), - identifier: function.identifier.clone(), - const_: function.const_, - input, - output, - block, - core_mapping: function.core_mapping.clone(), - span: function.span.clone(), - })); - } - } - - circuit_member.clone() - } -} - -impl ReconstructingReducer for Canonicalizer { - fn in_circuit(&self) -> bool { - self.in_circuit - } - - fn swap_in_circuit(&mut self) { - self.in_circuit = !self.in_circuit; - } - - fn reduce_type(&mut self, _type_: &Type, new: Type, span: &Span) -> Result { - match new.clone() { - Type::Array(base, dims) if dims.is_empty() => Ok(Type::Array(base, dims)), - Type::Array(_, dims) if dims.is_zero() => Err(AstError::invalid_array_dimension_size(span).into()), - // Reduce `ArrayDimensions` into nested `Array` types. - Type::Array(base, dims) => { - let mut iter = dims.0.into_iter().rev(); - let ctor = |ty, dim| Type::Array(ty, ArrayDimensions::single(dim)); - let dim = iter.next().unwrap(); - let base = ctor(base, dim); - Ok(iter.fold(base, |ty, dim| ctor(Box::new(ty), dim))) - } - Type::SelfType if !self.in_circuit => Err(AstError::big_self_outside_of_circuit(span).into()), - Type::Tuple(types) if types.len() == 1 => Err(AstError::invalid_tuple_dimension_size(span).into()), - _ => Ok(new), - } - } - - fn reduce_string(&mut self, string: &[Char], span: &Span) -> Result { - if string.is_empty() { - return Err(AstError::empty_string(span).into()); - } - - let mut elements = Vec::new(); - let mut col_adder = 0; - for (index, character) in string.iter().enumerate() { - let col_start = span.col_start + index + 1 + col_adder; // account for open quote - let bytes = span.content.clone().into_bytes(); - let col_stop = if bytes[col_start - 1] == b'\\' { - let mut width = 0; - - match bytes[col_start] { - b'x' => width += 3, - b'u' => { - width += 1; - let mut index = 1; - while bytes[col_start + index] != b'}' { - width += 1; - index += 1; - } - width += 1; - } - _ => width += 1, - } - col_adder += width; - col_start + 1 + width - } else { - col_start + 1 - }; - - elements.push(SpreadOrExpression::Expression(Expression::Value( - ValueExpression::Char(CharValue { - character: character.clone(), - span: Span::new( - span.line_start, - span.line_stop, - col_start, - col_stop, - span.path.clone(), - span.content.clone(), - ), - }), - ))); - } - - if elements.is_empty() { - return Err(AstError::invalid_array_dimension_size(span).into()); - } - - Ok(Expression::ArrayInline(ArrayInlineExpression { - elements, - span: span.clone(), - })) - } - - fn reduce_array_init( - &mut self, - array_init: &ArrayInitExpression, - element: Expression, - ) -> Result { - let mk_expr = |element, dim| ArrayInitExpression { - element, - dimensions: ArrayDimensions::single(dim), - span: array_init.span.clone(), - }; - - let mut iter = array_init.dimensions.iter().rev().cloned(); - // We know the array has non-zero dimensions. - let init = mk_expr(Box::new(element), iter.next().unwrap()); - Ok(iter.fold(init, |elem, dim| mk_expr(Box::new(Expression::ArrayInit(elem)), dim))) - } - - fn reduce_definition( - &mut self, - definition: &DefinitionStatement, - variable_names: Vec, - type_: Type, - value: Expression, - ) -> Result { - let type_ = self.canonicalize_self_type(type_.as_ref()); - - Ok(DefinitionStatement { - declaration_type: definition.declaration_type.clone(), - variable_names, - type_, - value, - span: definition.span.clone(), - }) - } - - fn reduce_assign( - &mut self, - assign: &AssignStatement, - assignee: Assignee, - value: Expression, - ) -> Result { - match value { - value if assign.operation != AssignOperation::Assign => { - let left = self.canonicalize_accesses( - Expression::Identifier(assignee.identifier.clone()), - &assignee.accesses, - &assign.span, - )?; - let right = Box::new(value); - let op = self.compound_operation_conversion(&assign.operation)?; - - let new_value = Expression::Binary(BinaryExpression { - left, - right, - op, - span: assign.span.clone(), - }); - - Ok(AssignStatement { - operation: AssignOperation::Assign, - assignee, - value: new_value, - span: assign.span.clone(), - }) - } - value => Ok(AssignStatement { - operation: AssignOperation::Assign, - assignee, - value, - span: assign.span.clone(), - }), - } - } - - fn reduce_function( - &mut self, - function: &Function, - identifier: Identifier, - annotations: IndexMap, - input: Vec, - const_: bool, - output: Type, - block: Block, - ) -> Result { - Ok(Function { - identifier, - annotations, - input, - const_, - output, - block, - core_mapping: function.core_mapping.clone(), - span: function.span.clone(), - }) - } - - fn reduce_circuit( - &mut self, - _circuit: &Circuit, - circuit_name: Identifier, - members: Vec, - ) -> Result { - self.circuit_name = Some(circuit_name.clone()); - let circ = Circuit { - circuit_name, - members: members - .iter() - .map(|member| self.canonicalize_circuit_member(member)) - .collect(), - }; - self.circuit_name = None; - Ok(circ) - } -} diff --git a/compiler/passes/src/canonicalization/mod.rs b/compiler/passes/src/canonicalization/mod.rs deleted file mode 100644 index 26f172ff16..0000000000 --- a/compiler/passes/src/canonicalization/mod.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -//! Implements the AstPass trait for the Canonicalizer -//! which is a ReconstructingReducer trait to canonicalize AST nodes. -//! This allows for easy calling of the Canonicalization pass. - -pub mod canonicalizer; -pub use canonicalizer::*; - -use leo_ast::{Ast, AstPass, Program, ReconstructingDirector}; -use leo_errors::Result; - -impl AstPass for Canonicalizer { - fn do_pass(self, ast: Program) -> Result { - Ok(Ast::new(ReconstructingDirector::new(self).reduce_program(&ast)?)) - } -} diff --git a/compiler/passes/src/import_resolution/importer.rs b/compiler/passes/src/import_resolution/importer.rs deleted file mode 100644 index 0e3e0397ed..0000000000 --- a/compiler/passes/src/import_resolution/importer.rs +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::resolver::*; - -use leo_ast::*; -use leo_errors::{AstError, Result, Span}; - -use indexmap::IndexMap; - -pub struct Importer {} - -impl Importer { - pub fn do_pass(program: Program, importer: &mut T) -> Result - where - T: ImportResolver, - { - let mut ast = program.clone(); - ast.imports.extend(leo_stdlib::resolve_prelude_modules()?); - - let mut imported_symbols: Vec<(Vec, ImportSymbol, Span)> = vec![]; - for import_statement in program.import_statements.iter() { - resolve_import_package(&mut imported_symbols, vec![], &import_statement.package_or_packages); - } - - let mut deduplicated_imports: IndexMap, Span> = IndexMap::new(); - for (package, _symbol, span) in imported_symbols.iter() { - deduplicated_imports.insert(package.clone(), span.clone()); - } - - let mut wrapped_resolver = CoreImportResolver::new(importer); - - let mut resolved_packages: IndexMap, Program> = IndexMap::new(); - for (package, span) in deduplicated_imports { - let pretty_package = package.join("."); - - let resolved_package = - match wrapped_resolver.resolve_package(&package.iter().map(|x| &**x).collect::>(), &span)? { - Some(x) => x, - None => return Err(AstError::unresolved_import(pretty_package, &span).into()), - }; - - resolved_packages.insert(package.clone(), resolved_package); - } - - ast.imports.extend(resolved_packages); - - Ok(Ast::new(ast)) - } -} - -/// Enumerates what names are imported from a package. -#[derive(Clone)] -enum ImportSymbol { - /// Import the symbol by name. - Direct(String), - - /// Import the symbol by name and store it under an alias. - Alias(String, String), // from remote -> to local - - /// Import all symbols from the package. - All, -} - -fn resolve_import_package( - output: &mut Vec<(Vec, ImportSymbol, Span)>, - mut package_segments: Vec, - package_or_packages: &PackageOrPackages, -) { - match package_or_packages { - PackageOrPackages::Package(package) => { - package_segments.push(package.name.name.to_string()); - resolve_import_package_access(output, package_segments, &package.access); - } - PackageOrPackages::Packages(packages) => { - package_segments.push(packages.name.name.to_string()); - for access in packages.accesses.clone() { - resolve_import_package_access(output, package_segments.clone(), &access); - } - } - } -} - -fn resolve_import_package_access( - output: &mut Vec<(Vec, ImportSymbol, Span)>, - mut package_segments: Vec, - package: &PackageAccess, -) { - match package { - PackageAccess::Star { span } => { - output.push((package_segments, ImportSymbol::All, span.clone())); - } - PackageAccess::SubPackage(subpackage) => { - resolve_import_package( - output, - package_segments, - &PackageOrPackages::Package(*(*subpackage).clone()), - ); - } - PackageAccess::Symbol(symbol) => { - let span = symbol.symbol.span.clone(); - let symbol = if let Some(alias) = symbol.alias.as_ref() { - ImportSymbol::Alias(symbol.symbol.name.to_string(), alias.name.to_string()) - } else { - ImportSymbol::Direct(symbol.symbol.name.to_string()) - }; - output.push((package_segments, symbol, span)); - } - PackageAccess::Multiple(packages) => { - package_segments.push(packages.name.name.to_string()); - for subaccess in packages.accesses.iter() { - resolve_import_package_access(output, package_segments.clone(), subaccess); - } - } - } -} diff --git a/compiler/passes/src/import_resolution/mod.rs b/compiler/passes/src/import_resolution/mod.rs deleted file mode 100644 index 1830adac73..0000000000 --- a/compiler/passes/src/import_resolution/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -pub mod importer; -pub use self::importer::*; - -pub mod resolver; -pub use self::resolver::*; diff --git a/compiler/passes/src/import_resolution/resolver.rs b/compiler/passes/src/import_resolution/resolver.rs deleted file mode 100644 index 947a5ff341..0000000000 --- a/compiler/passes/src/import_resolution/resolver.rs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2019-2022 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 leo_ast::Program; -use leo_errors::{Result, Span}; -use leo_core::resolve_core_module; - -use indexmap::IndexMap; - -pub trait ImportResolver { - fn resolve_package(&mut self, package_segments: &[&str], span: &Span) -> Result>; -} - -pub struct NullImportResolver; - -impl ImportResolver for NullImportResolver { - fn resolve_package(&mut self, _package_segments: &[&str], _span: &Span) -> Result> { - Ok(None) - } -} - -pub struct CoreImportResolver<'a, T: ImportResolver> { - inner: &'a mut T, -} - -impl<'a, T: ImportResolver> CoreImportResolver<'a, T> { - pub fn new(inner: &'a mut T) -> Self { - CoreImportResolver { inner } - } -} - -impl<'a, T: ImportResolver> ImportResolver for CoreImportResolver<'a, T> { - fn resolve_package(&mut self, package_segments: &[&str], span: &Span) -> Result> { - if !package_segments.is_empty() && package_segments.get(0).unwrap() == &"std" { - Ok(Some(resolve_stdlib_module(&*package_segments[1..].join("."))?)) - } else { - self.inner.resolve_package(package_segments, span) - } - } -} - -pub struct MockedImportResolver { - pub packages: IndexMap, -} - -impl ImportResolver for MockedImportResolver { - fn resolve_package(&mut self, package_segments: &[&str], _span: &Span) -> Result> { - Ok(self.packages.get(&package_segments.join(".")).cloned()) - } -} diff --git a/compiler/passes/src/lib.rs b/compiler/passes/src/lib.rs index 91429bd51c..a405c946ff 100644 --- a/compiler/passes/src/lib.rs +++ b/compiler/passes/src/lib.rs @@ -16,16 +16,6 @@ #![doc = include_str!("../README.md")] -// Temporarily disable canonicalization. -/* pub mod canonicalization; -pub use canonicalization::*; - */ - -// Temporarily disable import resolution -// until we migrate core and then import resolution. -/* pub mod import_resolution; -pub use import_resolution::*; */ - pub mod code_generation; pub use code_generation::*; diff --git a/leo/commands/unused/README.md b/leo/commands/unused/README.md deleted file mode 100644 index 9b2d1942a5..0000000000 --- a/leo/commands/unused/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Overview - -This directory contains Leo cli commands that are not yet ready for `testnet3` release. \ No newline at end of file diff --git a/leo/commands/unused/deploy.rs b/leo/commands/unused/deploy.rs deleted file mode 100644 index 0f98db6a38..0000000000 --- a/leo/commands/unused/deploy.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::{commands::Command, context::Context}; -use leo_errors::Result; - -use structopt::StructOpt; -use tracing::span::Span; - -/// Deploy Leo program to the network -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Deploy {} - -impl Command for Deploy { - type Input = (); - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Deploy") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, _: Context, _: Self::Input) -> Result { - unimplemented!("Deploy command has not been implemented yet"); - } -} diff --git a/leo/commands/unused/init.rs b/leo/commands/unused/init.rs deleted file mode 100644 index 0031c74339..0000000000 --- a/leo/commands/unused/init.rs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::{commands::Command, config::*, context::Context}; -use leo_errors::{CliError, Result}; -use leo_package::LeoPackage; - -use structopt::StructOpt; -use tracing::span::Span; - -/// Init Leo project command within current directory -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Init {} - -impl Command for Init { - type Input = (); - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Initializing") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, context: Context, _: Self::Input) -> Result { - // Derive the package directory path. - let path = context.dir()?; - - // Check that the current package directory path exists. - if !path.exists() { - return Err(CliError::package_directory_does_not_exist().into()); - } - - // Check that the given package name is valid. - let package_name = path - .file_stem() - .ok_or_else(CliError::invalid_project_name)? - .to_string_lossy() - .to_string(); - if !LeoPackage::is_package_name_valid(&package_name) { - return Err(CliError::invalid_package_name(&package_name).into()); - } - - let username = read_username().ok(); - - LeoPackage::initialize(&package_name, &path, username)?; - - Ok(()) - } -} diff --git a/leo/commands/unused/lint.rs b/leo/commands/unused/lint.rs deleted file mode 100644 index a5c7e22348..0000000000 --- a/leo/commands/unused/lint.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::{commands::Command, context::Context}; -use leo_errors::Result; - -use structopt::StructOpt; -use tracing::span::Span; - -/// Lint Leo code command -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Lint {} - -impl Command for Lint { - type Input = (); - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Linting") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, _: Context, _: Self::Input) -> Result { - unimplemented!("Lint command has not been implemented yet"); - } -} diff --git a/leo/commands/unused/package/add.rs b/leo/commands/unused/package/add.rs deleted file mode 100644 index e63404a24b..0000000000 --- a/leo/commands/unused/package/add.rs +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -// !!!!!!!!!!!!!!!!!!!!!!!!!!!! -// COMMAND TEMPORARILY DISABLED -// !!!!!!!!!!!!!!!!!!!!!!!!!!!! - -use crate::{api::Fetch, commands::Command, context::Context}; -use leo_errors::{CliError, Result}; -use leo_package::imports::{ImportsDirectory, IMPORTS_DIRECTORY_NAME}; - -use std::{ - fs::{create_dir_all, File}, - io::{Read, Write}, - path::PathBuf, -}; -use structopt::StructOpt; -use tracing::Span; - -/// Add a package from Aleo Package Manager -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Add { - #[structopt(name = "REMOTE")] - remote: Option, - - #[structopt(name = "author", help = "Specify a package author", long = "author", short = "a")] - author: Option, - - #[structopt(name = "package", help = "Specify a package name", long = "package", short = "p")] - package: Option, - - #[structopt(name = "version", help = "Specify a package version", long = "version", short = "v")] - version: Option, -} - -impl Add { - pub fn new( - remote: Option, - author: Option, - package: Option, - version: Option, - ) -> Add { - Add { - remote, - author, - package, - version, - } - } - - /// Try to parse author/package string from self.remote - fn try_read_arguments(&self) -> Result<(String, String)> { - if let Some(val) = &self.remote { - let v: Vec<&str> = val.split('/').collect(); - if v.len() == 2 { - Ok((v[0].to_string(), v[1].to_string())) - } else { - Err(CliError::incorrect_command_argument().into()) - } - } else if let (Some(author), Some(package)) = (&self.author, &self.package) { - Ok((author.clone(), package.clone())) - } else { - Err(CliError::incorrect_command_argument().into()) - } - } -} - -impl Command for Add { - type Input = (); - type Output = PathBuf; - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Adding") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, context: Context, _: Self::Input) -> Result { - // Check that a manifest exists for the current package. - context.manifest().map_err(|_| CliError::manifest_file_not_found())?; - - let (author, package_name) = self - .try_read_arguments() - .map_err(CliError::cli_bytes_conversion_error)?; - - tracing::info!("Package: {}/{}", &author, &package_name); - - // Attempt to fetch the package. - let reader = { - let fetch = Fetch { - author: author.clone(), - package_name: package_name.clone(), - version: self.version.clone(), - }; - let bytes = context - .api - .run_route(fetch)? - .bytes() - .map_err(CliError::cli_bytes_conversion_error)?; - std::io::Cursor::new(bytes) - }; - - // Construct the directory structure. - let mut path = context.dir()?; - { - ImportsDirectory::create(&path)?; - path.push(IMPORTS_DIRECTORY_NAME); - - // Dumb compatibility hack. - // TODO: Remove once `leo add` functionality is discussed. - if self.version.is_some() { - path.push(format!("{}-{}@{}", author, package_name, self.version.unwrap())); - } else { - path.push(package_name.clone()); - } - create_dir_all(&path).map_err(CliError::cli_io_error)?; - }; - - // Proceed to unzip and parse the fetched bytes. - let mut zip_archive = zip::ZipArchive::new(reader).map_err(CliError::cli_zip_error)?; - for i in 0..zip_archive.len() { - let file = zip_archive.by_index(i).map_err(CliError::cli_zip_error)?; - - let file_name = file.name(); - - let mut file_path = path.clone(); - file_path.push(file_name); - - if file_name.ends_with('/') { - create_dir_all(file_path).map_err(CliError::cli_io_error)?; - } else { - if let Some(parent_directory) = path.parent() { - create_dir_all(parent_directory).map_err(CliError::cli_io_error)?; - } - - let mut created = File::create(file_path).map_err(CliError::cli_io_error)?; - created - .write_all(&file.bytes().map(|e| e.unwrap()).collect::>()) - .map_err(CliError::cli_bytes_conversion_error)?; - } - } - - tracing::info!("Successfully added package {}/{}", author, package_name); - - Ok(path) - } -} diff --git a/leo/commands/unused/package/clone.rs b/leo/commands/unused/package/clone.rs deleted file mode 100644 index fb6161785e..0000000000 --- a/leo/commands/unused/package/clone.rs +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::{api::Fetch, commands::Command, context::Context}; -use leo_errors::{CliError, Result}; - -use std::{ - borrow::Cow, - fs::{ - File, {self}, - }, - io::{Read, Write}, - path::Path, -}; -use structopt::StructOpt; -use tracing::Span; - -/// Clone a package from Aleo Package Manager -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Clone { - #[structopt(name = "REMOTE")] - remote: Option, - - #[structopt(name = "author", help = "Specify a package author", long = "author", short = "a")] - author: Option, - - #[structopt(name = "package", help = "Specify a package name", long = "package", short = "p")] - package: Option, - - #[structopt(name = "version", help = "Specify a package version", long = "version", short = "v")] - version: Option, -} - -impl Clone { - pub fn new( - remote: Option, - author: Option, - package: Option, - version: Option, - ) -> Self { - Self { - remote, - author, - package, - version, - } - } - - /// Try to parse author/package string from self.remote - fn try_read_arguments(&self) -> Result<(String, String)> { - if let Some(val) = &self.remote { - let v: Vec<&str> = val.split('/').collect(); - if v.len() == 2 { - Ok((v[0].to_string(), v[1].to_string())) - } else { - Err(CliError::incorrect_command_argument().into()) - } - } else if let (Some(author), Some(package)) = (&self.author, &self.package) { - Ok((author.clone(), package.clone())) - } else { - Err(CliError::incorrect_command_argument().into()) - } - } - - /// Creates a directory at the provided path with the given directory name. - fn create_directory(path: &Path, directory_name: &str) -> Result<()> { - let mut path = Cow::from(path); - - // Check that the path ends in the directory name. - // If it does not, proceed to append the directory name to the path. - if path.is_dir() && !path.ends_with(directory_name) { - path.to_mut().push(directory_name); - } - - Ok(fs::create_dir_all(&path).map_err(CliError::cli_io_error)?) - } -} - -impl Command for Clone { - type Input = (); - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Cloning") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, context: Context, _: Self::Input) -> Result { - let (author, package_name) = self.try_read_arguments()?; - - // Attempt to fetch the package. - let reader = { - let fetch = Fetch { - author, - package_name: package_name.clone(), - version: self.version, - }; - let bytes = context - .api - .run_route(fetch)? - .bytes() - .map_err(CliError::cli_bytes_conversion_error)?; - std::io::Cursor::new(bytes) - }; - - // Construct the directory structure. - let mut path = context.dir()?; - path.push(package_name.clone()); - Self::create_directory(&path, &package_name)?; - - // Proceed to unzip and parse the fetched bytes. - let mut zip_archive = zip::ZipArchive::new(reader).map_err(CliError::cli_io_error)?; - - for i in 0..zip_archive.len() { - let file = zip_archive.by_index(i).map_err(CliError::cli_zip_error)?; - - let file_name = file.name(); - - let mut file_path = path.clone(); - file_path.push(file_name); - - if file_name.ends_with('/') { - fs::create_dir_all(file_path).map_err(CliError::cli_io_error)?; - } else { - if let Some(parent_directory) = path.parent() { - fs::create_dir_all(parent_directory).map_err(CliError::cli_io_error)?; - } - - let mut created = File::create(file_path).map_err(CliError::cli_io_error)?; - created - .write_all(&file.bytes().map(|e| e.unwrap()).collect::>()) - .map_err(CliError::cli_bytes_conversion_error)?; - } - } - - tracing::info!("Successfully cloned {}", package_name); - - Ok(()) - } -} diff --git a/leo/commands/unused/package/fetch.rs b/leo/commands/unused/package/fetch.rs deleted file mode 100644 index b5545919da..0000000000 --- a/leo/commands/unused/package/fetch.rs +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::{ - commands::{package::Add, Command}, - context::{create_context, Context}, -}; - -use leo_package::root::{ - lock_file::{LockFile, Package}, - Dependency, -}; - -use indexmap::{set::IndexSet, IndexMap}; -use leo_errors::{CliError, Result}; -use structopt::StructOpt; -use tracing::span::Span; - -/// Pull dependencies specified in Leo toml. -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Fetch {} - -impl Command for Fetch { - /// Names of dependencies in the current branch of a dependency tree. - type Input = IndexSet; - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Fetching") - } - - fn prelude(&self, context: Context) -> Result { - let package_name = context.manifest()?.get_package_name(); - - let mut set = IndexSet::new(); - set.insert(package_name); - - Ok(set) - } - - fn apply(self, context: Context, tree: Self::Input) -> Result { - let dependencies = context - .manifest() - .map_err(|_| CliError::manifest_file_not_found())? - .get_package_dependencies(); - - // If program has no dependencies in the Leo.toml, exit with success. - let dependencies = match dependencies { - Some(dependencies) => dependencies, - None => return Ok(()), - }; - - if dependencies.is_empty() { - return Ok(()); - } - - let mut lock_file = LockFile::new(); - self.add_dependencies(context.clone(), tree, &mut lock_file, dependencies)?; - lock_file.write_to(&context.dir()?)?; - - Ok(()) - } -} - -impl Fetch { - /// Pulls dependencies and fills in the lock file. Also checks for - /// recursive dependencies with dependency tree. - fn add_dependencies( - &self, - context: Context, - mut tree: IndexSet, - lock_file: &mut LockFile, - dependencies: IndexMap, - ) -> Result<()> { - // Go through each dependency in Leo.toml and add it to the imports. - // While adding, pull dependencies of this package as well and check for recursion. - for (import_name, dependency) in dependencies.into_iter() { - let mut package = Package::from(&dependency); - package.import_name = Some(import_name); - - // Pull the dependency first. - let path = Add::new( - None, - Some(package.author.clone()), - Some(package.name.clone()), - Some(package.version.clone()), - ) - .apply(context.clone(), ())?; - - // Try inserting a new dependency to the branch. If not inserted, - // then fail because this dependency was added on a higher level. - if !tree.insert(package.name.clone()) { - // Pretty format for the message - show dependency structure. - let mut message: Vec = tree - .into_iter() - .enumerate() - .map(|(i, val)| format!("{}└─{}", " ".repeat(i * 2), val)) - .collect(); - - message.push(format!("{}└─{} (FAILURE)", " ".repeat(message.len() * 2), package.name)); - - return Err(CliError::recursive_dependency_found(message.join("\n")).into()); - } - - // Check imported dependency's dependencies. - let imported_dependencies = create_context(path, None)? - .manifest() - .map_err(|_| CliError::unable_to_read_imported_dependency_manifest())? - .get_package_dependencies(); - - if let Some(dependencies) = imported_dependencies { - if !dependencies.is_empty() { - // Fill in the lock file with imported dependency and information about its dependencies. - package.add_dependencies(&dependencies); - lock_file.add_package(package); - - // Recursively call this method for imported program. - self.add_dependencies(context.clone(), tree.clone(), lock_file, dependencies)?; - - continue; - } - } - - // If there are no dependencies for the new import, add a single record. - lock_file.add_package(package); - } - - Ok(()) - } -} diff --git a/leo/commands/unused/package/login.rs b/leo/commands/unused/package/login.rs deleted file mode 100644 index 763bf365d4..0000000000 --- a/leo/commands/unused/package/login.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::{ - api::{Login as LoginRoute, Profile as ProfileRoute}, - commands::Command, - config::*, - context::Context, -}; -use leo_errors::{CliError, Result}; - -use std::collections::HashMap; -use structopt::StructOpt; -use tracing::Span; - -/// Login to Aleo PM and store credentials locally -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Login { - #[structopt(name = "AUTH_TOKEN", about = "Pass authorization token")] - token: Option, - - #[structopt(short = "u", long = "user", about = "Username for Aleo PM")] - user: Option, - - #[structopt(short = "p", long = "password", about = "Password for Aleo PM")] - pass: Option, -} - -impl Login { - pub fn new(token: Option, user: Option, pass: Option) -> Login { - Login { token, user, pass } - } -} - -impl Command for Login { - type Input = (); - type Output = String; - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Login") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, context: Context, _: Self::Input) -> Result { - let mut api = context.clone().api; - - // ...or trying to use arguments to either get token or user-pass - let (token, username) = match (self.token, self.user, self.pass) { - // Login using username and password if they were passed. Even if token already - // exists login procedure will be done first (we need that for expired credentials). - (None, Some(email_username), Some(password)) => { - let login = LoginRoute { - email_username: email_username.clone(), - password, - }; - - let res = api.run_route(login)?; - let mut res: HashMap = res.json().map_err(CliError::reqwest_json_error)?; - - let tok_opt = res.remove("token"); - if tok_opt.is_none() { - return Err(CliError::unable_to_get_user_token().into()); - }; - - (tok_opt.unwrap(), email_username) - } - - // Login with token, use get_profile route to verify that. - (Some(token), _, _) => { - tracing::info!("Token passed, checking..."); - - api.set_auth_token(token.clone()); - - match api.run_route(ProfileRoute {})? { - Some(username) => (token, username), - None => return Err(CliError::supplied_token_is_incorrect().into()), - } - } - - // In case token or login/pass were not passed as arguments - (_, _, _) => { - // Check locally stored token if there is. - let token = context.api.auth_token(); - - match token { - Some(token) => { - tracing::info!("Found locally stored credentials, verifying..."); - - if let Some(username) = api.run_route(ProfileRoute {})? { - (token, username) - } else { - remove_token_and_username()?; - return Err(CliError::stored_credentials_expired().into()); - } - } - None => return Err(CliError::no_credentials_provided().into()), - } - } - }; - - // write token either after logging or if it was passed - write_token_and_username(token.as_str(), username.as_str())?; - - tracing::info!("Success! You are logged in!"); - - Ok(token) - } -} diff --git a/leo/commands/unused/package/logout.rs b/leo/commands/unused/package/logout.rs deleted file mode 100644 index f2912b3bbe..0000000000 --- a/leo/commands/unused/package/logout.rs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::{commands::Command, config::remove_token_and_username, context::Context}; -use leo_errors::Result; - -use structopt::StructOpt; -use tracing::Span; - -/// Remove credentials for Aleo PM from .leo directory -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Logout {} - -impl Command for Logout { - type Input = (); - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Logout") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, _context: Context, _: Self::Input) -> Result { - // the only error we're interested here is NotFound - // however err in this case can also be of kind PermissionDenied or other - remove_token_and_username()?; - tracing::info!("success"); - Ok(()) - } -} diff --git a/leo/commands/unused/package/mod.rs b/leo/commands/unused/package/mod.rs deleted file mode 100644 index 9aadc6aba0..0000000000 --- a/leo/commands/unused/package/mod.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -pub mod add; -pub use add::Add; - -pub mod clone; -pub use clone::Clone; - -pub mod fetch; -pub use fetch::Fetch; - -pub mod login; -pub use login::Login; - -pub mod logout; -pub use logout::Logout; - -pub mod publish; -pub use publish::Publish; - -pub mod remove; -pub use remove::Remove; - -pub use super::*; diff --git a/leo/commands/unused/package/publish.rs b/leo/commands/unused/package/publish.rs deleted file mode 100644 index 6d63557343..0000000000 --- a/leo/commands/unused/package/publish.rs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (C) 2019-2022 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::build::Build; -use crate::{api::Publish as PublishRoute, commands::Command, context::Context}; -use leo_errors::{CliError, Result}; -use leo_package::{ - outputs::OutputsDirectory, - root::{ZipFile, AUTHOR_PLACEHOLDER}, -}; -use leo_parser::KEYWORD_TOKENS; - -use structopt::StructOpt; - -/// Publish package to Aleo Package Manager -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Publish {} - -impl Command for Publish { - type Input = ::Output; - type Output = String; - - /// Build program before publishing - fn prelude(&self, context: Context) -> Result { - (Build { - compiler_options: Default::default(), - }) - .execute(context) - } - - fn apply(self, context: Context, _input: Self::Input) -> Result { - // Get the package manifest - let path = context.dir()?; - let manifest = context.manifest()?; - - let package_name = manifest.get_package_name(); - if KEYWORD_TOKENS.iter().any(|keyword| keyword.to_string() == package_name) { - return Err(CliError::package_cannot_be_named_after_a_keyword().into()); - } - - let package_version = manifest.get_package_version(); - - match ( - manifest.get_package_description(), - manifest.get_package_license(), - manifest.get_package_remote(), - ) { - (None, _, _) => return Err(CliError::no_package_description().into()), - (_, None, _) => return Err(CliError::missing_package_license().into()), - (_, _, None) => return Err(CliError::missing_package_remote().into()), - (_, _, _) => (), - }; - - let package_remote = manifest.get_package_remote().unwrap(); - let username = package_remote.clone().author; - - // Prevent most common error before accessing API. - if username == AUTHOR_PLACEHOLDER { - return Err(CliError::package_author_is_not_set().into()); - } - - // Create the output directory. - OutputsDirectory::create(&path)?; - - // Create zip file. - let zip_file = ZipFile::new(&package_name); - if zip_file.exists_at(&path) { - tracing::debug!("Existing package zip file found. Clearing it to regenerate."); - // Remove the existing package zip file - zip_file.remove(&path)?; - } - zip_file.write(&path)?; - - // Make an API request with zip file and package data. - let package_id = context.api.run_route(PublishRoute { - name: package_name.clone(), - remote: format!("{}/{}", package_remote.author, package_name), - version: package_version, - file: zip_file.get_file_path(&path).into(), - })?; - - tracing::info!("Package published successfully with id: {}", &package_id); - Ok(package_id) - } -} diff --git a/leo/commands/unused/package/remove.rs b/leo/commands/unused/package/remove.rs deleted file mode 100644 index ec2fd67fe1..0000000000 --- a/leo/commands/unused/package/remove.rs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -// !!!!!!!!!!!!!!!!!!!!!!!!!!!! -// COMMAND TEMPORARILY DISABLED -// !!!!!!!!!!!!!!!!!!!!!!!!!!!! - -use crate::{commands::Command, context::Context}; -use leo_errors::Result; -use leo_package::LeoPackage; - -use structopt::StructOpt; -use tracing::span::Span; - -/// Remove imported package -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Remove { - #[structopt(name = "PACKAGE")] - name: String, -} - -impl Command for Remove { - type Input = (); - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Removing") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, context: Context, _: Self::Input) -> Result { - let path = context.dir()?; - let package_name = self.name; - - LeoPackage::remove_imported_package(&package_name, &path)?; - tracing::info!("Successfully removed package \"{}\"\n", package_name); - - Ok(()) - } -} diff --git a/leo/commands/unused/prove.rs b/leo/commands/unused/prove.rs deleted file mode 100644 index 46eb9a6d99..0000000000 --- a/leo/commands/unused/prove.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (C) 2019-2022 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::{build::BuildOptions, setup::Setup}; -use crate::{commands::Command, context::Context}; -use leo_errors::{CliError, Result, SnarkVMError}; -use leo_package::outputs::ProofFile; -use snarkvm_algorithms::{ - snark::groth16::{Groth16, PreparedVerifyingKey, Proof}, - traits::SNARK, -}; -use snarkvm_curves::bls12_377::{Bls12_377, Fr}; -use snarkvm_utilities::bytes::ToBytes; - -use rand::thread_rng; -use structopt::StructOpt; -use tracing::span::Span; - -/// Run the program and produce a proof -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Prove { - #[structopt(long = "skip-key-check", help = "Skip key verification on Setup stage")] - pub(crate) skip_key_check: bool, - - #[structopt(flatten)] - pub(crate) compiler_options: BuildOptions, -} - -impl Command for Prove { - type Input = ::Output; - type Output = (Proof, PreparedVerifyingKey); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Proving") - } - - fn prelude(&self, context: Context) -> Result { - (Setup { - skip_key_check: self.skip_key_check, - compiler_options: self.compiler_options.clone(), - }) - .execute(context) - } - - fn apply(self, context: Context, input: Self::Input) -> Result { - let (program, parameters, prepared_verifying_key) = input; - - // Get the package name - let path = context.dir()?; - let package_name = context.manifest()?.get_package_name(); - - tracing::info!("Starting..."); - - let rng = &mut thread_rng(); - // TODO fix this once snarkvm has better errors. - let program_proof = - Groth16::>::prove(¶meters, &program, rng).map_err(|_| SnarkVMError::default())?; - - // Write the proof file to the output directory - let mut proof = vec![]; - program_proof.write_le(&mut proof).map_err(CliError::cli_io_error)?; - ProofFile::new(&package_name).write_to(&path, &proof)?; - - Ok((program_proof, prepared_verifying_key)) - } -} diff --git a/leo/commands/unused/setup.rs b/leo/commands/unused/setup.rs deleted file mode 100644 index 19a2a02b84..0000000000 --- a/leo/commands/unused/setup.rs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (C) 2019-2022 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::build::{Build, BuildOptions}; -use crate::{commands::Command, context::Context}; -use leo_compiler::{compiler::Compiler, group::targets::edwards_bls12::EdwardsGroupType}; -use leo_errors::{CliError, Result}; -use leo_package::outputs::{ProvingKeyFile, VerificationKeyFile}; - -use snarkvm_algorithms::{ - snark::groth16::{Groth16, PreparedVerifyingKey, ProvingKey, VerifyingKey}, - traits::snark::SNARK, - SRS, -}; -use snarkvm_curves::bls12_377::{Bls12_377, Fr}; -use snarkvm_utilities::ToBytes; - -use rand::thread_rng; -use structopt::StructOpt; -use tracing::span::Span; - -/// Executes the setup command for a Leo program -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Setup { - #[structopt(long = "skip-key-check", help = "Skip key verification")] - pub(crate) skip_key_check: bool, - - #[structopt(flatten)] - pub(crate) compiler_options: BuildOptions, -} - -impl Command for Setup { - type Input = ::Output; - type Output = ( - Compiler<'static, Fr, EdwardsGroupType>, - ProvingKey, - PreparedVerifyingKey, - ); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Setup") - } - - fn prelude(&self, context: Context) -> Result { - (Build { - compiler_options: self.compiler_options.clone(), - }) - .execute(context) - } - - fn apply(self, context: Context, input: Self::Input) -> Result { - let path = context.dir()?; - let package_name = context.manifest()?.get_package_name(); - - // Check if leo build failed - let (program, checksum_differs) = input; - - // Check if a proving key and verification key already exists - let keys_exist = ProvingKeyFile::new(&package_name).exists_at(&path) - && VerificationKeyFile::new(&package_name).exists_at(&path); - - // If keys do not exist or the checksum differs, run the program setup - let (proving_key, prepared_verifying_key) = if !keys_exist || checksum_differs { - tracing::info!("Starting..."); - - // Run the program setup operation - let rng = &mut thread_rng(); - let (proving_key, verifying_key) = - Groth16::>::setup(&program, &mut SRS::CircuitSpecific(rng)) - .map_err(|_| CliError::unable_to_setup())?; - - // TODO (howardwu): Convert parameters to a 'proving key' struct for serialization. - // Write the proving key file to the output directory - let proving_key_file = ProvingKeyFile::new(&package_name); - tracing::info!("Saving proving key ({:?})", proving_key_file.full_path(&path)); - let mut proving_key_bytes = vec![]; - proving_key - .write_le(&mut proving_key_bytes) - .map_err(CliError::cli_io_error)?; - let _ = proving_key_file.write_to(&path, &proving_key_bytes)?; - tracing::info!("Complete"); - - // Write the verification key file to the output directory - let verification_key_file = VerificationKeyFile::new(&package_name); - tracing::info!("Saving verification key ({:?})", verification_key_file.full_path(&path)); - let mut verification_key = vec![]; - proving_key - .vk - .write_le(&mut verification_key) - .map_err(CliError::cli_io_error)?; - let _ = verification_key_file.write_to(&path, &verification_key)?; - tracing::info!("Complete"); - - // Derive the prepared verifying key file from the verifying key - let prepared_verifying_key = PreparedVerifyingKey::::from(verifying_key); - - (proving_key, prepared_verifying_key) - } else { - tracing::info!("Detected saved setup"); - - // Read the proving key file from the output directory - tracing::info!("Loading proving key..."); - - if self.skip_key_check { - tracing::info!("Skipping curve check"); - } - let proving_key_bytes = ProvingKeyFile::new(&package_name).read_from(&path)?; - let proving_key = ProvingKey::::read(proving_key_bytes.as_slice(), !self.skip_key_check) - .map_err(CliError::cli_io_error)?; - tracing::info!("Complete"); - - // Read the verification key file from the output directory - tracing::info!("Loading verification key..."); - let verifying_key_bytes = VerificationKeyFile::new(&package_name) - .read_from(&path) - .map_err(CliError::cli_io_error)?; - let verifying_key = - VerifyingKey::::read(verifying_key_bytes.as_slice()).map_err(CliError::cli_io_error)?; - - // Derive the prepared verifying key file from the verifying key - let prepared_verifying_key = PreparedVerifyingKey::::from(verifying_key); - tracing::info!("Complete"); - - (proving_key, prepared_verifying_key) - }; - - Ok((program, proving_key, prepared_verifying_key)) - } -} diff --git a/leo/commands/unused/test.rs b/leo/commands/unused/test.rs deleted file mode 100644 index b6398f5ffe..0000000000 --- a/leo/commands/unused/test.rs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (C) 2019-2022 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::build::BuildOptions; -use crate::{commands::Command, context::Context}; -use leo_compiler::{ - compiler::{thread_leaked_context, Compiler}, - group::targets::edwards_bls12::EdwardsGroupType, -}; -use leo_errors::{CliError, Result}; -use leo_package::{ - inputs::*, - outputs::{OutputsDirectory, OUTPUTS_DIRECTORY_NAME}, - source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME}, -}; - -use indexmap::IndexMap; -use snarkvm_curves::edwards_bls12::Fq; -use std::{convert::TryFrom, path::PathBuf, time::Instant}; -use structopt::StructOpt; -use tracing::span::Span; - -/// Build program and run tests command -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Test { - #[structopt(short = "f", long = "file", name = "file")] - pub(crate) files: Vec, - - #[structopt(flatten)] - pub(crate) compiler_options: BuildOptions, -} - -impl Command for Test { - type Input = (); - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Test") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, context: Context, _: Self::Input) -> Result { - // Get the package name - let package_name = context.manifest()?.get_package_name(); - - // Sanitize the package path to the root directory - let mut package_path = context.dir()?; - if package_path.is_file() { - package_path.pop(); - } - - let mut to_test: Vec = Vec::new(); - - // if -f flag was used, then we'll test only this files - if !self.files.is_empty() { - to_test.extend(self.files.iter().cloned()); - - // if args were not passed - try main file - } else if MainFile::exists_at(&package_path) { - let mut file_path = package_path.clone(); - file_path.push(SOURCE_DIRECTORY_NAME); - file_path.push(MAIN_FILENAME); - to_test.push(file_path); - - // when no main file and no files marked - error - } else { - return Err(CliError::program_file_does_not_exist(package_path.to_string_lossy()).into()); - } - - // Construct the path to the output directory; - let mut output_directory = package_path.clone(); - output_directory.push(OUTPUTS_DIRECTORY_NAME); - - // Create the output directory - OutputsDirectory::create(&package_path)?; - - // Finally test every passed file - for file_path in to_test { - tracing::info!("Running tests in file {:?}", file_path); - - let input_pairs = match InputPairs::try_from(package_path.as_path()) { - Ok(pairs) => pairs, - Err(_) => { - tracing::warn!("Unable to find inputs, ignore this message or put them into /inputs folder"); - InputPairs::new() - } - }; - - let timer = Instant::now(); - let program = Compiler::::parse_program_without_input( - package_name.clone(), - file_path, - output_directory.clone(), - thread_leaked_context(), - Some(self.compiler_options.clone().into()), - IndexMap::new(), - Some(self.compiler_options.clone().into()), - )?; - - let temporary_program = program; - let (passed, failed) = temporary_program.compile_test_constraints(input_pairs)?; - let time_taken = timer.elapsed().as_millis(); - - if failed == 0 { - tracing::info!( - "Tests passed in {} milliseconds. {} passed; {} failed;\n", - time_taken, - passed, - failed - ); - } else { - tracing::error!( - "Tests failed in {} milliseconds. {} passed; {} failed;\n", - time_taken, - passed, - failed - ); - } - } - - Ok(()) - } -} diff --git a/leo/commands/unused/update.rs b/leo/commands/unused/update.rs deleted file mode 100644 index b320244001..0000000000 --- a/leo/commands/unused/update.rs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::{commands::Command, config::Config, context::Context, updater::Updater}; -use leo_errors::Result; - -use structopt::StructOpt; -use tracing::span::Span; - -/// Setting for automatic updates of Leo -#[derive(Debug, StructOpt)] -pub enum Automatic { - Automatic { - #[structopt(name = "bool", help = "Boolean value: true or false", parse(try_from_str))] - value: bool, - }, -} - -/// Update Leo to the latest version -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Update { - /// List all available versions of Leo - #[structopt(short, long)] - pub(crate) list: bool, - - /// For Aleo Studio only - #[structopt(short, long)] - pub(crate) studio: bool, - - /// Setting for automatic updates of Leo - #[structopt(subcommand)] - pub(crate) automatic: Option, -} - -impl Command for Update { - type Input = (); - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Updating") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, _: Context, _: Self::Input) -> Result { - // If --list is passed, list all available versions and return. - if self.list { - return Updater::show_available_releases(); - } - - // Handles enabling and disabling automatic updates in the config file. - if let Some(Automatic::Automatic { value }) = self.automatic { - Config::set_update_automatic(value)?; - - match value { - true => tracing::info!("Automatic updates are enabled. Leo will update as new versions are released"), - false => { - tracing::info!("Automatic updates are disabled. Leo will not update as new versions are released") - } - }; - - return Ok(()); - } - - let config = Config::read_config()?; - // If update is run with studio and the automatic update is off, finish quietly - if self.studio && !config.update.automatic { - return Ok(()); - } - - match Updater::update_to_latest_release(true) { - Ok(status) => match (status.uptodate(), status.updated()) { - (true, _) => tracing::info!("Leo is already on the latest version"), - (_, true) => tracing::info!("Leo has successfully updated to version {}", status.version()), - (_, _) => (), - }, - Err(e) => { - tracing::error!("Could not update Leo to the latest version"); - tracing::error!("{}", e); - } - } - - Ok(()) - } -} diff --git a/leo/commands/unused/watch.rs b/leo/commands/unused/watch.rs deleted file mode 100644 index d677c1ee90..0000000000 --- a/leo/commands/unused/watch.rs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (C) 2019-2022 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::build::{Build, BuildOptions}; -use crate::{commands::Command, context::Context}; -use leo_errors::{CliError, Result}; - -use std::{sync::mpsc::channel, time::Duration}; - -use notify::{watcher, DebouncedEvent, RecursiveMode, Watcher}; -use structopt::StructOpt; -use tracing::span::Span; - -const LEO_SOURCE_DIR: &str = "src/"; - -/// Watch file changes in src/ directory and run Build Command -#[derive(StructOpt, Debug)] -#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)] -pub struct Watch { - /// Set up watch interval - #[structopt(short, long, default_value = "3")] - interval: u64, - - #[structopt(flatten)] - compiler_options: BuildOptions, -} - -impl Command for Watch { - type Input = (); - type Output = (); - - fn log_span(&self) -> Span { - tracing::span!(tracing::Level::INFO, "Watching") - } - - fn prelude(&self, _: Context) -> Result { - Ok(()) - } - - fn apply(self, context: Context, _: Self::Input) -> Result { - let (tx, rx) = channel(); - let mut watcher = watcher(tx, Duration::from_secs(self.interval)).unwrap(); - - watcher - .watch(LEO_SOURCE_DIR, RecursiveMode::Recursive) - .map_err(CliError::unable_to_watch)?; - - tracing::info!("Watching Leo source code"); - - loop { - match rx.recv() { - // See changes on the write event - Ok(DebouncedEvent::Write(_write)) => { - match (Build { - compiler_options: self.compiler_options.clone(), - }) - .execute(context.clone()) - { - Ok(_output) => tracing::info!("Built successfully"), - Err(e) => tracing::error!("Error {:?}", e), - }; - } - // Other events - Ok(_event) => {} - - // Watch error - Err(e) => { - tracing::error!("watch error: {:?}", e) - // TODO (howardwu): Add graceful termination. - } - } - } - } -} diff --git a/leo/package/src/unused/directory.rs b/leo/package/src/unused/directory.rs deleted file mode 100644 index 6178b826d2..0000000000 --- a/leo/package/src/unused/directory.rs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2019-2022 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 leo_errors::{PackageError, Result}; - -use std::{borrow::Cow, fs, path::Path}; - -pub static IMPORTS_DIRECTORY_NAME: &str = "imports/"; - -pub struct ImportsDirectory; - -impl ImportsDirectory { - /// Creates a directory at the provided path with the default directory name. - pub fn create(path: &Path) -> Result<()> { - let mut path = Cow::from(path); - if path.is_dir() && !path.ends_with(IMPORTS_DIRECTORY_NAME) { - path.to_mut().push(IMPORTS_DIRECTORY_NAME); - } - - fs::create_dir_all(&path).map_err(PackageError::failed_to_create_imports_directory)?; - Ok(()) - } - - /// Removes an imported package in the imports directory at the provided path. - pub fn remove_import(path: &Path, package_name: &str) -> Result<()> { - let mut path = Cow::from(path); - if path.is_dir() && !path.ends_with(IMPORTS_DIRECTORY_NAME) { - path.to_mut().push(IMPORTS_DIRECTORY_NAME); - } - - path.to_mut().push(package_name); - - if !path.exists() || !path.is_dir() { - return Err(PackageError::import_does_not_exist(package_name).into()); - } - - fs::remove_dir_all(&path).map_err(PackageError::failed_to_remove_imports_directory)?; - - Ok(()) - } -} diff --git a/leo/package/src/unused/lock_file.rs b/leo/package/src/unused/lock_file.rs deleted file mode 100644 index 84c25aebda..0000000000 --- a/leo/package/src/unused/lock_file.rs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::root::Dependency; -use leo_errors::{PackageError, Result}; - -use indexmap::IndexMap; -use serde::{Deserialize, Serialize}; -use std::{ - borrow::Cow, - convert::TryFrom, - fmt::{self, Display}, - fs::File, - io::{Read, Write}, - path::Path, -}; - -pub const LOCKFILE_FILENAME: &str = "Leo.lock"; - -/// Lock-file struct, contains all information about imported dependencies -/// and their relationships. -#[derive(Default, Debug, Clone, Serialize, Deserialize)] -pub struct LockFile { - pub package: Vec, -} - -/// Single dependency record. -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct Package { - pub name: String, - pub version: String, - pub author: String, - pub import_name: Option, - #[serde(skip_serializing_if = "IndexMap::is_empty", default)] - pub dependencies: IndexMap, -} - -impl LockFile { - pub fn new() -> Self { - LockFile { package: vec![] } - } - - /// Check if LockFile exists in a directory. - pub fn exists_at(path: &Path) -> bool { - let mut path = Cow::from(path); - if path.is_dir() { - path.to_mut().push(LOCKFILE_FILENAME); - } - path.exists() - } - - /// Add Package record to the lock file. Chainable. - pub fn add_package(&mut self, package: Package) -> &mut Self { - self.package.push(package); - self - } - - /// Print LockFile as toml. - pub fn to_string(&self) -> Result { - Ok(toml::to_string(self).map_err(PackageError::failed_to_serialize_lock_file)?) - } - - /// Form a IndexMap of kind: - /// ``` imported_name => package_name ``` - /// for all imported packages. - pub fn to_import_map(&self) -> IndexMap { - let mut result = IndexMap::new(); - for package in self.package.iter() { - match &package.import_name { - Some(name) => result.insert(name.clone(), package.to_string()), - None => result.insert(package.name.clone(), package.to_string()), - }; - } - - result - } - - /// Write Leo.lock to the given location. - pub fn write_to(self, path: &Path) -> Result<()> { - let mut path = Cow::from(path); - if path.is_dir() { - path.to_mut().push(LOCKFILE_FILENAME); - } - - File::create(&path) - .map_err(|error| PackageError::failed_to_create_lock_file(LOCKFILE_FILENAME, error))? - .write_all(self.to_string()?.as_bytes()) - .map_err(|error| PackageError::failed_to_write_lock_file(LOCKFILE_FILENAME, error))?; - - Ok(()) - } -} - -impl TryFrom<&Path> for LockFile { - type Error = PackageError; - - fn try_from(path: &Path) -> Result { - let mut path = Cow::from(path); - if path.is_dir() { - path.to_mut().push(LOCKFILE_FILENAME); - } - - let mut file = File::open(path.clone()) - .map_err(|error| PackageError::failed_to_open_lock_file(LOCKFILE_FILENAME, error))?; - let size = file - .metadata() - .map_err(|error| PackageError::failed_to_get_lock_file_metadata(LOCKFILE_FILENAME, error))? - .len() as usize; - - let mut buffer = String::with_capacity(size); - file.read_to_string(&mut buffer) - .map_err(|error| PackageError::failed_to_read_lock_file(LOCKFILE_FILENAME, error))?; - - toml::from_str(&buffer).map_err(|error| PackageError::failed_to_parse_lock_file(LOCKFILE_FILENAME, error)) - } -} - -impl Package { - /// Fill dependencies from Leo Manifest data. - pub fn add_dependencies(&mut self, dependencies: &IndexMap) { - for (import_name, dependency) in dependencies.iter() { - self.dependencies - .insert(import_name.clone(), Package::from(dependency).to_string()); - } - } -} - -impl Display for Package { - /// Form an path identifier for a package. It is the path under which package is stored - /// inside the `imports/` directory. - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}-{}@{}", self.author, self.name, self.version) - } -} - -impl From<&Dependency> for Package { - fn from(dependency: &Dependency) -> Package { - Package { - name: dependency.package.clone(), - author: dependency.author.clone(), - version: dependency.version.clone(), - dependencies: Default::default(), - import_name: None, - } - } -} diff --git a/leo/package/src/unused/manifest.rs b/leo/package/src/unused/manifest.rs deleted file mode 100644 index b9f4feacba..0000000000 --- a/leo/package/src/unused/manifest.rs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::package::Package; -use leo_errors::{PackageError, Result}; - -use indexmap::IndexMap; -use serde::Deserialize; -use std::{ - borrow::Cow, - collections::HashMap, - convert::TryFrom, - fs::File, - io::{Read, Write}, - path::Path, -}; - -pub const MANIFEST_FILENAME: &str = "Leo.toml"; -pub const AUTHOR_PLACEHOLDER: &str = "[AUTHOR]"; - -#[derive(Clone, Deserialize)] -pub struct Remote { - pub author: String, -} - -#[derive(Clone, Debug, Deserialize)] -pub struct Dependency { - pub author: String, - pub version: String, - pub package: String, -} - -#[derive(Deserialize)] -pub struct Manifest { - pub project: Package, - pub remote: Option, - pub dependencies: Option>, -} - -impl Manifest { - pub fn new(package_name: &str, author: Option) -> Result { - Ok(Self { - project: Package::new(package_name)?, - remote: author.map(|author| Remote { author }), - dependencies: Some(IndexMap::::new()), - }) - } - - pub fn filename() -> String { - MANIFEST_FILENAME.to_string() - } - - pub fn exists_at(path: &Path) -> bool { - let mut path = Cow::from(path); - if path.is_dir() { - path.to_mut().push(MANIFEST_FILENAME); - } - path.exists() - } - - pub fn get_package_name(&self) -> String { - self.project.name.clone() - } - - pub fn get_package_version(&self) -> String { - self.project.version.clone() - } - - pub fn get_package_description(&self) -> Option { - self.project.description.clone() - } - - pub fn get_package_dependencies(&self) -> Option> { - self.dependencies.clone() - } - - /// Get HashMap of kind: - /// import name => import directory - /// Which then used in AST/ASG to resolve import paths. - pub fn get_imports_map(&self) -> Option> { - self.dependencies.clone().map(|dependencies| { - dependencies - .into_iter() - .map(|(name, dependency)| { - ( - name, - format!("{}-{}@{}", dependency.author, dependency.package, dependency.version), - ) - }) - .collect() - }) - } - - pub fn get_package_license(&self) -> Option { - self.project.license.clone() - } - - pub fn get_package_remote(&self) -> Option { - self.remote.clone() - } - - pub fn write_to(self, path: &Path) -> Result<()> { - let mut path = Cow::from(path); - if path.is_dir() { - path.to_mut().push(MANIFEST_FILENAME); - } - - let mut file = - File::create(&path).map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e))?; - - file.write_all(self.template().as_bytes()) - .map_err(PackageError::io_error_manifest_file)?; - Ok(()) - } - - fn template(&self) -> String { - let author = self - .remote - .clone() - .map_or(AUTHOR_PLACEHOLDER.to_string(), |remote| remote.author); - - format!( - r#"[project] -name = "{name}" -version = "0.1.0" -description = "The {name} package" -license = "MIT" - -[remote] -author = "{author}" # Add your Aleo Package Manager username or team name. - -[dependencies] -# Define dependencies here in format: -# name = {{ package = "package-name", author = "author", version = "version" }} -"#, - name = self.project.name, - author = author - ) - } -} - -impl TryFrom<&Path> for Manifest { - type Error = PackageError; - - fn try_from(path: &Path) -> Result { - let mut path = Cow::from(path); - if path.is_dir() { - path.to_mut().push(MANIFEST_FILENAME); - } - - let mut file = - File::open(path.clone()).map_err(|e| PackageError::failed_to_open_manifest_file(MANIFEST_FILENAME, e))?; - - let size = file - .metadata() - .map_err(|e| PackageError::failed_to_get_manifest_metadata_file(MANIFEST_FILENAME, e))? - .len() as usize; - - let mut buffer = String::with_capacity(size); - - file.read_to_string(&mut buffer) - .map_err(|e| PackageError::failed_to_read_manifest_file(MANIFEST_FILENAME, e))?; - - // Determine if the old remote format is being used, and update to new convention - - let mut old_remote_format: Option<&str> = None; - let mut new_remote_format_exists = false; - - // Toml file adhering to the new format. - let mut final_toml = "".to_owned(); - - // New Toml file format that should be written based on feature flags. - let mut refactored_toml = "".to_owned(); - - // Read each individual line of the toml file - for line in buffer.lines() { - // Determine if the old remote format is being used - if line.starts_with("remote") { - let remote = line - .split('=') // Split the line as 'remote' = '"{author}/{package_name}"' - .nth(1).unwrap(); // Fetch just '"{author}/{package_name}"' - old_remote_format = Some(remote); - - // Retain the old remote format if the `manifest_refactor_remote` is not enabled - if cfg!(not(feature = "manifest_refactor_remote")) { - refactored_toml += line; - refactored_toml += "\n"; - } - continue; - } - - // Determine if the new remote format is being used - if line.starts_with("[remote]") { - new_remote_format_exists = true; - } - - // If the old project format is being being used, update the toml file - // to use the new format instead. - if line.starts_with("[package]") { - final_toml += "[project]"; - - // Refactor the old project format if the `manifest_refactor_project` is enabled - match cfg!(feature = "manifest_refactor_project") { - true => refactored_toml += "[project]", - false => refactored_toml += line, - } - } else { - final_toml += line; - refactored_toml += line; - } - - final_toml += "\n"; - refactored_toml += "\n"; - } - - // Update the remote format - if let Some(old_remote) = old_remote_format { - // If both the old remote and new remote are missing, - // then skip appending the new remote, just keep the old remote. - if !new_remote_format_exists { - // Fetch the author from the old remote. - let remote_author = old_remote - .split('/') // Split the old remote as '"{author}' and '{package_name}"' - .next().unwrap() // Fetch just the '"{author}' - .replace(&['\"', ' '], ""); // Remove the quotes from the author string - - // Construct the new remote section. - let new_remote = format!( - r#" -[remote] -author = "{author}" -"#, - author = remote_author - ); - - // Append the new remote to the bottom of the manifest file. - final_toml += &new_remote; - - // Add the new remote format if the `manifest_refactor_remote` is enabled - if cfg!(feature = "manifest_refactor_remote") { - refactored_toml += &new_remote; - } - } - } - - // Rewrite the toml file if it has been updated - if buffer != refactored_toml { - let mut file = - File::create(&path).map_err(|e| PackageError::failed_to_create_manifest_file(MANIFEST_FILENAME, e))?; - - file.write_all(refactored_toml.as_bytes()) - .map_err(|e| PackageError::failed_to_write_manifest_file(MANIFEST_FILENAME, e))?; - } - - // Read the toml file - toml::from_str(&final_toml).map_err(|e| PackageError::failed_to_parse_manifest_file(MANIFEST_FILENAME, e)) - } -} diff --git a/leo/package/src/unused/pairs.rs b/leo/package/src/unused/pairs.rs deleted file mode 100644 index b13e7b15f7..0000000000 --- a/leo/package/src/unused/pairs.rs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (C) 2019-2022 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 crate::inputs::{InputFile, InputsDirectory, StateFile, INPUT_FILE_EXTENSION, STATE_FILE_EXTENSION}; -use leo_errors::{LeoError, PackageError}; - -use std::{collections::HashMap, convert::TryFrom, path::Path}; - -#[derive(Default)] -pub struct InputPairs { - /// Maps file names to input file pairs - pub pairs: HashMap, -} - -#[derive(Debug)] -pub struct InputPair { - pub input_file: String, - pub state_file: String, -} - -impl InputPairs { - pub fn new() -> Self { - Self::default() - } -} - -impl TryFrom<&Path> for InputPairs { - type Error = LeoError; - - fn try_from(directory: &Path) -> Result { - let files = InputsDirectory::files(directory)?; - - let mut pairs = HashMap::::new(); - - for file in files { - // if file name starts with . (dot) None is returned - we're - // skipping these files intentionally but not exiting - let file_extension = match file.extension() { - Some(extension) => extension, - None => continue, - }; - - // Have to handle error mapping this way because of rust error: https://github.com/rust-lang/rust/issues/42424. - let file_name = match file.file_stem() { - Some(stem) => match stem.to_str() { - Some(file_name) => file_name, - None => { - return Err(PackageError::failed_to_get_input_file_name(file.as_os_str()).into()); - } - }, - None => { - return Err(PackageError::failed_to_get_input_file_name(file.as_os_str()).into()); - } - }; - - if file_extension == INPUT_FILE_EXTENSION.trim_start_matches('.') { - let input_file = InputFile::new(file_name).read_from(&file)?.0; - - if pairs.contains_key(file_name) { - let pair = pairs.get_mut(file_name).unwrap(); - pair.input_file = input_file; - } else { - let pair = InputPair { - input_file, - state_file: "".to_owned(), - }; - pairs.insert(file_name.to_owned(), pair); - } - } else if file_extension == STATE_FILE_EXTENSION.trim_start_matches('.') { - let state_file = StateFile::new(file_name).read_from(&file)?.0; - - if pairs.contains_key(file_name) { - let pair = pairs.get_mut(file_name).unwrap(); - pair.state_file = state_file; - } else { - let pair = InputPair { - input_file: "".to_owned(), - state_file, - }; - pairs.insert(file_name.to_owned(), pair); - } - } else { - // kept for verbosity, can be removed - continue; - } - } - - Ok(InputPairs { pairs }) - } -} diff --git a/leo/package/src/unused/proof.rs b/leo/package/src/unused/proof.rs deleted file mode 100644 index cd4adfc787..0000000000 --- a/leo/package/src/unused/proof.rs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (C) 2019-2022 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 proof file. - -use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; - -use serde::Deserialize; -use std::{ - borrow::Cow, - fs::{ - File, {self}, - }, - io::Write, - path::Path, -}; - -pub static PROOF_FILE_EXTENSION: &str = ".proof"; - -#[derive(Deserialize)] -pub struct ProofFile { - pub package_name: String, -} - -impl ProofFile { - pub fn new(package_name: &str) -> Self { - Self { - package_name: package_name.to_string(), - } - } - - pub fn exists_at(&self, path: &Path) -> bool { - let path = self.setup_file_path(path); - path.exists() - } - - /// Reads the proof from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result { - let path = self.setup_file_path(path); - - let string = - fs::read_to_string(&path).map_err(|_| PackageError::failed_to_read_proof_file(path.into_owned()))?; - Ok(string) - } - - /// Writes the given proof to a file. - pub fn write_to(&self, path: &Path, proof: &[u8]) -> Result<()> { - let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(PackageError::io_error_proof_file)?; - - file.write_all(proof).map_err(PackageError::io_error_proof_file)?; - tracing::info!("Saving proof... ({:?})", path); - - Ok(()) - } - - /// Removes the proof at the given path if it exists. Returns `true` on success, - /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { - let path = self.setup_file_path(path); - if !path.exists() { - return Ok(false); - } - - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proof_file(path))?; - Ok(true) - } - - fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { - let mut path = Cow::from(path); - if path.is_dir() { - if !path.ends_with(OUTPUTS_DIRECTORY_NAME) { - path.to_mut().push(OUTPUTS_DIRECTORY_NAME); - } - path.to_mut() - .push(format!("{}{}", self.package_name, PROOF_FILE_EXTENSION)); - } - path - } -} diff --git a/leo/package/src/unused/proving_key.rs b/leo/package/src/unused/proving_key.rs deleted file mode 100644 index 2f525c51f9..0000000000 --- a/leo/package/src/unused/proving_key.rs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2019-2022 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 proving key file. - -use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; - -use serde::Deserialize; -use std::{ - borrow::Cow, - fs::{ - File, {self}, - }, - io::Write, - path::Path, -}; - -pub static PROVING_KEY_FILE_EXTENSION: &str = ".lpk"; - -#[derive(Deserialize)] -pub struct ProvingKeyFile { - pub package_name: String, -} - -impl ProvingKeyFile { - pub fn new(package_name: &str) -> Self { - Self { - package_name: package_name.to_string(), - } - } - - pub fn full_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { - self.setup_file_path(path) - } - - pub fn exists_at(&self, path: &Path) -> bool { - let path = self.setup_file_path(path); - path.exists() - } - - /// Reads the proving key from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result> { - let path = self.setup_file_path(path); - - let bytes = fs::read(&path).map_err(|_| PackageError::failed_to_read_proving_key_file(path))?; - Ok(bytes) - } - - /// Writes the given proving key to a file. - pub fn write_to<'a>(&self, path: &'a Path, proving_key: &[u8]) -> Result> { - let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(PackageError::io_error_proving_key_file)?; - - file.write_all(proving_key) - .map_err(PackageError::io_error_proving_key_file)?; - Ok(path) - } - - /// Removes the proving key at the given path if it exists. Returns `true` on success, - /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { - let path = self.setup_file_path(path); - if !path.exists() { - return Ok(false); - } - - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_proving_key_file(path))?; - Ok(true) - } - - fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { - let mut path = Cow::from(path); - if path.is_dir() { - if !path.ends_with(OUTPUTS_DIRECTORY_NAME) { - path.to_mut().push(OUTPUTS_DIRECTORY_NAME); - } - path.to_mut() - .push(format!("{}{}", self.package_name, PROVING_KEY_FILE_EXTENSION)); - } - path - } -} diff --git a/leo/package/src/unused/state.rs b/leo/package/src/unused/state.rs deleted file mode 100644 index bad4a327d3..0000000000 --- a/leo/package/src/unused/state.rs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (C) 2019-2022 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 `program.state` file. - -use crate::inputs::INPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; - -use serde::Deserialize; -use std::{ - borrow::Cow, - fs::{ - File, {self}, - }, - io::Write, - path::Path, -}; - -pub static STATE_FILE_EXTENSION: &str = ".state"; - -#[derive(Deserialize)] -pub struct StateFile { - pub package_name: String, -} - -impl StateFile { - pub fn new(package_name: &str) -> Self { - Self { - package_name: package_name.to_string(), - } - } - - pub fn filename(&self) -> String { - format!("{}{}{}", INPUTS_DIRECTORY_NAME, self.package_name, STATE_FILE_EXTENSION) - } - - pub fn exists_at(&self, path: &Path) -> bool { - let path = self.setup_file_path(path); - path.exists() - } - - /// Reads the state input variables from the given file path if it exists. - pub fn read_from<'a>(&self, path: &'a Path) -> Result<(String, Cow<'a, Path>)> { - let path = self.setup_file_path(path); - - let input = fs::read_to_string(&path) - .map_err(|_| PackageError::failed_to_read_state_file(path.clone().into_owned()))?; - Ok((input, path)) - } - - /// Writes the standard input format to a file. - pub fn write_to(self, path: &Path) -> Result<()> { - let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(PackageError::io_error_state_file)?; - - Ok(file - .write_all(self.template().as_bytes()) - .map_err(PackageError::io_error_state_file)?) - } - - fn template(&self) -> String { - format!( - r#"// The program state for {}/src/main.leo -[[public]] - -[state] -leaf_index: u32 = 0; -root: [u8; 32] = [0; 32]; - -[[private]] - -[record] -serial_number: [u8; 64] = [0; 64]; -commitment: [u8; 32] = [0; 32]; -owner: address = aleo1daxej63vwrmn2zhl4dymygagh89k5d2vaw6rjauueme7le6k2q8sjn0ng9; -is_dummy: bool = false; -value: u64 = 0; -payload: [u8; 32] = [0; 32]; -birth_program_id: [u8; 48] = [0; 48]; -death_program_id: [u8; 48] = [0; 48]; -serial_number_nonce: [u8; 32] = [0; 32]; -commitment_randomness: [u8; 32] = [0; 32]; - -[state_leaf] -path: [u8; 128] = [0; 128]; -memo: [u8; 32] = [0; 32]; -network_id: u8 = 0; -leaf_randomness: [u8; 32] = [0; 32]; -"#, - self.package_name - ) - } - - fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { - let mut path = Cow::from(path); - if path.is_dir() { - if !path.ends_with(INPUTS_DIRECTORY_NAME) { - path.to_mut().push(INPUTS_DIRECTORY_NAME); - } - path.to_mut() - .push(format!("{}{}", self.package_name, STATE_FILE_EXTENSION)); - } - path - } -} diff --git a/leo/package/src/unused/verification_key.rs b/leo/package/src/unused/verification_key.rs deleted file mode 100644 index c457ef79bf..0000000000 --- a/leo/package/src/unused/verification_key.rs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2019-2022 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 verification key file. - -use crate::outputs::OUTPUTS_DIRECTORY_NAME; -use leo_errors::{PackageError, Result}; - -use serde::Deserialize; -use std::{ - borrow::Cow, - fs::{ - File, {self}, - }, - io::Write, - path::Path, -}; - -pub static VERIFICATION_KEY_FILE_EXTENSION: &str = ".lvk"; - -#[derive(Deserialize)] -pub struct VerificationKeyFile { - pub package_name: String, -} - -impl VerificationKeyFile { - pub fn new(package_name: &str) -> Self { - Self { - package_name: package_name.to_string(), - } - } - - pub fn full_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { - self.setup_file_path(path) - } - - pub fn exists_at(&self, path: &Path) -> bool { - let path = self.setup_file_path(path); - path.exists() - } - - /// Reads the verification key from the given file path if it exists. - pub fn read_from(&self, path: &Path) -> Result> { - let path = self.setup_file_path(path); - - let bytes = - fs::read(&path).map_err(|_| PackageError::failed_to_read_verification_key_file(path.into_owned()))?; - Ok(bytes) - } - - /// Writes the given verification key to a file. - pub fn write_to<'a>(&self, path: &'a Path, verification_key: &[u8]) -> Result> { - let path = self.setup_file_path(path); - let mut file = File::create(&path).map_err(PackageError::io_error_verification_key_file)?; - - file.write_all(verification_key) - .map_err(PackageError::io_error_verification_key_file)?; - Ok(path) - } - - /// Removes the verification key at the given path if it exists. Returns `true` on success, - /// `false` if the file doesn't exist, and `Error` if the file system fails during operation. - pub fn remove(&self, path: &Path) -> Result { - let path = self.setup_file_path(path); - if !path.exists() { - return Ok(false); - } - - fs::remove_file(&path).map_err(|_| PackageError::failed_to_remove_verification_key_file(path))?; - Ok(true) - } - - fn setup_file_path<'a>(&self, path: &'a Path) -> Cow<'a, Path> { - let mut path = Cow::from(path); - if path.is_dir() { - if !path.ends_with(OUTPUTS_DIRECTORY_NAME) { - path.to_mut().push(OUTPUTS_DIRECTORY_NAME); - } - path.to_mut() - .push(format!("{}{}", self.package_name, VERIFICATION_KEY_FILE_EXTENSION)); - } - path - } -} diff --git a/leo/unused/api.rs b/leo/unused/api.rs deleted file mode 100644 index 65fc5cf28b..0000000000 --- a/leo/unused/api.rs +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (C) 2019-2022 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 leo_errors::{CliError, LeoError, Result}; - -use reqwest::{ - blocking::{multipart::Form, Client, Response}, - Method, StatusCode, -}; -use serde::{Deserialize, Serialize}; -use std::{collections::HashMap, path::PathBuf}; - -/// Format to use. -/// Default is JSON, but publish route uses FormData -#[derive(Clone, Debug)] -pub enum ContentType { - Json, - FormData, -} - -/// API Routes and Request bodies. -/// Structs that implement Route MUST also support Serialize to be usable in Api::run_route(r: Route) -pub trait Route { - /// [`true`] if a route supports bearer authentication. - /// For example, the login route. - const AUTH: bool; - - /// The HTTP method to use when requesting. - const METHOD: Method; - - /// The URL path without the first forward slash (e.g. v1/package/fetch) - const PATH: &'static str; - - /// Content type: JSON or Multipart/FormData. Only usable in POST/PUT queries. - const CONTENT_TYPE: ContentType; - - /// The output type for this route. For example, the login route output is [`String`]. - /// But for other routes may be more complex. - type Output; - - /// Process the reqwest Response and turn it into an Output. - fn process(&self, res: Response) -> Result; - - /// Represent self as a form data for multipart (ContentType::FormData) requests. - fn to_form(&self) -> Option
{ - None - } - - /// Transform specific status codes into correct errors for this route. - /// For example 404 on package fetch should mean that 'Package is not found' - fn status_to_err(&self, _status: StatusCode) -> LeoError { - CliError::unidentified_api().into() - } -} - -/// REST API handler with reqwest::blocking inside. -#[derive(Clone, Debug)] -pub struct Api { - host: String, - client: Client, - /// Authorization token for API requests. - auth_token: Option, -} - -impl Api { - /// Returns a new instance of API. - /// The set host and Client are created automatically. - pub fn new(host: String, auth_token: Option) -> Api { - Api { - client: Client::new(), - auth_token, - host, - } - } - - /// Returns the token for bearer auth, otherwise None. - /// The [`auth_token`] should be passed into the Api through Context. - pub fn auth_token(&self) -> Option { - self.auth_token.clone() - } - - /// Set the authorization token for future requests. - pub fn set_auth_token(&mut self, token: String) { - self.auth_token = Some(token); - } - - /// Run specific route struct. Turn struct into request body - /// and use type constants and Route implementation to get request params. - pub fn run_route(&self, route: T) -> Result - where - T: Route, - T: Serialize, - { - let mut res = self.client.request(T::METHOD, &format!("{}{}", self.host, T::PATH)); - - // add body for POST and PUT requests - if T::METHOD == Method::POST || T::METHOD == Method::PUT { - res = match T::CONTENT_TYPE { - ContentType::Json => res.json(&route), - ContentType::FormData => { - let form = route - .to_form() - .unwrap_or_else(|| unimplemented!("to_form is not implemented for this route")); - - res.multipart(form) - } - } - }; - - // if Route::Auth is true and token is present - pass it - if T::AUTH && self.auth_token().is_some() { - res = res.bearer_auth(&self.auth_token().unwrap()); - }; - - // only one error is possible here - let res = res.send().map_err(|_| CliError::unable_to_connect_aleo_pm())?; - - // where magic begins - route.process(res) - } -} - -// -------------------------------------------------- -// | Defining routes | -// -------------------------------------------------- - -/// Handler for 'fetch' route - fetch packages from Aleo PM -/// Route: POST /v1/package/fetch -#[derive(Serialize, Debug)] -pub struct Fetch { - pub author: String, - pub package_name: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub version: Option, -} - -impl Route for Fetch { - type Output = Response; - - const AUTH: bool = true; - const CONTENT_TYPE: ContentType = ContentType::Json; - const METHOD: Method = Method::POST; - const PATH: &'static str = "api/package/fetch"; - - fn process(&self, res: Response) -> Result { - // check status code first - if res.status() != 200 { - return Err(self.status_to_err(res.status())); - }; - - Ok(res) - } - - fn status_to_err(&self, status: StatusCode) -> LeoError { - match status { - StatusCode::BAD_REQUEST => CliError::package_not_found().into(), - // TODO: we should return 404 on not found author/package - // and return BAD_REQUEST if data format is incorrect or some of the arguments - // were not passed - StatusCode::NOT_FOUND => CliError::package_not_found().into(), - _ => CliError::unkown_api_error(status).into(), - } - } -} - -/// Handler for 'login' route - send username and password and receive JWT -/// Route: POST /v1/account/authenticate -#[derive(Serialize)] -pub struct Login { - pub email_username: String, - pub password: String, -} - -impl Route for Login { - type Output = Response; - - const AUTH: bool = false; - const CONTENT_TYPE: ContentType = ContentType::Json; - const METHOD: Method = Method::POST; - const PATH: &'static str = "api/account/authenticate"; - - fn process(&self, res: Response) -> Result { - if res.status() != 200 { - return Err(self.status_to_err(res.status())); - } - - Ok(res) - } - - fn status_to_err(&self, status: StatusCode) -> LeoError { - match status { - StatusCode::BAD_REQUEST => CliError::account_not_found().into(), - // TODO: NOT_FOUND here should be replaced, this error code has no relation to what this route is doing - StatusCode::NOT_FOUND => CliError::incorrect_password().into(), - _ => CliError::unkown_api_error(status).into(), - } - } -} - -#[derive(Serialize)] -pub struct Publish { - pub name: String, - pub remote: String, - pub version: String, - pub file: PathBuf, -} - -#[derive(Deserialize)] -pub struct PublishResponse { - package_id: String, -} - -impl Route for Publish { - type Output = String; - - const AUTH: bool = true; - const CONTENT_TYPE: ContentType = ContentType::FormData; - const METHOD: Method = Method::POST; - const PATH: &'static str = "api/package/publish"; - - fn to_form(&self) -> Option { - Form::new() - .text("name", self.name.clone()) - .text("remote", self.remote.clone()) - .text("version", self.version.clone()) - .file("file", self.file.clone()) - .ok() - } - - fn process(&self, res: Response) -> Result { - let status = res.status(); - - if status == StatusCode::OK { - let body: PublishResponse = res.json().map_err(CliError::reqwest_json_error)?; - Ok(body.package_id) - } else { - let res: HashMap = res.json().map_err(CliError::reqwest_json_error)?; - Err(match status { - StatusCode::BAD_REQUEST => CliError::bad_request(res.get("message").unwrap()).into(), - StatusCode::UNAUTHORIZED => CliError::not_logged_in().into(), - StatusCode::FAILED_DEPENDENCY => CliError::already_published().into(), - StatusCode::INTERNAL_SERVER_ERROR => CliError::internal_server_error().into(), - _ => CliError::unkown_api_error(status).into(), - }) - } - } -} - -/// Handler for 'my_profile' route. Meant to be used to get profile details but -/// in the current application it is used to check if the user is logged in. Any non-200 response -/// is treated as Unauthorized. -#[derive(Serialize)] -pub struct Profile {} - -#[derive(Deserialize)] -pub struct ProfileResponse { - username: String, -} - -impl Route for Profile { - // Some with Username is success, None is failure. - type Output = Option; - - const AUTH: bool = true; - const CONTENT_TYPE: ContentType = ContentType::Json; - const METHOD: Method = Method::GET; - const PATH: &'static str = "api/account/my_profile"; - - fn process(&self, res: Response) -> Result { - // this may be extended for more precise error handling - let status = res.status(); - if status == StatusCode::OK { - let body: ProfileResponse = res.json().map_err(CliError::reqwest_json_error)?; - return Ok(Some(body.username)); - } - - Ok(None) - } -} diff --git a/leo/unused/config.rs b/leo/unused/config.rs deleted file mode 100644 index cade269e23..0000000000 --- a/leo/unused/config.rs +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (C) 2019-2022 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 leo_errors::{CliError, Result}; - -use std::{ - fs::{ - create_dir_all, File, {self}, - }, - io::prelude::*, - path::{Path, PathBuf}, -}; - -use dirs::home_dir; -use lazy_static::lazy_static; -use serde::{Deserialize, Serialize}; - -pub const LEO_CREDENTIALS_FILE: &str = "credentials"; -pub const LEO_CONFIG_FILE: &str = "config.toml"; -pub const LEO_USERNAME_FILE: &str = "username"; - -lazy_static! { - pub static ref LEO_CONFIG_DIRECTORY: PathBuf = { - let mut path = home_dir().expect("Invalid home directory"); - path.push(".leo"); - path - }; - pub static ref LEO_CREDENTIALS_PATH: PathBuf = { - let mut path = LEO_CONFIG_DIRECTORY.to_path_buf(); - path.push(LEO_CREDENTIALS_FILE); - path - }; - pub static ref LEO_USERNAME_PATH: PathBuf = { - let mut path = LEO_CONFIG_DIRECTORY.to_path_buf(); - path.push(LEO_USERNAME_FILE); - path - }; - pub static ref LEO_CONFIG_PATH: PathBuf = { - let mut path = LEO_CONFIG_DIRECTORY.to_path_buf(); - path.push(LEO_CONFIG_FILE); - path - }; -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct Update { - pub automatic: bool, -} - -impl Default for Update { - fn default() -> Self { - Self { automatic: true } - } -} - -#[derive(Clone, Debug, Serialize, Deserialize, Default)] -pub struct Config { - pub update: Update, -} - -impl Config { - /// Read the config from the `config.toml` file - pub fn read_config() -> Result { - let config_dir = LEO_CONFIG_DIRECTORY.clone(); - let config_path = LEO_CONFIG_PATH.clone(); - - if !Path::exists(&config_path) { - // Create a new default `config.toml` file if it doesn't already exist - create_dir_all(&config_dir).map_err(CliError::cli_io_error)?; - - let default_config_string = - toml::to_string(&Config::default()).map_err(CliError::failed_to_convert_to_toml)?; - - fs::write(&config_path, default_config_string).map_err(CliError::cli_io_error)?; - } - - let toml_string = match fs::read_to_string(&config_path) { - Ok(mut toml) => { - // If the config is using an incorrect format, rewrite it. - if toml::from_str::(&toml).is_err() { - let default_config_string = - toml::to_string(&Config::default()).map_err(CliError::failed_to_convert_to_toml)?; - fs::write(&config_path, default_config_string.clone()).map_err(CliError::cli_io_error)?; - toml = default_config_string; - } - - toml - } - Err(_) => { - create_dir_all(&config_dir).map_err(CliError::cli_io_error)?; - toml::to_string(&Config::default()).map_err(CliError::failed_to_convert_to_toml)? - } - }; - - // Parse the contents into the `Config` struct - let config: Config = toml::from_str(&toml_string).map_err(CliError::failed_to_convert_from_toml)?; - - Ok(config) - } - - /// Update the `automatic` configuration in the `config.toml` file. - pub fn set_update_automatic(automatic: bool) -> Result<()> { - let mut config = Self::read_config()?; - - if config.update.automatic != automatic { - config.update.automatic = automatic; - - // Update the config file - let config_path = LEO_CONFIG_PATH.clone(); - fs::write( - &config_path, - toml::to_string(&config).map_err(CliError::failed_to_convert_to_toml)?, - ) - .map_err(CliError::cli_io_error)?; - } - - Ok(()) - } -} - -pub fn write_token_and_username(token: &str, username: &str) -> Result<()> { - let config_dir = LEO_CONFIG_DIRECTORY.clone(); - - // Create Leo config directory if it not exists - if !Path::new(&config_dir).exists() { - create_dir_all(&config_dir).map_err(CliError::cli_io_error)?; - } - - let mut credentials = File::create(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(CliError::cli_io_error)?; - credentials - .write_all(token.as_bytes()) - .map_err(CliError::cli_io_error)?; - - let mut username_file = File::create(&LEO_USERNAME_PATH.to_path_buf()).map_err(CliError::cli_io_error)?; - username_file - .write_all(username.as_bytes()) - .map_err(CliError::cli_io_error)?; - - Ok(()) -} - -pub fn read_token() -> Result { - let mut credentials = File::open(&LEO_CREDENTIALS_PATH.to_path_buf()).map_err(CliError::cli_io_error)?; - let mut buf = String::new(); - credentials.read_to_string(&mut buf).map_err(CliError::cli_io_error)?; - Ok(buf) -} - -pub fn read_username() -> Result { - let mut username = File::open(&LEO_USERNAME_PATH.to_path_buf()).map_err(CliError::cli_io_error)?; - let mut buf = String::new(); - username.read_to_string(&mut buf).map_err(CliError::cli_io_error)?; - Ok(buf) -} - -pub fn remove_token_and_username() -> Result<()> { - if let Err(err) = fs::remove_file(&LEO_CREDENTIALS_PATH.to_path_buf()) { - return Err(CliError::remove_token_and_username(err).into()); - } - if let Err(err) = fs::remove_file(&LEO_USERNAME_PATH.to_path_buf()) { - return Err(CliError::remove_token_and_username(err).into()); - } - Ok(()) -} From ca0c34ea42dc11dae05bb4bb347545918bece0f2 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:31:19 -0700 Subject: [PATCH 28/43] remove unused wasm package --- compiler/wasm/.gitignore | 1 - compiler/wasm/Cargo.toml | 54 -------- compiler/wasm/README.md | 34 ----- compiler/wasm/src/lib.rs | 56 -------- compiler/wasm/tests/.gitignore | 1 - compiler/wasm/tests/package-lock.json | 36 ------ compiler/wasm/tests/package.json | 26 ---- compiler/wasm/tests/src/index.ts | 179 -------------------------- compiler/wasm/tests/tsconfig.json | 13 -- 9 files changed, 400 deletions(-) delete mode 100644 compiler/wasm/.gitignore delete mode 100644 compiler/wasm/Cargo.toml delete mode 100644 compiler/wasm/README.md delete mode 100644 compiler/wasm/src/lib.rs delete mode 100644 compiler/wasm/tests/.gitignore delete mode 100644 compiler/wasm/tests/package-lock.json delete mode 100644 compiler/wasm/tests/package.json delete mode 100644 compiler/wasm/tests/src/index.ts delete mode 100644 compiler/wasm/tests/tsconfig.json diff --git a/compiler/wasm/.gitignore b/compiler/wasm/.gitignore deleted file mode 100644 index 5fff1d9c18..0000000000 --- a/compiler/wasm/.gitignore +++ /dev/null @@ -1 +0,0 @@ -pkg diff --git a/compiler/wasm/Cargo.toml b/compiler/wasm/Cargo.toml deleted file mode 100644 index ca2fc176ef..0000000000 --- a/compiler/wasm/Cargo.toml +++ /dev/null @@ -1,54 +0,0 @@ -[package] -name = "leo-wasm" -authors = [ "The Aleo Team " ] -description = "Leo compiler as WASM" -version = "1.5.3" -edition = "2018" -homepage = "https://aleo.org" -repository = "https://github.com/AleoHQ/leo" -keywords = [ - "aleo", - "cryptography", - "leo", - "programming-language", - "zero-knowledge", - "wasm" -] -categories = [ "cryptography::cryptocurrencies", "web-programming" ] -include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ] -license = "GPL-3.0" - -[lib] -crate-type = ["cdylib", "rlib"] - -[dependencies.leo-ast] -path = "../ast" -version = "1.5.3" - -[dependencies.leo-ast-passes] -path = "../ast-passes" -version = "1.5.3" - -[dependencies.leo-errors] -path = "../../leo/errors" -version = "1.5.3" - -[dependencies.leo-parser] -path = "../parser" -version = "1.5.3" - -[dependencies.serde] -version = "1.0" -features = [ "derive" ] - -[dependencies.serde_json] -version = "1.0" - -[dependencies.wasm-bindgen] -version = "0.2" -features = [ "serde-serialize" ] - -# Crate metadata - -[package.metadata.wasm-pack.profile.dev] -wasm-opt = false diff --git a/compiler/wasm/README.md b/compiler/wasm/README.md deleted file mode 100644 index 03ad4c6512..0000000000 --- a/compiler/wasm/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Leo WASM - - -[![Authors](https://img.shields.io/badge/authors-Aleo-orange.svg)](../AUTHORS) -[![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE.md) - -This directory contains WASM bindings for the Leo compiler. - -## Limitations - -Currently, WASM target of the compiler supports parsing and canonicalization stages. - -## API - -This is a list of the supported methods and their signatures. - -### leo.parse - -Method takes in a Leo program as string and returns JSON string with the resulting AST or throws a LeoError. - -```ts -export interface LeoError { - text: string, // Full error text (including span) - code: string, // Leo error identifier (e.g. "EPAR0370005") - exitCode: number // Exit code for an error (e.g. 370005) -} - -/** - * @param {String} program Leo program text to parse and produce AST - * @return {String} Resulting AST as a JSON string. - * @throws {LeoError} When program contains invalid Leo code. - */ -export function parse(program: string): string; -``` diff --git a/compiler/wasm/src/lib.rs b/compiler/wasm/src/lib.rs deleted file mode 100644 index a9bc80f6f8..0000000000 --- a/compiler/wasm/src/lib.rs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -// Currently does not support crate `leo-compiler` because it has a dependency in its tree -// which is not wasm compatible. All compiler passes (such as TypeInference) - -use leo_ast::AstPass; -use leo_errors::LeoError; - -use serde_json::json; -use wasm_bindgen::prelude::*; - -#[wasm_bindgen(typescript_custom_section)] -const TS_APPEND_CONTENT: &'static str = r#" -export interface LeoError { text: string, code: string, exitCode: number } -"#; - -/// Publicly accessible method. -/// Parse the code and return an AST as JSON or an error object. -#[wasm_bindgen(method, catch)] -pub fn parse(program: &str) -> Result { - parse_program(program).map_err(error_to_value) -} - -/// Parse the program and pass the Canonicalization phase; -/// Asg is useless without compiler passes, so we need to add them once the compatibility problem in -/// snarkvm is solved. -fn parse_program(program: &str) -> leo_errors::Result { - let ast = leo_parser::parse_ast("", program)?; - let ast = leo_ast_passes::Canonicalizer::do_pass(ast.into_repr())?.to_json_string()?; - - Ok(ast) -} - -/// Make a pretty-print JS object for the thrown error. -fn error_to_value(err: LeoError) -> JsValue { - JsValue::from_serde(&json!({ - "error": err.to_string(), - "code": err.error_code(), - "exitCode": err.exit_code() - })) - .expect("Unable to create an error object from JSON") -} diff --git a/compiler/wasm/tests/.gitignore b/compiler/wasm/tests/.gitignore deleted file mode 100644 index 3c3629e647..0000000000 --- a/compiler/wasm/tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/compiler/wasm/tests/package-lock.json b/compiler/wasm/tests/package-lock.json deleted file mode 100644 index e1561325bd..0000000000 --- a/compiler/wasm/tests/package-lock.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "parser-wasm-tests", - "version": "0.1.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/js-yaml": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.3.tgz", - "integrity": "sha512-5t9BhoORasuF5uCPr+d5/hdB++zRFUTMIZOzbNkr+jZh3yQht4HYbRDyj9fY8n2TZT30iW9huzav73x4NikqWg==" - }, - "@types/node": { - "version": "16.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.4.tgz", - "integrity": "sha512-KDazLNYAGIuJugdbULwFZULF9qQ13yNWEBFnfVpqlpgAAo6H/qnM9RjBgh0A0kmHf3XxAKLdN5mTIng9iUvVLA==" - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, - "typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==" - } - } -} diff --git a/compiler/wasm/tests/package.json b/compiler/wasm/tests/package.json deleted file mode 100644 index 2c7ccaa3ec..0000000000 --- a/compiler/wasm/tests/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "parser-wasm-tests", - "version": "0.1.0", - "description": "Test Framework implementation for compiler tests in WASM", - "main": "dist/index.js", - "scripts": { - "compile": "tsc -p ./", - "test": "npm run compile && node dist/index.js" - }, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/aleohq/leo.git" - }, - "author": "The Aleo Team ", - "license": "GNU", - "bugs": { - "url": "https://github.com/aleohq/leo/issues" - }, - "homepage": "https://github.com/aleohq/leo#readme", - "dependencies": { - "@types/js-yaml": "^4.0.3", - "@types/node": "^16.9.4", - "js-yaml": "^4.1.0", - "typescript": "^3.9.10" - } -} diff --git a/compiler/wasm/tests/src/index.ts b/compiler/wasm/tests/src/index.ts deleted file mode 100644 index 8a77195569..0000000000 --- a/compiler/wasm/tests/src/index.ts +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (C) 2019-2022 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 . - -import * as fs from 'fs'; -import * as path from 'path'; -import * as leo from '../../pkg/leo_wasm'; -import * as yaml from 'js-yaml'; - -// Path to the parser tests folder -const TESTS_PATH: string = path.join(__dirname, '../../../tests/parser'); - -// Path to the test expectations for parser tests -const EXPECTATIONS_PATH: string = path.join(__dirname, '../../../tests/expectations/parser/parser'); - -// List of folders containing parser tests -const TEST_FOLDERS: string[] = fs.readdirSync(TESTS_PATH); - -// Test expectations enum, maps to string values: Pass and Fail -enum Expectation { - Pass = "Pass", - Fail = "Fail" -} - -interface TestHeader { - expectation: Expectation, - namespace: string -} - -interface TestResult { - filePath: string, - expectation: Expectation, - received: Expectation, - error: string|null -} - -// Main function for the tests -(function runTests() { - let results: TestResult[] = []; - - for (let folder of TEST_FOLDERS) { - results.push(...walkDir(folder)); - } - - if (results.length !== 0) { - results.forEach((result) => { - console.log( - 'Test failed. Path: %s; Expected: %s; Received: %s', - result.filePath, - result.expectation, - result.received - ); - }); - process.exit(1); - } else { - console.log('All tests successfully passed.'); - process.exit(0); - } -})(); - - -/** - * Test specific file an compare its outputs to the test expectations. - * - * @param filePath Path to the tested file - * @param outFile Contents of the expectation file of there is one - * @returns {TestResult[]} Tests that failed execution, empty means success - */ -function test(filePath: string, outFile: string|null): TestResult[] { - const text = fs.readFileSync(filePath).toString(); - - // Process the test's contents by cutting off the header - const header = text.slice(text.indexOf('/*') + 2, text.indexOf('*/')); - const testBody = text.slice(text.indexOf('*/') + 2); - - const {expectation /* , namespace */} = readHeader(header); - - const mismatches: TestResult[] = []; - const outputs: string[] = []; - - // Get the tests by splitting by 2 newlines and sanitize each sample. - const samples = testBody - .split('\n\n') - .map((el) => el.trim()) - .filter((el) => el.length !== 0); - - // Go through each test and run WASM parse function. Check the results agains expectations - // and collect outputs to later compare to saved .out expectations. - for (const sample of samples) { - try { - outputs.push(JSON.parse(leo.parse(sample))); // Parser outputs JSON - if (expectation === Expectation.Fail) { // If expectation was Fail and it passed - mismatches.push({ - filePath, - expectation: Expectation.Fail, - received: Expectation.Pass, - error: null - }); - } - } catch (error) { - outputs.push(error.toString()); - if (expectation === Expectation.Pass) { // If expectation was Pass and it failed - mismatches.push({ - error, - filePath, - expectation: Expectation.Pass, - received: Expectation.Fail, - }); - } - } - } - - // Todo: After AST spans are removed, figure out a way to canonicalize strings - // and get them to the same format as serde's. For now comparing the outputs as - // strings is impossible. - // - // const formedOut = yaml.dump({ - // expectation: expectation, - // namespace: namespace, - // outputs: outputs - // }, {schema: DEFAULT_SCHEMA}); - - return mismatches; -} - -/** - * Recursively go through each directory. If a file is met, - * then run test function for this file. - * - * @param fileOrDir - */ -function walkDir(fileOrDir: string): TestResult[] { - const currTarget = path.join(TESTS_PATH, fileOrDir); - let results: TestResult[] = []; // collect test results from sub calls - - if (fs.lstatSync(currTarget).isDirectory()) { - for (const entry of fs.readdirSync(currTarget)) { - results.push(...walkDir(path.join(fileOrDir, entry))); - } - } else { - const outFilePath = path.join(EXPECTATIONS_PATH, fileOrDir + '.out'); - const outFile = fs.existsSync(outFilePath) ? fs.readFileSync(outFilePath).toString() : null; - - return results.concat(test(currTarget, outFile)); - } - - return results; -} - -/** - * Read a test header yaml and transform it into an Object. - * - * @param header - * @returns {TestHeader} - */ -function readHeader(header: string): TestHeader { - const parsed: any = yaml.load(header); - - if (!parsed || parsed.constructor !== Object) { - throw "Unable to read test expectations: " + header; - } - - return { - expectation: parsed.namespace, - namespace: parsed.expectation, - }; -} diff --git a/compiler/wasm/tests/tsconfig.json b/compiler/wasm/tests/tsconfig.json deleted file mode 100644 index 5f932585ba..0000000000 --- a/compiler/wasm/tests/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2019", - "allowJs": true, - "lib": ["ES2019"], - "outDir": "dist", - "sourceMap": true, - "strict": true - }, - "exclude": ["node_modules", ".vscode-test"], - "include": ["./src/**/*"] -} From 6d731891d0a893cb534cc79bd554834fe168d480 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:37:10 -0700 Subject: [PATCH 29/43] move /leo/span -> /compiler/span --- Cargo.toml | 2 +- compiler/ast/Cargo.toml | 2 +- compiler/compiler/Cargo.toml | 8 +++--- compiler/core/Cargo.toml | 2 +- compiler/parser/Cargo.toml | 2 +- compiler/passes/Cargo.toml | 2 +- {leo => compiler}/span/Cargo.toml | 0 {leo => compiler}/span/src/dropless.rs | 0 {leo => compiler}/span/src/lib.rs | 0 {leo => compiler}/span/src/source_map.rs | 0 {leo => compiler}/span/src/span.rs | 0 {leo => compiler}/span/src/span_json.rs | 0 {leo => compiler}/span/src/symbol.rs | 0 leo/errors/Cargo.toml | 2 +- tests/test-framework/Cargo.toml | 32 +++++++++++++----------- 15 files changed, 27 insertions(+), 25 deletions(-) rename {leo => compiler}/span/Cargo.toml (100%) rename {leo => compiler}/span/src/dropless.rs (100%) rename {leo => compiler}/span/src/lib.rs (100%) rename {leo => compiler}/span/src/source_map.rs (100%) rename {leo => compiler}/span/src/span.rs (100%) rename {leo => compiler}/span/src/span_json.rs (100%) rename {leo => compiler}/span/src/symbol.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 0cfb5050ae..56716f25df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ path = "./leo/package" version = "1.5.3" [dependencies.leo-span] -path = "./leo/span" +path = "./compiler/span" version = "1.5.3" [dependencies.aleo] diff --git a/compiler/ast/Cargo.toml b/compiler/ast/Cargo.toml index b6cc017397..030409b95e 100644 --- a/compiler/ast/Cargo.toml +++ b/compiler/ast/Cargo.toml @@ -23,7 +23,7 @@ path = "../../leo/errors" version = "1.5.3" [dependencies.leo-span] -path = "../../leo/span" +path = "../span" version = "1.5.3" [dependencies.indexmap] diff --git a/compiler/compiler/Cargo.toml b/compiler/compiler/Cargo.toml index a62027dddd..7f9fc52102 100644 --- a/compiler/compiler/Cargo.toml +++ b/compiler/compiler/Cargo.toml @@ -34,13 +34,13 @@ version = "1.5.3" path = "../parser" version = "1.5.3" +[dependencies.leo-span] +path = "../span" +version = "1.5.3" + [dependencies.sha2] version = "0.10" -[dependencies.leo-span] -path = "../../leo/span" -version = "1.5.3" - [dev-dependencies.leo-test-framework] path = "../../tests/test-framework" version = "1.4.0" diff --git a/compiler/core/Cargo.toml b/compiler/core/Cargo.toml index f45e42fbd5..de8cfbefdf 100644 --- a/compiler/core/Cargo.toml +++ b/compiler/core/Cargo.toml @@ -29,7 +29,7 @@ path = "../../leo/errors" version = "1.5.3" [dependencies.leo-span] -path = "../../leo/span" +path = "../span" version = "1.5.3" [dependencies.indexmap] diff --git a/compiler/parser/Cargo.toml b/compiler/parser/Cargo.toml index 5d55d72dcc..eca69db088 100644 --- a/compiler/parser/Cargo.toml +++ b/compiler/parser/Cargo.toml @@ -27,7 +27,7 @@ path = "../../leo/errors" version = "1.5.3" [dependencies.leo-span] -path = "../../leo/span" +path = "../span" version = "1.5.3" [dependencies.snarkvm-dpc] diff --git a/compiler/passes/Cargo.toml b/compiler/passes/Cargo.toml index b590a178cf..132f9d69f1 100644 --- a/compiler/passes/Cargo.toml +++ b/compiler/passes/Cargo.toml @@ -37,7 +37,7 @@ path = "../parser" version = "1.5.3" [dependencies.leo-span] -path = "../../leo/span" +path = "../span" version = "1.5.3" [dependencies.leo-core] diff --git a/leo/span/Cargo.toml b/compiler/span/Cargo.toml similarity index 100% rename from leo/span/Cargo.toml rename to compiler/span/Cargo.toml diff --git a/leo/span/src/dropless.rs b/compiler/span/src/dropless.rs similarity index 100% rename from leo/span/src/dropless.rs rename to compiler/span/src/dropless.rs diff --git a/leo/span/src/lib.rs b/compiler/span/src/lib.rs similarity index 100% rename from leo/span/src/lib.rs rename to compiler/span/src/lib.rs diff --git a/leo/span/src/source_map.rs b/compiler/span/src/source_map.rs similarity index 100% rename from leo/span/src/source_map.rs rename to compiler/span/src/source_map.rs diff --git a/leo/span/src/span.rs b/compiler/span/src/span.rs similarity index 100% rename from leo/span/src/span.rs rename to compiler/span/src/span.rs diff --git a/leo/span/src/span_json.rs b/compiler/span/src/span_json.rs similarity index 100% rename from leo/span/src/span_json.rs rename to compiler/span/src/span_json.rs diff --git a/leo/span/src/symbol.rs b/compiler/span/src/symbol.rs similarity index 100% rename from leo/span/src/symbol.rs rename to compiler/span/src/symbol.rs diff --git a/leo/errors/Cargo.toml b/leo/errors/Cargo.toml index 7cdabcc335..a5b7255309 100644 --- a/leo/errors/Cargo.toml +++ b/leo/errors/Cargo.toml @@ -19,7 +19,7 @@ edition = "2021" rust-version = "1.56" [dependencies.leo-span] -path = "../span" +path = "../../compiler/span" version = "1.5.3" [dependencies.anyhow] diff --git a/tests/test-framework/Cargo.toml b/tests/test-framework/Cargo.toml index fd6d3db676..8422c9d569 100644 --- a/tests/test-framework/Cargo.toml +++ b/tests/test-framework/Cargo.toml @@ -21,9 +21,16 @@ edition = "2018" name = "leo_compiler" harness = false -[dependencies] -backtrace = "0.3.66" -walkdir = "2.3.2" +[dependencies.leo-errors] +path = "../../leo/errors" +version = "1.5.3" + +[dependencies.backtrace] +version = "0.3.66" + +[dependencies.clap] +version = "3.1" +features = ["derive"] [dependencies.serde] version = "1.0" @@ -36,24 +43,19 @@ features = ["preserve_order"] [dependencies.serde_yaml] version = "0.8" -[dependencies.clap] -version = "3.1" -features = ["derive"] - -[dependencies.leo-errors] -path = "../../leo/errors" -version = "1.5.3" +[dependencies.walkdir] +version = "2.3" [dependencies.regex] version = "1.6" -[dev-dependencies.criterion] -version = "0.3" - [dev-dependencies.leo-compiler] path = "../../compiler/compiler" version = "1.5.3" [dev-dependencies.leo-span] -path = "../../leo/span" -version = "1.5.3" \ No newline at end of file +path = "../../compiler/span" +version = "1.5.3" + +[dev-dependencies.criterion] +version = "0.3" From 0b81f03f3a4004d8f52ba5850f3723d7ea9158d8 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:41:42 -0700 Subject: [PATCH 30/43] move /leo/errors -> /errors --- Cargo.toml | 4 ++-- compiler/ast/Cargo.toml | 2 +- compiler/compiler/Cargo.toml | 2 +- compiler/core/Cargo.toml | 2 +- compiler/parser/Cargo.toml | 2 +- compiler/passes/Cargo.toml | 2 +- {leo/errors => errors}/Cargo.toml | 2 +- {leo/errors => errors}/ERROR_INDEX.md | 0 {leo/errors => errors}/LICENSE.md | 0 {leo/errors => errors}/README.md | 0 {leo/errors => errors}/src/common/backtraced.rs | 0 {leo/errors => errors}/src/common/formatted.rs | 0 {leo/errors => errors}/src/common/macros.rs | 0 {leo/errors => errors}/src/common/mod.rs | 0 {leo/errors => errors}/src/common/traits.rs | 0 {leo/errors => errors}/src/emitter/mod.rs | 0 {leo/errors => errors}/src/errors/ast/ast_errors.rs | 0 {leo/errors => errors}/src/errors/ast/mod.rs | 0 {leo/errors => errors}/src/errors/cli/cli_errors.rs | 0 {leo/errors => errors}/src/errors/cli/mod.rs | 0 {leo/errors => errors}/src/errors/compiler/compiler_errors.rs | 0 {leo/errors => errors}/src/errors/compiler/mod.rs | 0 {leo/errors => errors}/src/errors/import/import_errors.rs | 0 {leo/errors => errors}/src/errors/import/mod.rs | 0 {leo/errors => errors}/src/errors/input/input_errors.rs | 0 {leo/errors => errors}/src/errors/input/mod.rs | 0 {leo/errors => errors}/src/errors/mod.rs | 0 {leo/errors => errors}/src/errors/package/mod.rs | 0 {leo/errors => errors}/src/errors/package/package_errors.rs | 0 {leo/errors => errors}/src/errors/parser/mod.rs | 0 {leo/errors => errors}/src/errors/parser/parser_errors.rs | 0 {leo/errors => errors}/src/errors/state/mod.rs | 0 {leo/errors => errors}/src/errors/state/state_errors.rs | 0 {leo/errors => errors}/src/errors/type_checker/mod.rs | 0 .../src/errors/type_checker/type_checker_error.rs | 0 {leo/errors => errors}/src/lib.rs | 0 {leo/errors => errors}/src/warnings/mod.rs | 0 {leo/errors => errors}/src/warnings/parser/mod.rs | 0 {leo/errors => errors}/src/warnings/parser/parser_warning.rs | 0 leo/package/Cargo.toml | 2 +- tests/test-framework/Cargo.toml | 2 +- 41 files changed, 10 insertions(+), 10 deletions(-) rename {leo/errors => errors}/Cargo.toml (96%) rename {leo/errors => errors}/ERROR_INDEX.md (100%) rename {leo/errors => errors}/LICENSE.md (100%) rename {leo/errors => errors}/README.md (100%) rename {leo/errors => errors}/src/common/backtraced.rs (100%) rename {leo/errors => errors}/src/common/formatted.rs (100%) rename {leo/errors => errors}/src/common/macros.rs (100%) rename {leo/errors => errors}/src/common/mod.rs (100%) rename {leo/errors => errors}/src/common/traits.rs (100%) rename {leo/errors => errors}/src/emitter/mod.rs (100%) rename {leo/errors => errors}/src/errors/ast/ast_errors.rs (100%) rename {leo/errors => errors}/src/errors/ast/mod.rs (100%) rename {leo/errors => errors}/src/errors/cli/cli_errors.rs (100%) rename {leo/errors => errors}/src/errors/cli/mod.rs (100%) rename {leo/errors => errors}/src/errors/compiler/compiler_errors.rs (100%) rename {leo/errors => errors}/src/errors/compiler/mod.rs (100%) rename {leo/errors => errors}/src/errors/import/import_errors.rs (100%) rename {leo/errors => errors}/src/errors/import/mod.rs (100%) rename {leo/errors => errors}/src/errors/input/input_errors.rs (100%) rename {leo/errors => errors}/src/errors/input/mod.rs (100%) rename {leo/errors => errors}/src/errors/mod.rs (100%) rename {leo/errors => errors}/src/errors/package/mod.rs (100%) rename {leo/errors => errors}/src/errors/package/package_errors.rs (100%) rename {leo/errors => errors}/src/errors/parser/mod.rs (100%) rename {leo/errors => errors}/src/errors/parser/parser_errors.rs (100%) rename {leo/errors => errors}/src/errors/state/mod.rs (100%) rename {leo/errors => errors}/src/errors/state/state_errors.rs (100%) rename {leo/errors => errors}/src/errors/type_checker/mod.rs (100%) rename {leo/errors => errors}/src/errors/type_checker/type_checker_error.rs (100%) rename {leo/errors => errors}/src/lib.rs (100%) rename {leo/errors => errors}/src/warnings/mod.rs (100%) rename {leo/errors => errors}/src/warnings/parser/mod.rs (100%) rename {leo/errors => errors}/src/warnings/parser/parser_warning.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 56716f25df..db30cd62d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ path = "leo/main.rs" members = [ "compiler/compiler", "docs/grammar", - "leo/errors", + "errors", "leo/package", "tests/test-framework", ] @@ -39,7 +39,7 @@ path = "./compiler/compiler" version = "1.5.3" [dependencies.leo-errors] -path = "./leo/errors" +path = "./errors" version = "1.5.3" [dependencies.leo-package] diff --git a/compiler/ast/Cargo.toml b/compiler/ast/Cargo.toml index 030409b95e..9d9525219a 100644 --- a/compiler/ast/Cargo.toml +++ b/compiler/ast/Cargo.toml @@ -19,7 +19,7 @@ edition = "2021" rust-version = "1.56" [dependencies.leo-errors] -path = "../../leo/errors" +path = "../../errors" version = "1.5.3" [dependencies.leo-span] diff --git a/compiler/compiler/Cargo.toml b/compiler/compiler/Cargo.toml index 7f9fc52102..d41d6bafda 100644 --- a/compiler/compiler/Cargo.toml +++ b/compiler/compiler/Cargo.toml @@ -23,7 +23,7 @@ path = "../ast" version = "1.5.3" [dependencies.leo-errors] -path = "../../leo/errors" +path = "../../errors" version = "1.5.3" [dependencies.leo-passes] diff --git a/compiler/core/Cargo.toml b/compiler/core/Cargo.toml index de8cfbefdf..b375bfdbaa 100644 --- a/compiler/core/Cargo.toml +++ b/compiler/core/Cargo.toml @@ -25,7 +25,7 @@ path = "../ast" version = "1.5.3" [dependencies.leo-errors] -path = "../../leo/errors" +path = "../../errors" version = "1.5.3" [dependencies.leo-span] diff --git a/compiler/parser/Cargo.toml b/compiler/parser/Cargo.toml index eca69db088..1970cbcfd2 100644 --- a/compiler/parser/Cargo.toml +++ b/compiler/parser/Cargo.toml @@ -23,7 +23,7 @@ path = "../ast" version = "1.5.3" [dependencies.leo-errors] -path = "../../leo/errors" +path = "../../errors" version = "1.5.3" [dependencies.leo-span] diff --git a/compiler/passes/Cargo.toml b/compiler/passes/Cargo.toml index 132f9d69f1..f48d86f3a4 100644 --- a/compiler/passes/Cargo.toml +++ b/compiler/passes/Cargo.toml @@ -29,7 +29,7 @@ path = "../ast" version = "1.5.3" [dependencies.leo-errors] -path = "../../leo/errors" +path = "../../errors" version = "1.5.3" [dependencies.leo-parser] diff --git a/leo/errors/Cargo.toml b/errors/Cargo.toml similarity index 96% rename from leo/errors/Cargo.toml rename to errors/Cargo.toml index a5b7255309..925bc84c34 100644 --- a/leo/errors/Cargo.toml +++ b/errors/Cargo.toml @@ -19,7 +19,7 @@ edition = "2021" rust-version = "1.56" [dependencies.leo-span] -path = "../../compiler/span" +path = "../compiler/span" version = "1.5.3" [dependencies.anyhow] diff --git a/leo/errors/ERROR_INDEX.md b/errors/ERROR_INDEX.md similarity index 100% rename from leo/errors/ERROR_INDEX.md rename to errors/ERROR_INDEX.md diff --git a/leo/errors/LICENSE.md b/errors/LICENSE.md similarity index 100% rename from leo/errors/LICENSE.md rename to errors/LICENSE.md diff --git a/leo/errors/README.md b/errors/README.md similarity index 100% rename from leo/errors/README.md rename to errors/README.md diff --git a/leo/errors/src/common/backtraced.rs b/errors/src/common/backtraced.rs similarity index 100% rename from leo/errors/src/common/backtraced.rs rename to errors/src/common/backtraced.rs diff --git a/leo/errors/src/common/formatted.rs b/errors/src/common/formatted.rs similarity index 100% rename from leo/errors/src/common/formatted.rs rename to errors/src/common/formatted.rs diff --git a/leo/errors/src/common/macros.rs b/errors/src/common/macros.rs similarity index 100% rename from leo/errors/src/common/macros.rs rename to errors/src/common/macros.rs diff --git a/leo/errors/src/common/mod.rs b/errors/src/common/mod.rs similarity index 100% rename from leo/errors/src/common/mod.rs rename to errors/src/common/mod.rs diff --git a/leo/errors/src/common/traits.rs b/errors/src/common/traits.rs similarity index 100% rename from leo/errors/src/common/traits.rs rename to errors/src/common/traits.rs diff --git a/leo/errors/src/emitter/mod.rs b/errors/src/emitter/mod.rs similarity index 100% rename from leo/errors/src/emitter/mod.rs rename to errors/src/emitter/mod.rs diff --git a/leo/errors/src/errors/ast/ast_errors.rs b/errors/src/errors/ast/ast_errors.rs similarity index 100% rename from leo/errors/src/errors/ast/ast_errors.rs rename to errors/src/errors/ast/ast_errors.rs diff --git a/leo/errors/src/errors/ast/mod.rs b/errors/src/errors/ast/mod.rs similarity index 100% rename from leo/errors/src/errors/ast/mod.rs rename to errors/src/errors/ast/mod.rs diff --git a/leo/errors/src/errors/cli/cli_errors.rs b/errors/src/errors/cli/cli_errors.rs similarity index 100% rename from leo/errors/src/errors/cli/cli_errors.rs rename to errors/src/errors/cli/cli_errors.rs diff --git a/leo/errors/src/errors/cli/mod.rs b/errors/src/errors/cli/mod.rs similarity index 100% rename from leo/errors/src/errors/cli/mod.rs rename to errors/src/errors/cli/mod.rs diff --git a/leo/errors/src/errors/compiler/compiler_errors.rs b/errors/src/errors/compiler/compiler_errors.rs similarity index 100% rename from leo/errors/src/errors/compiler/compiler_errors.rs rename to errors/src/errors/compiler/compiler_errors.rs diff --git a/leo/errors/src/errors/compiler/mod.rs b/errors/src/errors/compiler/mod.rs similarity index 100% rename from leo/errors/src/errors/compiler/mod.rs rename to errors/src/errors/compiler/mod.rs diff --git a/leo/errors/src/errors/import/import_errors.rs b/errors/src/errors/import/import_errors.rs similarity index 100% rename from leo/errors/src/errors/import/import_errors.rs rename to errors/src/errors/import/import_errors.rs diff --git a/leo/errors/src/errors/import/mod.rs b/errors/src/errors/import/mod.rs similarity index 100% rename from leo/errors/src/errors/import/mod.rs rename to errors/src/errors/import/mod.rs diff --git a/leo/errors/src/errors/input/input_errors.rs b/errors/src/errors/input/input_errors.rs similarity index 100% rename from leo/errors/src/errors/input/input_errors.rs rename to errors/src/errors/input/input_errors.rs diff --git a/leo/errors/src/errors/input/mod.rs b/errors/src/errors/input/mod.rs similarity index 100% rename from leo/errors/src/errors/input/mod.rs rename to errors/src/errors/input/mod.rs diff --git a/leo/errors/src/errors/mod.rs b/errors/src/errors/mod.rs similarity index 100% rename from leo/errors/src/errors/mod.rs rename to errors/src/errors/mod.rs diff --git a/leo/errors/src/errors/package/mod.rs b/errors/src/errors/package/mod.rs similarity index 100% rename from leo/errors/src/errors/package/mod.rs rename to errors/src/errors/package/mod.rs diff --git a/leo/errors/src/errors/package/package_errors.rs b/errors/src/errors/package/package_errors.rs similarity index 100% rename from leo/errors/src/errors/package/package_errors.rs rename to errors/src/errors/package/package_errors.rs diff --git a/leo/errors/src/errors/parser/mod.rs b/errors/src/errors/parser/mod.rs similarity index 100% rename from leo/errors/src/errors/parser/mod.rs rename to errors/src/errors/parser/mod.rs diff --git a/leo/errors/src/errors/parser/parser_errors.rs b/errors/src/errors/parser/parser_errors.rs similarity index 100% rename from leo/errors/src/errors/parser/parser_errors.rs rename to errors/src/errors/parser/parser_errors.rs diff --git a/leo/errors/src/errors/state/mod.rs b/errors/src/errors/state/mod.rs similarity index 100% rename from leo/errors/src/errors/state/mod.rs rename to errors/src/errors/state/mod.rs diff --git a/leo/errors/src/errors/state/state_errors.rs b/errors/src/errors/state/state_errors.rs similarity index 100% rename from leo/errors/src/errors/state/state_errors.rs rename to errors/src/errors/state/state_errors.rs diff --git a/leo/errors/src/errors/type_checker/mod.rs b/errors/src/errors/type_checker/mod.rs similarity index 100% rename from leo/errors/src/errors/type_checker/mod.rs rename to errors/src/errors/type_checker/mod.rs diff --git a/leo/errors/src/errors/type_checker/type_checker_error.rs b/errors/src/errors/type_checker/type_checker_error.rs similarity index 100% rename from leo/errors/src/errors/type_checker/type_checker_error.rs rename to errors/src/errors/type_checker/type_checker_error.rs diff --git a/leo/errors/src/lib.rs b/errors/src/lib.rs similarity index 100% rename from leo/errors/src/lib.rs rename to errors/src/lib.rs diff --git a/leo/errors/src/warnings/mod.rs b/errors/src/warnings/mod.rs similarity index 100% rename from leo/errors/src/warnings/mod.rs rename to errors/src/warnings/mod.rs diff --git a/leo/errors/src/warnings/parser/mod.rs b/errors/src/warnings/parser/mod.rs similarity index 100% rename from leo/errors/src/warnings/parser/mod.rs rename to errors/src/warnings/parser/mod.rs diff --git a/leo/errors/src/warnings/parser/parser_warning.rs b/errors/src/warnings/parser/parser_warning.rs similarity index 100% rename from leo/errors/src/warnings/parser/parser_warning.rs rename to errors/src/warnings/parser/parser_warning.rs diff --git a/leo/package/Cargo.toml b/leo/package/Cargo.toml index 53c5479d22..370b506907 100644 --- a/leo/package/Cargo.toml +++ b/leo/package/Cargo.toml @@ -19,7 +19,7 @@ edition = "2021" rust-version = "1.56.1" [dependencies.leo-errors] -path = "../errors" +path = "../../errors" version = "1.5.3" [dependencies.indexmap] diff --git a/tests/test-framework/Cargo.toml b/tests/test-framework/Cargo.toml index 8422c9d569..9293779040 100644 --- a/tests/test-framework/Cargo.toml +++ b/tests/test-framework/Cargo.toml @@ -22,7 +22,7 @@ name = "leo_compiler" harness = false [dependencies.leo-errors] -path = "../../leo/errors" +path = "../../errors" version = "1.5.3" [dependencies.backtrace] From 266fdd7a5e302608641148e833406e2c3dbf8d9c Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:46:42 -0700 Subject: [PATCH 31/43] fix readmes and licenses --- compiler/core/README.md | 2 +- compiler/parser/LICENSE.md | 596 +++++++++++++++++++++++++++++++++++++ compiler/parser/README.md | 3 +- compiler/passes/README.md | 21 +- compiler/span/LICENSE.md | 596 +++++++++++++++++++++++++++++++++++++ compiler/span/README.md | 9 + leo/README.md | 3 +- 7 files changed, 1207 insertions(+), 23 deletions(-) create mode 100644 compiler/parser/LICENSE.md create mode 100644 compiler/span/LICENSE.md create mode 100644 compiler/span/README.md diff --git a/compiler/core/README.md b/compiler/core/README.md index 500f8bc903..b10a86fcc7 100644 --- a/compiler/core/README.md +++ b/compiler/core/README.md @@ -1,6 +1,6 @@ # leo-core -[![Crates.io](https://img.shields.io/crates/v/leo-ast.svg?color=neon)](https://crates.io/crates/leo-ast) +[![Crates.io](https://img.shields.io/crates/v/leo-ast.svg?color=neon)](https://crates.io/crates/leo-core) [![Authors](https://img.shields.io/badge/authors-Aleo-orange.svg)](../AUTHORS) [![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE.md) diff --git a/compiler/parser/LICENSE.md b/compiler/parser/LICENSE.md new file mode 100644 index 0000000000..b95c626e2a --- /dev/null +++ b/compiler/parser/LICENSE.md @@ -0,0 +1,596 @@ +GNU General Public License +========================== + +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. <> + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +## Preamble + +The GNU General Public License is a free, copyleft license for software and other +kinds of works. + +The licenses for most software and other practical works are designed to take away +your freedom to share and change the works. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change all versions of a +program--to make sure it remains free software for all its users. We, the Free +Software Foundation, use the GNU General Public License for most of our software; it +applies also to any other work released this way by its authors. You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General +Public Licenses are designed to make sure that you have the freedom to distribute +copies of free software (and charge for them if you wish), that you receive source +code or can get it if you want it, that you can change the software or use pieces of +it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or +asking you to surrender the rights. Therefore, you have certain responsibilities if +you distribute copies of the software, or if you modify it: responsibilities to +respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, +you must pass on to the recipients the same freedoms that you received. You must make +sure that they, too, receive or can get the source code. And you must show them these +terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: **(1)** assert +copyright on the software, and **(2)** offer you this License giving you legal permission +to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is +no warranty for this free software. For both users' and authors' sake, the GPL +requires that modified versions be marked as changed, so that their problems will not +be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of +the software inside them, although the manufacturer can do so. This is fundamentally +incompatible with the aim of protecting users' freedom to change the software. The +systematic pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we have designed +this version of the GPL to prohibit the practice for those products. If such problems +arise substantially in other domains, we stand ready to extend this provision to +those domains in future versions of the GPL, as needed to protect the freedom of +users. + +Finally, every program is threatened constantly by software patents. States should +not allow patents to restrict development and use of software on general-purpose +computers, but in those that do, we wish to avoid the special danger that patents +applied to a free program could make it effectively proprietary. To prevent this, the +GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +## TERMS AND CONDITIONS + +### 0. Definitions + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this +License. Each licensee is addressed as “you”. “Licensees” and +“recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in +a fashion requiring copyright permission, other than the making of an exact copy. The +resulting work is called a “modified version” of the earlier work or a +work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on +the Program. + +To “propagate” a work means to do anything with it that, without +permission, would make you directly or secondarily liable for infringement under +applicable copyright law, except executing it on a computer or modifying a private +copy. Propagation includes copying, distribution (with or without modification), +making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through a computer +network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the +extent that it includes a convenient and prominently visible feature that **(1)** +displays an appropriate copyright notice, and **(2)** tells the user that there is no +warranty for the work (except to the extent that warranties are provided), that +licensees may convey the work under this License, and how to view a copy of this +License. If the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +### 1. Source Code + +The “source code” for a work means the preferred form of the work for +making modifications to it. “Object code” means any non-source form of a +work. + +A “Standard Interface” means an interface that either is an official +standard defined by a recognized standards body, or, in the case of interfaces +specified for a particular programming language, one that is widely used among +developers working in that language. + +The “System Libraries” of an executable work include anything, other than +the work as a whole, that **(a)** is included in the normal form of packaging a Major +Component, but which is not part of that Major Component, and **(b)** serves only to +enable use of the work with that Major Component, or to implement a Standard +Interface for which an implementation is available to the public in source code form. +A “Major Component”, in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system (if any) on which +the executable work runs, or a compiler used to produce the work, or an object code +interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the +source code needed to generate, install, and (for an executable work) run the object +code and to modify the work, including scripts to control those activities. However, +it does not include the work's System Libraries, or general-purpose tools or +generally available free programs which are used unmodified in performing those +activities but which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for the work, and +the source code for shared libraries and dynamically linked subprograms that the work +is specifically designed to require, such as by intimate data communication or +control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate +automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +### 2. Basic Permissions + +All rights granted under this License are granted for the term of copyright on the +Program, and are irrevocable provided the stated conditions are met. This License +explicitly affirms your unlimited permission to run the unmodified Program. The +output from running a covered work is covered by this License only if the output, +given its content, constitutes a covered work. This License acknowledges your rights +of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without +conditions so long as your license otherwise remains in force. You may convey covered +works to others for the sole purpose of having them make modifications exclusively +for you, or provide you with facilities for running those works, provided that you +comply with the terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for you must do so +exclusively on your behalf, under your direction and control, on terms that prohibit +them from making any copies of your copyrighted material outside their relationship +with you. + +Conveying under any other circumstances is permitted solely under the conditions +stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law + +No covered work shall be deemed part of an effective technological measure under any +applicable law fulfilling obligations under article 11 of the WIPO copyright treaty +adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention +of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of +technological measures to the extent such circumvention is effected by exercising +rights under this License with respect to the covered work, and you disclaim any +intention to limit operation or modification of the work as a means of enforcing, +against the work's users, your or third parties' legal rights to forbid circumvention +of technological measures. + +### 4. Conveying Verbatim Copies + +You may convey verbatim copies of the Program's source code as you receive it, in any +medium, provided that you conspicuously and appropriately publish on each copy an +appropriate copyright notice; keep intact all notices stating that this License and +any non-permissive terms added in accord with section 7 apply to the code; keep +intact all notices of the absence of any warranty; and give all recipients a copy of +this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer +support or warranty protection for a fee. + +### 5. Conveying Modified Source Versions + +You may convey a work based on the Program, or the modifications to produce it from +the Program, in the form of source code under the terms of section 4, provided that +you also meet all of these conditions: + +* **a)** The work must carry prominent notices stating that you modified it, and giving a +relevant date. +* **b)** The work must carry prominent notices stating that it is released under this +License and any conditions added under section 7. This requirement modifies the +requirement in section 4 to “keep intact all notices”. +* **c)** You must license the entire work, as a whole, under this License to anyone who +comes into possession of a copy. This License will therefore apply, along with any +applicable section 7 additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no permission to license the +work in any other way, but it does not invalidate such permission if you have +separately received it. +* **d)** If the work has interactive user interfaces, each must display Appropriate Legal +Notices; however, if the Program has interactive interfaces that do not display +Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are +not by their nature extensions of the covered work, and which are not combined with +it such as to form a larger program, in or on a volume of a storage or distribution +medium, is called an “aggregate” if the compilation and its resulting +copyright are not used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work in an aggregate +does not cause this License to apply to the other parts of the aggregate. + +### 6. Conveying Non-Source Forms + +You may convey a covered work in object code form under the terms of sections 4 and +5, provided that you also convey the machine-readable Corresponding Source under the +terms of this License, in one of these ways: + +* **a)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by the Corresponding Source fixed on a +durable physical medium customarily used for software interchange. +* **b)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by a written offer, valid for at least +three years and valid for as long as you offer spare parts or customer support for +that product model, to give anyone who possesses the object code either **(1)** a copy of +the Corresponding Source for all the software in the product that is covered by this +License, on a durable physical medium customarily used for software interchange, for +a price no more than your reasonable cost of physically performing this conveying of +source, or **(2)** access to copy the Corresponding Source from a network server at no +charge. +* **c)** Convey individual copies of the object code with a copy of the written offer to +provide the Corresponding Source. This alternative is allowed only occasionally and +noncommercially, and only if you received the object code with such an offer, in +accord with subsection 6b. +* **d)** Convey the object code by offering access from a designated place (gratis or for +a charge), and offer equivalent access to the Corresponding Source in the same way +through the same place at no further charge. You need not require recipients to copy +the Corresponding Source along with the object code. If the place to copy the object +code is a network server, the Corresponding Source may be on a different server +(operated by you or a third party) that supports equivalent copying facilities, +provided you maintain clear directions next to the object code saying where to find +the Corresponding Source. Regardless of what server hosts the Corresponding Source, +you remain obligated to ensure that it is available for as long as needed to satisfy +these requirements. +* **e)** Convey the object code using peer-to-peer transmission, provided you inform +other peers where the object code and Corresponding Source of the work are being +offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the +Corresponding Source as a System Library, need not be included in conveying the +object code work. + +A “User Product” is either **(1)** a “consumer product”, which +means any tangible personal property which is normally used for personal, family, or +household purposes, or **(2)** anything designed or sold for incorporation into a +dwelling. In determining whether a product is a consumer product, doubtful cases +shall be resolved in favor of coverage. For a particular product received by a +particular user, “normally used” refers to a typical or common use of +that class of product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected to use, the +product. A product is a consumer product regardless of whether the product has +substantial commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, +procedures, authorization keys, or other information required to install and execute +modified versions of a covered work in that User Product from a modified version of +its Corresponding Source. The information must suffice to ensure that the continued +functioning of the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for +use in, a User Product, and the conveying occurs as part of a transaction in which +the right of possession and use of the User Product is transferred to the recipient +in perpetuity or for a fixed term (regardless of how the transaction is +characterized), the Corresponding Source conveyed under this section must be +accompanied by the Installation Information. But this requirement does not apply if +neither you nor any third party retains the ability to install modified object code +on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to +continue to provide support service, warranty, or updates for a work that has been +modified or installed by the recipient, or for the User Product in which it has been +modified or installed. Access to a network may be denied when the modification itself +materially and adversely affects the operation of the network or violates the rules +and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with +this section must be in a format that is publicly documented (and with an +implementation available to the public in source code form), and must require no +special password or key for unpacking, reading or copying. + +### 7. Additional Terms + +“Additional permissions” are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. Additional +permissions that are applicable to the entire Program shall be treated as though they +were included in this License, to the extent that they are valid under applicable +law. If additional permissions apply only to part of the Program, that part may be +used separately under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any +additional permissions from that copy, or from any part of it. (Additional +permissions may be written to require their own removal in certain cases when you +modify the work.) You may place additional permissions on material, added by you to a +covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a +covered work, you may (if authorized by the copyright holders of that material) +supplement the terms of this License with terms: + +* **a)** Disclaiming warranty or limiting liability differently from the terms of +sections 15 and 16 of this License; or +* **b)** Requiring preservation of specified reasonable legal notices or author +attributions in that material or in the Appropriate Legal Notices displayed by works +containing it; or +* **c)** Prohibiting misrepresentation of the origin of that material, or requiring that +modified versions of such material be marked in reasonable ways as different from the +original version; or +* **d)** Limiting the use for publicity purposes of names of licensors or authors of the +material; or +* **e)** Declining to grant rights under trademark law for use of some trade names, +trademarks, or service marks; or +* **f)** Requiring indemnification of licensors and authors of that material by anyone +who conveys the material (or modified versions of it) with contractual assumptions of +liability to the recipient, for any liability that these contractual assumptions +directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further +restrictions” within the meaning of section 10. If the Program as you received +it, or any part of it, contains a notice stating that it is governed by this License +along with a term that is a further restriction, you may remove that term. If a +license document contains a further restriction but permits relicensing or conveying +under this License, you may add to a covered work material governed by the terms of +that license document, provided that the further restriction does not survive such +relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in +the relevant source files, a statement of the additional terms that apply to those +files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a +separately written license, or stated as exceptions; the above requirements apply +either way. + +### 8. Termination + +You may not propagate or modify a covered work except as expressly provided under +this License. Any attempt otherwise to propagate or modify it is void, and will +automatically terminate your rights under this License (including any patent licenses +granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a +particular copyright holder is reinstated **(a)** provisionally, unless and until the +copyright holder explicitly and finally terminates your license, and **(b)** permanently, +if the copyright holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently +if the copyright holder notifies you of the violation by some reasonable means, this +is the first time you have received notice of violation of this License (for any +work) from that copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of +parties who have received copies or rights from you under this License. If your +rights have been terminated and not permanently reinstated, you do not qualify to +receive new licenses for the same material under section 10. + +### 9. Acceptance Not Required for Having Copies + +You are not required to accept this License in order to receive or run a copy of the +Program. Ancillary propagation of a covered work occurring solely as a consequence of +using peer-to-peer transmission to receive a copy likewise does not require +acceptance. However, nothing other than this License grants you permission to +propagate or modify any covered work. These actions infringe copyright if you do not +accept this License. Therefore, by modifying or propagating a covered work, you +indicate your acceptance of this License to do so. + +### 10. Automatic Licensing of Downstream Recipients + +Each time you convey a covered work, the recipient automatically receives a license +from the original licensors, to run, modify and propagate that work, subject to this +License. You are not responsible for enforcing compliance by third parties with this +License. + +An “entity transaction” is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an organization, or +merging organizations. If propagation of a covered work results from an entity +transaction, each party to that transaction who receives a copy of the work also +receives whatever licenses to the work the party's predecessor in interest had or +could give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if the predecessor +has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or +affirmed under this License. For example, you may not impose a license fee, royalty, +or other charge for exercise of rights granted under this License, and you may not +initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging +that any patent claim is infringed by making, using, selling, offering for sale, or +importing the Program or any portion of it. + +### 11. Patents + +A “contributor” is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The work thus +licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or +controlled by the contributor, whether already acquired or hereafter acquired, that +would be infringed by some manner, permitted by this License, of making, using, or +selling its contributor version, but do not include claims that would be infringed +only as a consequence of further modification of the contributor version. For +purposes of this definition, “control” includes the right to grant patent +sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license +under the contributor's essential patent claims, to make, use, sell, offer for sale, +import and otherwise run, modify and propagate the contents of its contributor +version. + +In the following three paragraphs, a “patent license” is any express +agreement or commitment, however denominated, not to enforce a patent (such as an +express permission to practice a patent or covenant not to sue for patent +infringement). To “grant” such a patent license to a party means to make +such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the +Corresponding Source of the work is not available for anyone to copy, free of charge +and under the terms of this License, through a publicly available network server or +other readily accessible means, then you must either **(1)** cause the Corresponding +Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the +patent license for this particular work, or **(3)** arrange, in a manner consistent with +the requirements of this License, to extend the patent license to downstream +recipients. “Knowingly relying” means you have actual knowledge that, but +for the patent license, your conveying the covered work in a country, or your +recipient's use of the covered work in a country, would infringe one or more +identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you +convey, or propagate by procuring conveyance of, a covered work, and grant a patent +license to some of the parties receiving the covered work authorizing them to use, +propagate, modify or convey a specific copy of the covered work, then the patent +license you grant is automatically extended to all recipients of the covered work and +works based on it. + +A patent license is “discriminatory” if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on the +non-exercise of one or more of the rights that are specifically granted under this +License. You may not convey a covered work if you are a party to an arrangement with +a third party that is in the business of distributing software, under which you make +payment to the third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties who would receive +the covered work from you, a discriminatory patent license **(a)** in connection with +copies of the covered work conveyed by you (or copies made from those copies), or **(b)** +primarily for and in connection with specific products or compilations that contain +the covered work, unless you entered into that arrangement, or that patent license +was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied +license or other defenses to infringement that may otherwise be available to you +under applicable patent law. + +### 12. No Surrender of Others' Freedom + +If conditions are imposed on you (whether by court order, agreement or otherwise) +that contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot convey a covered work so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not convey it at all. For example, if you +agree to terms that obligate you to collect a royalty for further conveying from +those to whom you convey the Program, the only way you could satisfy both those terms +and this License would be to refrain entirely from conveying the Program. + +### 13. Use with the GNU Affero General Public License + +Notwithstanding any other provision of this License, you have permission to link or +combine any covered work with a work licensed under version 3 of the GNU Affero +General Public License into a single combined work, and to convey the resulting work. +The terms of this License will continue to apply to the part which is the covered +work, but the special requirements of the GNU Affero General Public License, section +13, concerning interaction through a network will apply to the combination as such. + +### 14. Revised Versions of this License + +The Free Software Foundation may publish revised and/or new versions of the GNU +General Public License from time to time. Such new versions will be similar in spirit +to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that +a certain numbered version of the GNU General Public License “or any later +version” applies to it, you have the option of following the terms and +conditions either of that numbered version or of any later version published by the +Free Software Foundation. If the Program does not specify a version number of the GNU +General Public License, you may choose any version ever published by the Free +Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU +General Public License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no +additional obligations are imposed on any author or copyright holder as a result of +your choosing to follow a later version. + +### 15. Disclaimer of Warranty + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE +QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +### 16. Limitation of Liability + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY +COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS +PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, +INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE +OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE +WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +### 17. Interpretation of Sections 15 and 16 + +If the disclaimer of warranty and limitation of liability provided above cannot be +given local legal effect according to their terms, reviewing courts shall apply local +law that most closely approximates an absolute waiver of all civil liability in +connection with the Program, unless a warranty or assumption of liability accompanies +a copy of the Program in return for a fee. + +_END OF TERMS AND CONDITIONS_ + +## How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to +the public, the best way to achieve this is to make it free software which everyone +can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them +to the start of each source file to most effectively state the exclusion of warranty; +and each file should have at least the “copyright” line and a pointer to +where the full notice is found. + + + Copyright (C) + + This program 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. + + This program 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 this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this +when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type 'show c' for details. + +The hypothetical commands `show w` and `show c` should show the appropriate parts of +the General Public License. Of course, your program's commands might be different; +for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to +sign a “copyright disclaimer” for the program, if necessary. For more +information on this, and how to apply and follow the GNU GPL, see +<>. + +The GNU General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may consider it +more useful to permit linking proprietary applications with the library. If this is +what you want to do, use the GNU Lesser General Public License instead of this +License. But first, please read +<>. diff --git a/compiler/parser/README.md b/compiler/parser/README.md index b683f9b4fb..aa895e996d 100644 --- a/compiler/parser/README.md +++ b/compiler/parser/README.md @@ -1,4 +1,5 @@ -# Leo Parser +# leo-parser + [![Crates.io](https://img.shields.io/crates/v/leo-parser.svg?color=neon)](https://crates.io/crates/leo-parser) [![Authors](https://img.shields.io/badge/authors-Aleo-orange.svg)](../AUTHORS) [![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE.md) diff --git a/compiler/passes/README.md b/compiler/passes/README.md index ad2dc2d4bd..db60cf1506 100644 --- a/compiler/passes/README.md +++ b/compiler/passes/README.md @@ -1,6 +1,6 @@ -# leo-ast-passes +# leo-passes -[![Crates.io](https://img.shields.io/crates/v/leo-ast.svg?color=neon)](https://crates.io/crates/leo-ast) +[![Crates.io](https://img.shields.io/crates/v/leo-ast.svg?color=neon)](https://crates.io/crates/leo-passes) [![Authors](https://img.shields.io/badge/authors-Aleo-orange.svg)](../AUTHORS) [![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE.md) @@ -8,23 +8,6 @@ The code here is split into several usages. Each usage represents a different pass or modification when given an AST. -### Canonicalization - -This pass of the code has a few changes it must complete: - -- `Self` is not allowed outside a circuit. -- `Self` in circuits must be replaced with an Identifier containing the Circuit Name. -- Any 0 size array definitions should be rejected. -- Multi-size array definitions should be expanded such that `[0u8; (2, 3)]` becomes `[[0u8; 3] 2]`. -- Compound assignments become simple assignments such that `a += 2;` becomes `a = a + 2;`. -- Missing function output types are replaced with an empty tuple. - -### Import Resolution - -This pass iterates through the import statements(nestedly), resloving all imports. Thus adding the improted file's AST to the main AST. - -In addition, it also handles forcibly importing the stdlib prelude files. - ## Structure Each different type of pass is located in its own directory within the src directory. diff --git a/compiler/span/LICENSE.md b/compiler/span/LICENSE.md new file mode 100644 index 0000000000..b95c626e2a --- /dev/null +++ b/compiler/span/LICENSE.md @@ -0,0 +1,596 @@ +GNU General Public License +========================== + +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. <> + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +## Preamble + +The GNU General Public License is a free, copyleft license for software and other +kinds of works. + +The licenses for most software and other practical works are designed to take away +your freedom to share and change the works. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change all versions of a +program--to make sure it remains free software for all its users. We, the Free +Software Foundation, use the GNU General Public License for most of our software; it +applies also to any other work released this way by its authors. You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General +Public Licenses are designed to make sure that you have the freedom to distribute +copies of free software (and charge for them if you wish), that you receive source +code or can get it if you want it, that you can change the software or use pieces of +it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or +asking you to surrender the rights. Therefore, you have certain responsibilities if +you distribute copies of the software, or if you modify it: responsibilities to +respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, +you must pass on to the recipients the same freedoms that you received. You must make +sure that they, too, receive or can get the source code. And you must show them these +terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: **(1)** assert +copyright on the software, and **(2)** offer you this License giving you legal permission +to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is +no warranty for this free software. For both users' and authors' sake, the GPL +requires that modified versions be marked as changed, so that their problems will not +be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of +the software inside them, although the manufacturer can do so. This is fundamentally +incompatible with the aim of protecting users' freedom to change the software. The +systematic pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we have designed +this version of the GPL to prohibit the practice for those products. If such problems +arise substantially in other domains, we stand ready to extend this provision to +those domains in future versions of the GPL, as needed to protect the freedom of +users. + +Finally, every program is threatened constantly by software patents. States should +not allow patents to restrict development and use of software on general-purpose +computers, but in those that do, we wish to avoid the special danger that patents +applied to a free program could make it effectively proprietary. To prevent this, the +GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +## TERMS AND CONDITIONS + +### 0. Definitions + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this +License. Each licensee is addressed as “you”. “Licensees” and +“recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in +a fashion requiring copyright permission, other than the making of an exact copy. The +resulting work is called a “modified version” of the earlier work or a +work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on +the Program. + +To “propagate” a work means to do anything with it that, without +permission, would make you directly or secondarily liable for infringement under +applicable copyright law, except executing it on a computer or modifying a private +copy. Propagation includes copying, distribution (with or without modification), +making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through a computer +network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the +extent that it includes a convenient and prominently visible feature that **(1)** +displays an appropriate copyright notice, and **(2)** tells the user that there is no +warranty for the work (except to the extent that warranties are provided), that +licensees may convey the work under this License, and how to view a copy of this +License. If the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +### 1. Source Code + +The “source code” for a work means the preferred form of the work for +making modifications to it. “Object code” means any non-source form of a +work. + +A “Standard Interface” means an interface that either is an official +standard defined by a recognized standards body, or, in the case of interfaces +specified for a particular programming language, one that is widely used among +developers working in that language. + +The “System Libraries” of an executable work include anything, other than +the work as a whole, that **(a)** is included in the normal form of packaging a Major +Component, but which is not part of that Major Component, and **(b)** serves only to +enable use of the work with that Major Component, or to implement a Standard +Interface for which an implementation is available to the public in source code form. +A “Major Component”, in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system (if any) on which +the executable work runs, or a compiler used to produce the work, or an object code +interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the +source code needed to generate, install, and (for an executable work) run the object +code and to modify the work, including scripts to control those activities. However, +it does not include the work's System Libraries, or general-purpose tools or +generally available free programs which are used unmodified in performing those +activities but which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for the work, and +the source code for shared libraries and dynamically linked subprograms that the work +is specifically designed to require, such as by intimate data communication or +control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate +automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +### 2. Basic Permissions + +All rights granted under this License are granted for the term of copyright on the +Program, and are irrevocable provided the stated conditions are met. This License +explicitly affirms your unlimited permission to run the unmodified Program. The +output from running a covered work is covered by this License only if the output, +given its content, constitutes a covered work. This License acknowledges your rights +of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without +conditions so long as your license otherwise remains in force. You may convey covered +works to others for the sole purpose of having them make modifications exclusively +for you, or provide you with facilities for running those works, provided that you +comply with the terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for you must do so +exclusively on your behalf, under your direction and control, on terms that prohibit +them from making any copies of your copyrighted material outside their relationship +with you. + +Conveying under any other circumstances is permitted solely under the conditions +stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law + +No covered work shall be deemed part of an effective technological measure under any +applicable law fulfilling obligations under article 11 of the WIPO copyright treaty +adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention +of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of +technological measures to the extent such circumvention is effected by exercising +rights under this License with respect to the covered work, and you disclaim any +intention to limit operation or modification of the work as a means of enforcing, +against the work's users, your or third parties' legal rights to forbid circumvention +of technological measures. + +### 4. Conveying Verbatim Copies + +You may convey verbatim copies of the Program's source code as you receive it, in any +medium, provided that you conspicuously and appropriately publish on each copy an +appropriate copyright notice; keep intact all notices stating that this License and +any non-permissive terms added in accord with section 7 apply to the code; keep +intact all notices of the absence of any warranty; and give all recipients a copy of +this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer +support or warranty protection for a fee. + +### 5. Conveying Modified Source Versions + +You may convey a work based on the Program, or the modifications to produce it from +the Program, in the form of source code under the terms of section 4, provided that +you also meet all of these conditions: + +* **a)** The work must carry prominent notices stating that you modified it, and giving a +relevant date. +* **b)** The work must carry prominent notices stating that it is released under this +License and any conditions added under section 7. This requirement modifies the +requirement in section 4 to “keep intact all notices”. +* **c)** You must license the entire work, as a whole, under this License to anyone who +comes into possession of a copy. This License will therefore apply, along with any +applicable section 7 additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no permission to license the +work in any other way, but it does not invalidate such permission if you have +separately received it. +* **d)** If the work has interactive user interfaces, each must display Appropriate Legal +Notices; however, if the Program has interactive interfaces that do not display +Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are +not by their nature extensions of the covered work, and which are not combined with +it such as to form a larger program, in or on a volume of a storage or distribution +medium, is called an “aggregate” if the compilation and its resulting +copyright are not used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work in an aggregate +does not cause this License to apply to the other parts of the aggregate. + +### 6. Conveying Non-Source Forms + +You may convey a covered work in object code form under the terms of sections 4 and +5, provided that you also convey the machine-readable Corresponding Source under the +terms of this License, in one of these ways: + +* **a)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by the Corresponding Source fixed on a +durable physical medium customarily used for software interchange. +* **b)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by a written offer, valid for at least +three years and valid for as long as you offer spare parts or customer support for +that product model, to give anyone who possesses the object code either **(1)** a copy of +the Corresponding Source for all the software in the product that is covered by this +License, on a durable physical medium customarily used for software interchange, for +a price no more than your reasonable cost of physically performing this conveying of +source, or **(2)** access to copy the Corresponding Source from a network server at no +charge. +* **c)** Convey individual copies of the object code with a copy of the written offer to +provide the Corresponding Source. This alternative is allowed only occasionally and +noncommercially, and only if you received the object code with such an offer, in +accord with subsection 6b. +* **d)** Convey the object code by offering access from a designated place (gratis or for +a charge), and offer equivalent access to the Corresponding Source in the same way +through the same place at no further charge. You need not require recipients to copy +the Corresponding Source along with the object code. If the place to copy the object +code is a network server, the Corresponding Source may be on a different server +(operated by you or a third party) that supports equivalent copying facilities, +provided you maintain clear directions next to the object code saying where to find +the Corresponding Source. Regardless of what server hosts the Corresponding Source, +you remain obligated to ensure that it is available for as long as needed to satisfy +these requirements. +* **e)** Convey the object code using peer-to-peer transmission, provided you inform +other peers where the object code and Corresponding Source of the work are being +offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the +Corresponding Source as a System Library, need not be included in conveying the +object code work. + +A “User Product” is either **(1)** a “consumer product”, which +means any tangible personal property which is normally used for personal, family, or +household purposes, or **(2)** anything designed or sold for incorporation into a +dwelling. In determining whether a product is a consumer product, doubtful cases +shall be resolved in favor of coverage. For a particular product received by a +particular user, “normally used” refers to a typical or common use of +that class of product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected to use, the +product. A product is a consumer product regardless of whether the product has +substantial commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, +procedures, authorization keys, or other information required to install and execute +modified versions of a covered work in that User Product from a modified version of +its Corresponding Source. The information must suffice to ensure that the continued +functioning of the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for +use in, a User Product, and the conveying occurs as part of a transaction in which +the right of possession and use of the User Product is transferred to the recipient +in perpetuity or for a fixed term (regardless of how the transaction is +characterized), the Corresponding Source conveyed under this section must be +accompanied by the Installation Information. But this requirement does not apply if +neither you nor any third party retains the ability to install modified object code +on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to +continue to provide support service, warranty, or updates for a work that has been +modified or installed by the recipient, or for the User Product in which it has been +modified or installed. Access to a network may be denied when the modification itself +materially and adversely affects the operation of the network or violates the rules +and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with +this section must be in a format that is publicly documented (and with an +implementation available to the public in source code form), and must require no +special password or key for unpacking, reading or copying. + +### 7. Additional Terms + +“Additional permissions” are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. Additional +permissions that are applicable to the entire Program shall be treated as though they +were included in this License, to the extent that they are valid under applicable +law. If additional permissions apply only to part of the Program, that part may be +used separately under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any +additional permissions from that copy, or from any part of it. (Additional +permissions may be written to require their own removal in certain cases when you +modify the work.) You may place additional permissions on material, added by you to a +covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a +covered work, you may (if authorized by the copyright holders of that material) +supplement the terms of this License with terms: + +* **a)** Disclaiming warranty or limiting liability differently from the terms of +sections 15 and 16 of this License; or +* **b)** Requiring preservation of specified reasonable legal notices or author +attributions in that material or in the Appropriate Legal Notices displayed by works +containing it; or +* **c)** Prohibiting misrepresentation of the origin of that material, or requiring that +modified versions of such material be marked in reasonable ways as different from the +original version; or +* **d)** Limiting the use for publicity purposes of names of licensors or authors of the +material; or +* **e)** Declining to grant rights under trademark law for use of some trade names, +trademarks, or service marks; or +* **f)** Requiring indemnification of licensors and authors of that material by anyone +who conveys the material (or modified versions of it) with contractual assumptions of +liability to the recipient, for any liability that these contractual assumptions +directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further +restrictions” within the meaning of section 10. If the Program as you received +it, or any part of it, contains a notice stating that it is governed by this License +along with a term that is a further restriction, you may remove that term. If a +license document contains a further restriction but permits relicensing or conveying +under this License, you may add to a covered work material governed by the terms of +that license document, provided that the further restriction does not survive such +relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in +the relevant source files, a statement of the additional terms that apply to those +files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a +separately written license, or stated as exceptions; the above requirements apply +either way. + +### 8. Termination + +You may not propagate or modify a covered work except as expressly provided under +this License. Any attempt otherwise to propagate or modify it is void, and will +automatically terminate your rights under this License (including any patent licenses +granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a +particular copyright holder is reinstated **(a)** provisionally, unless and until the +copyright holder explicitly and finally terminates your license, and **(b)** permanently, +if the copyright holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently +if the copyright holder notifies you of the violation by some reasonable means, this +is the first time you have received notice of violation of this License (for any +work) from that copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of +parties who have received copies or rights from you under this License. If your +rights have been terminated and not permanently reinstated, you do not qualify to +receive new licenses for the same material under section 10. + +### 9. Acceptance Not Required for Having Copies + +You are not required to accept this License in order to receive or run a copy of the +Program. Ancillary propagation of a covered work occurring solely as a consequence of +using peer-to-peer transmission to receive a copy likewise does not require +acceptance. However, nothing other than this License grants you permission to +propagate or modify any covered work. These actions infringe copyright if you do not +accept this License. Therefore, by modifying or propagating a covered work, you +indicate your acceptance of this License to do so. + +### 10. Automatic Licensing of Downstream Recipients + +Each time you convey a covered work, the recipient automatically receives a license +from the original licensors, to run, modify and propagate that work, subject to this +License. You are not responsible for enforcing compliance by third parties with this +License. + +An “entity transaction” is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an organization, or +merging organizations. If propagation of a covered work results from an entity +transaction, each party to that transaction who receives a copy of the work also +receives whatever licenses to the work the party's predecessor in interest had or +could give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if the predecessor +has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or +affirmed under this License. For example, you may not impose a license fee, royalty, +or other charge for exercise of rights granted under this License, and you may not +initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging +that any patent claim is infringed by making, using, selling, offering for sale, or +importing the Program or any portion of it. + +### 11. Patents + +A “contributor” is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The work thus +licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or +controlled by the contributor, whether already acquired or hereafter acquired, that +would be infringed by some manner, permitted by this License, of making, using, or +selling its contributor version, but do not include claims that would be infringed +only as a consequence of further modification of the contributor version. For +purposes of this definition, “control” includes the right to grant patent +sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license +under the contributor's essential patent claims, to make, use, sell, offer for sale, +import and otherwise run, modify and propagate the contents of its contributor +version. + +In the following three paragraphs, a “patent license” is any express +agreement or commitment, however denominated, not to enforce a patent (such as an +express permission to practice a patent or covenant not to sue for patent +infringement). To “grant” such a patent license to a party means to make +such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the +Corresponding Source of the work is not available for anyone to copy, free of charge +and under the terms of this License, through a publicly available network server or +other readily accessible means, then you must either **(1)** cause the Corresponding +Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the +patent license for this particular work, or **(3)** arrange, in a manner consistent with +the requirements of this License, to extend the patent license to downstream +recipients. “Knowingly relying” means you have actual knowledge that, but +for the patent license, your conveying the covered work in a country, or your +recipient's use of the covered work in a country, would infringe one or more +identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you +convey, or propagate by procuring conveyance of, a covered work, and grant a patent +license to some of the parties receiving the covered work authorizing them to use, +propagate, modify or convey a specific copy of the covered work, then the patent +license you grant is automatically extended to all recipients of the covered work and +works based on it. + +A patent license is “discriminatory” if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on the +non-exercise of one or more of the rights that are specifically granted under this +License. You may not convey a covered work if you are a party to an arrangement with +a third party that is in the business of distributing software, under which you make +payment to the third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties who would receive +the covered work from you, a discriminatory patent license **(a)** in connection with +copies of the covered work conveyed by you (or copies made from those copies), or **(b)** +primarily for and in connection with specific products or compilations that contain +the covered work, unless you entered into that arrangement, or that patent license +was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied +license or other defenses to infringement that may otherwise be available to you +under applicable patent law. + +### 12. No Surrender of Others' Freedom + +If conditions are imposed on you (whether by court order, agreement or otherwise) +that contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot convey a covered work so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not convey it at all. For example, if you +agree to terms that obligate you to collect a royalty for further conveying from +those to whom you convey the Program, the only way you could satisfy both those terms +and this License would be to refrain entirely from conveying the Program. + +### 13. Use with the GNU Affero General Public License + +Notwithstanding any other provision of this License, you have permission to link or +combine any covered work with a work licensed under version 3 of the GNU Affero +General Public License into a single combined work, and to convey the resulting work. +The terms of this License will continue to apply to the part which is the covered +work, but the special requirements of the GNU Affero General Public License, section +13, concerning interaction through a network will apply to the combination as such. + +### 14. Revised Versions of this License + +The Free Software Foundation may publish revised and/or new versions of the GNU +General Public License from time to time. Such new versions will be similar in spirit +to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that +a certain numbered version of the GNU General Public License “or any later +version” applies to it, you have the option of following the terms and +conditions either of that numbered version or of any later version published by the +Free Software Foundation. If the Program does not specify a version number of the GNU +General Public License, you may choose any version ever published by the Free +Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU +General Public License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no +additional obligations are imposed on any author or copyright holder as a result of +your choosing to follow a later version. + +### 15. Disclaimer of Warranty + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE +QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +### 16. Limitation of Liability + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY +COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS +PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, +INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE +OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE +WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +### 17. Interpretation of Sections 15 and 16 + +If the disclaimer of warranty and limitation of liability provided above cannot be +given local legal effect according to their terms, reviewing courts shall apply local +law that most closely approximates an absolute waiver of all civil liability in +connection with the Program, unless a warranty or assumption of liability accompanies +a copy of the Program in return for a fee. + +_END OF TERMS AND CONDITIONS_ + +## How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to +the public, the best way to achieve this is to make it free software which everyone +can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them +to the start of each source file to most effectively state the exclusion of warranty; +and each file should have at least the “copyright” line and a pointer to +where the full notice is found. + + + Copyright (C) + + This program 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. + + This program 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 this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this +when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type 'show c' for details. + +The hypothetical commands `show w` and `show c` should show the appropriate parts of +the General Public License. Of course, your program's commands might be different; +for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to +sign a “copyright disclaimer” for the program, if necessary. For more +information on this, and how to apply and follow the GNU GPL, see +<>. + +The GNU General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may consider it +more useful to permit linking proprietary applications with the library. If this is +what you want to do, use the GNU Lesser General Public License instead of this +License. But first, please read +<>. diff --git a/compiler/span/README.md b/compiler/span/README.md new file mode 100644 index 0000000000..a024e0a33f --- /dev/null +++ b/compiler/span/README.md @@ -0,0 +1,9 @@ +# leo-span + +[![Crates.io](https://img.shields.io/crates/v/leo-ast.svg?color=neon)](https://crates.io/crates/leo-span) +[![Authors](https://img.shields.io/badge/authors-Aleo-orange.svg)](../AUTHORS) +[![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](./LICENSE.md) + +## Usage + +A span implementation for tracking Leo code locations across multiple Leo compiler phases. \ No newline at end of file diff --git a/leo/README.md b/leo/README.md index ee5fca0446..551c4c0c71 100644 --- a/leo/README.md +++ b/leo/README.md @@ -3,5 +3,4 @@ This directory contains the source code for the Leo command line interface. For a comprehensive list of commands and usage see the [developer documentation](https://developer.aleo.org/developer/cli/overview). -The `leo-errors` and `leo-package` modules are also included in this directory for convenience. -However, they are also used throughout the `compiler/` directory and `leo-compiler` module. \ No newline at end of file +The `leo-package` module is also included in this directory for convenience. From c0e968206b7b1c56abe7f70a662ed03fc05991ef Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 18:30:55 -0700 Subject: [PATCH 32/43] fix examples --- .../src/code_generation/visit_program.rs | 2 +- errors/src/errors/cli/cli_errors.rs | 2 +- examples/helloworld/main.aleo | 7 +++ examples/helloworld/src/main.leo | 8 +-- examples/token/inputs/token.in | 1 - examples/token/main.aleo | 11 ++++ examples/token/src/main.leo | 51 ++----------------- 7 files changed, 30 insertions(+), 52 deletions(-) create mode 100644 examples/token/main.aleo diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs index 493570eca0..e09737b913 100644 --- a/compiler/passes/src/code_generation/visit_program.rs +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -23,7 +23,7 @@ use std::{collections::HashMap, fmt::Write as _}; impl<'a> CodeGenerator<'a> { pub(crate) fn visit_program(&mut self, input: &'a Program) -> String { - let mut program_string = format!("program {}.{};\n", input.name, input.network); + let mut program_string = format!("program {}.{};\n\n", input.name, input.network); // Visit each `Circuit` or `Record` in the Leo AST and produce a bytecode circuit. program_string.push_str( diff --git a/errors/src/errors/cli/cli_errors.rs b/errors/src/errors/cli/cli_errors.rs index 6495d7e0bf..80ccc3bb7c 100644 --- a/errors/src/errors/cli/cli_errors.rs +++ b/errors/src/errors/cli/cli_errors.rs @@ -411,7 +411,7 @@ create_messages!( @backtraced failed_to_load_instructions { args: (error: impl Display), - msg: format!("Failed to load compiled Aleo instructions into an Aleo file: {}", error), + msg: format!("Failed to load compiled Aleo instructions into an Aleo file:\n{}", error), help: Some("This is a Leo code generation bug. Please report it to https://github.com/AleoHQ/leo/issues/new/choose".to_string()), } diff --git a/examples/helloworld/main.aleo b/examples/helloworld/main.aleo index 88fd8a3f5b..8e1c38eb5a 100644 --- a/examples/helloworld/main.aleo +++ b/examples/helloworld/main.aleo @@ -1,5 +1,12 @@ program helloworld.aleo; + +function compute: + input r0 as u32.private; + input r1 as u32.private; + add r0 r1 into r2; + output r2 as u32.private; + function main: input r0 as u32.public; input r1 as u32.private; diff --git a/examples/helloworld/src/main.leo b/examples/helloworld/src/main.leo index 7ec442526d..2b19c5000a 100644 --- a/examples/helloworld/src/main.leo +++ b/examples/helloworld/src/main.leo @@ -1,5 +1,7 @@ // The 'helloworld' main function. -function main(public a: u32, b: u32) -> u32 { - let c: u32 = a + b; - return c; +function compute(a: u32, b: u32) -> u32 { + return a + b; } +function main(public a: u32, b: u32) -> u32 { + return a + b; +} \ No newline at end of file diff --git a/examples/token/inputs/token.in b/examples/token/inputs/token.in index 254046e373..2412f0fd04 100644 --- a/examples/token/inputs/token.in +++ b/examples/token/inputs/token.in @@ -1,4 +1,3 @@ // The program input for token/src/main.leo [main] a: u32 = 1u32; -b: u32 = 2u32; diff --git a/examples/token/main.aleo b/examples/token/main.aleo new file mode 100644 index 0000000000..8506bb974a --- /dev/null +++ b/examples/token/main.aleo @@ -0,0 +1,11 @@ +program token.aleo; + +record token: + owner as address.private; + balance as u64.private; + token_amount as u64.private; + +function compute: + input r0 as token.record; + add r0.token_amount r0.token_amount into r1; + output r1 as u64.private; diff --git a/examples/token/src/main.leo b/examples/token/src/main.leo index e1a1520fad..6d01f74284 100644 --- a/examples/token/src/main.leo +++ b/examples/token/src/main.leo @@ -1,50 +1,9 @@ -// CAUTION: Work in progress - record Token { - // The token owner. - owner: address, - // The Aleo balance (in gates). - balance: u64, - // The token amount. - amount: u64, + owner: address, + balance: u64, + token_amount: u64, } -circuit Receiver { - // The token owner. - owner: address, - // The token amount. - amount: u64, -} - -function mint(r0: address, r1: u64) -> Token { - let t: Token = Token { - owner: r0, - balance: 0u64, - amount: r1, - }; - return t; -} - -// The `transfer` function sends the specified number of tokens -// to the receiver from the provided token record. -function transfer(r0: Token, r1: Receiver) -> (Token, Token) { - // Checks the given token record has sufficient balance. - // This `sub` operation is safe, and the proof will fail - // if an overflow occurs. The output register `r2` holds - // the change amount to be returned to the sender. - let r2: u64 = r0.amount - r1.amount; - - // Calls the `mint` function to produce a token record - // for the specified receiver. - let r3: Token = mint(r1.owner, r1.amount); - - // Calls the `mint` function to produce a token record - // with the change amount for the sender. - let r4: Token = mint(r0.owner, r0.amount); - - return (r3, r4); -} - -function main() -> u8 { - return 1u8; +function compute(t: Token) -> u64 { + return t.token_amount + t.token_amount; } \ No newline at end of file From 6b561fc38f95f9570d8edefe88aa1ff5a9805ca9 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 18:50:38 -0700 Subject: [PATCH 33/43] store aleo instructions before parsing --- errors/src/errors/cli/cli_errors.rs | 2 +- leo/commands/build.rs | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/errors/src/errors/cli/cli_errors.rs b/errors/src/errors/cli/cli_errors.rs index 80ccc3bb7c..e04071bd19 100644 --- a/errors/src/errors/cli/cli_errors.rs +++ b/errors/src/errors/cli/cli_errors.rs @@ -412,7 +412,7 @@ create_messages!( failed_to_load_instructions { args: (error: impl Display), msg: format!("Failed to load compiled Aleo instructions into an Aleo file:\n{}", error), - help: Some("This is a Leo code generation bug. Please report it to https://github.com/AleoHQ/leo/issues/new/choose".to_string()), + help: Some("Generated Aleo instructions have been left in `main.aleo`".to_string()), } @backtraced diff --git a/leo/commands/build.rs b/leo/commands/build.rs index ce0cc754fd..ce24674041 100644 --- a/leo/commands/build.rs +++ b/leo/commands/build.rs @@ -27,7 +27,7 @@ use leo_package::{ use aleo::commands::Build as AleoBuild; use clap::StructOpt; -use std::str::FromStr; +use std::io::Write; use tracing::span::Span; /// Compiler Options wrapper for Build command. Also used by other commands which @@ -145,16 +145,26 @@ impl Command for Build { // Compile the Leo program into Aleo instructions. let (_, instructions) = program.compile_and_generate_instructions()?; - // Parse the generated Aleo instructions into an Aleo file. - let file = AleoFile::::from_str(&instructions).map_err(CliError::failed_to_load_instructions)?; + // // Parse the generated Aleo instructions into an Aleo file. + // let file = AleoFile::::from_str(&instructions).map_err(CliError::failed_to_load_instructions)?; + // + // // Create the path to the Aleo file. + // let mut aleo_file_path = package_path.clone(); + // aleo_file_path.push(AleoFile::::main_file_name()); + // + // // Write the Aleo file to `main.aleo`. + // file.write_to(&aleo_file_path) + // .map_err(|err| CliError::failed_to_write_to_aleo_file(aleo_file_path.display(), err))?; - // Create the path to the Aleo file. + // Create the path to the main Aleo file. let mut aleo_file_path = package_path.clone(); aleo_file_path.push(AleoFile::::main_file_name()); - // Write the Aleo file to `main.aleo`. - file.write_to(&aleo_file_path) - .map_err(|err| CliError::failed_to_write_to_aleo_file(aleo_file_path.display(), err))?; + // Write the instructions. + std::fs::File::create(&aleo_file_path) + .map_err(CliError::failed_to_load_instructions)? + .write_all(instructions.as_bytes()) + .map_err(CliError::failed_to_load_instructions)?; // Call the `aleo build` command from the Aleo SDK. let res = AleoBuild.parse().map_err(CliError::failed_to_execute_aleo_build)?; From 3d9c8dd0e4eef06386802e2a105cad4cd895dc3b Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 21:43:19 -0700 Subject: [PATCH 34/43] add more examples, fix circuits as input --- compiler/ast/src/expressions/circuit_init.rs | 24 +++++++++++++------ compiler/ast/src/expressions/literal.rs | 6 ++--- compiler/parser/src/parser/expression.rs | 8 ++++++- compiler/parser/src/parser/input.rs | 2 +- .../src/code_generation/visit_program.rs | 2 +- examples/message/.gitignore | 2 ++ examples/message/README.md | 6 +++++ examples/message/inputs/message.in | 3 +++ examples/message/main.aleo | 9 +++++++ examples/message/program.json | 10 ++++++++ examples/message/src/main.leo | 9 +++++++ examples/token/inputs/token.in | 6 ++++- examples/token/main.aleo | 3 +-- examples/token/src/main.leo | 2 +- 14 files changed, 75 insertions(+), 17 deletions(-) create mode 100644 examples/message/.gitignore create mode 100644 examples/message/README.md create mode 100644 examples/message/inputs/message.in create mode 100644 examples/message/main.aleo create mode 100644 examples/message/program.json create mode 100644 examples/message/src/main.leo diff --git a/compiler/ast/src/expressions/circuit_init.rs b/compiler/ast/src/expressions/circuit_init.rs index 81e8fec94f..1b3c7e8a3d 100644 --- a/compiler/ast/src/expressions/circuit_init.rs +++ b/compiler/ast/src/expressions/circuit_init.rs @@ -24,12 +24,19 @@ pub struct CircuitVariableInitializer { /// The expression to initialize the field with. /// When `None`, a binding, in scope, with the name will be used instead. pub expression: Option, + /// `true` if the circuit is a `record` type. + pub is_record: bool, } impl fmt::Display for CircuitVariableInitializer { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if let Some(expr) = &self.expression { - write!(f, "{}: {}", self.identifier, expr) + write!(f, "{}: {}", self.identifier, expr)?; + if self.is_record { + write!(f, "private") + } else { + write!(f, "") + } } else { write!(f, "{}", self.identifier) } @@ -52,12 +59,15 @@ pub struct CircuitExpression { impl fmt::Display for CircuitExpression { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{} {{ ", self.name)?; - for member in self.members.iter() { - write!(f, "{}", member)?; - write!(f, ", ")?; - } - write!(f, "}}") + write!( + f, + "{{{}}}", + self.members + .iter() + .map(|x| x.to_string()) + .collect::>() + .join(", ") + ) } } diff --git a/compiler/ast/src/expressions/literal.rs b/compiler/ast/src/expressions/literal.rs index 9353e338fd..11c9482a05 100644 --- a/compiler/ast/src/expressions/literal.rs +++ b/compiler/ast/src/expressions/literal.rs @@ -46,10 +46,10 @@ impl fmt::Display for Literal { match &self { Self::Address(address, _) => write!(f, "{}", address), Self::Boolean(boolean, _) => write!(f, "{}", boolean), - Self::Field(field, _) => write!(f, "{}", field), - Self::Group(group) => write!(f, "{}", group), + Self::Field(field, _) => write!(f, "{}field", field), + Self::Group(group) => write!(f, "{}group", group), Self::Integer(type_, value, _) => write!(f, "{}{}", value, type_), - Self::Scalar(scalar, _) => write!(f, "{}", scalar), + Self::Scalar(scalar, _) => write!(f, "{}scalar", scalar), Self::String(string, _) => write!(f, "{}", string), } } diff --git a/compiler/parser/src/parser/expression.rs b/compiler/parser/src/parser/expression.rs index b83e9fa8b4..6a7e51a889 100644 --- a/compiler/parser/src/parser/expression.rs +++ b/compiler/parser/src/parser/expression.rs @@ -467,7 +467,13 @@ impl ParserContext<'_> { None }; - Ok(CircuitVariableInitializer { identifier, expression }) + let is_record = identifier.to_string().eq("Record"); + + Ok(CircuitVariableInitializer { + identifier, + expression, + is_record, + }) } /// Returns an [`Expression`] AST node if the next tokens represent a diff --git a/compiler/parser/src/parser/input.rs b/compiler/parser/src/parser/input.rs index f56baf0575..2437e683fb 100644 --- a/compiler/parser/src/parser/input.rs +++ b/compiler/parser/src/parser/input.rs @@ -65,7 +65,7 @@ impl ParserContext<'_> { let name = self.expect_identifier()?; self.expect(&Token::Colon)?; - let (type_, span) = self.parse_non_ident_types()?; + let (type_, span) = self.parse_single_type()?; self.expect(&Token::Assign)?; let value = self.parse_unary_expression()?; self.expect(&Token::Semicolon)?; diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs index e09737b913..493570eca0 100644 --- a/compiler/passes/src/code_generation/visit_program.rs +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -23,7 +23,7 @@ use std::{collections::HashMap, fmt::Write as _}; impl<'a> CodeGenerator<'a> { pub(crate) fn visit_program(&mut self, input: &'a Program) -> String { - let mut program_string = format!("program {}.{};\n\n", input.name, input.network); + let mut program_string = format!("program {}.{};\n", input.name, input.network); // Visit each `Circuit` or `Record` in the Leo AST and produce a bytecode circuit. program_string.push_str( diff --git a/examples/message/.gitignore b/examples/message/.gitignore new file mode 100644 index 0000000000..b28696155d --- /dev/null +++ b/examples/message/.gitignore @@ -0,0 +1,2 @@ +outputs/ +build/ diff --git a/examples/message/README.md b/examples/message/README.md new file mode 100644 index 0000000000..137165b8bd --- /dev/null +++ b/examples/message/README.md @@ -0,0 +1,6 @@ +# message.aleo +## Build Guide +To compile this Aleo program, run: +```bash +aleo build +``` diff --git a/examples/message/inputs/message.in b/examples/message/inputs/message.in new file mode 100644 index 0000000000..de962c0fc4 --- /dev/null +++ b/examples/message/inputs/message.in @@ -0,0 +1,3 @@ +// The program input for message/src/main.leo +[main] +a: Message = Message { first: 2field, second: 3field}; diff --git a/examples/message/main.aleo b/examples/message/main.aleo new file mode 100644 index 0000000000..1f7a65133b --- /dev/null +++ b/examples/message/main.aleo @@ -0,0 +1,9 @@ +program message.aleo; +interface message: + first as field; + second as field; + +function main: + input r0 as message.private; + add r0.first r0.second into r1; + output r1 as field.private; diff --git a/examples/message/program.json b/examples/message/program.json new file mode 100644 index 0000000000..86a7c50158 --- /dev/null +++ b/examples/message/program.json @@ -0,0 +1,10 @@ +{ + "program": "message.aleo", + "version": "0.0.0", + "description": "", + "development": { + "private_key": "APrivateKey1zkp4YvAU9D17zZDxrt6WKE2wVrNGgfqheLVXqJ6WZADtKS1", + "address": "aleo1fw4xmr8yv88scg20gmzqn2t7ye22wqk2rq22d2ayq6j952v0n5psw7ztqp" + }, + "license": "MIT" +} diff --git a/examples/message/src/main.leo b/examples/message/src/main.leo new file mode 100644 index 0000000000..129bf5f99c --- /dev/null +++ b/examples/message/src/main.leo @@ -0,0 +1,9 @@ +// The 'message' main function. +circuit Message { + first: field, + second: field, +} + +function main(m: Message) -> field { + return m.first + m.second; +} diff --git a/examples/token/inputs/token.in b/examples/token/inputs/token.in index 2412f0fd04..d6d7b113c7 100644 --- a/examples/token/inputs/token.in +++ b/examples/token/inputs/token.in @@ -1,3 +1,7 @@ // The program input for token/src/main.leo [main] -a: u32 = 1u32; +a: Record = Record { + owner: aleo1d5hg2z3ma00382pngntdp68e74zv54jdxy249qhaujhks9c72yrs33ddah, + balance: 5u64, + token_amount: 100u64 +}; diff --git a/examples/token/main.aleo b/examples/token/main.aleo index 8506bb974a..79a5bd23f8 100644 --- a/examples/token/main.aleo +++ b/examples/token/main.aleo @@ -1,11 +1,10 @@ program token.aleo; - record token: owner as address.private; balance as u64.private; token_amount as u64.private; -function compute: +function main: input r0 as token.record; add r0.token_amount r0.token_amount into r1; output r1 as u64.private; diff --git a/examples/token/src/main.leo b/examples/token/src/main.leo index 6d01f74284..40e93ab1fd 100644 --- a/examples/token/src/main.leo +++ b/examples/token/src/main.leo @@ -4,6 +4,6 @@ record Token { token_amount: u64, } -function compute(t: Token) -> u64 { +function main(t: Token) -> u64 { return t.token_amount + t.token_amount; } \ No newline at end of file From d7efc2ddb6cd2a41c26cfebbbd8d0ee77f0b66e0 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 21:44:26 -0700 Subject: [PATCH 35/43] regen tests --- tests/expectations/compiler/compiler/circuits/inline.out | 2 +- .../expectations/compiler/compiler/circuits/member_variable.out | 2 +- .../expectations/compiler/compiler/records/init_expression.out | 2 +- .../compiler/compiler/records/init_expression_shorthand.out | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/expectations/compiler/compiler/circuits/inline.out b/tests/expectations/compiler/compiler/circuits/inline.out index 872a2d787a..5d559fe7b7 100644 --- a/tests/expectations/compiler/compiler/circuits/inline.out +++ b/tests/expectations/compiler/compiler/circuits/inline.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 1f1764005f0d7fa538fdb17d09a1bd5cb92eba8a613ea23173859200a4dd7183 + initial_ast: 0bf2ef7cbe1a1be5be8fc3bd86184d0146aca6dc912f601a5a0edf7c0f9fc1b9 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.out b/tests/expectations/compiler/compiler/circuits/member_variable.out index 5421281620..4a05759aa8 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 29f6139d908d390f890f04d8ee620757d29b7f71cd48c46ff65bc1e70aae840c - initial_ast: 16404e55f68744b4439f4c0d315f7c47a426542544aef23d8ba990499cba6e0a + initial_ast: a1d6a956de7f4d92fc24b3e247a6260b16455e8422b4ae191225fb806bf5a3b0 diff --git a/tests/expectations/compiler/compiler/records/init_expression.out b/tests/expectations/compiler/compiler/records/init_expression.out index b7e6fc8f51..b058c04ce7 100644 --- a/tests/expectations/compiler/compiler/records/init_expression.out +++ b/tests/expectations/compiler/compiler/records/init_expression.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 672d31f98d7d1a61d0ffa0ce364b7df84e03e1e769fad9f14c3a45e66f8654d0 + initial_ast: 70ae890af829797f2ded03a335fae82ebb98a8de40bfe61825ae45cc67726864 diff --git a/tests/expectations/compiler/compiler/records/init_expression_shorthand.out b/tests/expectations/compiler/compiler/records/init_expression_shorthand.out index b61b75211e..84191d0e32 100644 --- a/tests/expectations/compiler/compiler/records/init_expression_shorthand.out +++ b/tests/expectations/compiler/compiler/records/init_expression_shorthand.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 78f8fddf1f1afd737f3fe14e30f5b260ec20da6c41f9c224c432b0a35c6bef28 + initial_ast: 52292ed69c78e23c6463979d92756c37710f6f82d3a50ac5faef0300030b6042 From 0bd0aed08977b69917a728dd5b4c59ea3ab1cc23 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 22:13:54 -0700 Subject: [PATCH 36/43] update error logging --- errors/src/errors/cli/cli_errors.rs | 14 +++++++------- examples/helloworld/main.aleo | 1 - examples/message/main.aleo | 1 + examples/token/main.aleo | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/errors/src/errors/cli/cli_errors.rs b/errors/src/errors/cli/cli_errors.rs index e04071bd19..a6146d1328 100644 --- a/errors/src/errors/cli/cli_errors.rs +++ b/errors/src/errors/cli/cli_errors.rs @@ -411,49 +411,49 @@ create_messages!( @backtraced failed_to_load_instructions { args: (error: impl Display), - msg: format!("Failed to load compiled Aleo instructions into an Aleo file:\n{}", error), + msg: format!("Failed to load compiled Aleo instructions into an Aleo file.\nSnarkVM Error: {}", error), help: Some("Generated Aleo instructions have been left in `main.aleo`".to_string()), } @backtraced failed_to_write_to_aleo_file { args: (path: impl Display, error: impl Display), - msg: format!("Failed to write to the Aleo file at `{}`. Error: {}", path, error), + msg: format!("Failed to write to the Aleo file at `{}`.\nSnarkVM Error: {}", path, error), help: None, } @backtraced failed_to_execute_aleo_build { args: (error: impl Display), - msg: format!("Failed to execute the `aleo build` command. Error: {}", error), + msg: format!("Failed to execute the `aleo build` command.\nSnarkVM Error: {}", error), help: None, } @backtraced failed_to_execute_aleo_new { args: (error: impl Display), - msg: format!("Failed to execute the `aleo new` command. Error: {}", error), + msg: format!("Failed to execute the `aleo new` command.\nSnarkVM Error: {}", error), help: None, } @backtraced failed_to_execute_aleo_run { args: (error: impl Display), - msg: format!("Failed to execute the `aleo run` command. Error: {}", error), + msg: format!("Failed to execute the `aleo run` command.\nSnarkVM Error: {}", error), help: None, } @backtraced failed_to_parse_aleo_new { args: (error: impl Display), - msg: format!("Failed to parse the `aleo new` command. Error: {}", error), + msg: format!("Failed to parse the `aleo new` command.\nSnarkVM Error: {}", error), help: None, } @backtraced failed_to_parse_aleo_run { args: (error: impl Display), - msg: format!("Failed to parse the `aleo run` command. Error: {}", error), + msg: format!("Failed to parse the `aleo run` command.\nSnarkVM Error: {}", error), help: None, } ); diff --git a/examples/helloworld/main.aleo b/examples/helloworld/main.aleo index 8e1c38eb5a..464c691e96 100644 --- a/examples/helloworld/main.aleo +++ b/examples/helloworld/main.aleo @@ -1,6 +1,5 @@ program helloworld.aleo; - function compute: input r0 as u32.private; input r1 as u32.private; diff --git a/examples/message/main.aleo b/examples/message/main.aleo index 1f7a65133b..55b3c611b1 100644 --- a/examples/message/main.aleo +++ b/examples/message/main.aleo @@ -1,4 +1,5 @@ program message.aleo; + interface message: first as field; second as field; diff --git a/examples/token/main.aleo b/examples/token/main.aleo index 79a5bd23f8..038567f3ab 100644 --- a/examples/token/main.aleo +++ b/examples/token/main.aleo @@ -7,4 +7,4 @@ record token: function main: input r0 as token.record; add r0.token_amount r0.token_amount into r1; - output r1 as u64.private; + output r1 as field.private; From d151401385c1883d355e99b98bcc526523ab5926 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Tue, 12 Jul 2022 22:52:56 -0700 Subject: [PATCH 37/43] indexmap over hashmap --- compiler/passes/src/code_generation/generator.rs | 10 +++++----- compiler/passes/src/code_generation/visit_program.rs | 5 +++-- examples/helloworld/src/main.leo | 3 --- examples/message/inputs/message.in | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/compiler/passes/src/code_generation/generator.rs b/compiler/passes/src/code_generation/generator.rs index 2d8addd29a..2980b70149 100644 --- a/compiler/passes/src/code_generation/generator.rs +++ b/compiler/passes/src/code_generation/generator.rs @@ -18,7 +18,7 @@ use leo_ast::Function; use leo_errors::emitter::Handler; use leo_span::Symbol; -use std::collections::HashMap; +use indexmap::IndexMap; pub struct CodeGenerator<'a> { _handler: &'a Handler, @@ -27,9 +27,9 @@ pub struct CodeGenerator<'a> { /// Reference to the current function. pub(crate) current_function: Option<&'a Function>, /// Mapping of variables to registers. - pub(crate) variable_mapping: HashMap<&'a Symbol, String>, + pub(crate) variable_mapping: IndexMap<&'a Symbol, String>, /// Mapping of composite names to type (`circuit` or `register`). - pub(crate) composite_mapping: HashMap<&'a Symbol, String>, + pub(crate) composite_mapping: IndexMap<&'a Symbol, String>, } impl<'a> CodeGenerator<'a> { @@ -39,8 +39,8 @@ impl<'a> CodeGenerator<'a> { _handler: handler, next_register: 0, current_function: None, - variable_mapping: HashMap::new(), - composite_mapping: HashMap::new(), + variable_mapping: IndexMap::new(), + composite_mapping: IndexMap::new(), } } } diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs index 493570eca0..85d0244aa7 100644 --- a/compiler/passes/src/code_generation/visit_program.rs +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -18,8 +18,9 @@ use crate::CodeGenerator; use leo_ast::{Circuit, CircuitMember, Function, Program}; +use indexmap::IndexMap; use itertools::Itertools; -use std::{collections::HashMap, fmt::Write as _}; +use std::fmt::Write as _; impl<'a> CodeGenerator<'a> { pub(crate) fn visit_program(&mut self, input: &'a Program) -> String { @@ -103,7 +104,7 @@ impl<'a> CodeGenerator<'a> { fn visit_function(&mut self, function: &'a Function) -> String { // Initialize the state of `self` with the appropriate values before visiting `function`. self.next_register = 0; - self.variable_mapping = HashMap::new(); + self.variable_mapping = IndexMap::new(); self.current_function = Some(function); // Construct the header of the function. diff --git a/examples/helloworld/src/main.leo b/examples/helloworld/src/main.leo index 2b19c5000a..09ba46e0ac 100644 --- a/examples/helloworld/src/main.leo +++ b/examples/helloworld/src/main.leo @@ -1,7 +1,4 @@ // The 'helloworld' main function. -function compute(a: u32, b: u32) -> u32 { - return a + b; -} function main(public a: u32, b: u32) -> u32 { return a + b; } \ No newline at end of file diff --git a/examples/message/inputs/message.in b/examples/message/inputs/message.in index de962c0fc4..83df037171 100644 --- a/examples/message/inputs/message.in +++ b/examples/message/inputs/message.in @@ -1,3 +1,3 @@ // The program input for message/src/main.leo [main] -a: Message = Message { first: 2field, second: 3field}; +a: Message = Message { first: 2field, second: 3field }; From 13b9261063326ba60cdc4bbf448f3a0744f58506 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 13 Jul 2022 14:13:30 -0700 Subject: [PATCH 38/43] bump revs, fix cast instruction --- Cargo.lock | 1132 +++++++++-------- Cargo.toml | 4 +- .../src/code_generation/visit_expressions.rs | 4 +- examples/helloworld/main.aleo | 6 - examples/message/main.aleo | 6 +- examples/message/src/main.leo | 6 +- examples/token/main.aleo | 2 +- 7 files changed, 583 insertions(+), 577 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ea219a1f1..bae1e2cc17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,7 +71,7 @@ dependencies = [ [[package]] name = "aleo" version = "0.2.0" -source = "git+https://github.com/AleoHQ/aleo.git?rev=a0895e0#a0895e0f1b1d4ceb78199dec5439425e7abb0b53" +source = "git+https://github.com/AleoHQ/aleo.git?rev=02db93e#02db93e6e60d27a05178183e5b4a2a74495dc5e7" dependencies = [ "anyhow", "clap 3.2.8", @@ -79,7 +79,7 @@ dependencies = [ "rand", "rand_chacha", "self_update 0.28.0", - "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", "thiserror", ] @@ -1230,7 +1230,7 @@ dependencies = [ "self_update 0.30.0", "serde", "serde_json", - "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", "sys-info", "test_dir", "toml", @@ -2259,17 +2259,20 @@ dependencies = [ [[package]] name = "snarkvm" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "anyhow", "clap 3.2.8", "colored", "rand", + "rayon", "self_update 0.30.0", "serde_json", - "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", "thiserror", "walkdir", ] @@ -2277,21 +2280,94 @@ dependencies = [ [[package]] name = "snarkvm" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "anyhow", "clap 3.2.8", "colored", "rand", + "rayon", "self_update 0.30.0", "serde_json", - "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-compiler 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", "thiserror", "walkdir", ] +[[package]] +name = "snarkvm-algorithms" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "blake2s_simd", + "crossbeam-channel", + "curl", + "derivative", + "digest", + "hashbrown", + "hex", + "itertools", + "lazy_static", + "num_cpus", + "once_cell", + "parking_lot", + "rand", + "rand_chacha", + "rand_core", + "rayon", + "serde", + "sha2", + "smallvec", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "thiserror", +] + +[[package]] +name = "snarkvm-algorithms" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "blake2s_simd", + "crossbeam-channel", + "curl", + "derivative", + "digest", + "hashbrown", + "hex", + "itertools", + "lazy_static", + "num_cpus", + "once_cell", + "parking_lot", + "rand", + "rand_chacha", + "rand_core", + "rayon", + "serde", + "sha2", + "smallvec", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "thiserror", +] + [[package]] name = "snarkvm-algorithms" version = "0.7.5" @@ -2327,451 +2403,381 @@ dependencies = [ ] [[package]] -name = "snarkvm-algorithms" +name = "snarkvm-circuit" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "aleo-std", - "anyhow", - "bincode", - "blake2s_simd", - "crossbeam-channel", - "curl", - "derivative", - "digest", - "hashbrown", - "hex", - "itertools", - "lazy_static", - "num_cpus", - "once_cell", - "parking_lot", - "rand", - "rand_chacha", - "rand_core", - "rayon", - "serde", - "sha2", - "smallvec", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "thiserror", -] - -[[package]] -name = "snarkvm-algorithms" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" -dependencies = [ - "aleo-std", - "anyhow", - "bincode", - "blake2s_simd", - "crossbeam-channel", - "curl", - "derivative", - "digest", - "hashbrown", - "hex", - "itertools", - "lazy_static", - "num_cpus", - "once_cell", - "parking_lot", - "rand", - "rand_chacha", - "rand_core", - "rayon", - "serde", - "sha2", - "smallvec", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-parameters 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "thiserror", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", -] - -[[package]] -name = "snarkvm-circuit" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" -dependencies = [ - "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-collections" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-collections" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-environment" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "indexmap", "itertools", "nom", "num-traits", "once_cell", - "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-environment" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "indexmap", "itertools", "nom", "num-traits", "once_cell", - "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment-witness 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-r1cs 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-environment-witness" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" [[package]] name = "snarkvm-circuit-environment-witness" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" [[package]] name = "snarkvm-circuit-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-types" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-types" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-types-address" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-types-address" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-types-boolean" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-types-boolean" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-types-field" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-types-field" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-types-group" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-types-group" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-types-integers" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-types-integers" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-types-scalar" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-types-scalar" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-circuit-types-string" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-circuit-types-string" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-circuit-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-compiler" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "anyhow", "colored", @@ -2780,20 +2786,21 @@ dependencies = [ "parking_lot", "paste", "rand", + "rayon", "serde_json", - "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", "tracing", ] [[package]] name = "snarkvm-compiler" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "anyhow", "colored", @@ -2802,148 +2809,149 @@ dependencies = [ "parking_lot", "paste", "rand", + "rayon", "serde_json", - "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-circuit 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", "tracing", ] [[package]] name = "snarkvm-console" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-program 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "base58", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-account" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "base58", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "blake2s_simd", "smallvec", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "blake2s_simd", "smallvec", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-collections" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "aleo-std", "rayon", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-collections" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "aleo-std", "rayon", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "anyhow", "itertools", "lazy_static", "serde", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-network" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "anyhow", "itertools", "lazy_static", "serde", - "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-algorithms 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-collections 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-network-environment" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "anyhow", "bech32 0.9.0", @@ -2953,15 +2961,15 @@ dependencies = [ "rand", "rand_xorshift", "serde", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-network-environment" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "anyhow", "bech32 0.9.0", @@ -2971,15 +2979,15 @@ dependencies = [ "rand", "rand_xorshift", "serde", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "enum_index", "enum_index_derive", @@ -2987,15 +2995,15 @@ dependencies = [ "num-derive", "num-traits", "once_cell", - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-program" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ "enum_index", "enum_index_derive", @@ -3003,179 +3011,207 @@ dependencies = [ "num-derive", "num-traits", "once_cell", - "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-account 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-network 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-types" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-types" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-address 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-string 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-types-address" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-types-address" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-group 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-types-boolean" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-types-boolean" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-types-field" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-types-field" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-types-group" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-types-group" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-scalar 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-types-integers" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-types-integers" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-types-scalar" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-types-scalar" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", ] [[package]] name = "snarkvm-console-types-string" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", ] [[package]] name = "snarkvm-console-types-string" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-console-network-environment 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-boolean 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-field 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-console-types-integers 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", +] + +[[package]] +name = "snarkvm-curves" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" +dependencies = [ + "derivative", + "rand", + "rustc_version", + "serde", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "thiserror", +] + +[[package]] +name = "snarkvm-curves" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" +dependencies = [ + "derivative", + "rand", + "rustc_version", + "serde", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "thiserror", ] [[package]] @@ -3192,34 +3228,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "snarkvm-curves" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" -dependencies = [ - "derivative", - "rand", - "rustc_version", - "serde", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "thiserror", -] - -[[package]] -name = "snarkvm-curves" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" -dependencies = [ - "derivative", - "rand", - "rustc_version", - "serde", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "thiserror", -] - [[package]] name = "snarkvm-dpc" version = "0.7.5" @@ -3249,6 +3257,36 @@ dependencies = [ "time", ] +[[package]] +name = "snarkvm-fields" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" +dependencies = [ + "anyhow", + "derivative", + "num-traits", + "rand", + "rayon", + "serde", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "thiserror", +] + +[[package]] +name = "snarkvm-fields" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" +dependencies = [ + "anyhow", + "derivative", + "num-traits", + "rand", + "rayon", + "serde", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "thiserror", +] + [[package]] name = "snarkvm-fields" version = "0.7.5" @@ -3263,36 +3301,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "snarkvm-fields" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" -dependencies = [ - "anyhow", - "derivative", - "num-traits", - "rand", - "rayon", - "serde", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "thiserror", -] - -[[package]] -name = "snarkvm-fields" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" -dependencies = [ - "anyhow", - "derivative", - "num-traits", - "rand", - "rayon", - "serde", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "thiserror", -] - [[package]] name = "snarkvm-gadgets" version = "0.7.5" @@ -3310,6 +3318,50 @@ dependencies = [ "thiserror", ] +[[package]] +name = "snarkvm-parameters" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "cfg-if", + "curl", + "hex", + "itertools", + "lazy_static", + "paste", + "rand", + "serde_json", + "sha2", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "thiserror", +] + +[[package]] +name = "snarkvm-parameters" +version = "0.7.5" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" +dependencies = [ + "aleo-std", + "anyhow", + "bincode", + "cfg-if", + "curl", + "hex", + "itertools", + "lazy_static", + "paste", + "rand", + "serde_json", + "sha2", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "thiserror", +] + [[package]] name = "snarkvm-parameters" version = "0.7.5" @@ -3328,46 +3380,34 @@ dependencies = [ ] [[package]] -name = "snarkvm-parameters" +name = "snarkvm-r1cs" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "aleo-std", "anyhow", - "bincode", "cfg-if", - "curl", - "hex", + "fxhash", + "indexmap", "itertools", - "lazy_static", - "paste", - "rand", - "serde_json", - "sha2", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", "thiserror", ] [[package]] -name = "snarkvm-parameters" +name = "snarkvm-r1cs" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "aleo-std", "anyhow", - "bincode", "cfg-if", - "curl", - "hex", + "fxhash", + "indexmap", "itertools", - "lazy_static", - "paste", - "rand", - "serde_json", - "sha2", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", + "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", "thiserror", ] @@ -3388,34 +3428,38 @@ dependencies = [ ] [[package]] -name = "snarkvm-r1cs" +name = "snarkvm-utilities" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ + "aleo-std", "anyhow", - "cfg-if", - "fxhash", - "indexmap", - "itertools", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", + "bincode", + "num-bigint", + "num_cpus", + "rand", + "rand_xorshift", + "rayon", + "serde", + "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e)", "thiserror", ] [[package]] -name = "snarkvm-r1cs" +name = "snarkvm-utilities" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ + "aleo-std", "anyhow", - "cfg-if", - "fxhash", - "indexmap", - "itertools", - "snarkvm-curves 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-fields 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "snarkvm-utilities 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", + "bincode", + "num-bigint", + "num_cpus", + "rand", + "rand_xorshift", + "rayon", + "serde", + "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52)", "thiserror", ] @@ -3438,39 +3482,27 @@ dependencies = [ ] [[package]] -name = "snarkvm-utilities" +name = "snarkvm-utilities-derives" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "aleo-std", - "anyhow", - "bincode", - "num-bigint", - "num_cpus", - "rand", - "rand_xorshift", - "rayon", - "serde", - "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2)", - "thiserror", + "proc-macro-crate 1.1.3", + "proc-macro-error", + "proc-macro2 1.0.40", + "quote 1.0.20", + "syn 1.0.98", ] [[package]] -name = "snarkvm-utilities" +name = "snarkvm-utilities-derives" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=0dea89e52#0dea89e526f09317ee500b15c215a0a888c0b4a0" dependencies = [ - "aleo-std", - "anyhow", - "bincode", - "num-bigint", - "num_cpus", - "rand", - "rand_xorshift", - "rayon", - "serde", - "snarkvm-utilities-derives 0.7.5 (git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a)", - "thiserror", + "proc-macro-crate 1.1.3", + "proc-macro-error", + "proc-macro2 1.0.40", + "quote 1.0.20", + "syn 1.0.98", ] [[package]] @@ -3485,30 +3517,6 @@ dependencies = [ "syn 1.0.98", ] -[[package]] -name = "snarkvm-utilities-derives" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", - "proc-macro2 1.0.40", - "quote 1.0.20", - "syn 1.0.98", -] - -[[package]] -name = "snarkvm-utilities-derives" -version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", - "proc-macro2 1.0.40", - "quote 1.0.20", - "syn 1.0.98", -] - [[package]] name = "socket2" version = "0.4.4" diff --git a/Cargo.toml b/Cargo.toml index db30cd62d8..5fe7bced33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,12 +52,12 @@ version = "1.5.3" [dependencies.aleo] git = "https://github.com/AleoHQ/aleo.git" -rev = "a0895e0" +rev = "02db93e" [dependencies.snarkvm] #path = "../snarkVM" git = "https://github.com/AleoHQ/snarkVM.git" -rev = "f25e0b2" +rev = "0dea89e" features = ["circuit", "console"] [dependencies.backtrace] diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 06d4744785..95d3ae7674 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -156,7 +156,7 @@ impl<'a> CodeGenerator<'a> { fn visit_circuit_init(&mut self, input: &'a CircuitExpression) -> (String, String) { // Initialize instruction builder strings. let mut instructions = String::new(); - let mut circuit_init_instruction = format!(" {} ", input.name.to_string().to_lowercase()); + let mut circuit_init_instruction = format!(" cast "); // Visit each circuit member and accumulate instructions from expressions. for member in input.members.iter() { @@ -180,7 +180,7 @@ impl<'a> CodeGenerator<'a> { // Push destination register to circuit init instruction. let destination_register = format!("r{}", self.next_register); - writeln!(circuit_init_instruction, "into {};", destination_register).expect("failed to write to string"); + writeln!(circuit_init_instruction, "into {} as {};", destination_register, input.name.to_string().to_lowercase()).expect("failed to write to string"); instructions.push_str(&circuit_init_instruction); // Increment the register counter. diff --git a/examples/helloworld/main.aleo b/examples/helloworld/main.aleo index 464c691e96..88fd8a3f5b 100644 --- a/examples/helloworld/main.aleo +++ b/examples/helloworld/main.aleo @@ -1,11 +1,5 @@ program helloworld.aleo; -function compute: - input r0 as u32.private; - input r1 as u32.private; - add r0 r1 into r2; - output r2 as u32.private; - function main: input r0 as u32.public; input r1 as u32.private; diff --git a/examples/message/main.aleo b/examples/message/main.aleo index 55b3c611b1..5b7a0c6a6a 100644 --- a/examples/message/main.aleo +++ b/examples/message/main.aleo @@ -1,10 +1,10 @@ program message.aleo; - interface message: first as field; second as field; function main: input r0 as message.private; - add r0.first r0.second into r1; - output r1 as field.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/src/main.leo b/examples/message/src/main.leo index 129bf5f99c..c2ac3f13ce 100644 --- a/examples/message/src/main.leo +++ b/examples/message/src/main.leo @@ -5,5 +5,9 @@ circuit Message { } function main(m: Message) -> field { - return m.first + m.second; + let m1: Message = Message { + first: m.first, + second: m.second, + }; + return m1.first + m1.second; } diff --git a/examples/token/main.aleo b/examples/token/main.aleo index 038567f3ab..79a5bd23f8 100644 --- a/examples/token/main.aleo +++ b/examples/token/main.aleo @@ -7,4 +7,4 @@ record token: function main: input r0 as token.record; add r0.token_amount r0.token_amount into r1; - output r1 as field.private; + output r1 as u64.private; From 7d604748bd431616fc16c39d0d0e8fadfe6144c4 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 13 Jul 2022 21:02:33 -0700 Subject: [PATCH 39/43] add token transfer example, fix record cast codegen --- compiler/ast/src/expressions/circuit_init.rs | 9 +---- compiler/parser/src/parser/expression.rs | 3 -- .../src/code_generation/visit_expressions.rs | 15 +++++++- examples/transfer/.gitignore | 2 ++ examples/transfer/README.md | 8 +++++ examples/transfer/inputs/transfer.in | 4 +++ examples/transfer/main.aleo | 21 +++++++++++ examples/transfer/program.json | 10 ++++++ examples/transfer/src/main.leo | 35 +++++++++++++++++++ 9 files changed, 95 insertions(+), 12 deletions(-) create mode 100644 examples/transfer/.gitignore create mode 100644 examples/transfer/README.md create mode 100644 examples/transfer/inputs/transfer.in create mode 100644 examples/transfer/main.aleo create mode 100644 examples/transfer/program.json create mode 100644 examples/transfer/src/main.leo diff --git a/compiler/ast/src/expressions/circuit_init.rs b/compiler/ast/src/expressions/circuit_init.rs index 1b3c7e8a3d..a1e59ab4b4 100644 --- a/compiler/ast/src/expressions/circuit_init.rs +++ b/compiler/ast/src/expressions/circuit_init.rs @@ -24,19 +24,12 @@ pub struct CircuitVariableInitializer { /// The expression to initialize the field with. /// When `None`, a binding, in scope, with the name will be used instead. pub expression: Option, - /// `true` if the circuit is a `record` type. - pub is_record: bool, } impl fmt::Display for CircuitVariableInitializer { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if let Some(expr) = &self.expression { - write!(f, "{}: {}", self.identifier, expr)?; - if self.is_record { - write!(f, "private") - } else { - write!(f, "") - } + write!(f, "{}: {}", self.identifier, expr) } else { write!(f, "{}", self.identifier) } diff --git a/compiler/parser/src/parser/expression.rs b/compiler/parser/src/parser/expression.rs index 6a7e51a889..e2c40ac898 100644 --- a/compiler/parser/src/parser/expression.rs +++ b/compiler/parser/src/parser/expression.rs @@ -467,12 +467,9 @@ impl ParserContext<'_> { None }; - let is_record = identifier.to_string().eq("Record"); - Ok(CircuitVariableInitializer { identifier, expression, - is_record, }) } diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 95d3ae7674..62e4ce75fd 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -154,6 +154,13 @@ impl<'a> CodeGenerator<'a> { } fn visit_circuit_init(&mut self, input: &'a CircuitExpression) -> (String, String) { + // Lookup circuit or record. + let name = if let Some(type_) = self.composite_mapping.get(&input.name.name) { + format!("{}.{}", input.name.to_string().to_lowercase(), type_) + } else { + unreachable!("All composite types should be known at this phase of compilation") + }; + // Initialize instruction builder strings. let mut instructions = String::new(); let mut circuit_init_instruction = format!(" cast "); @@ -180,7 +187,13 @@ impl<'a> CodeGenerator<'a> { // Push destination register to circuit init instruction. let destination_register = format!("r{}", self.next_register); - writeln!(circuit_init_instruction, "into {} as {};", destination_register, input.name.to_string().to_lowercase()).expect("failed to write to string"); + writeln!( + circuit_init_instruction, + "into {dest} as {name};", + dest = destination_register, + name = name, + ).expect("failed to write to string"); + instructions.push_str(&circuit_init_instruction); // Increment the register counter. diff --git a/examples/transfer/.gitignore b/examples/transfer/.gitignore new file mode 100644 index 0000000000..b28696155d --- /dev/null +++ b/examples/transfer/.gitignore @@ -0,0 +1,2 @@ +outputs/ +build/ diff --git a/examples/transfer/README.md b/examples/transfer/README.md new file mode 100644 index 0000000000..b4da4a59a4 --- /dev/null +++ b/examples/transfer/README.md @@ -0,0 +1,8 @@ +# transfer.aleo + +## Build Guide + +To compile this Aleo program, run: +```bash +aleo build +``` diff --git a/examples/transfer/inputs/transfer.in b/examples/transfer/inputs/transfer.in new file mode 100644 index 0000000000..e7e9565b67 --- /dev/null +++ b/examples/transfer/inputs/transfer.in @@ -0,0 +1,4 @@ +// The program input for transfer/src/main.leo +[main] +owner: address = aleo12aw0kcnzyn5xj46z9u6mzpa67tzuqnvmwe0q2ejfjm8c2ue4pgys3877fr; +amount: u64 = 100u64; diff --git a/examples/transfer/main.aleo b/examples/transfer/main.aleo new file mode 100644 index 0000000000..5714ae58db --- /dev/null +++ b/examples/transfer/main.aleo @@ -0,0 +1,21 @@ +program transfer.aleo; +record token: + owner as address.private; + balance as u64.private; + amount as u64.private; + +function main: + input r0 as address.private; + input r1 as u64.private; + cast r0 0u64 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 r1 0u64 r2 into r4 as token.record; + cast r0.owner r0.balance r3 into r5 as token.record; + output r4 as token.record; + output r5 as token.record; diff --git a/examples/transfer/program.json b/examples/transfer/program.json new file mode 100644 index 0000000000..9b4dceb80c --- /dev/null +++ b/examples/transfer/program.json @@ -0,0 +1,10 @@ +{ + "program": "transfer.aleo", + "version": "0.0.0", + "description": "", + "development": { + "private_key": "APrivateKey1zkp3FxmbSYjkHsRBzZbCMGXY5u2sGCkgddNKVL7CDwy7KSe", + "address": "aleo12aw0kcnzyn5xj46z9u6mzpa67tzuqnvmwe0q2ejfjm8c2ue4pgys3877fr" + }, + "license": "MIT" +} diff --git a/examples/transfer/src/main.leo b/examples/transfer/src/main.leo new file mode 100644 index 0000000000..d9fd368051 --- /dev/null +++ b/examples/transfer/src/main.leo @@ -0,0 +1,35 @@ +record Token { + owner: address, + balance: u64, + amount: u64, +} + +function main(owner: address, amount: u64) -> Token { + return Token { + owner: owner, + balance: 0u64, + amount: amount, + }; +} + +function transfer( + t: Token, + r: address, + a: u64 +) -> (Token, Token) { + let change: u64 = t.amount - a; + + let t1: Token = Token { + owner: r, + balance: 0u64, + amount: a, + }; + + let t2: Token = Token { + owner: t.owner, + balance: t.balance, + amount: change + }; + + return (t1, t2); +} \ No newline at end of file From f4a59c5745084a7eac49394430ca8306acff74d4 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 13 Jul 2022 21:05:38 -0700 Subject: [PATCH 40/43] cargo fmt --- compiler/parser/src/parser/expression.rs | 5 +---- compiler/passes/src/code_generation/visit_expressions.rs | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/compiler/parser/src/parser/expression.rs b/compiler/parser/src/parser/expression.rs index e2c40ac898..b83e9fa8b4 100644 --- a/compiler/parser/src/parser/expression.rs +++ b/compiler/parser/src/parser/expression.rs @@ -467,10 +467,7 @@ impl ParserContext<'_> { None }; - Ok(CircuitVariableInitializer { - identifier, - expression, - }) + Ok(CircuitVariableInitializer { identifier, expression }) } /// Returns an [`Expression`] AST node if the next tokens represent a diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 62e4ce75fd..24c6aceab6 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -192,7 +192,8 @@ impl<'a> CodeGenerator<'a> { "into {dest} as {name};", dest = destination_register, name = name, - ).expect("failed to write to string"); + ) + .expect("failed to write to string"); instructions.push_str(&circuit_init_instruction); From 9229f46bb5f755b6e835ebd8c7e0e4f09fbe1a0c Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 13 Jul 2022 21:06:54 -0700 Subject: [PATCH 41/43] regen tests --- tests/expectations/compiler/compiler/circuits/inline.out | 2 +- .../expectations/compiler/compiler/circuits/member_variable.out | 2 +- .../expectations/compiler/compiler/records/init_expression.out | 2 +- .../compiler/compiler/records/init_expression_shorthand.out | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/expectations/compiler/compiler/circuits/inline.out b/tests/expectations/compiler/compiler/circuits/inline.out index 5d559fe7b7..872a2d787a 100644 --- a/tests/expectations/compiler/compiler/circuits/inline.out +++ b/tests/expectations/compiler/compiler/circuits/inline.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 0bf2ef7cbe1a1be5be8fc3bd86184d0146aca6dc912f601a5a0edf7c0f9fc1b9 + initial_ast: 1f1764005f0d7fa538fdb17d09a1bd5cb92eba8a613ea23173859200a4dd7183 diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.out b/tests/expectations/compiler/compiler/circuits/member_variable.out index 4a05759aa8..5421281620 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: 29f6139d908d390f890f04d8ee620757d29b7f71cd48c46ff65bc1e70aae840c - initial_ast: a1d6a956de7f4d92fc24b3e247a6260b16455e8422b4ae191225fb806bf5a3b0 + initial_ast: 16404e55f68744b4439f4c0d315f7c47a426542544aef23d8ba990499cba6e0a diff --git a/tests/expectations/compiler/compiler/records/init_expression.out b/tests/expectations/compiler/compiler/records/init_expression.out index b058c04ce7..b7e6fc8f51 100644 --- a/tests/expectations/compiler/compiler/records/init_expression.out +++ b/tests/expectations/compiler/compiler/records/init_expression.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 70ae890af829797f2ded03a335fae82ebb98a8de40bfe61825ae45cc67726864 + initial_ast: 672d31f98d7d1a61d0ffa0ce364b7df84e03e1e769fad9f14c3a45e66f8654d0 diff --git a/tests/expectations/compiler/compiler/records/init_expression_shorthand.out b/tests/expectations/compiler/compiler/records/init_expression_shorthand.out index 84191d0e32..b61b75211e 100644 --- a/tests/expectations/compiler/compiler/records/init_expression_shorthand.out +++ b/tests/expectations/compiler/compiler/records/init_expression_shorthand.out @@ -4,4 +4,4 @@ expectation: Pass outputs: - output: - initial_input_ast: no input - initial_ast: 52292ed69c78e23c6463979d92756c37710f6f82d3a50ac5faef0300030b6042 + initial_ast: 78f8fddf1f1afd737f3fe14e30f5b260ec20da6c41f9c224c432b0a35c6bef28 From 230491f1b1006231deb6efc00e541caae270bed9 Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Wed, 13 Jul 2022 21:18:09 -0700 Subject: [PATCH 42/43] clippy --- compiler/passes/src/code_generation/visit_expressions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 24c6aceab6..b457be6ae7 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -163,7 +163,7 @@ impl<'a> CodeGenerator<'a> { // Initialize instruction builder strings. let mut instructions = String::new(); - let mut circuit_init_instruction = format!(" cast "); + let mut circuit_init_instruction = String::from(" cast "); // Visit each circuit member and accumulate instructions from expressions. for member in input.members.iter() { From 09095f37ef4661d6cc308f50e20eb81a64b8f0e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Jul 2022 10:17:56 +0000 Subject: [PATCH 43/43] Bump clap from 3.2.8 to 3.2.11 Bumps [clap](https://github.com/clap-rs/clap) from 3.2.8 to 3.2.11. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.2.8...v3.2.11) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- tests/test-framework/Cargo.toml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ea219a1f1..9f49533249 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,7 +74,7 @@ version = "0.2.0" source = "git+https://github.com/AleoHQ/aleo.git?rev=a0895e0#a0895e0f1b1d4ceb78199dec5439425e7abb0b53" dependencies = [ "anyhow", - "clap 3.2.8", + "clap 3.2.11", "colored", "rand", "rand_chacha", @@ -408,9 +408,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.8" +version = "3.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190814073e85d238f31ff738fcb0bf6910cedeb73376c87cd69291028966fd83" +checksum = "d646c7ade5eb07c4aa20e907a922750df0c448892513714fd3e4acbc7130829f" dependencies = [ "atty", "bitflags", @@ -1212,7 +1212,7 @@ dependencies = [ "ansi_term", "assert_cmd", "backtrace", - "clap 3.2.8", + "clap 3.2.11", "color-backtrace", "colored", "console", @@ -1256,7 +1256,7 @@ dependencies = [ name = "leo-parser" version = "1.5.3" dependencies = [ - "clap 3.2.8", + "clap 3.2.11", "indexmap", "lazy_static", "leo-ast", @@ -1299,7 +1299,7 @@ name = "leo-test-framework" version = "1.5.3" dependencies = [ "backtrace", - "clap 3.2.8", + "clap 3.2.11", "criterion", "leo-compiler", "leo-errors", @@ -2262,7 +2262,7 @@ version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b2#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", - "clap 3.2.8", + "clap 3.2.11", "colored", "rand", "self_update 0.30.0", @@ -2280,7 +2280,7 @@ version = "0.7.5" source = "git+https://github.com/AleoHQ/snarkVM.git?rev=f25e0b23a#f25e0b23ab842eb7c4063677d51d141cd1750ea2" dependencies = [ "anyhow", - "clap 3.2.8", + "clap 3.2.11", "colored", "rand", "self_update 0.30.0", diff --git a/Cargo.toml b/Cargo.toml index db30cd62d8..9860e56b98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,7 +64,7 @@ features = ["circuit", "console"] version = "0.3.66" [dependencies.clap] -version = "3.1" +version = "3.2" features = ["derive", "env"] [dependencies.color-backtrace] diff --git a/tests/test-framework/Cargo.toml b/tests/test-framework/Cargo.toml index 9293779040..cfb87e385a 100644 --- a/tests/test-framework/Cargo.toml +++ b/tests/test-framework/Cargo.toml @@ -29,7 +29,7 @@ version = "1.5.3" version = "0.3.66" [dependencies.clap] -version = "3.1" +version = "3.2" features = ["derive"] [dependencies.serde]