diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 890c814c77..9bb5d75eff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -139,7 +139,9 @@ jobs: runs-on: macos-latest steps: - name: Xcode Select - uses: devbotsxyz/xcode-select@v1.1.0 + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable - name: Checkout uses: actions/checkout@v2 diff --git a/Cargo.lock b/Cargo.lock index 06ee0ca47b..7ded5d72d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -461,9 +461,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.3" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" +checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" dependencies = [ "clap_builder", "clap_derive", @@ -471,9 +471,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" dependencies = [ "anstream", "anstyle", @@ -664,6 +664,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-common" version = "0.1.6" @@ -1370,7 +1376,7 @@ dependencies = [ "rand_core", "reqwest", "rusty-hook", - "self_update 0.38.0", + "self_update", "serde", "serde_json", "snarkvm", @@ -2252,24 +2258,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "self_update" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a667e18055120bcc9a658d55d36f2f6bfc82e07968cc479ee7774e3bfb501e14" -dependencies = [ - "hyper", - "indicatif", - "log", - "quick-xml", - "regex", - "reqwest", - "semver", - "serde_json", - "tempfile", - "urlencoding", -] - [[package]] name = "self_update" version = "0.38.0" @@ -2403,9 +2391,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" dependencies = [ "serde", ] @@ -2413,7 +2401,7 @@ dependencies = [ [[package]] name = "snarkvm" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "anstyle", "anyhow", @@ -2426,7 +2414,7 @@ dependencies = [ "parking_lot", "rand", "rayon", - "self_update 0.37.0", + "self_update", "serde_json", "snarkvm-circuit", "snarkvm-console", @@ -2442,7 +2430,7 @@ dependencies = [ [[package]] name = "snarkvm-algorithms" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "aleo-std", "anyhow", @@ -2472,7 +2460,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-account", "snarkvm-circuit-algorithms", @@ -2486,7 +2474,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-account" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-network", @@ -2497,7 +2485,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-algorithms" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-types", "snarkvm-console-algorithms", @@ -2507,7 +2495,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-collections" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-types", @@ -2517,7 +2505,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-environment" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "indexmap 2.0.0", "itertools 0.11.0", @@ -2535,12 +2523,12 @@ dependencies = [ [[package]] name = "snarkvm-circuit-environment-witness" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" [[package]] name = "snarkvm-circuit-network" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-algorithms", "snarkvm-circuit-collections", @@ -2551,8 +2539,9 @@ dependencies = [ [[package]] name = "snarkvm-circuit-program" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ + "paste", "snarkvm-circuit-account", "snarkvm-circuit-collections", "snarkvm-circuit-network", @@ -2564,7 +2553,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-address", @@ -2579,7 +2568,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-address" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2592,7 +2581,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-boolean" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-console-types-boolean", @@ -2601,7 +2590,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-field" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2611,7 +2600,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-group" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2623,7 +2612,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-integers" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2634,7 +2623,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-scalar" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2645,7 +2634,7 @@ dependencies = [ [[package]] name = "snarkvm-circuit-types-string" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-circuit-environment", "snarkvm-circuit-types-boolean", @@ -2657,7 +2646,7 @@ dependencies = [ [[package]] name = "snarkvm-console" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console-account", "snarkvm-console-algorithms", @@ -2670,7 +2659,7 @@ dependencies = [ [[package]] name = "snarkvm-console-account" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "bs58", "snarkvm-console-network", @@ -2680,19 +2669,20 @@ dependencies = [ [[package]] name = "snarkvm-console-algorithms" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "blake2s_simd", "smallvec", "snarkvm-console-types", "snarkvm-fields", "snarkvm-utilities", + "tiny-keccak", ] [[package]] name = "snarkvm-console-collections" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "aleo-std", "rayon", @@ -2703,7 +2693,7 @@ dependencies = [ [[package]] name = "snarkvm-console-network" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "anyhow", "indexmap 2.0.0", @@ -2726,7 +2716,7 @@ dependencies = [ [[package]] name = "snarkvm-console-network-environment" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "anyhow", "bech32", @@ -2743,7 +2733,7 @@ dependencies = [ [[package]] name = "snarkvm-console-program" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "enum_index", "enum_index_derive", @@ -2751,6 +2741,7 @@ dependencies = [ "num-derive", "num-traits", "once_cell", + "paste", "serde_json", "snarkvm-console-account", "snarkvm-console-collections", @@ -2762,7 +2753,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-address", @@ -2777,7 +2768,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-address" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2788,7 +2779,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-boolean" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console-network-environment", ] @@ -2796,7 +2787,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-field" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2805,7 +2796,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-group" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2816,7 +2807,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-integers" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2826,7 +2817,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-scalar" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2836,7 +2827,7 @@ dependencies = [ [[package]] name = "snarkvm-console-types-string" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console-network-environment", "snarkvm-console-types-boolean", @@ -2847,7 +2838,7 @@ dependencies = [ [[package]] name = "snarkvm-curves" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "rand", "rayon", @@ -2861,7 +2852,7 @@ dependencies = [ [[package]] name = "snarkvm-fields" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "aleo-std", "anyhow", @@ -2878,7 +2869,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "aleo-std", "anyhow", @@ -2902,7 +2893,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-authority" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "anyhow", "rand", @@ -2914,7 +2905,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-block" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "indexmap 2.0.0", "rayon", @@ -2932,7 +2923,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-coinbase" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "aleo-std", "anyhow", @@ -2952,7 +2943,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-committee" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "indexmap 2.0.0", "serde_json", @@ -2962,7 +2953,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-ledger-narwhal-batch-certificate", "snarkvm-ledger-narwhal-batch-header", @@ -2975,7 +2966,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-batch-certificate" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "indexmap 2.0.0", "serde_json", @@ -2987,7 +2978,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-batch-header" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "indexmap 2.0.0", "serde_json", @@ -2998,7 +2989,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-data" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "bytes", "serde_json", @@ -3009,7 +3000,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-subdag" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "indexmap 2.0.0", "serde_json", @@ -3021,7 +3012,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-transmission" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "bytes", "serde_json", @@ -3034,7 +3025,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-narwhal-transmission-id" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "snarkvm-console", "snarkvm-ledger-coinbase", @@ -3043,7 +3034,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-query" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "async-trait", "reqwest", @@ -3056,7 +3047,7 @@ dependencies = [ [[package]] name = "snarkvm-ledger-store" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "anyhow", "bincode", @@ -3069,6 +3060,7 @@ dependencies = [ "snarkvm-ledger-block", "snarkvm-ledger-coinbase", "snarkvm-ledger-committee", + "snarkvm-ledger-narwhal-batch-certificate", "snarkvm-synthesizer-program", "snarkvm-synthesizer-snark", ] @@ -3076,7 +3068,7 @@ dependencies = [ [[package]] name = "snarkvm-parameters" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "aleo-std", "anyhow", @@ -3100,7 +3092,7 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "aleo-std", "anyhow", @@ -3124,7 +3116,7 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer-process" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "aleo-std", "colored", @@ -3145,7 +3137,7 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer-program" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "indexmap 2.0.0", "paste", @@ -3159,7 +3151,7 @@ dependencies = [ [[package]] name = "snarkvm-synthesizer-snark" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "bincode", "once_cell", @@ -3172,7 +3164,7 @@ dependencies = [ [[package]] name = "snarkvm-utilities" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "aleo-std", "anyhow", @@ -3191,7 +3183,7 @@ dependencies = [ [[package]] name = "snarkvm-utilities-derives" version = "0.14.6" -source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#05d7a1f1e371d77583506a34501a3de8a2949ea6" +source = "git+https://github.com/AleoHQ/snarkVM.git?branch=testnet3#6d298690252025d769e061f204b7057bba0d8b8a" dependencies = [ "proc-macro2", "quote 1.0.33", @@ -3372,6 +3364,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinytemplate" version = "1.2.1" diff --git a/compiler/ast/Cargo.toml b/compiler/ast/Cargo.toml index aead191e92..b0aa561597 100644 --- a/compiler/ast/Cargo.toml +++ b/compiler/ast/Cargo.toml @@ -42,7 +42,7 @@ version = "1.0" features = [ "preserve_order" ] [dependencies.smallvec] -version = "1.11.0" +version = "1.11.1" features = [ "serde" ] [dev-dependencies.criterion] diff --git a/compiler/ast/src/core/mod.rs b/compiler/ast/src/core/mod.rs deleted file mode 100644 index 27caeebc3b..0000000000 --- a/compiler/ast/src/core/mod.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2019-2023 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -//! The core library structures for a Leo program. - -pub struct BHP \ No newline at end of file diff --git a/compiler/ast/src/functions/core_function.rs b/compiler/ast/src/functions/core_function.rs index 4587bf219b..21bc740014 100644 --- a/compiler/ast/src/functions/core_function.rs +++ b/compiler/ast/src/functions/core_function.rs @@ -107,6 +107,51 @@ pub enum CoreFunction { ChaChaRandU128, ChaChaRandScalar, + Keccak256HashToAddress, + Keccak256HashToField, + Keccak256HashToGroup, + Keccak256HashToI8, + Keccak256HashToI16, + Keccak256HashToI32, + Keccak256HashToI64, + Keccak256HashToI128, + Keccak256HashToU8, + Keccak256HashToU16, + Keccak256HashToU32, + Keccak256HashToU64, + Keccak256HashToU128, + Keccak256HashToScalar, + + Keccak384HashToAddress, + Keccak384HashToField, + Keccak384HashToGroup, + Keccak384HashToI8, + Keccak384HashToI16, + Keccak384HashToI32, + Keccak384HashToI64, + Keccak384HashToI128, + Keccak384HashToU8, + Keccak384HashToU16, + Keccak384HashToU32, + Keccak384HashToU64, + Keccak384HashToU128, + Keccak384HashToScalar, + + Keccak512HashToAddress, + Keccak512HashToField, + Keccak512HashToGroup, + Keccak512HashToI8, + Keccak512HashToI16, + Keccak512HashToI32, + Keccak512HashToI64, + Keccak512HashToI128, + Keccak512HashToU8, + Keccak512HashToU16, + Keccak512HashToU32, + Keccak512HashToU64, + Keccak512HashToU128, + Keccak512HashToScalar, + Pedersen64CommitToAddress, Pedersen64CommitToField, Pedersen64CommitToGroup, @@ -188,6 +233,51 @@ pub enum CoreFunction { Poseidon8HashToU128, Poseidon8HashToScalar, + SHA3_256HashToAddress, + SHA3_256HashToField, + SHA3_256HashToGroup, + SHA3_256HashToI8, + SHA3_256HashToI16, + SHA3_256HashToI32, + SHA3_256HashToI64, + SHA3_256HashToI128, + SHA3_256HashToU8, + SHA3_256HashToU16, + SHA3_256HashToU32, + SHA3_256HashToU64, + SHA3_256HashToU128, + SHA3_256HashToScalar, + + SHA3_384HashToAddress, + SHA3_384HashToField, + SHA3_384HashToGroup, + SHA3_384HashToI8, + SHA3_384HashToI16, + SHA3_384HashToI32, + SHA3_384HashToI64, + SHA3_384HashToI128, + SHA3_384HashToU8, + SHA3_384HashToU16, + SHA3_384HashToU32, + SHA3_384HashToU64, + SHA3_384HashToU128, + SHA3_384HashToScalar, + + SHA3_512HashToAddress, + SHA3_512HashToField, + SHA3_512HashToGroup, + SHA3_512HashToI8, + SHA3_512HashToI16, + SHA3_512HashToI32, + SHA3_512HashToI64, + SHA3_512HashToI128, + SHA3_512HashToU8, + SHA3_512HashToU16, + SHA3_512HashToU32, + SHA3_512HashToU64, + SHA3_512HashToU128, + SHA3_512HashToScalar, + MappingGet, MappingGetOrUse, MappingSet, @@ -293,6 +383,51 @@ impl CoreFunction { (sym::ChaCha, sym::rand_u64) => Self::ChaChaRandU64, (sym::ChaCha, sym::rand_u128) => Self::ChaChaRandU128, + (sym::Keccak256, sym::hash_to_address) => Self::Keccak256HashToAddress, + (sym::Keccak256, sym::hash_to_field) => Self::Keccak256HashToField, + (sym::Keccak256, sym::hash_to_group) => Self::Keccak256HashToGroup, + (sym::Keccak256, sym::hash_to_i8) => Self::Keccak256HashToI8, + (sym::Keccak256, sym::hash_to_i16) => Self::Keccak256HashToI16, + (sym::Keccak256, sym::hash_to_i32) => Self::Keccak256HashToI32, + (sym::Keccak256, sym::hash_to_i64) => Self::Keccak256HashToI64, + (sym::Keccak256, sym::hash_to_i128) => Self::Keccak256HashToI128, + (sym::Keccak256, sym::hash_to_u8) => Self::Keccak256HashToU8, + (sym::Keccak256, sym::hash_to_u16) => Self::Keccak256HashToU16, + (sym::Keccak256, sym::hash_to_u32) => Self::Keccak256HashToU32, + (sym::Keccak256, sym::hash_to_u64) => Self::Keccak256HashToU64, + (sym::Keccak256, sym::hash_to_u128) => Self::Keccak256HashToU128, + (sym::Keccak256, sym::hash_to_scalar) => Self::Keccak256HashToScalar, + + (sym::Keccak384, sym::hash_to_address) => Self::Keccak384HashToAddress, + (sym::Keccak384, sym::hash_to_field) => Self::Keccak384HashToField, + (sym::Keccak384, sym::hash_to_group) => Self::Keccak384HashToGroup, + (sym::Keccak384, sym::hash_to_i8) => Self::Keccak384HashToI8, + (sym::Keccak384, sym::hash_to_i16) => Self::Keccak384HashToI16, + (sym::Keccak384, sym::hash_to_i32) => Self::Keccak384HashToI32, + (sym::Keccak384, sym::hash_to_i64) => Self::Keccak384HashToI64, + (sym::Keccak384, sym::hash_to_i128) => Self::Keccak384HashToI128, + (sym::Keccak384, sym::hash_to_u8) => Self::Keccak384HashToU8, + (sym::Keccak384, sym::hash_to_u16) => Self::Keccak384HashToU16, + (sym::Keccak384, sym::hash_to_u32) => Self::Keccak384HashToU32, + (sym::Keccak384, sym::hash_to_u64) => Self::Keccak384HashToU64, + (sym::Keccak384, sym::hash_to_u128) => Self::Keccak384HashToU128, + (sym::Keccak384, sym::hash_to_scalar) => Self::Keccak384HashToScalar, + + (sym::Keccak512, sym::hash_to_address) => Self::Keccak512HashToAddress, + (sym::Keccak512, sym::hash_to_field) => Self::Keccak512HashToField, + (sym::Keccak512, sym::hash_to_group) => Self::Keccak512HashToGroup, + (sym::Keccak512, sym::hash_to_i8) => Self::Keccak512HashToI8, + (sym::Keccak512, sym::hash_to_i16) => Self::Keccak512HashToI16, + (sym::Keccak512, sym::hash_to_i32) => Self::Keccak512HashToI32, + (sym::Keccak512, sym::hash_to_i64) => Self::Keccak512HashToI64, + (sym::Keccak512, sym::hash_to_i128) => Self::Keccak512HashToI128, + (sym::Keccak512, sym::hash_to_u8) => Self::Keccak512HashToU8, + (sym::Keccak512, sym::hash_to_u16) => Self::Keccak512HashToU16, + (sym::Keccak512, sym::hash_to_u32) => Self::Keccak512HashToU32, + (sym::Keccak512, sym::hash_to_u64) => Self::Keccak512HashToU64, + (sym::Keccak512, sym::hash_to_u128) => Self::Keccak512HashToU128, + (sym::Keccak512, sym::hash_to_scalar) => Self::Keccak512HashToScalar, + (sym::Pedersen64, sym::commit_to_address) => Self::Pedersen64CommitToAddress, (sym::Pedersen64, sym::commit_to_field) => Self::Pedersen64CommitToField, (sym::Pedersen64, sym::commit_to_group) => Self::Pedersen64CommitToGroup, @@ -374,6 +509,51 @@ impl CoreFunction { (sym::Poseidon8, sym::hash_to_u128) => Self::Poseidon8HashToU128, (sym::Poseidon8, sym::hash_to_scalar) => Self::Poseidon8HashToScalar, + (sym::SHA3_256, sym::hash_to_address) => Self::SHA3_256HashToAddress, + (sym::SHA3_256, sym::hash_to_field) => Self::SHA3_256HashToField, + (sym::SHA3_256, sym::hash_to_group) => Self::SHA3_256HashToGroup, + (sym::SHA3_256, sym::hash_to_i8) => Self::SHA3_256HashToI8, + (sym::SHA3_256, sym::hash_to_i16) => Self::SHA3_256HashToI16, + (sym::SHA3_256, sym::hash_to_i32) => Self::SHA3_256HashToI32, + (sym::SHA3_256, sym::hash_to_i64) => Self::SHA3_256HashToI64, + (sym::SHA3_256, sym::hash_to_i128) => Self::SHA3_256HashToI128, + (sym::SHA3_256, sym::hash_to_u8) => Self::SHA3_256HashToU8, + (sym::SHA3_256, sym::hash_to_u16) => Self::SHA3_256HashToU16, + (sym::SHA3_256, sym::hash_to_u32) => Self::SHA3_256HashToU32, + (sym::SHA3_256, sym::hash_to_u64) => Self::SHA3_256HashToU64, + (sym::SHA3_256, sym::hash_to_u128) => Self::SHA3_256HashToU128, + (sym::SHA3_256, sym::hash_to_scalar) => Self::SHA3_256HashToScalar, + + (sym::SHA3_384, sym::hash_to_address) => Self::SHA3_384HashToAddress, + (sym::SHA3_384, sym::hash_to_field) => Self::SHA3_384HashToField, + (sym::SHA3_384, sym::hash_to_group) => Self::SHA3_384HashToGroup, + (sym::SHA3_384, sym::hash_to_i8) => Self::SHA3_384HashToI8, + (sym::SHA3_384, sym::hash_to_i16) => Self::SHA3_384HashToI16, + (sym::SHA3_384, sym::hash_to_i32) => Self::SHA3_384HashToI32, + (sym::SHA3_384, sym::hash_to_i64) => Self::SHA3_384HashToI64, + (sym::SHA3_384, sym::hash_to_i128) => Self::SHA3_384HashToI128, + (sym::SHA3_384, sym::hash_to_u8) => Self::SHA3_384HashToU8, + (sym::SHA3_384, sym::hash_to_u16) => Self::SHA3_384HashToU16, + (sym::SHA3_384, sym::hash_to_u32) => Self::SHA3_384HashToU32, + (sym::SHA3_384, sym::hash_to_u64) => Self::SHA3_384HashToU64, + (sym::SHA3_384, sym::hash_to_u128) => Self::SHA3_384HashToU128, + (sym::SHA3_384, sym::hash_to_scalar) => Self::SHA3_384HashToScalar, + + (sym::SHA3_512, sym::hash_to_address) => Self::SHA3_512HashToAddress, + (sym::SHA3_512, sym::hash_to_field) => Self::SHA3_512HashToField, + (sym::SHA3_512, sym::hash_to_group) => Self::SHA3_512HashToGroup, + (sym::SHA3_512, sym::hash_to_i8) => Self::SHA3_512HashToI8, + (sym::SHA3_512, sym::hash_to_i16) => Self::SHA3_512HashToI16, + (sym::SHA3_512, sym::hash_to_i32) => Self::SHA3_512HashToI32, + (sym::SHA3_512, sym::hash_to_i64) => Self::SHA3_512HashToI64, + (sym::SHA3_512, sym::hash_to_i128) => Self::SHA3_512HashToI128, + (sym::SHA3_512, sym::hash_to_u8) => Self::SHA3_512HashToU8, + (sym::SHA3_512, sym::hash_to_u16) => Self::SHA3_512HashToU16, + (sym::SHA3_512, sym::hash_to_u32) => Self::SHA3_512HashToU32, + (sym::SHA3_512, sym::hash_to_u64) => Self::SHA3_512HashToU64, + (sym::SHA3_512, sym::hash_to_u128) => Self::SHA3_512HashToU128, + (sym::SHA3_512, sym::hash_to_scalar) => Self::SHA3_512HashToScalar, + (sym::Mapping, sym::get) => Self::MappingGet, (sym::Mapping, sym::get_or_use) => Self::MappingGetOrUse, (sym::Mapping, sym::set) => Self::MappingSet, @@ -480,6 +660,51 @@ impl CoreFunction { Self::ChaChaRandU128 => 0, Self::ChaChaRandScalar => 0, + Self::Keccak256HashToAddress => 1, + Self::Keccak256HashToField => 1, + Self::Keccak256HashToGroup => 1, + Self::Keccak256HashToI8 => 1, + Self::Keccak256HashToI16 => 1, + Self::Keccak256HashToI32 => 1, + Self::Keccak256HashToI64 => 1, + Self::Keccak256HashToI128 => 1, + Self::Keccak256HashToU8 => 1, + Self::Keccak256HashToU16 => 1, + Self::Keccak256HashToU32 => 1, + Self::Keccak256HashToU64 => 1, + Self::Keccak256HashToU128 => 1, + Self::Keccak256HashToScalar => 1, + + Self::Keccak384HashToAddress => 1, + Self::Keccak384HashToField => 1, + Self::Keccak384HashToGroup => 1, + Self::Keccak384HashToI8 => 1, + Self::Keccak384HashToI16 => 1, + Self::Keccak384HashToI32 => 1, + Self::Keccak384HashToI64 => 1, + Self::Keccak384HashToI128 => 1, + Self::Keccak384HashToU8 => 1, + Self::Keccak384HashToU16 => 1, + Self::Keccak384HashToU32 => 1, + Self::Keccak384HashToU64 => 1, + Self::Keccak384HashToU128 => 1, + Self::Keccak384HashToScalar => 1, + + Self::Keccak512HashToAddress => 1, + Self::Keccak512HashToField => 1, + Self::Keccak512HashToGroup => 1, + Self::Keccak512HashToI8 => 1, + Self::Keccak512HashToI16 => 1, + Self::Keccak512HashToI32 => 1, + Self::Keccak512HashToI64 => 1, + Self::Keccak512HashToI128 => 1, + Self::Keccak512HashToU8 => 1, + Self::Keccak512HashToU16 => 1, + Self::Keccak512HashToU32 => 1, + Self::Keccak512HashToU64 => 1, + Self::Keccak512HashToU128 => 1, + Self::Keccak512HashToScalar => 1, + Self::Pedersen64CommitToAddress => 2, Self::Pedersen64CommitToField => 2, Self::Pedersen64CommitToGroup => 2, @@ -561,6 +786,51 @@ impl CoreFunction { Self::Poseidon8HashToU128 => 1, Self::Poseidon8HashToScalar => 1, + Self::SHA3_256HashToAddress => 1, + Self::SHA3_256HashToField => 1, + Self::SHA3_256HashToGroup => 1, + Self::SHA3_256HashToI8 => 1, + Self::SHA3_256HashToI16 => 1, + Self::SHA3_256HashToI32 => 1, + Self::SHA3_256HashToI64 => 1, + Self::SHA3_256HashToI128 => 1, + Self::SHA3_256HashToU8 => 1, + Self::SHA3_256HashToU16 => 1, + Self::SHA3_256HashToU32 => 1, + Self::SHA3_256HashToU64 => 1, + Self::SHA3_256HashToU128 => 1, + Self::SHA3_256HashToScalar => 1, + + Self::SHA3_384HashToAddress => 1, + Self::SHA3_384HashToField => 1, + Self::SHA3_384HashToGroup => 1, + Self::SHA3_384HashToI8 => 1, + Self::SHA3_384HashToI16 => 1, + Self::SHA3_384HashToI32 => 1, + Self::SHA3_384HashToI64 => 1, + Self::SHA3_384HashToI128 => 1, + Self::SHA3_384HashToU8 => 1, + Self::SHA3_384HashToU16 => 1, + Self::SHA3_384HashToU32 => 1, + Self::SHA3_384HashToU64 => 1, + Self::SHA3_384HashToU128 => 1, + Self::SHA3_384HashToScalar => 1, + + Self::SHA3_512HashToAddress => 1, + Self::SHA3_512HashToField => 1, + Self::SHA3_512HashToGroup => 1, + Self::SHA3_512HashToI8 => 1, + Self::SHA3_512HashToI16 => 1, + Self::SHA3_512HashToI32 => 1, + Self::SHA3_512HashToI64 => 1, + Self::SHA3_512HashToI128 => 1, + Self::SHA3_512HashToU8 => 1, + Self::SHA3_512HashToU16 => 1, + Self::SHA3_512HashToU32 => 1, + Self::SHA3_512HashToU64 => 1, + Self::SHA3_512HashToU128 => 1, + Self::SHA3_512HashToScalar => 1, + Self::MappingGet => 2, Self::MappingGetOrUse => 3, Self::MappingSet => 3, @@ -665,6 +935,48 @@ impl CoreFunction { | CoreFunction::BHP1024HashToU64 | CoreFunction::BHP1024HashToU128 | CoreFunction::BHP1024HashToScalar + | CoreFunction::Keccak256HashToAddress + | CoreFunction::Keccak256HashToField + | CoreFunction::Keccak256HashToGroup + | CoreFunction::Keccak256HashToI8 + | CoreFunction::Keccak256HashToI16 + | CoreFunction::Keccak256HashToI32 + | CoreFunction::Keccak256HashToI64 + | CoreFunction::Keccak256HashToI128 + | CoreFunction::Keccak256HashToU8 + | CoreFunction::Keccak256HashToU16 + | CoreFunction::Keccak256HashToU32 + | CoreFunction::Keccak256HashToU64 + | CoreFunction::Keccak256HashToU128 + | CoreFunction::Keccak256HashToScalar + | CoreFunction::Keccak384HashToAddress + | CoreFunction::Keccak384HashToField + | CoreFunction::Keccak384HashToGroup + | CoreFunction::Keccak384HashToI8 + | CoreFunction::Keccak384HashToI16 + | CoreFunction::Keccak384HashToI32 + | CoreFunction::Keccak384HashToI64 + | CoreFunction::Keccak384HashToI128 + | CoreFunction::Keccak384HashToU8 + | CoreFunction::Keccak384HashToU16 + | CoreFunction::Keccak384HashToU32 + | CoreFunction::Keccak384HashToU64 + | CoreFunction::Keccak384HashToU128 + | CoreFunction::Keccak384HashToScalar + | CoreFunction::Keccak512HashToAddress + | CoreFunction::Keccak512HashToField + | CoreFunction::Keccak512HashToGroup + | CoreFunction::Keccak512HashToI8 + | CoreFunction::Keccak512HashToI16 + | CoreFunction::Keccak512HashToI32 + | CoreFunction::Keccak512HashToI64 + | CoreFunction::Keccak512HashToI128 + | CoreFunction::Keccak512HashToU8 + | CoreFunction::Keccak512HashToU16 + | CoreFunction::Keccak512HashToU32 + | CoreFunction::Keccak512HashToU64 + | CoreFunction::Keccak512HashToU128 + | CoreFunction::Keccak512HashToScalar | CoreFunction::Pedersen64CommitToAddress | CoreFunction::Pedersen64CommitToField | CoreFunction::Pedersen64CommitToGroup @@ -741,6 +1053,48 @@ impl CoreFunction { | CoreFunction::Poseidon8HashToU64 | CoreFunction::Poseidon8HashToU128 | CoreFunction::Poseidon8HashToScalar + | CoreFunction::SHA3_256HashToAddress + | CoreFunction::SHA3_256HashToField + | CoreFunction::SHA3_256HashToGroup + | CoreFunction::SHA3_256HashToI8 + | CoreFunction::SHA3_256HashToI16 + | CoreFunction::SHA3_256HashToI32 + | CoreFunction::SHA3_256HashToI64 + | CoreFunction::SHA3_256HashToI128 + | CoreFunction::SHA3_256HashToU8 + | CoreFunction::SHA3_256HashToU16 + | CoreFunction::SHA3_256HashToU32 + | CoreFunction::SHA3_256HashToU64 + | CoreFunction::SHA3_256HashToU128 + | CoreFunction::SHA3_256HashToScalar + | CoreFunction::SHA3_384HashToAddress + | CoreFunction::SHA3_384HashToField + | CoreFunction::SHA3_384HashToGroup + | CoreFunction::SHA3_384HashToI8 + | CoreFunction::SHA3_384HashToI16 + | CoreFunction::SHA3_384HashToI32 + | CoreFunction::SHA3_384HashToI64 + | CoreFunction::SHA3_384HashToI128 + | CoreFunction::SHA3_384HashToU8 + | CoreFunction::SHA3_384HashToU16 + | CoreFunction::SHA3_384HashToU32 + | CoreFunction::SHA3_384HashToU64 + | CoreFunction::SHA3_384HashToU128 + | CoreFunction::SHA3_384HashToScalar + | CoreFunction::SHA3_512HashToAddress + | CoreFunction::SHA3_512HashToField + | CoreFunction::SHA3_512HashToGroup + | CoreFunction::SHA3_512HashToI8 + | CoreFunction::SHA3_512HashToI16 + | CoreFunction::SHA3_512HashToI32 + | CoreFunction::SHA3_512HashToI64 + | CoreFunction::SHA3_512HashToI128 + | CoreFunction::SHA3_512HashToU8 + | CoreFunction::SHA3_512HashToU16 + | CoreFunction::SHA3_512HashToU32 + | CoreFunction::SHA3_512HashToU64 + | CoreFunction::SHA3_512HashToU128 + | CoreFunction::SHA3_512HashToScalar | CoreFunction::GroupToXCoordinate | CoreFunction::GroupToYCoordinate | CoreFunction::SignatureVerify => false, diff --git a/compiler/ast/src/passes/reconstructor.rs b/compiler/ast/src/passes/reconstructor.rs index 2ad83f5741..9a17dc8368 100644 --- a/compiler/ast/src/passes/reconstructor.rs +++ b/compiler/ast/src/passes/reconstructor.rs @@ -114,7 +114,27 @@ pub trait ExpressionReconstructor { } fn reconstruct_struct_init(&mut self, input: StructExpression) -> (Expression, Self::AdditionalOutput) { - (Expression::Struct(input), Default::default()) + ( + Expression::Struct(StructExpression { + name: input.name, + members: input + .members + .into_iter() + .map(|member| StructVariableInitializer { + identifier: member.identifier, + expression: match member.expression { + Some(expression) => Some(self.reconstruct_expression(expression).0), + None => Some(self.reconstruct_expression(Expression::Identifier(member.identifier)).0), + }, + span: member.span, + id: member.id, + }) + .collect(), + span: input.span, + id: input.id, + }), + Default::default(), + ) } fn reconstruct_err(&mut self, _input: ErrExpression) -> (Expression, Self::AdditionalOutput) { diff --git a/compiler/passes/src/code_generation/visit_expressions.rs b/compiler/passes/src/code_generation/visit_expressions.rs index 0280aec5d1..ab1d68784d 100644 --- a/compiler/passes/src/code_generation/visit_expressions.rs +++ b/compiler/passes/src/code_generation/visit_expressions.rs @@ -315,6 +315,15 @@ impl<'a> CodeGenerator<'a> { Type::Identifier(Identifier { name: sym::BHP1024, .. }) => { construct_simple_function_call(&input.name, "bhp1024", arguments) } + Type::Identifier(Identifier { name: sym::Keccak256, .. }) => { + construct_simple_function_call(&input.name, "keccak256", arguments) + } + Type::Identifier(Identifier { name: sym::Keccak384, .. }) => { + construct_simple_function_call(&input.name, "keccak384", arguments) + } + Type::Identifier(Identifier { name: sym::Keccak512, .. }) => { + construct_simple_function_call(&input.name, "keccak512", arguments) + } Type::Identifier(Identifier { name: sym::Pedersen64, .. }) => { construct_simple_function_call(&input.name, "ped64", arguments) } @@ -330,6 +339,15 @@ impl<'a> CodeGenerator<'a> { Type::Identifier(Identifier { name: sym::Poseidon8, .. }) => { construct_simple_function_call(&input.name, "psd8", arguments) } + Type::Identifier(Identifier { name: sym::SHA3_256, .. }) => { + construct_simple_function_call(&input.name, "sha3_256", arguments) + } + Type::Identifier(Identifier { name: sym::SHA3_384, .. }) => { + construct_simple_function_call(&input.name, "sha3_384", arguments) + } + Type::Identifier(Identifier { name: sym::SHA3_512, .. }) => { + construct_simple_function_call(&input.name, "sha3_512", arguments) + } Type::Identifier(Identifier { name: sym::Mapping, .. }) => match input.name.name { sym::get => { let mut instruction = " get".to_string(); diff --git a/compiler/passes/src/type_checking/checker.rs b/compiler/passes/src/type_checking/checker.rs index c0692ecbd2..f0c5c1364c 100644 --- a/compiler/passes/src/type_checking/checker.rs +++ b/compiler/passes/src/type_checking/checker.rs @@ -480,9 +480,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToAddress | CoreFunction::BHP768HashToAddress | CoreFunction::BHP1024HashToAddress + | CoreFunction::Keccak256HashToAddress + | CoreFunction::Keccak384HashToAddress + | CoreFunction::Keccak512HashToAddress | CoreFunction::Poseidon2HashToAddress | CoreFunction::Poseidon4HashToAddress - | CoreFunction::Poseidon8HashToAddress => { + | CoreFunction::Poseidon8HashToAddress + | CoreFunction::SHA3_256HashToAddress + | CoreFunction::SHA3_384HashToAddress + | CoreFunction::SHA3_512HashToAddress => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Address) @@ -491,9 +497,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToField | CoreFunction::BHP768HashToField | CoreFunction::BHP1024HashToField + | CoreFunction::Keccak256HashToField + | CoreFunction::Keccak384HashToField + | CoreFunction::Keccak512HashToField | CoreFunction::Poseidon2HashToField | CoreFunction::Poseidon4HashToField - | CoreFunction::Poseidon8HashToField => { + | CoreFunction::Poseidon8HashToField + | CoreFunction::SHA3_256HashToField + | CoreFunction::SHA3_384HashToField + | CoreFunction::SHA3_512HashToField => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Field) @@ -502,9 +514,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToGroup | CoreFunction::BHP768HashToGroup | CoreFunction::BHP1024HashToGroup + | CoreFunction::Keccak256HashToGroup + | CoreFunction::Keccak384HashToGroup + | CoreFunction::Keccak512HashToGroup | CoreFunction::Poseidon2HashToGroup | CoreFunction::Poseidon4HashToGroup - | CoreFunction::Poseidon8HashToGroup => { + | CoreFunction::Poseidon8HashToGroup + | CoreFunction::SHA3_256HashToGroup + | CoreFunction::SHA3_384HashToGroup + | CoreFunction::SHA3_512HashToGroup => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Group) @@ -513,9 +531,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToI8 | CoreFunction::BHP768HashToI8 | CoreFunction::BHP1024HashToI8 + | CoreFunction::Keccak256HashToI8 + | CoreFunction::Keccak384HashToI8 + | CoreFunction::Keccak512HashToI8 | CoreFunction::Poseidon2HashToI8 | CoreFunction::Poseidon4HashToI8 - | CoreFunction::Poseidon8HashToI8 => { + | CoreFunction::Poseidon8HashToI8 + | CoreFunction::SHA3_256HashToI8 + | CoreFunction::SHA3_384HashToI8 + | CoreFunction::SHA3_512HashToI8 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::I8)) @@ -524,9 +548,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToI16 | CoreFunction::BHP768HashToI16 | CoreFunction::BHP1024HashToI16 + | CoreFunction::Keccak256HashToI16 + | CoreFunction::Keccak384HashToI16 + | CoreFunction::Keccak512HashToI16 | CoreFunction::Poseidon2HashToI16 | CoreFunction::Poseidon4HashToI16 - | CoreFunction::Poseidon8HashToI16 => { + | CoreFunction::Poseidon8HashToI16 + | CoreFunction::SHA3_256HashToI16 + | CoreFunction::SHA3_384HashToI16 + | CoreFunction::SHA3_512HashToI16 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::I16)) @@ -535,9 +565,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToI32 | CoreFunction::BHP768HashToI32 | CoreFunction::BHP1024HashToI32 + | CoreFunction::Keccak256HashToI32 + | CoreFunction::Keccak384HashToI32 + | CoreFunction::Keccak512HashToI32 | CoreFunction::Poseidon2HashToI32 | CoreFunction::Poseidon4HashToI32 - | CoreFunction::Poseidon8HashToI32 => { + | CoreFunction::Poseidon8HashToI32 + | CoreFunction::SHA3_256HashToI32 + | CoreFunction::SHA3_384HashToI32 + | CoreFunction::SHA3_512HashToI32 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::I32)) @@ -546,9 +582,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToI64 | CoreFunction::BHP768HashToI64 | CoreFunction::BHP1024HashToI64 + | CoreFunction::Keccak256HashToI64 + | CoreFunction::Keccak384HashToI64 + | CoreFunction::Keccak512HashToI64 | CoreFunction::Poseidon2HashToI64 | CoreFunction::Poseidon4HashToI64 - | CoreFunction::Poseidon8HashToI64 => { + | CoreFunction::Poseidon8HashToI64 + | CoreFunction::SHA3_256HashToI64 + | CoreFunction::SHA3_384HashToI64 + | CoreFunction::SHA3_512HashToI64 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::I64)) @@ -557,9 +599,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToI128 | CoreFunction::BHP768HashToI128 | CoreFunction::BHP1024HashToI128 + | CoreFunction::Keccak256HashToI128 + | CoreFunction::Keccak384HashToI128 + | CoreFunction::Keccak512HashToI128 | CoreFunction::Poseidon2HashToI128 | CoreFunction::Poseidon4HashToI128 - | CoreFunction::Poseidon8HashToI128 => { + | CoreFunction::Poseidon8HashToI128 + | CoreFunction::SHA3_256HashToI128 + | CoreFunction::SHA3_384HashToI128 + | CoreFunction::SHA3_512HashToI128 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::I128)) @@ -568,9 +616,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToU8 | CoreFunction::BHP768HashToU8 | CoreFunction::BHP1024HashToU8 + | CoreFunction::Keccak256HashToU8 + | CoreFunction::Keccak384HashToU8 + | CoreFunction::Keccak512HashToU8 | CoreFunction::Poseidon2HashToU8 | CoreFunction::Poseidon4HashToU8 - | CoreFunction::Poseidon8HashToU8 => { + | CoreFunction::Poseidon8HashToU8 + | CoreFunction::SHA3_256HashToU8 + | CoreFunction::SHA3_384HashToU8 + | CoreFunction::SHA3_512HashToU8 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::U8)) @@ -579,9 +633,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToU16 | CoreFunction::BHP768HashToU16 | CoreFunction::BHP1024HashToU16 + | CoreFunction::Keccak256HashToU16 + | CoreFunction::Keccak384HashToU16 + | CoreFunction::Keccak512HashToU16 | CoreFunction::Poseidon2HashToU16 | CoreFunction::Poseidon4HashToU16 - | CoreFunction::Poseidon8HashToU16 => { + | CoreFunction::Poseidon8HashToU16 + | CoreFunction::SHA3_256HashToU16 + | CoreFunction::SHA3_384HashToU16 + | CoreFunction::SHA3_512HashToU16 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::U16)) @@ -590,9 +650,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToU32 | CoreFunction::BHP768HashToU32 | CoreFunction::BHP1024HashToU32 + | CoreFunction::Keccak256HashToU32 + | CoreFunction::Keccak384HashToU32 + | CoreFunction::Keccak512HashToU32 | CoreFunction::Poseidon2HashToU32 | CoreFunction::Poseidon4HashToU32 - | CoreFunction::Poseidon8HashToU32 => { + | CoreFunction::Poseidon8HashToU32 + | CoreFunction::SHA3_256HashToU32 + | CoreFunction::SHA3_384HashToU32 + | CoreFunction::SHA3_512HashToU32 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::U32)) @@ -601,9 +667,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToU64 | CoreFunction::BHP768HashToU64 | CoreFunction::BHP1024HashToU64 + | CoreFunction::Keccak256HashToU64 + | CoreFunction::Keccak384HashToU64 + | CoreFunction::Keccak512HashToU64 | CoreFunction::Poseidon2HashToU64 | CoreFunction::Poseidon4HashToU64 - | CoreFunction::Poseidon8HashToU64 => { + | CoreFunction::Poseidon8HashToU64 + | CoreFunction::SHA3_256HashToU64 + | CoreFunction::SHA3_384HashToU64 + | CoreFunction::SHA3_512HashToU64 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::U64)) @@ -612,9 +684,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToU128 | CoreFunction::BHP768HashToU128 | CoreFunction::BHP1024HashToU128 + | CoreFunction::Keccak256HashToU128 + | CoreFunction::Keccak384HashToU128 + | CoreFunction::Keccak512HashToU128 | CoreFunction::Poseidon2HashToU128 | CoreFunction::Poseidon4HashToU128 - | CoreFunction::Poseidon8HashToU128 => { + | CoreFunction::Poseidon8HashToU128 + | CoreFunction::SHA3_256HashToU128 + | CoreFunction::SHA3_384HashToU128 + | CoreFunction::SHA3_512HashToU128 => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Integer(IntegerType::U128)) @@ -623,9 +701,15 @@ impl<'a> TypeChecker<'a> { | CoreFunction::BHP512HashToScalar | CoreFunction::BHP768HashToScalar | CoreFunction::BHP1024HashToScalar + | CoreFunction::Keccak256HashToScalar + | CoreFunction::Keccak384HashToScalar + | CoreFunction::Keccak512HashToScalar | CoreFunction::Poseidon2HashToScalar | CoreFunction::Poseidon4HashToScalar - | CoreFunction::Poseidon8HashToScalar => { + | CoreFunction::Poseidon8HashToScalar + | CoreFunction::SHA3_256HashToScalar + | CoreFunction::SHA3_384HashToScalar + | CoreFunction::SHA3_512HashToScalar => { // Check that the first argument is not a mapping, tuple, err, or unit type. check_not_mapping_tuple_err_unit(&arguments[0].0, &arguments[0].1); Some(Type::Scalar) diff --git a/compiler/span/src/symbol.rs b/compiler/span/src/symbol.rs index 1a85a15db4..eb2f9ce566 100644 --- a/compiler/span/src/symbol.rs +++ b/compiler/span/src/symbol.rs @@ -170,6 +170,9 @@ symbols! { hash_to_u64, hash_to_u128, hash_to_scalar, + Keccak256, + Keccak384, + Keccak512, Mapping, Pedersen64, Pedersen128, @@ -193,6 +196,9 @@ symbols! { rand_u128, remove, set, + SHA3_256, + SHA3_384, + SHA3_512, to_x_coordinate, to_y_coordinate, verify, diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i128.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i128.out new file mode 100644 index 0000000000..c74304ac79 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: d61b6c9a81578cd47a707319541ce1cea3ac5e20020f2a5b8c0b0363df72ceb4 + type_checked_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + unrolled_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + initial_ast: 98b7d6ec7db4be890d206716cdcfdc1c93aa22651ec673abb8390627f4f5fb22 + unrolled_ast: 98b7d6ec7db4be890d206716cdcfdc1c93aa22651ec673abb8390627f4f5fb22 + ssa_ast: 84592e3dbae2abc29fbe18f18f0b4fa04d2cc5f3a5049c6682d47b565faf997a + flattened_ast: 52f08510c0b94715b2c8ddf26620d31a6e2ada19c9b59f3102ee985a37ededf0 + inlined_ast: 52f08510c0b94715b2c8ddf26620d31a6e2ada19c9b59f3102ee985a37ededf0 + dce_ast: 6d1a6cb7718eb6d1a7e26a04563381fc089c2ccab86ff98af4fb824a5366dca6 + bytecode: 590389deb5b7da7e5210fcae5fed44bddf2b1a0bd6d2b30817eb650dd5efa343 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i16.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i16.out new file mode 100644 index 0000000000..3210a09b30 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 077422b93c97f7cd8a28ff1ba7bbe58e07c4b7887304c46d35eb5ac6bf23c972 + type_checked_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + unrolled_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + initial_ast: 55b4587505d4dd00262fc8b402763bbb82ffdc4679f9cd6809dd90bc79c27cd4 + unrolled_ast: 55b4587505d4dd00262fc8b402763bbb82ffdc4679f9cd6809dd90bc79c27cd4 + ssa_ast: 7be08e8f3f5fb651b6145b78332235a13deed5ccc66249dbf58deff7e40629ee + flattened_ast: 593f3ee0142c10b9e37ccfe614f521f68ce0d0248093cf059edc76770e21e039 + inlined_ast: 593f3ee0142c10b9e37ccfe614f521f68ce0d0248093cf059edc76770e21e039 + dce_ast: 9afadeeb1d1a12e64155a62b14721747744629246a6d68b42c7233150d99b426 + bytecode: 6ae1c5f0b41e9982c661326ee81b26e8c0b6d400f5a8454117984c37ab4e492a + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i32.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i32.out new file mode 100644 index 0000000000..09bf7aa630 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 0b9e361a60499d11d8de9a427cd689b0904e3660092b6ff95a1c07bf09964e11 + type_checked_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + unrolled_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + initial_ast: f2ab8261effd5060494b756274f6441a8062b07cbe09bd4158b8f877e57296dd + unrolled_ast: f2ab8261effd5060494b756274f6441a8062b07cbe09bd4158b8f877e57296dd + ssa_ast: 9965abcdbcfd3652353e7a7e683ae14b7d10629f346c1c73b24a05a73e1928ee + flattened_ast: 07e649899eb672fbbcdb930da6f027a2462cdaa9152999f1c10acedd976860b3 + inlined_ast: 07e649899eb672fbbcdb930da6f027a2462cdaa9152999f1c10acedd976860b3 + dce_ast: 5fcec02f11b400e615d37d07dc0241f8f122ad49672990399b51e175fa8f5861 + bytecode: baa423f7d34847421a44a1ccfede64fb02829a7d99c465b0605f85cf20705986 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i64.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i64.out new file mode 100644 index 0000000000..283741f8c5 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 85b2afdf445a99fc5beb1bb9b7c98ddce8f4936dbdb5173447e64bfc5c73e96d + type_checked_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + unrolled_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + initial_ast: 321a85cfa3a737319084c8235299c04b955b4f980209d3447f6b566de48317ae + unrolled_ast: 321a85cfa3a737319084c8235299c04b955b4f980209d3447f6b566de48317ae + ssa_ast: ef34c2b570b888fe7bb8a72ad022b3e002e6dbbb5d83caa58a4f705ba7f7e090 + flattened_ast: b61882dc032ddad4d7cc45c55cdb997e77f720135366d707ffb98c754cf221e0 + inlined_ast: b61882dc032ddad4d7cc45c55cdb997e77f720135366d707ffb98c754cf221e0 + dce_ast: 4658562e562631ca467625444975ed86e53a9f3cd460250da7c4261639e785f2 + bytecode: 4d5b9ec6fd0830de759b0df4e24136712875ed4bac5aca6ff53d8a6938693f56 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i8.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i8.out new file mode 100644 index 0000000000..87b53e4b8c --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: e57034c883f65a0bf8bf21c5948e8e470938929205661f4629331145f96f457a + type_checked_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + unrolled_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + initial_ast: 20248068c41a68035096cfe2534bfc922dbca468c2151415598f34ff2d1aab87 + unrolled_ast: 20248068c41a68035096cfe2534bfc922dbca468c2151415598f34ff2d1aab87 + ssa_ast: 8ff313b9e1b447cc849a8cda7d8f0ee7702cfb722d2cf36cbd5c6e1819217059 + flattened_ast: b27154e5bd68bf2419076b25bdbcc234039484b29d6b431a12a7aed127ebedfd + inlined_ast: b27154e5bd68bf2419076b25bdbcc234039484b29d6b431a12a7aed127ebedfd + dce_ast: 35e4cbcac59598c05fc3576567606331554447e8c55be6254e528ecd39feba4a + bytecode: dae1414959e50ca77ecae476843824b6220aa3ca4e95ab2a98deaa4b78987bc7 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u128.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u128.out new file mode 100644 index 0000000000..72d8cd23d8 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 30b74ef9405be6a65d0718e893155dfab9c5a27ba6331b46674fbfe804c078c7 + type_checked_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + unrolled_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + initial_ast: 73968c2eba75ebc70d83983f5f5de4241fe0a34f6397bea192ba1972ccbbb3c0 + unrolled_ast: 73968c2eba75ebc70d83983f5f5de4241fe0a34f6397bea192ba1972ccbbb3c0 + ssa_ast: 31537a4ee3f86f3572c9685efd3682cd60d6a68c7f517da128716b0a10aca27a + flattened_ast: cde91248f6cb7b4aca633046531bf8448875f4676188e3408b58a231c865a5c2 + inlined_ast: cde91248f6cb7b4aca633046531bf8448875f4676188e3408b58a231c865a5c2 + dce_ast: 324c3cc692e6b45ddfa0e405c09ff7190db11ab28d50b4d26fbb5b4f10b892af + bytecode: 770f2acaaeeba1f46a6b57a837f4abab295fe19070a150e6f59fc4e8d4cb19fa + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u16.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u16.out new file mode 100644 index 0000000000..c257987d1f --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 5a59bc205eed395ed0a857abe27790d3612aaac26fce76ec8b77b539dd85b4ad + type_checked_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + unrolled_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + initial_ast: f55065e53e678dcc9f24f7b41b662028842755d63979e8ea62ab85124f0f3176 + unrolled_ast: f55065e53e678dcc9f24f7b41b662028842755d63979e8ea62ab85124f0f3176 + ssa_ast: ef2b4ec60569c824f5890e993c657529308d373507cc2fbb87be470ae9d229c3 + flattened_ast: 9526458c6f500bbecddde0d7bb930b307300a6dfc3c8fe5ac95e1e990870b6e9 + inlined_ast: 9526458c6f500bbecddde0d7bb930b307300a6dfc3c8fe5ac95e1e990870b6e9 + dce_ast: 298695f137353c8a1dc7b74b0ffb655373d77544d109c0d4531620b780ec380e + bytecode: 2827725e28e621b51cf5a40a1979da7558af0ec1e7e260b1ec255c169efd7948 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u32.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u32.out new file mode 100644 index 0000000000..11f4fefd3e --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 992dd740994079e30efead06f29f9c2df115a70d54f7649eb5fadec3120db120 + type_checked_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + unrolled_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + initial_ast: 92e72357d36cee322570bf84e25b3eb13ded37726ed33f6150af2a783859c10a + unrolled_ast: 92e72357d36cee322570bf84e25b3eb13ded37726ed33f6150af2a783859c10a + ssa_ast: e541d5c3ad7d89bba140ae9fcc79c2ba723be21134a54011ad05aaba266b0d2f + flattened_ast: ffaa13c686948efe51f6d433ac96d0996ac74665e0ca49cb91b919b5256fe224 + inlined_ast: ffaa13c686948efe51f6d433ac96d0996ac74665e0ca49cb91b919b5256fe224 + dce_ast: 76245c9694ee523685f56aa9503a2589d63bad168f416943299afeafe2cc01e6 + bytecode: a90328ca973213775dcbfa872950cc8126b172ef1cd4c1a1650277b23b6f6957 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u64.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u64.out new file mode 100644 index 0000000000..995aa9ea08 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 7c89248ded858c5bc52c59d418ebea9937f41f59e113313a43dce30d21780db9 + type_checked_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + unrolled_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + initial_ast: d2bd2a0d259d986db03d4adbc98b2e55a8255fe76524f360f224a73d1423de8f + unrolled_ast: d2bd2a0d259d986db03d4adbc98b2e55a8255fe76524f360f224a73d1423de8f + ssa_ast: 43e9a92b352d295980c4826909bcb2d79f7b2875b60860e609c26344c6fcbea9 + flattened_ast: be1f37e36e4e0934b2acdcbbda74ac2d3d834844367e1449d953e13490359792 + inlined_ast: be1f37e36e4e0934b2acdcbbda74ac2d3d834844367e1449d953e13490359792 + dce_ast: 8d1ae68a4a639142f53f90051d8fd2b96f7ddb5b99e9ae861ca6e2a5154540ad + bytecode: 56496fd935df4646cdd71fb7cee3390df240c99433835d70ef5967a33e6d7de8 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u8.out b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u8.out new file mode 100644 index 0000000000..e3c509917b --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 9de9a9614bae9e392c40cbe50c32763866d8facbe3b7b0e618c773c9c1e2452b + type_checked_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + unrolled_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + initial_ast: c272dfa503cf04ffadfd096a4a56eacec426d72ab89c9c7299d2b223ef520089 + unrolled_ast: c272dfa503cf04ffadfd096a4a56eacec426d72ab89c9c7299d2b223ef520089 + ssa_ast: 703991981ddaee19bfbff25eadf082c601194d36e51e9ce95699d1c7e14ea854 + flattened_ast: 74d44f58289131275eae87f129d81a1e410534d3bf1db26c8b969e03c887da83 + inlined_ast: 74d44f58289131275eae87f129d81a1e410534d3bf1db26c8b969e03c887da83 + dce_ast: 953c256865c639c0a3131678d46ba46d050fdc630c73d42c492e85eed9a43d7c + bytecode: db058ed7b34e9c94cb51c9152685548070f56ec9b80abe82b0ae5789a0f81cee + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i128.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i128.out new file mode 100644 index 0000000000..7eafcdd84d --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: d61b6c9a81578cd47a707319541ce1cea3ac5e20020f2a5b8c0b0363df72ceb4 + type_checked_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + unrolled_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + initial_ast: 988740f25c255705bb535e103b3f2ad1d2b32ed0a17b75445d5b67006cb075cf + unrolled_ast: 988740f25c255705bb535e103b3f2ad1d2b32ed0a17b75445d5b67006cb075cf + ssa_ast: d81e0c4dc99d02c508415221d75c124080e72467474e5904a2673e4740cfa3ad + flattened_ast: 969a1134cab7823f7da167804efe1b202719f05c10bc04cda4b4b6bbb82b5b5f + inlined_ast: 969a1134cab7823f7da167804efe1b202719f05c10bc04cda4b4b6bbb82b5b5f + dce_ast: 5f21e8538520144b0bce8741c3ecab54553f69c3f47a87fd61d4a47fc6306871 + bytecode: 3c60fe2ccd72f2fee542194a4a812f65cb74ffe4aa77947d0ef39a626d9175d9 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i16.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i16.out new file mode 100644 index 0000000000..3b007b3e19 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 077422b93c97f7cd8a28ff1ba7bbe58e07c4b7887304c46d35eb5ac6bf23c972 + type_checked_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + unrolled_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + initial_ast: ade06bd24aa3c28d8efc570926bae7422d060ff17f9256a8812ede2f7215ef57 + unrolled_ast: ade06bd24aa3c28d8efc570926bae7422d060ff17f9256a8812ede2f7215ef57 + ssa_ast: 7c5c5372e59171948f838d138b3d343485e1e6e3c814f80253a8e6b225a33cb4 + flattened_ast: 38b217d39243fbd0e3139a2351499dea9d44f3e3acd3587b49de466f2a97e13f + inlined_ast: 38b217d39243fbd0e3139a2351499dea9d44f3e3acd3587b49de466f2a97e13f + dce_ast: 7b7c7b62ba89d9f2ff5ccf3eef55b9c80b51fff266c84ad2447573db1abcae46 + bytecode: f6c112b08c4a5b02002de56b8dfba054dca0fdb49feeda7146384ce5bc4b9e3b + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i32.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i32.out new file mode 100644 index 0000000000..0ecbd90d9e --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 0b9e361a60499d11d8de9a427cd689b0904e3660092b6ff95a1c07bf09964e11 + type_checked_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + unrolled_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + initial_ast: c824f8b65a0b126047e35dd045057120531b1fdf8ac7ffd6f26def1c47bce94e + unrolled_ast: c824f8b65a0b126047e35dd045057120531b1fdf8ac7ffd6f26def1c47bce94e + ssa_ast: d7c3af0f44a2438b8b132c808fb4add572f1990086eee6391c7691198570bb4f + flattened_ast: 59a28037747838c6219332d5f4b39c3b20bd9fa1e22c8e9f66f02e686c0eaaf8 + inlined_ast: 59a28037747838c6219332d5f4b39c3b20bd9fa1e22c8e9f66f02e686c0eaaf8 + dce_ast: daa2eb0d1d3a2ee818a5780e3026ae93aa2e93621e06a8c65a3c6db8fab0a80f + bytecode: ff30f43337c830695fd7271014aee19d33c0489de50d3d66db69b3d73da357ce + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i64.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i64.out new file mode 100644 index 0000000000..3b6e509145 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 85b2afdf445a99fc5beb1bb9b7c98ddce8f4936dbdb5173447e64bfc5c73e96d + type_checked_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + unrolled_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + initial_ast: a7ac1b60ade1534cf943482cc0830273938d56ede0f6230215db41d07a0f92a1 + unrolled_ast: a7ac1b60ade1534cf943482cc0830273938d56ede0f6230215db41d07a0f92a1 + ssa_ast: b238499439dafba0bb756fd7d8568380ba6078f4de1496156c61b5db3a414a1b + flattened_ast: d03d05498966b5d9ca6d6ad981c07b89dea69069b65db89bae7efac084139093 + inlined_ast: d03d05498966b5d9ca6d6ad981c07b89dea69069b65db89bae7efac084139093 + dce_ast: 3ee51ca5a52712f7b680174c6c4552081a7ec42f2d1bb9c030d86b4d310e6289 + bytecode: 9613835dc4e36f266d29110dd595208e54ebd4b8dcf371985a38796c15044f38 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i8.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i8.out new file mode 100644 index 0000000000..69a5218c9e --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: e57034c883f65a0bf8bf21c5948e8e470938929205661f4629331145f96f457a + type_checked_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + unrolled_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + initial_ast: 969589ec2cb93dd304403295b61bd7a14a7cd5f0bde453ad9e66f12ed67c7221 + unrolled_ast: 969589ec2cb93dd304403295b61bd7a14a7cd5f0bde453ad9e66f12ed67c7221 + ssa_ast: 8e3cf3acf2a05fd3f2cf3827e29b1d3b79d785dda14eb65b9981c11c638c6028 + flattened_ast: 6ca95bcd7ad7f25d8f54f24b99c670ddeb330de0896d4f848d20346489290fa6 + inlined_ast: 6ca95bcd7ad7f25d8f54f24b99c670ddeb330de0896d4f848d20346489290fa6 + dce_ast: 426ec145b50faba7aa04a0d0aac347debd897f006b185abc4326b55d8a4f2949 + bytecode: ca074224fb21da9078cf66f586228b5d09460ff02edf0f84847970c375695b57 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u128.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u128.out new file mode 100644 index 0000000000..ab8ceffde6 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 30b74ef9405be6a65d0718e893155dfab9c5a27ba6331b46674fbfe804c078c7 + type_checked_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + unrolled_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + initial_ast: bfbfefbf1ec589e2017ff331ec8afef1ccca66d1ebc6a4ce9c52aa3e59e67a7f + unrolled_ast: bfbfefbf1ec589e2017ff331ec8afef1ccca66d1ebc6a4ce9c52aa3e59e67a7f + ssa_ast: a9e6652b39b4d1ad722714aed53ab60841eca051a44da7a89e2aa42547862197 + flattened_ast: a315adbd425afbbff7ca136bd2aa1205c74f8bdc0d5a4afdcbd7509521c24e46 + inlined_ast: a315adbd425afbbff7ca136bd2aa1205c74f8bdc0d5a4afdcbd7509521c24e46 + dce_ast: d4af3f7178e092577f29200aed67d52660eacdd0e4ae3b49b0edfe0803716b6e + bytecode: b0c87022d5e30dd47b5a097c7e1c00bd8c487886a84212ce7db0c7b1c5856259 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u16.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u16.out new file mode 100644 index 0000000000..c0a5df9ed4 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 5a59bc205eed395ed0a857abe27790d3612aaac26fce76ec8b77b539dd85b4ad + type_checked_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + unrolled_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + initial_ast: dbda07ce2fe45a0dc665ae1ced3a7713264ff066aee965e5009c8eec8a94865e + unrolled_ast: dbda07ce2fe45a0dc665ae1ced3a7713264ff066aee965e5009c8eec8a94865e + ssa_ast: f5ce70c377909621ba2cc7b891e3a7de3eda86c8341ab2e689773fc10c487cf9 + flattened_ast: 0745f2f84e8896081f0327e494be2f44bb5312ae4cbd9e39139d6e725a80f886 + inlined_ast: 0745f2f84e8896081f0327e494be2f44bb5312ae4cbd9e39139d6e725a80f886 + dce_ast: 95348c92ce3a9d1d0f497d5a00d44cc8b8e3e2c8cda0f1968034b41e1f148489 + bytecode: 8b851887789d1b0d14a68de7f393a839940770b54680c74656c872dde5ff20dc + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u32.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u32.out new file mode 100644 index 0000000000..d6afcbe224 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 992dd740994079e30efead06f29f9c2df115a70d54f7649eb5fadec3120db120 + type_checked_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + unrolled_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + initial_ast: d938586a8ca8cf0f909515c9db5a38a605793569763f86cf9d6bd56e1bf17f59 + unrolled_ast: d938586a8ca8cf0f909515c9db5a38a605793569763f86cf9d6bd56e1bf17f59 + ssa_ast: fc0bee51f6a25925b2c5128d525ad8cdfaa869e2832891dad0138a324a36e939 + flattened_ast: c358cd2983bd6495907132a464be06e133c326722ef18646b2c7b9faab291390 + inlined_ast: c358cd2983bd6495907132a464be06e133c326722ef18646b2c7b9faab291390 + dce_ast: 8347b29f7f8cd11598dd06a97014ec7b23dff9d8db86105fba4af177d8c18e16 + bytecode: 8cfc137d9de5f78970ffe8a7fd36cf828d967798364ebb25ed2654f97e993df2 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u64.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u64.out new file mode 100644 index 0000000000..b8e607a1e1 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 7c89248ded858c5bc52c59d418ebea9937f41f59e113313a43dce30d21780db9 + type_checked_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + unrolled_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + initial_ast: 06c566c65b2dc388784aac80df80b6a1db44cc4ee0ef88a4530c0dd90611939e + unrolled_ast: 06c566c65b2dc388784aac80df80b6a1db44cc4ee0ef88a4530c0dd90611939e + ssa_ast: c4229f237459edb93d658a13fabba258b9515b2fcedaf131a59e28d8ef65e401 + flattened_ast: 717f0191e6191f77518f52d62356ee5f3e649bf30fc64f34600b911e9a6bda7d + inlined_ast: 717f0191e6191f77518f52d62356ee5f3e649bf30fc64f34600b911e9a6bda7d + dce_ast: 6e30cca1ad2b197127ff5a46613cf093e13d08d258a34488914ac1cbdb1a729a + bytecode: e21f3d467b66f55e41c864391412af065fcfd0b44bb6697e68693b5c8620e4bc + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u8.out b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u8.out new file mode 100644 index 0000000000..1e0c4f1a14 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 9de9a9614bae9e392c40cbe50c32763866d8facbe3b7b0e618c773c9c1e2452b + type_checked_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + unrolled_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + initial_ast: 31e11e96b60a880a2464d0ee1cade250e75fd9244b325df26aaeebca7a38d635 + unrolled_ast: 31e11e96b60a880a2464d0ee1cade250e75fd9244b325df26aaeebca7a38d635 + ssa_ast: 59babacee5608646a5f15ef9d79b6ca106eb656ce5dd69b329185fe0c3d4c2c2 + flattened_ast: 2536c1908aa52ca3eb9ce66379031770fc1d46c0f3fb41a36dd7ac9a7bba619a + inlined_ast: 2536c1908aa52ca3eb9ce66379031770fc1d46c0f3fb41a36dd7ac9a7bba619a + dce_ast: 5107d449ad094fff19736c932bebca3539ddaad25d20ccd7f88a046d3f231d57 + bytecode: 999b9d0cdf8e006833a2d8ce94eb8ace714cd08c8df3e0b3531e28f6489e0984 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i128.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i128.out new file mode 100644 index 0000000000..0d4e9365c7 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: d61b6c9a81578cd47a707319541ce1cea3ac5e20020f2a5b8c0b0363df72ceb4 + type_checked_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + unrolled_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + initial_ast: 2c2d1ccb51c839e482174378b529a9ca372794e448f49a73c7d54d7102784b83 + unrolled_ast: 2c2d1ccb51c839e482174378b529a9ca372794e448f49a73c7d54d7102784b83 + ssa_ast: ca5200bf5a56c394fe380bf619200fab4de48590bfccc97d9309e5e98bfd67e9 + flattened_ast: 40c6a12b38f1d9835665f4a6dbac5412ac9779b239f05588e45dab0880073eb5 + inlined_ast: 40c6a12b38f1d9835665f4a6dbac5412ac9779b239f05588e45dab0880073eb5 + dce_ast: dc94220b99ba1b27cb6cadeed6d8a062b469bc31952746abc420fba903115ea5 + bytecode: 88e5bed3bec5448667a7407b85018435a99703ea27f2e24c965cee2b37ae5dc3 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i16.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i16.out new file mode 100644 index 0000000000..70af76b0ea --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 077422b93c97f7cd8a28ff1ba7bbe58e07c4b7887304c46d35eb5ac6bf23c972 + type_checked_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + unrolled_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + initial_ast: 8d36457e3b684ba52c2616afb2ee57b6211c320191e2f97eef3038869fcb69b0 + unrolled_ast: 8d36457e3b684ba52c2616afb2ee57b6211c320191e2f97eef3038869fcb69b0 + ssa_ast: 94ea82796b11539b0dbaa8d2835d7fce614e3bb4373216ca3b28e1ee86644f93 + flattened_ast: 96086d58810262f8211cfd68927e4bb1fd4a8b53d18d0b91b50f72537d75daa5 + inlined_ast: 96086d58810262f8211cfd68927e4bb1fd4a8b53d18d0b91b50f72537d75daa5 + dce_ast: 4f217a8a52ae50ce946658514ba73d0c26b08462b8c68b08dec8594afa4da04d + bytecode: 9b27d0806063bc598a773122d554a2d3da168e9813e2c2e55c4e0eedc2198f1c + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i32.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i32.out new file mode 100644 index 0000000000..5cefb3fbab --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 0b9e361a60499d11d8de9a427cd689b0904e3660092b6ff95a1c07bf09964e11 + type_checked_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + unrolled_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + initial_ast: a976774bcace9e83c21c4806a39daef70ab031fc7c3b14a62fe6d67d39d4947a + unrolled_ast: a976774bcace9e83c21c4806a39daef70ab031fc7c3b14a62fe6d67d39d4947a + ssa_ast: 94ceccee303af1bb33704f075c1f8e1108a77c981e50b950260e94414ac3f25c + flattened_ast: f91c68604350dc6fbb6da1c77e45a721f8dc465070d21de644545803ade48939 + inlined_ast: f91c68604350dc6fbb6da1c77e45a721f8dc465070d21de644545803ade48939 + dce_ast: ae3ed624697796b01f0b96c4989ea71788fc24a5ed3c24e04c73a4e4ab98f7c0 + bytecode: 6965d0539f26e7885d7fa616d93bb5326315793d3843573135bcda58cbaeb149 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i64.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i64.out new file mode 100644 index 0000000000..e4a7358111 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 85b2afdf445a99fc5beb1bb9b7c98ddce8f4936dbdb5173447e64bfc5c73e96d + type_checked_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + unrolled_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + initial_ast: 956d1254ca09c5e0949de8eee09a3a8dcb443ed5281392830897e48a805295e0 + unrolled_ast: 956d1254ca09c5e0949de8eee09a3a8dcb443ed5281392830897e48a805295e0 + ssa_ast: 1de9c10b3b78b2c2de90fc55f7e6212dba96d1f69d5be8bdd0896c47ca3b544f + flattened_ast: 7be044a6406aebddf654f6997da2ab55be256ccc09661a5a1f8b5fd18acfa48a + inlined_ast: 7be044a6406aebddf654f6997da2ab55be256ccc09661a5a1f8b5fd18acfa48a + dce_ast: 1b9f255e0f21e764f3e2401f72055d3646bcbc44e85b5fc78842bc86399c5b05 + bytecode: c497462939dadd3b6fa6a391939d169f8caf2da5064471e177e9dc2ca24af1c0 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i8.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i8.out new file mode 100644 index 0000000000..6f7650e553 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: e57034c883f65a0bf8bf21c5948e8e470938929205661f4629331145f96f457a + type_checked_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + unrolled_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + initial_ast: 4bf195576892e80ad70a8646ad1caf3b6524a41caac60175fde560ec4ecf4e3c + unrolled_ast: 4bf195576892e80ad70a8646ad1caf3b6524a41caac60175fde560ec4ecf4e3c + ssa_ast: ff3e057e99af9932dc60298c470b13fe25d5b06cb82da0bb51db61251321387c + flattened_ast: d8794e5ed4d49ed994e386725719f54649d7556d84f8cc97133fa61f6f3ead3e + inlined_ast: d8794e5ed4d49ed994e386725719f54649d7556d84f8cc97133fa61f6f3ead3e + dce_ast: 775e79331923c3e8804e9721c4425fb0c34229c406f427cff6437991e009ea4d + bytecode: 26f4c496d5e435d186f9ec58390da76af8848cecaaac30920a4daab0e2523a73 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u128.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u128.out new file mode 100644 index 0000000000..d52a306d6b --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 30b74ef9405be6a65d0718e893155dfab9c5a27ba6331b46674fbfe804c078c7 + type_checked_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + unrolled_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + initial_ast: fb0564379b6551ba15efad7ab636c8376bc7912e952c1f2cd655b6287c27bee3 + unrolled_ast: fb0564379b6551ba15efad7ab636c8376bc7912e952c1f2cd655b6287c27bee3 + ssa_ast: a71f3e5ad1b257bcb542145f07bf7b1cebc71ab1fc1da5e380ea2137b19e01ef + flattened_ast: 613eb032349c557bc8f197eeca01e4c0bac90b1d1194ecf4f3448d1190dc1490 + inlined_ast: 613eb032349c557bc8f197eeca01e4c0bac90b1d1194ecf4f3448d1190dc1490 + dce_ast: f474a80d2f063161adeaaa1fe80cbfd7eb484f560e4c428ac0c194f257af1470 + bytecode: 9a6698dbd340581ab6a6ab74e6ac3b2b04d107afafb2ef967cf878a68f90e66a + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u16.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u16.out new file mode 100644 index 0000000000..f470cdf690 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 5a59bc205eed395ed0a857abe27790d3612aaac26fce76ec8b77b539dd85b4ad + type_checked_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + unrolled_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + initial_ast: a174e402d3c60f2547f90ddbc8550635a34f32b48d4a29dbb22cd6b68e391038 + unrolled_ast: a174e402d3c60f2547f90ddbc8550635a34f32b48d4a29dbb22cd6b68e391038 + ssa_ast: 0ab446932a3708ec04bcb77969caf9486db6649915b414fb51e8a5daa0a79611 + flattened_ast: adbf37d6c3d312e04c5f94514aea9ea71b5c47d4f071ee50ba4d5194b4718392 + inlined_ast: adbf37d6c3d312e04c5f94514aea9ea71b5c47d4f071ee50ba4d5194b4718392 + dce_ast: 6da973991d6559471485deea0d678a2360a7346fa024202a20046dbefe20646b + bytecode: 382d6faca5454efb2c43e692e7ef46168de32044fd4eb589025fb7dabc62d3bb + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u32.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u32.out new file mode 100644 index 0000000000..c73da49fe5 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 992dd740994079e30efead06f29f9c2df115a70d54f7649eb5fadec3120db120 + type_checked_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + unrolled_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + initial_ast: 6a81b3dee819d4491b4d852f01a30f96363eae7816cb109685a67b068def8a2e + unrolled_ast: 6a81b3dee819d4491b4d852f01a30f96363eae7816cb109685a67b068def8a2e + ssa_ast: cf4131afeb8d46c3241b9e883c6c6a39e09b61c6d47c4a862d361cc20496d898 + flattened_ast: 8859b8ccd2bafcd389e01f57ea2591a8b20a23e321542871af924cd4ba189305 + inlined_ast: 8859b8ccd2bafcd389e01f57ea2591a8b20a23e321542871af924cd4ba189305 + dce_ast: 1a0e21e0f6445da71579911f4bfbfe4eaed4fdf4a092c0d9470250b98e582a57 + bytecode: cdf35ecca4bd73879647e3f8b20554dc0c6bea1b7064b2e62fe501aaf54469e8 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u64.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u64.out new file mode 100644 index 0000000000..48fcb42f9f --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 7c89248ded858c5bc52c59d418ebea9937f41f59e113313a43dce30d21780db9 + type_checked_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + unrolled_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + initial_ast: 9cb8e51006aa5fbec20899c838701fb025802573e5d9cda555f503782f60bc5f + unrolled_ast: 9cb8e51006aa5fbec20899c838701fb025802573e5d9cda555f503782f60bc5f + ssa_ast: b61bcacc0129e4ba41b2242cd55826ef6b563a36257ea9b25ce428dd6c92d9a2 + flattened_ast: 406e8d8e72755391871730444348104a753aad5bca71e31afee4f106f5000b22 + inlined_ast: 406e8d8e72755391871730444348104a753aad5bca71e31afee4f106f5000b22 + dce_ast: a5d3f777f1ae235a4d36cc9d6ac2c83b9f0f1bf87e4ef9e71c8bebba0d86b199 + bytecode: d7b1e51dba2a0e4e06e66b15ff10ea2c3d799073949f6b155489a46bbae70395 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u8.out b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u8.out new file mode 100644 index 0000000000..f76f613252 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 9de9a9614bae9e392c40cbe50c32763866d8facbe3b7b0e618c773c9c1e2452b + type_checked_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + unrolled_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + initial_ast: b634772b8c10bb096757e3e82b5e3028f346ef910533a48778c7885e7549cbbb + unrolled_ast: b634772b8c10bb096757e3e82b5e3028f346ef910533a48778c7885e7549cbbb + ssa_ast: 9d143e02ab5d92e4a8edd6e4e352e0cc399c97555f0abaf9b678b5edd7645b2c + flattened_ast: ad615653d17b46c22c80d1a16af3775ada276887e8ef3e19506edaad45ab1a9e + inlined_ast: ad615653d17b46c22c80d1a16af3775ada276887e8ef3e19506edaad45ab1a9e + dce_ast: c1045eb1b9a314f839ce6829f35a55baa7f6fc2a0180f686c1189ccc41ea46a9 + bytecode: 1729c5267f2280cfde27fd1c7806b03bb56e95306b8c269d0c186f05365ccef5 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i128.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i128.out new file mode 100644 index 0000000000..89a868d55b --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: d61b6c9a81578cd47a707319541ce1cea3ac5e20020f2a5b8c0b0363df72ceb4 + type_checked_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + unrolled_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + initial_ast: 58a3b4e94624fcd7741e623abec9af38c0c73b19cf76659608c41740fd5920f0 + unrolled_ast: 58a3b4e94624fcd7741e623abec9af38c0c73b19cf76659608c41740fd5920f0 + ssa_ast: 5fb165ec86987f42c038daa4209fa38a0584912d641a9841f668e84028cb4dc5 + flattened_ast: ce90f632cd8e21c1205e8d3e623e5455ee64a2d3af0ab3ba517d4d92afcfd98b + inlined_ast: ce90f632cd8e21c1205e8d3e623e5455ee64a2d3af0ab3ba517d4d92afcfd98b + dce_ast: 954570a985871ab6c12496a531e532b0d2e6e1c1eb124302f0f99e9e18be2f79 + bytecode: 90719e9440e244c74e57dd63e47c928680066f5d4289d1f15e9c4a2c78e75e84 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i16.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i16.out new file mode 100644 index 0000000000..d97d7f0df7 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 077422b93c97f7cd8a28ff1ba7bbe58e07c4b7887304c46d35eb5ac6bf23c972 + type_checked_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + unrolled_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + initial_ast: 3328290c728909e037299dc3471dada4a3af5a64067db6c05a932247f371ac18 + unrolled_ast: 3328290c728909e037299dc3471dada4a3af5a64067db6c05a932247f371ac18 + ssa_ast: ef783e3a5c886a20133a0ac7d562913aad6a5d17ae677cc79a5be1e1b16c522a + flattened_ast: 155bf9df20dfc1e1ff5914a0f682cb598834ca928a1261ca7ef7b6c492e3bf43 + inlined_ast: 155bf9df20dfc1e1ff5914a0f682cb598834ca928a1261ca7ef7b6c492e3bf43 + dce_ast: 3a658661efd391d30d7b274926b8c4b92e55dee787de35f8fc6bfd0a8a7483d8 + bytecode: 2bf257739832acc917b4b4f18f149a72e6a8394336740568bd06cb6141704762 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i32.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i32.out new file mode 100644 index 0000000000..a85e2e86df --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 0b9e361a60499d11d8de9a427cd689b0904e3660092b6ff95a1c07bf09964e11 + type_checked_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + unrolled_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + initial_ast: 5dcdbead72e84d845d8924d4a3bc6d0d46c35fcbf31e904d01de5da412b8b6bd + unrolled_ast: 5dcdbead72e84d845d8924d4a3bc6d0d46c35fcbf31e904d01de5da412b8b6bd + ssa_ast: 647128226f57669e87a3fe16b61dc57c8681fa8aa89ddbb4bd38bf80c638e255 + flattened_ast: 156aa530d48a25e9e007eef4b14a66b3566285d4449b9a83f2d0449322d19764 + inlined_ast: 156aa530d48a25e9e007eef4b14a66b3566285d4449b9a83f2d0449322d19764 + dce_ast: 317e8d80be7789c9721930f595bab286c0fbf30a26c3d419de8f2430fa6d495e + bytecode: 7420791e00dae08a4887c2fa36f481bcbfe5b3c8d5c8268ec753a904f3e51ae1 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i64.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i64.out new file mode 100644 index 0000000000..c982ec3c88 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 85b2afdf445a99fc5beb1bb9b7c98ddce8f4936dbdb5173447e64bfc5c73e96d + type_checked_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + unrolled_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + initial_ast: 59cf5fff8d2def44f1d552bf228d44d97ff8603cdb8050fd96d363a2e207c92f + unrolled_ast: 59cf5fff8d2def44f1d552bf228d44d97ff8603cdb8050fd96d363a2e207c92f + ssa_ast: acaa521eddb5f750f1fdff9cda3a5081c5a0a171970cb7a6760eeb0c6802c72d + flattened_ast: bf7be1a79d5abeb939c1dde898df521234b5e56a6e506ded3f16e613e4c131c8 + inlined_ast: bf7be1a79d5abeb939c1dde898df521234b5e56a6e506ded3f16e613e4c131c8 + dce_ast: 5415d1ec17bba9cf16f53d8ad42731b46e65a3aecfb779e0e1550b7b023c03d8 + bytecode: 6c433e307d008c270d0de4f6a677aa5069fcf55a7613d777379bbab14c24be61 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i8.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i8.out new file mode 100644 index 0000000000..2fd5c95199 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: e57034c883f65a0bf8bf21c5948e8e470938929205661f4629331145f96f457a + type_checked_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + unrolled_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + initial_ast: cbc0311ec22272d00a7490b2b5a268c3fc974d8f8a5e59b92fdfd6f017f31a41 + unrolled_ast: cbc0311ec22272d00a7490b2b5a268c3fc974d8f8a5e59b92fdfd6f017f31a41 + ssa_ast: 18ccbb80431a224c53a8a4be61f7757ed41498141a83167bc46c6169d4d4c20f + flattened_ast: 9b580eabbc9a39f2b236b3ad7a9ceb8af521c11ea870dbcdfdef2be19003efff + inlined_ast: 9b580eabbc9a39f2b236b3ad7a9ceb8af521c11ea870dbcdfdef2be19003efff + dce_ast: 65be1c239c253fbc24c9dc8440ff527e2e0241901ad637413b71aa62946fd567 + bytecode: 2d9a914eb6d3310ce7e2a0f8d7f3ea4e34fad2533c9e2c7b7bfcc9da17ee1313 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u128.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u128.out new file mode 100644 index 0000000000..2d9acfd963 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 30b74ef9405be6a65d0718e893155dfab9c5a27ba6331b46674fbfe804c078c7 + type_checked_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + unrolled_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + initial_ast: b69c54158da3c9efa288444762a4f8ee3e1ced722069e317cc99669951096b4b + unrolled_ast: b69c54158da3c9efa288444762a4f8ee3e1ced722069e317cc99669951096b4b + ssa_ast: 3e7131061883ba06bbef58000e0f386a6f595f6543bb66611b2566485aa522b5 + flattened_ast: 6b851995267135baedba85b8d33a476cc229de2cf11ff11257c38a6bf1a43d2c + inlined_ast: 6b851995267135baedba85b8d33a476cc229de2cf11ff11257c38a6bf1a43d2c + dce_ast: c15dfbc69618d8ea6fa5f103544b13e2de46e33eb3bc150005a7699e8ef2c67d + bytecode: e2c7366a24109eb7d575db5c998ee9833edf454546a359ea4508eeabfff11d19 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u16.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u16.out new file mode 100644 index 0000000000..ac1ee778e9 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 5a59bc205eed395ed0a857abe27790d3612aaac26fce76ec8b77b539dd85b4ad + type_checked_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + unrolled_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + initial_ast: 94f185034571cbfe3d64d6344bdb6f67df2a3968808f1d91c78c85bf9de3fc9b + unrolled_ast: 94f185034571cbfe3d64d6344bdb6f67df2a3968808f1d91c78c85bf9de3fc9b + ssa_ast: 32747b3f00cd0485259d5f9b166d54222f972e51257e24fccfc4c7db7d2ccee6 + flattened_ast: 2d4a3c548e07a31686344910a14b8d3e18a162a862b9a7b809d21081c33e0051 + inlined_ast: 2d4a3c548e07a31686344910a14b8d3e18a162a862b9a7b809d21081c33e0051 + dce_ast: 48ece325a8641ae98cdedb590c8727bebbf9a2a9bfc57c68657f07e1052f456a + bytecode: a789b985627d6892e58cab9b998763a2ab106196eb6b1c0c4452af122c7908fc + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u32.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u32.out new file mode 100644 index 0000000000..057d1edf25 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 992dd740994079e30efead06f29f9c2df115a70d54f7649eb5fadec3120db120 + type_checked_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + unrolled_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + initial_ast: 75cff51bcadfc042fa8b68031ceaf679ab5b7bc7be60f46a3179667e84c5d225 + unrolled_ast: 75cff51bcadfc042fa8b68031ceaf679ab5b7bc7be60f46a3179667e84c5d225 + ssa_ast: 5b642d6352f9fd930f03aaa019e359ac10dbb645abe081018215816e9a4560eb + flattened_ast: 737e7fafba0bd2ce9c5d738807e5699082cb0ef94f8be9dd02eb6c2833f749e3 + inlined_ast: 737e7fafba0bd2ce9c5d738807e5699082cb0ef94f8be9dd02eb6c2833f749e3 + dce_ast: cdfef300e5e87c6af2b37f8da7513d36c569cb6827a3c0d54a21ed3f2fbbfafc + bytecode: 32f8e6f9a0f4869bb08c45ba1b94b5411c3641959a3f21203f34f54bfbdf120f + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u64.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u64.out new file mode 100644 index 0000000000..236386a88d --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 7c89248ded858c5bc52c59d418ebea9937f41f59e113313a43dce30d21780db9 + type_checked_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + unrolled_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + initial_ast: 6e198985d0398a434f21adb34a056ad645f9ad0e7c50a8a4935665affa3aeaf0 + unrolled_ast: 6e198985d0398a434f21adb34a056ad645f9ad0e7c50a8a4935665affa3aeaf0 + ssa_ast: f39cbddf81aff48f6ae28bac20a3ffb8cd5f169e7cf907279183fe740e008644 + flattened_ast: 86b5b7359c21ce1ac255440d4b797a9ca43756d3777a024d00019d899afb3705 + inlined_ast: 86b5b7359c21ce1ac255440d4b797a9ca43756d3777a024d00019d899afb3705 + dce_ast: c73ccad733899ffe3692954e232188081e43a77c3299b84ba41738ca025dab8d + bytecode: 9c22fdc85a23a84932bff4c1d2f420db2e3c8f60fe55b628e573a100318afc09 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u8.out b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u8.out new file mode 100644 index 0000000000..b0941a147f --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 9de9a9614bae9e392c40cbe50c32763866d8facbe3b7b0e618c773c9c1e2452b + type_checked_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + unrolled_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + initial_ast: bef79f2eda7f062dd16fb3408ed0749786aba22cbe06c79467c41ade078d8caa + unrolled_ast: bef79f2eda7f062dd16fb3408ed0749786aba22cbe06c79467c41ade078d8caa + ssa_ast: f700d09e74af98bb37f189a5116c887b606a3f6a9be88afd7dd9e09d44198eed + flattened_ast: 69d1a7c1b37725a226be755b574a64fb8bfc5c0f60b14a03d78226941c3dd2a9 + inlined_ast: 69d1a7c1b37725a226be755b574a64fb8bfc5c0f60b14a03d78226941c3dd2a9 + dce_ast: 486c5fb002cae54a73bca099979eac100ae0ed24b233f81ce585b87763d2d7d4 + bytecode: 3abe59e41cf33d2c2faa4a8b214ca184aa3b1a34b4264e0d26d520d9ccfaa10d + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i128.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i128.out new file mode 100644 index 0000000000..aef84049d5 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: d61b6c9a81578cd47a707319541ce1cea3ac5e20020f2a5b8c0b0363df72ceb4 + type_checked_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + unrolled_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + initial_ast: 6b807387393c57d919e5186d0ced1162163cc0891473f48239cd56e9910f07f4 + unrolled_ast: 6b807387393c57d919e5186d0ced1162163cc0891473f48239cd56e9910f07f4 + ssa_ast: 790c49f47724b4bb3f1f28c115aabcbdc2555d52b7583a8b475b9d8733944dd5 + flattened_ast: 4b66159b96b4790678c8d0c081a77a046cd440e4181a15d49bf7ba9e6fc17ad5 + inlined_ast: 4b66159b96b4790678c8d0c081a77a046cd440e4181a15d49bf7ba9e6fc17ad5 + dce_ast: 3ef169a23a55e84be1fe3ead9cf5c83432f733138748bb38c70a06fea09e20a2 + bytecode: 49b4c6dd96208f99a71898243601f70b0905787e0a1d4c265a781db1a20cc0d5 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i16.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i16.out new file mode 100644 index 0000000000..b9a9c1624d --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 077422b93c97f7cd8a28ff1ba7bbe58e07c4b7887304c46d35eb5ac6bf23c972 + type_checked_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + unrolled_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + initial_ast: 95e0ba65d7ece346926eae63d488c082c17fbcfcd9be0f69351048eb7eac1ecb + unrolled_ast: 95e0ba65d7ece346926eae63d488c082c17fbcfcd9be0f69351048eb7eac1ecb + ssa_ast: b2e69bcb9bd231a1584d5ce3519202fb85659862e57f31281131673292dbd148 + flattened_ast: f7b9620c3c2191dfcf73a6861a4f83a7c686eef4a7b3e0103a94dbd2da867f30 + inlined_ast: f7b9620c3c2191dfcf73a6861a4f83a7c686eef4a7b3e0103a94dbd2da867f30 + dce_ast: 42a4269e11fb01b14614ed051ae4393060869b6b05f6918229c5b6c9bcfd41c7 + bytecode: 363561300454f0f6b2213cdd668ddb222e6ae238cded832a3b2703d4d05394ce + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i32.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i32.out new file mode 100644 index 0000000000..4079113a9c --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 0b9e361a60499d11d8de9a427cd689b0904e3660092b6ff95a1c07bf09964e11 + type_checked_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + unrolled_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + initial_ast: 52d896016fc4ed98d3948d38812b5b1b0e4fbbf27e553c3875bdd9e628bbb54e + unrolled_ast: 52d896016fc4ed98d3948d38812b5b1b0e4fbbf27e553c3875bdd9e628bbb54e + ssa_ast: 6968fcd721604a331ff377070ff3bef6df571fd5868c42dcb12e42ab8c752ebf + flattened_ast: 605fd8b0760dd4e0cadd535a34cd85b3193b6cc4300b2c6ea4867c7498bef3fe + inlined_ast: 605fd8b0760dd4e0cadd535a34cd85b3193b6cc4300b2c6ea4867c7498bef3fe + dce_ast: bc1eb0d91df811d790ad67121de31662384e6abbb54a492388c2c4d9139d1e9f + bytecode: 8c0aeafc028be27891412b5df88c1352b25b522936310bd38afd3334c8f21042 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i64.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i64.out new file mode 100644 index 0000000000..44492d2cda --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 85b2afdf445a99fc5beb1bb9b7c98ddce8f4936dbdb5173447e64bfc5c73e96d + type_checked_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + unrolled_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + initial_ast: 915999023c99de921f54312ff4c9eb35e2bfce4bcec4920a13de87e1f7a037ec + unrolled_ast: 915999023c99de921f54312ff4c9eb35e2bfce4bcec4920a13de87e1f7a037ec + ssa_ast: d0a191af2779fae750b0cbdfa7c89aef3943909c4efee1b7cfb11d25b7e7ba39 + flattened_ast: b0ba0e8eeac3b9769882075ddd352db1402555f46610d8854aebf7da03f1f0e4 + inlined_ast: b0ba0e8eeac3b9769882075ddd352db1402555f46610d8854aebf7da03f1f0e4 + dce_ast: b58649fc3f10a5bc21e0009962901caa05a8dd594dab11f8fc0e1de41a738620 + bytecode: a6f52a903b9de83e1cd758c63713591e8270f14276acd338000f47ea2ae40302 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i8.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i8.out new file mode 100644 index 0000000000..c7e8d724b5 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: e57034c883f65a0bf8bf21c5948e8e470938929205661f4629331145f96f457a + type_checked_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + unrolled_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + initial_ast: 5bbeb0e6ddf3cfc6e0de0a6b4ef9723a00e86358159729c783b54b583b598320 + unrolled_ast: 5bbeb0e6ddf3cfc6e0de0a6b4ef9723a00e86358159729c783b54b583b598320 + ssa_ast: 73744b3e8db4f6a62a87e8a6458dc00fc86aabd6a2127516b9d67dd104916759 + flattened_ast: 3033c5d4592c314c12334b503f4387852355577bbf0201fefb1f36b142014e2b + inlined_ast: 3033c5d4592c314c12334b503f4387852355577bbf0201fefb1f36b142014e2b + dce_ast: f1c8fe5f0c486ee74737104793b1036a7a180644313f28c8021988e9ac799fef + bytecode: 8b1f3cfaee87de68b82bbdf34cdaaac42bcec03c7a1220993034fd1251d4d4dd + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u128.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u128.out new file mode 100644 index 0000000000..919a15a613 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 30b74ef9405be6a65d0718e893155dfab9c5a27ba6331b46674fbfe804c078c7 + type_checked_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + unrolled_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + initial_ast: b3e472532c0569ae811733e4ffa87ab85c0c21b64faa3dd32ddab7d18ee0256a + unrolled_ast: b3e472532c0569ae811733e4ffa87ab85c0c21b64faa3dd32ddab7d18ee0256a + ssa_ast: 198f0d29fe6801e01b85d45ec3fff008fcc96404521ac05499ce0432372d9169 + flattened_ast: ce3e1ac361062bd3f5d5b69e5d989f9b1051d8a674c8f0bb41a1ed94e719fa99 + inlined_ast: ce3e1ac361062bd3f5d5b69e5d989f9b1051d8a674c8f0bb41a1ed94e719fa99 + dce_ast: dc285728116c03793f96a7e7db556caa9184c96910700fcd20ca25302aeaa6d6 + bytecode: 638b45c57e81c04b6f17fe13aa0764399352a80bd71618b03ff4831da6855f6e + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u16.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u16.out new file mode 100644 index 0000000000..b56c217c59 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 5a59bc205eed395ed0a857abe27790d3612aaac26fce76ec8b77b539dd85b4ad + type_checked_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + unrolled_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + initial_ast: 56386612f92849c19815eb8344c829df9ea4a9ab164e448e4e3f9f7167a04312 + unrolled_ast: 56386612f92849c19815eb8344c829df9ea4a9ab164e448e4e3f9f7167a04312 + ssa_ast: 5921e1b7dde2def8bb49e461deb212694843918bb171486a904daa5a5463adcc + flattened_ast: f921ec05ca35e11da88653a710e544bc905ae70305f3ad74b83acf9c92fac632 + inlined_ast: f921ec05ca35e11da88653a710e544bc905ae70305f3ad74b83acf9c92fac632 + dce_ast: c376a6adadac40fc9b4e5c84712e6d2b93ed7b677d2a7121b9f1ece225a6e3c7 + bytecode: bce86817893871d9d55d2a5a1dfb095822a7ec0813c029d7243200b20a401587 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u32.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u32.out new file mode 100644 index 0000000000..0dbfd3fc66 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 992dd740994079e30efead06f29f9c2df115a70d54f7649eb5fadec3120db120 + type_checked_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + unrolled_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + initial_ast: 9ea6d1a64d3c73e1dafebad5ff8b146ce26a7690b21aa77e328ec7d46e107484 + unrolled_ast: 9ea6d1a64d3c73e1dafebad5ff8b146ce26a7690b21aa77e328ec7d46e107484 + ssa_ast: 05cbe2c3784afd333a89e85bf29e959659e6e8c328fecb72ba7f6cd96b222d13 + flattened_ast: 573db37ff5d53241908cf6a0f23d922f676a505b74405f6306b6a2a3a1f5cfaa + inlined_ast: 573db37ff5d53241908cf6a0f23d922f676a505b74405f6306b6a2a3a1f5cfaa + dce_ast: 768614ded730c43b1c137afad2ed169f2c67ec98eeaeb2b0a0e25714f048ada2 + bytecode: 66c33deb9dd42d3e8f6600d5210f16e5fec245557773b8041346f13fbca2c37d + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u64.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u64.out new file mode 100644 index 0000000000..61ad5f6598 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 7c89248ded858c5bc52c59d418ebea9937f41f59e113313a43dce30d21780db9 + type_checked_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + unrolled_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + initial_ast: 118db09391a2e86480e855209346cb29bb3f5021c955a40b1e47ca38017674aa + unrolled_ast: 118db09391a2e86480e855209346cb29bb3f5021c955a40b1e47ca38017674aa + ssa_ast: 65cf87825f93f33d3062833ea74941b5fae09e4159dfc95ab088ace09823f013 + flattened_ast: 2b73e1fd713cb0d72849e5b6765451c66706239ebd3c267f447217f74d61e41c + inlined_ast: 2b73e1fd713cb0d72849e5b6765451c66706239ebd3c267f447217f74d61e41c + dce_ast: 33fe74cea6f1c3f691e065ff480557dae31617054b3f4cd5294c830f04717c2d + bytecode: 8b8c77b3c97fbee9405b7ee10e65b3d317e42479aa8944b3bd3f4fb6f02edbb6 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u8.out b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u8.out new file mode 100644 index 0000000000..f520539c7a --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 9de9a9614bae9e392c40cbe50c32763866d8facbe3b7b0e618c773c9c1e2452b + type_checked_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + unrolled_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + initial_ast: 4b6f097b7a51b55500bfa73909a70b6b96544d1165307734050c57b57bc88c8b + unrolled_ast: 4b6f097b7a51b55500bfa73909a70b6b96544d1165307734050c57b57bc88c8b + ssa_ast: feee62319db79bf5b131c900655f3ba7c78e9e74b8ac5ec5e6550bb27567bc0c + flattened_ast: cc7eecaf602117eee09fb30ea5857ac18425214049fb49d2ed8cf6c08de696e4 + inlined_ast: cc7eecaf602117eee09fb30ea5857ac18425214049fb49d2ed8cf6c08de696e4 + dce_ast: d50c30e38d94e7f54789f340bab94eeedf1cb89d516dcebec8e86e9d84665043 + bytecode: 29856bd31a6992636fabf8b9428115dbf7dc585688f358a617b9352c1c3a377f + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i128.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i128.out new file mode 100644 index 0000000000..0d0b6f5c16 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: d61b6c9a81578cd47a707319541ce1cea3ac5e20020f2a5b8c0b0363df72ceb4 + type_checked_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + unrolled_symbol_table: 242199b3378fc1e61068a3091df5fbc413ee879c63a678cc7256ae0562d8e0f4 + initial_ast: cd7810d59a1f342291c75e0bee8b52d4f14c45f2ef115b6582c609ade342dd65 + unrolled_ast: cd7810d59a1f342291c75e0bee8b52d4f14c45f2ef115b6582c609ade342dd65 + ssa_ast: 41d1108f776279e324d63905861ce0787eda0b582fd1de66930c5b1b0ff5dc34 + flattened_ast: 1ffe8552441ae6fadef075b66a4891c64c4366b676396778c5f3ec9a86c7fcf9 + inlined_ast: 1ffe8552441ae6fadef075b66a4891c64c4366b676396778c5f3ec9a86c7fcf9 + dce_ast: 171272ce70ff7e74f673178a442180dfd19e36936c9a50c91b2482b8e1f84c53 + bytecode: 84d2910c4f799e360581da0b0aca505e95e1c1bb187f45877c5b227e9561d936 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i16.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i16.out new file mode 100644 index 0000000000..81ffc7f686 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 077422b93c97f7cd8a28ff1ba7bbe58e07c4b7887304c46d35eb5ac6bf23c972 + type_checked_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + unrolled_symbol_table: 5f860d2de9a0608ecbc70179a65c645cd622701fee49e955c77387fa225b01a1 + initial_ast: 10b5e13f6ad4ecc2335546aabe9309f93ba879432e592ab5f06f1d9344b5c9ac + unrolled_ast: 10b5e13f6ad4ecc2335546aabe9309f93ba879432e592ab5f06f1d9344b5c9ac + ssa_ast: 9a087cfdc9630a7f82ad9f84570233b8e4e6768bf37263603fcb1fdf0417c868 + flattened_ast: 4748eac799037fe42e0b1a0184018b75643bca7f2096bbe2ac98ef82ac26cb65 + inlined_ast: 4748eac799037fe42e0b1a0184018b75643bca7f2096bbe2ac98ef82ac26cb65 + dce_ast: e9781aaa2846d59e594fe9ef06c3d5d1c079974347c3b7eb7d3bfcd6637fe529 + bytecode: 101fe1af849e29ba44ea27ea575a3393fba2e0d2e302e43327b8547561b5a2ff + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i32.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i32.out new file mode 100644 index 0000000000..5b8a932914 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 0b9e361a60499d11d8de9a427cd689b0904e3660092b6ff95a1c07bf09964e11 + type_checked_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + unrolled_symbol_table: 58b695183f390fd270d2d7b521591c524ad80192b3c1e04fc7e691ebd5fdf24e + initial_ast: db6dd45fc50a6df1658592f8a29d593c0d9a1efd4e2ffe985d6986a7abba2c84 + unrolled_ast: db6dd45fc50a6df1658592f8a29d593c0d9a1efd4e2ffe985d6986a7abba2c84 + ssa_ast: f5311ff6b3c5e91bcc165bff180ec85f340b3389c0dd6359b0aec3b5a38e8090 + flattened_ast: a20464630b2ecb73af5490c3e8cfada25ddbbe8ae67a6260dbb09b6e02f40e7b + inlined_ast: a20464630b2ecb73af5490c3e8cfada25ddbbe8ae67a6260dbb09b6e02f40e7b + dce_ast: d91a998bc1866e5fd573d3aedc0de19965c1b3527302dd749c502d5da59854f2 + bytecode: 6ef5805c3336e65726b72f34cc357f5f87030d017dfd525f232f912f14c3f421 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i64.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i64.out new file mode 100644 index 0000000000..fa0e2317aa --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 85b2afdf445a99fc5beb1bb9b7c98ddce8f4936dbdb5173447e64bfc5c73e96d + type_checked_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + unrolled_symbol_table: 37ed5c5410f201880eb2da82ac4ec3d3ebb21756fc697827b30a5853945bfbb7 + initial_ast: eafa6e8d404e05f49a1ab86bcc966ac2a5832b495144a2933de7688cb9db435e + unrolled_ast: eafa6e8d404e05f49a1ab86bcc966ac2a5832b495144a2933de7688cb9db435e + ssa_ast: 9ddc82b7609fea561f783684aef62f381c06aaceab88667b0fb6d12969e0444d + flattened_ast: 3e02c76c6d2128411794102fe88d1947b93ef408dac58c2faa9186c2b2cc4640 + inlined_ast: 3e02c76c6d2128411794102fe88d1947b93ef408dac58c2faa9186c2b2cc4640 + dce_ast: 36d72ea75999a9d7c0e0756e916bfdc97cbfdec10e59b05e114085e92320a7c7 + bytecode: 23b8c2466fbe8fc4cabd6fb7bb3b980b10ff779efecfd8fd347d3c4b46c2dc58 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i8.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i8.out new file mode 100644 index 0000000000..cde21b0a59 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: e57034c883f65a0bf8bf21c5948e8e470938929205661f4629331145f96f457a + type_checked_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + unrolled_symbol_table: bfa5890e9d7766d453384d93a8a70c7513c88833460ec856a316742105dee2c8 + initial_ast: 5cbab9af12711c3790edc831ef3359bb5851e45b8fb9da7da33269ac482a21bb + unrolled_ast: 5cbab9af12711c3790edc831ef3359bb5851e45b8fb9da7da33269ac482a21bb + ssa_ast: 82094cab1927b3239a2ae636e37ad4b2682d4fccfeedc04def35599e71167a2a + flattened_ast: 7bb13d0376737157b57f7b503ca6bb0b176ac9cba2d32b7773bb5136a3c557a6 + inlined_ast: 7bb13d0376737157b57f7b503ca6bb0b176ac9cba2d32b7773bb5136a3c557a6 + dce_ast: 72751221861ff95e194a13313e03e5fece3ae8ca0ff9c78380c1ade145e94d81 + bytecode: aa8cfafa904c5e0d62b9bb6d271a6182830cb6cfb1bedaa78812a6e5be735597 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u128.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u128.out new file mode 100644 index 0000000000..577ff126e5 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u128.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 30b74ef9405be6a65d0718e893155dfab9c5a27ba6331b46674fbfe804c078c7 + type_checked_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + unrolled_symbol_table: df1b9add309c4f16c8fc410cfe1a5e081449f19662d106576ea7934ae2ec016a + initial_ast: f162586812bbe946a40480a30a461238bd4ccee8dffcdcfc6f5f00edd8e39e8c + unrolled_ast: f162586812bbe946a40480a30a461238bd4ccee8dffcdcfc6f5f00edd8e39e8c + ssa_ast: 5e986cccbccd6d00294c74eb090469962dc56bc1840108ffa88929267047f59e + flattened_ast: cfb22188ba5dd71f0f4dc529d630b0377c80ecda34de8c5e59552fed07cfe93a + inlined_ast: cfb22188ba5dd71f0f4dc529d630b0377c80ecda34de8c5e59552fed07cfe93a + dce_ast: 5fd0127b68123edbb9ce0ef504995d8511ced1a77eb95c628738cbeb91baeb39 + bytecode: 540f46ca90fbe10a5ad8ff7b757d5d55a6e735ffd21c22116e7c65f0b9bde58d + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u16.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u16.out new file mode 100644 index 0000000000..8087470cc3 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u16.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 5a59bc205eed395ed0a857abe27790d3612aaac26fce76ec8b77b539dd85b4ad + type_checked_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + unrolled_symbol_table: eec79e1688bdeb5852327404ba04f4db9b6a914d2b19fc0578a44ac097fa4149 + initial_ast: 61ea06923216b971a62b1cf42df6bb27f8cec49a6f52836ae7f08d3161faccd4 + unrolled_ast: 61ea06923216b971a62b1cf42df6bb27f8cec49a6f52836ae7f08d3161faccd4 + ssa_ast: a2fc9da6afbd897d74887daf5feb1431b1c8ce13679739dd66106d9a8c7eb230 + flattened_ast: 4435b2a73698b9b058d2fcda2a311b353437c20fe70aae603114975f13e64eb1 + inlined_ast: 4435b2a73698b9b058d2fcda2a311b353437c20fe70aae603114975f13e64eb1 + dce_ast: b850b12350a47207f5aa0b5180b1f1caa6b0aad4b52fb71d87c1ef6085d374d5 + bytecode: a00a5d5ec5035a093b4928bdce57a4d79d9300e6f86565525e88bb670eb02957 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u32.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u32.out new file mode 100644 index 0000000000..25354524dd --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u32.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 992dd740994079e30efead06f29f9c2df115a70d54f7649eb5fadec3120db120 + type_checked_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + unrolled_symbol_table: 2271d0f496fc810a81e3edbd0303d248c348b0a732ee32e9cff64ccf24073daf + initial_ast: 0c5567b1fabc363fef1ad4fdf101d54a749fd6622add80f1c5144e8cc609e481 + unrolled_ast: 0c5567b1fabc363fef1ad4fdf101d54a749fd6622add80f1c5144e8cc609e481 + ssa_ast: 4a6f8648321981c313d06cded85c2818afe149b85ea39bfdd5d7d57e19727b26 + flattened_ast: 24dfc8a5fdb62038368a5879acb0aca966b141f5082de0a6481609172fd395b7 + inlined_ast: 24dfc8a5fdb62038368a5879acb0aca966b141f5082de0a6481609172fd395b7 + dce_ast: e6d5639a479c22fc7d62d3936b91cb04e9b7f9da6e804aa105e8b6bbc4874ef7 + bytecode: 0719502c2e69186b2f64fe31ce1cc6f35abad01c9a86f5f6d7dafb7c465504b7 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u64.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u64.out new file mode 100644 index 0000000000..f34befc7f8 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u64.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 7c89248ded858c5bc52c59d418ebea9937f41f59e113313a43dce30d21780db9 + type_checked_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + unrolled_symbol_table: 0d4884468efa4393f32b1d81aa9f1bd16687853321f65b88703dfa8ec1e9b257 + initial_ast: c6b3c97da2613b2294ffcd39382cbbbad0a9a56b6d402e60b07da1125d948d31 + unrolled_ast: c6b3c97da2613b2294ffcd39382cbbbad0a9a56b6d402e60b07da1125d948d31 + ssa_ast: 1156cd2448c6f6f47d4916590da9729737002ca216b7878ee16640af8e18fcc7 + flattened_ast: ab19ebe0c71e3d5c59a75f8d34c88e74e83658e7085d3283bfb436d48df434e6 + inlined_ast: ab19ebe0c71e3d5c59a75f8d34c88e74e83658e7085d3283bfb436d48df434e6 + dce_ast: ca7e8976ae1a089efcf4ee4501f3f2a2baae47a29803da9e34e3cbeddc0d9efd + bytecode: 2741bb1b69d7b32d52a4f6ae48a4b8197f73e8be7531d4d346fcce378bbda8dc + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u8.out b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u8.out new file mode 100644 index 0000000000..81b57e9ba8 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u8.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 9de9a9614bae9e392c40cbe50c32763866d8facbe3b7b0e618c773c9c1e2452b + type_checked_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + unrolled_symbol_table: 0c70472fb21893662b1ec36bd51f9ac064da4731817d99d9c0030cf08799d915 + initial_ast: 40082824cb0e675fee80c34545dd04c29fc0283253a4b632a3e503e627f97393 + unrolled_ast: 40082824cb0e675fee80c34545dd04c29fc0283253a4b632a3e503e627f97393 + ssa_ast: 1a83f21034a80313dd96651886869829267c7d3b56b9ad4d65745e6a7b4bbf61 + flattened_ast: 37e24a151a83dd6adccdca30e885405e3d95fc1bdaa840774cbe150707fb3fec + inlined_ast: 37e24a151a83dd6adccdca30e885405e3d95fc1bdaa840774cbe150707fb3fec + dce_ast: 6a9f318d0a226e2e0a48df95a2efe8e2a22d141f85a81a12832192502266b66f + bytecode: 5c85a376013c529f75944db09bfa9ee85470aca42e5622cfee8cb8c8dec29145 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak256_hash_to_address.out b/tests/expectations/compiler/core/algorithms/keccak256_hash_to_address.out new file mode 100644 index 0000000000..bf478f1c8d --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak256_hash_to_address.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + unrolled_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + initial_ast: 6d17a107600c886fab266817b16d61f4481ec561e0482c54cab0fa55c0c8ed39 + unrolled_ast: 6d17a107600c886fab266817b16d61f4481ec561e0482c54cab0fa55c0c8ed39 + ssa_ast: f03be4c8dfd6438fb0c3874146d0b3a2cf7b3360e7d47fed31c9e45b26b45606 + flattened_ast: 82e4f345079016719a471a5eba27e747c3dc028a40dbe4ce7949c98b418e18dc + inlined_ast: 82e4f345079016719a471a5eba27e747c3dc028a40dbe4ce7949c98b418e18dc + dce_ast: 31ed8fb36ddad967fd80c9753a7cfd788e151a4da0e6c7b4002797c8710eef56 + bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak256_hash_to_field.out b/tests/expectations/compiler/core/algorithms/keccak256_hash_to_field.out new file mode 100644 index 0000000000..2e77e964a8 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak256_hash_to_field.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + unrolled_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + initial_ast: af5e8c7c1ab6605bf156383b0bf68a306fa4900e88895de284f5e89899ee9a42 + unrolled_ast: af5e8c7c1ab6605bf156383b0bf68a306fa4900e88895de284f5e89899ee9a42 + ssa_ast: d551d296cf11f8f643bdf24b321a506b531a21e2026d814e704ff5a911885ecc + flattened_ast: 4164cba48c7fbaaa823c0c036a8ba595a6728575a8ba5e278fd010d13fccaa64 + inlined_ast: 4164cba48c7fbaaa823c0c036a8ba595a6728575a8ba5e278fd010d13fccaa64 + dce_ast: 9713a8f685ee66681c7f7a1daf59c579b3bb366e7a662baa1575f1a2bb3b05e5 + bytecode: 21736a09a94367a2bf017cd7dc7dade802a2f064f2343cd3d295eac4e3dca0ae + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak256_hash_to_group.out b/tests/expectations/compiler/core/algorithms/keccak256_hash_to_group.out new file mode 100644 index 0000000000..094c9c1640 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak256_hash_to_group.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: fd9620b494239c2b62c2da7b951d51f08a1c0ad366a726e6b108da648ce5fb58 + type_checked_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + unrolled_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + initial_ast: 7352697408e7c28355a4ac12e369da16dc9c83f21f95e4bbe7b110a2ed2b4989 + unrolled_ast: 7352697408e7c28355a4ac12e369da16dc9c83f21f95e4bbe7b110a2ed2b4989 + ssa_ast: 8b55bb8e0d033e35f30ce60d102275acbc8edf9ccfcbd45a4d29e66a67381a4b + flattened_ast: 5f2469ffbf8923442e953e9a33227edb978a1167aaefa917dd732fa2d5f7ce01 + inlined_ast: 5f2469ffbf8923442e953e9a33227edb978a1167aaefa917dd732fa2d5f7ce01 + dce_ast: 3f5618ff40b2bd17e99500977c8f56eab0720ed1b4c7829e02dff78cf8927f79 + bytecode: 12b2cee6aa44638371f466d0f9a4b6396e2a466669a11a938b7ac251a5b23eb6 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak256_hash_to_scalar.out b/tests/expectations/compiler/core/algorithms/keccak256_hash_to_scalar.out new file mode 100644 index 0000000000..fdecd5e349 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak256_hash_to_scalar.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 15549a7085ac019c35b881b7ef00f56cbfbf0a21e9ceb4d4599fa4e06359d9e5 + type_checked_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + unrolled_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + initial_ast: 51f07e99b7000210e3e324027db912add7b256a8f37e2ebe6710b051563a2b93 + unrolled_ast: 51f07e99b7000210e3e324027db912add7b256a8f37e2ebe6710b051563a2b93 + ssa_ast: ad268558667f9ae71beaddec03db056a3721b587cc7a1421395d34b79dab172d + flattened_ast: daa2f209f97fb066caffce3d1c1d73e12696748d62497dd248cca4d5e8391e57 + inlined_ast: daa2f209f97fb066caffce3d1c1d73e12696748d62497dd248cca4d5e8391e57 + dce_ast: 684b5efe47d1fc1e4b1c40961fe2d5d3f8d919ba3a981656cd3a8a6e52b2a545 + bytecode: 9600a008a2a7ac916f8e19cd292c150bf1474805e87b407c17fc2e079013c356 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak384_hash_to_address.out b/tests/expectations/compiler/core/algorithms/keccak384_hash_to_address.out new file mode 100644 index 0000000000..2d4d07f215 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak384_hash_to_address.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + unrolled_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + initial_ast: 7ef30e0c8dd5c013ea4a827ca0023ac6476012bc48215207660e4d3ac976b60c + unrolled_ast: 7ef30e0c8dd5c013ea4a827ca0023ac6476012bc48215207660e4d3ac976b60c + ssa_ast: 2f0714c1e4e132de3e378db26285569ac536329edb0cdd947af8044c0925b4ac + flattened_ast: 774ae08cd95ed7475e60031755d46ed2fb143485df4f803d79263c023b8027a8 + inlined_ast: 774ae08cd95ed7475e60031755d46ed2fb143485df4f803d79263c023b8027a8 + dce_ast: 31ed8fb36ddad967fd80c9753a7cfd788e151a4da0e6c7b4002797c8710eef56 + bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak384_hash_to_field.out b/tests/expectations/compiler/core/algorithms/keccak384_hash_to_field.out new file mode 100644 index 0000000000..9be5f61e1b --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak384_hash_to_field.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + unrolled_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + initial_ast: 1509f2d8bc181fc4267f2fdc580a4bf6338a3887fd4ff9cf40eaa60b1cdc3110 + unrolled_ast: 1509f2d8bc181fc4267f2fdc580a4bf6338a3887fd4ff9cf40eaa60b1cdc3110 + ssa_ast: a321e3a418ad98bdd990f687c17b8c2a65f88bb83918c92390dd96d15dff2ae2 + flattened_ast: ae67a973457c7c48eb7d53cd919e560c9c345d73a4b608561ddf7f0c84e69b1c + inlined_ast: ae67a973457c7c48eb7d53cd919e560c9c345d73a4b608561ddf7f0c84e69b1c + dce_ast: 747f823e8aa7d5a9f82660ef9ea66743d543042e6d0307e7b5a8d0266e66c1f0 + bytecode: f5347c70dbb10f7c191f2e29dc9b2e58760207351d34b8e0a5ccb91e360e9f79 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak384_hash_to_group.out b/tests/expectations/compiler/core/algorithms/keccak384_hash_to_group.out new file mode 100644 index 0000000000..c89767109e --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak384_hash_to_group.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: fd9620b494239c2b62c2da7b951d51f08a1c0ad366a726e6b108da648ce5fb58 + type_checked_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + unrolled_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + initial_ast: 324b8d43606a9051ea6d9dae5d9fe90963af26cbf1e0f2a21b11fbe69c318a2e + unrolled_ast: 324b8d43606a9051ea6d9dae5d9fe90963af26cbf1e0f2a21b11fbe69c318a2e + ssa_ast: 7996f1627ce5e171a80451ec406ac3fc0464ea3b2caceef48c019a53f107dc6e + flattened_ast: b2defe88a525090e3324404e9baa5b0cf2bdc503d30b62db4bd47fe159454c88 + inlined_ast: b2defe88a525090e3324404e9baa5b0cf2bdc503d30b62db4bd47fe159454c88 + dce_ast: fa961fa0eebe0654d6f0d3d84f4fa674b36eb9f47ef93860e6d99e1b2f4d3614 + bytecode: 7be24faec6f77c016109224b474ae5e5ef66bc3d02d058ae748d6b992990d165 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak384_hash_to_scalar.out b/tests/expectations/compiler/core/algorithms/keccak384_hash_to_scalar.out new file mode 100644 index 0000000000..d7f2e37b6c --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak384_hash_to_scalar.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 15549a7085ac019c35b881b7ef00f56cbfbf0a21e9ceb4d4599fa4e06359d9e5 + type_checked_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + unrolled_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + initial_ast: 2acb673382a51a87e6009c498dbef51a625b47a4b124e78b2e5f9aeb15cbb443 + unrolled_ast: 2acb673382a51a87e6009c498dbef51a625b47a4b124e78b2e5f9aeb15cbb443 + ssa_ast: 0a985782aa886765be6e09314bc67574a094b935e499127bee74d2e67f726d63 + flattened_ast: 160afe888997471f420a6b84ca62c63f0f2792e905857589563cb48909f95f18 + inlined_ast: 160afe888997471f420a6b84ca62c63f0f2792e905857589563cb48909f95f18 + dce_ast: c06c68bd390f12f0245e262b482780e58419bb4f4ab4625b3aa786686044d77d + bytecode: b2109894ba866067ec33ab20cdc34620697485b592f6a0d511e922a89bb065e1 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak512_hash_to_address.out b/tests/expectations/compiler/core/algorithms/keccak512_hash_to_address.out new file mode 100644 index 0000000000..7007143d78 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak512_hash_to_address.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + unrolled_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + initial_ast: 8625876715578588f903fb0e6c59eb06ee335bdb9bd25598e1954bc27106847b + unrolled_ast: 8625876715578588f903fb0e6c59eb06ee335bdb9bd25598e1954bc27106847b + ssa_ast: e1d078d008bb2aa7534edeade6c8678afc5a7fe249389075d06d091e88a2cbc0 + flattened_ast: 763f4aefd166e92549b8e3cd8fed7d67248506dc069e6667517790648ad94882 + inlined_ast: 763f4aefd166e92549b8e3cd8fed7d67248506dc069e6667517790648ad94882 + dce_ast: 31ed8fb36ddad967fd80c9753a7cfd788e151a4da0e6c7b4002797c8710eef56 + bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak512_hash_to_field.out b/tests/expectations/compiler/core/algorithms/keccak512_hash_to_field.out new file mode 100644 index 0000000000..5b7b340215 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak512_hash_to_field.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + unrolled_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + initial_ast: ad06e9e07ac591fbd464500eaf0e88bfc4102b8ba8ef8c166cc4e9aa0585bb87 + unrolled_ast: ad06e9e07ac591fbd464500eaf0e88bfc4102b8ba8ef8c166cc4e9aa0585bb87 + ssa_ast: 5e50a179bdf598bf6bec709fb9936ad0b20161eea30ec2bdc2a8bc05fc772483 + flattened_ast: e68041e451da3e60f3c6c5588e1c7ae28d981c57cc00385495388d5b453f0f8e + inlined_ast: e68041e451da3e60f3c6c5588e1c7ae28d981c57cc00385495388d5b453f0f8e + dce_ast: 6011b6211bf2cd3671650d4784be9b6ca85ea1ea7d8ce8e60a03c838dbdeb22c + bytecode: 31250720832dea7675bf097f3ff4a7e878a544854d76a583daeaa8508e5b7165 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak512_hash_to_group.out b/tests/expectations/compiler/core/algorithms/keccak512_hash_to_group.out new file mode 100644 index 0000000000..f1d5501a1e --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak512_hash_to_group.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: fd9620b494239c2b62c2da7b951d51f08a1c0ad366a726e6b108da648ce5fb58 + type_checked_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + unrolled_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + initial_ast: 9151d287132e7968e9c5d3abc90a93dc23aac599c31cf44cc467d99f741e0928 + unrolled_ast: 9151d287132e7968e9c5d3abc90a93dc23aac599c31cf44cc467d99f741e0928 + ssa_ast: 90545d5dc2fcce58b056cde237e631ac4764edd3f19cbb157fe500c5a3bb79d3 + flattened_ast: 5d6efb24635bd9a4d70155fab9c5d4445ef9ca629e0956e787819133980807d9 + inlined_ast: 5d6efb24635bd9a4d70155fab9c5d4445ef9ca629e0956e787819133980807d9 + dce_ast: 9f1af325ccd1b1f62f641ab230dbcfc16c37048f08f765f970eb008df185d6fc + bytecode: 04dce70893b730595c768593a76510f027b13559817d71dc7b804933692e59a9 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/keccak512_hash_to_scalar.out b/tests/expectations/compiler/core/algorithms/keccak512_hash_to_scalar.out new file mode 100644 index 0000000000..5045ccde80 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/keccak512_hash_to_scalar.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 15549a7085ac019c35b881b7ef00f56cbfbf0a21e9ceb4d4599fa4e06359d9e5 + type_checked_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + unrolled_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + initial_ast: 2bb9bfd8293cb4807f667c70e9c7caba683453c574f83db15b357dc0890acd69 + unrolled_ast: 2bb9bfd8293cb4807f667c70e9c7caba683453c574f83db15b357dc0890acd69 + ssa_ast: 8d80be135007234e5e4f13f431eceea2250a475a090333cfabb17ff9fadd1234 + flattened_ast: a99af76217035ceb6b0766861f7838fc2e32dc9d64108480281bc89fb052dc54 + inlined_ast: a99af76217035ceb6b0766861f7838fc2e32dc9d64108480281bc89fb052dc54 + dce_ast: 13cd407f698f8aceb8940b8ce677b058d2db819c9376bd2f92b06895689e2ec2 + bytecode: 48564e67f77504fa5f896b7b8f03dcc3bd690898df96eed9027776e1346b07ad + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_address.out b/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_address.out new file mode 100644 index 0000000000..10bcd2ab87 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_address.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + unrolled_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + initial_ast: 91a302e968ac694d467db3df1b6c951056927ebedb5b09557308addd03f29bbe + unrolled_ast: 91a302e968ac694d467db3df1b6c951056927ebedb5b09557308addd03f29bbe + ssa_ast: cb7a96a8ded35a2b6d2ef5d07bea2a692a86bda1c3957298eaaad1d56864d5bf + flattened_ast: 314cd90f3f5f13601b88a0c59392ffec6afbb2147de48f711f9d91050005d186 + inlined_ast: 314cd90f3f5f13601b88a0c59392ffec6afbb2147de48f711f9d91050005d186 + dce_ast: a7c2f06eaeee6e0f76b16845d8c73cd38a4cf54f12f3c00e32371bb075cb342c + bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_field.out b/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_field.out new file mode 100644 index 0000000000..14c663352b --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_field.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + unrolled_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + initial_ast: 6d37df1b155b4cf558e77b2eec2c1a6a625c7b2965168fd4087c1c8cd5981ef1 + unrolled_ast: 6d37df1b155b4cf558e77b2eec2c1a6a625c7b2965168fd4087c1c8cd5981ef1 + ssa_ast: 5a593e110a0f45f6c12fe371fb5d7365d206911b5579da51edbd07eb7e3913ab + flattened_ast: 6d1df05eb0a2ec6593435609427c1cd01c81f3e14002e9fb0366cce297b045ab + inlined_ast: 6d1df05eb0a2ec6593435609427c1cd01c81f3e14002e9fb0366cce297b045ab + dce_ast: f82d8f6a2cf0e473e2a4926082357094bc82112bdc3951fc67a9ea84ff4d4bbe + bytecode: 690637a56c18881cf6f85a1531bb8b17cd18d901daf7c29301562c019fe495c7 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_group.out b/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_group.out new file mode 100644 index 0000000000..76e0e7f729 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_group.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: fd9620b494239c2b62c2da7b951d51f08a1c0ad366a726e6b108da648ce5fb58 + type_checked_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + unrolled_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + initial_ast: 874321882ce5568a94153ae6e62c79906bf3087c1ce88cebb938955e986de530 + unrolled_ast: 874321882ce5568a94153ae6e62c79906bf3087c1ce88cebb938955e986de530 + ssa_ast: a2041556ccc4cdb672d6e2ec335d628a21cf6a0f8533b30c2ecda35eeaa6230a + flattened_ast: a9ef18333a0f262b9a7db15f7c70e387f91a52a70542a91183f26712c97e2a11 + inlined_ast: a9ef18333a0f262b9a7db15f7c70e387f91a52a70542a91183f26712c97e2a11 + dce_ast: 9ecf16f5cd4960a69f04c5b65c298ef880157ebe2c160bad888c59d32d6d5bd7 + bytecode: 46d916910ae925bea8c55fc0887b41d05efedac9228150f59f894ff52652a290 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_scalar.out b/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_scalar.out new file mode 100644 index 0000000000..372f225db1 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_256_hash_to_scalar.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 15549a7085ac019c35b881b7ef00f56cbfbf0a21e9ceb4d4599fa4e06359d9e5 + type_checked_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + unrolled_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + initial_ast: 8b7cb356ed2e9b19894b53ec28c002cafd019bfc321005413de203b4194c7966 + unrolled_ast: 8b7cb356ed2e9b19894b53ec28c002cafd019bfc321005413de203b4194c7966 + ssa_ast: efb22be7db9d52683f674d541db345ff7c6f1c6643c834c9b1069b0116ffc1c8 + flattened_ast: 08c8f877aff4151107616442994ecf11d44b12b64138217d7761285b31d9c9e4 + inlined_ast: 08c8f877aff4151107616442994ecf11d44b12b64138217d7761285b31d9c9e4 + dce_ast: e6cee3664bb3d80bc98128e0863e83772ab22a08c831bfe86d8a7ecc9a0d7ce1 + bytecode: d6a9ad31d87c08ce7882a80a4d5067f89ce048108bd23a41487051aab4904268 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_address.out b/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_address.out new file mode 100644 index 0000000000..91481f8d07 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_address.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + unrolled_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + initial_ast: 36c6cf861df645beb38066f0b2100467b3e035a6d457ca256b263e7ee7e4293e + unrolled_ast: 36c6cf861df645beb38066f0b2100467b3e035a6d457ca256b263e7ee7e4293e + ssa_ast: 000d542fb570122ba21e9a8c57a12fff0d3a738ffcd4396cb89bf0d1e4a2ebd4 + flattened_ast: da0864e5c0151193cad4068580ed1517171d80f44fdeeb9b12d15a2e1b9ce303 + inlined_ast: da0864e5c0151193cad4068580ed1517171d80f44fdeeb9b12d15a2e1b9ce303 + dce_ast: a7c2f06eaeee6e0f76b16845d8c73cd38a4cf54f12f3c00e32371bb075cb342c + bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_field.out b/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_field.out new file mode 100644 index 0000000000..e06da8bedd --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_field.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + unrolled_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + initial_ast: 0c251792a2f603807a7ccd166a0fa1181f054c537ec0e066d5a3935659462804 + unrolled_ast: 0c251792a2f603807a7ccd166a0fa1181f054c537ec0e066d5a3935659462804 + ssa_ast: 74b864504167ac0278d7537113d87bd607bc85de28914b3280cea6c0c9d443ca + flattened_ast: e50b807a54e1811c5ed45c470ab0cce8c2303164d09e1b388658075682b4004d + inlined_ast: e50b807a54e1811c5ed45c470ab0cce8c2303164d09e1b388658075682b4004d + dce_ast: b2077bd278ce6c651135a9971be42842c1a09ed75fdb214d30194a8554ae1201 + bytecode: 2e3beeb8a0f7547611c2c519e43599ac9e5b7fafc215ee921eb500d921987252 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_group.out b/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_group.out new file mode 100644 index 0000000000..beb2dfbf7f --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_group.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: fd9620b494239c2b62c2da7b951d51f08a1c0ad366a726e6b108da648ce5fb58 + type_checked_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + unrolled_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + initial_ast: 460f3336bd8230d8e7a136ebe1feadce402834788619851927fae9b55d4c8677 + unrolled_ast: 460f3336bd8230d8e7a136ebe1feadce402834788619851927fae9b55d4c8677 + ssa_ast: 818cab3cab5eee1130bd90cfda0af599f01e1093cc3aafe32f56c3ff05a37606 + flattened_ast: c876641a7f0860565d9230dd2b84b52fdddcf416d9669acb19531ea65c8186ac + inlined_ast: c876641a7f0860565d9230dd2b84b52fdddcf416d9669acb19531ea65c8186ac + dce_ast: aaa68eed3f7ba628a618b336eb7bf63ddeedfcf681bbd16f112a4a6f41332b1a + bytecode: 9dddbe9729f05832d71afd33571dc4ea51212f6e4f6d6c6b27f523d38059f2a1 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_scalar.out b/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_scalar.out new file mode 100644 index 0000000000..17bdbd5639 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_384_hash_to_scalar.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 15549a7085ac019c35b881b7ef00f56cbfbf0a21e9ceb4d4599fa4e06359d9e5 + type_checked_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + unrolled_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + initial_ast: f8f8731046cf41349090c25dbb2cca55ee7efd10d4f215efa97a7f310ccbfc0d + unrolled_ast: f8f8731046cf41349090c25dbb2cca55ee7efd10d4f215efa97a7f310ccbfc0d + ssa_ast: adf660ae8e70faa959d0d114563839d39f1f3ab25ed8901ed5b27c2d39a6bf73 + flattened_ast: e56a0705f521647939f45c3a1d678205606bd222882e07f0a4b2b5e3b3ca322f + inlined_ast: e56a0705f521647939f45c3a1d678205606bd222882e07f0a4b2b5e3b3ca322f + dce_ast: d7124e86546e91b8f78d2baecccd4067421559114341d81b3f26d39cf13b50fd + bytecode: 77991d7596edcef00041488b23dfbb364c0c979217f4de3a324d42d91ea28f5a + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_address.out b/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_address.out new file mode 100644 index 0000000000..3fcd1fc030 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_address.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + unrolled_symbol_table: aaaec423b2c439b4857751e7dec72e29fbe3cf863753d6f21e52c9d0f5e98558 + initial_ast: aef4119936f287a363cc2de136ba379408d7a5919f2dfcdf8e758bf1c8e3d773 + unrolled_ast: aef4119936f287a363cc2de136ba379408d7a5919f2dfcdf8e758bf1c8e3d773 + ssa_ast: e7be3c64b44e4e3729b04feb48fb64294106837d33214caa9988318943cf2e41 + flattened_ast: ecb2890d289bfcb8485fbf0aad58989482f1351a9dc04fd0eff61f332631e8f2 + inlined_ast: ecb2890d289bfcb8485fbf0aad58989482f1351a9dc04fd0eff61f332631e8f2 + dce_ast: a7c2f06eaeee6e0f76b16845d8c73cd38a4cf54f12f3c00e32371bb075cb342c + bytecode: 03845ec2f54d49f71640659603ead8f68ad067a15fda438e5e13524777d1559b + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_field.out b/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_field.out new file mode 100644 index 0000000000..87964c0453 --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_field.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 1f96df1e414fd96505a23c658692de40614d28804ebeaeafc90835f4087c91cc + type_checked_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + unrolled_symbol_table: f51b6c1660b8bb5b45ca5e05c303bf2fb92e47d575ff34c69abec002486452f4 + initial_ast: e70e2f2c58477d8b81261cd899d847c8334dccf61afb653d312081c7c3ef5c96 + unrolled_ast: e70e2f2c58477d8b81261cd899d847c8334dccf61afb653d312081c7c3ef5c96 + ssa_ast: fc91068309be9740f11f8d2579444484205388b0a4a3e217c55f8a6721963711 + flattened_ast: b377e77ea728ad4420f31818abc6d172b1efef0453d571574be19948bca7fd88 + inlined_ast: b377e77ea728ad4420f31818abc6d172b1efef0453d571574be19948bca7fd88 + dce_ast: 464179a7497f78d53e90fd00becba5342beeb04da896e7b64090d74baf15cfb6 + bytecode: 5a8a82d9707b83f6fe1d6f317a88b89ec9d908cd30fde3658d4e465e4ddf88e8 + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_group.out b/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_group.out new file mode 100644 index 0000000000..bb8b958ccc --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_group.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: fd9620b494239c2b62c2da7b951d51f08a1c0ad366a726e6b108da648ce5fb58 + type_checked_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + unrolled_symbol_table: 392b4afe780015c412cfb5e45a1b084b40873e9eda40e05ef94ab54aaadf8a3d + initial_ast: 8af7abda322574487d16980ccffb077e1c6a814889918f9a0e71da0d3f43cdde + unrolled_ast: 8af7abda322574487d16980ccffb077e1c6a814889918f9a0e71da0d3f43cdde + ssa_ast: c8c2d2c36f9082791a538db9b23dac715971a290a6e6d540e0efebb38c797272 + flattened_ast: d2a0e9f841f99dbed92f5d2a87388e9de8b12ecacfc3bcb28f5b83d5bd4a06c6 + inlined_ast: d2a0e9f841f99dbed92f5d2a87388e9de8b12ecacfc3bcb28f5b83d5bd4a06c6 + dce_ast: 282a9c94cf0a1061a9b5c285e22e0cb1764cb0f71b2c70502a0b6bd5ff2f3078 + bytecode: 02daa75965baeaaad40c59c24d161cb796a2d833b10bd189c9bb2a38e8bf747b + warnings: "" diff --git a/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_scalar.out b/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_scalar.out new file mode 100644 index 0000000000..49472d990b --- /dev/null +++ b/tests/expectations/compiler/core/algorithms/sha3_512_hash_to_scalar.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - - initial_symbol_table: 15549a7085ac019c35b881b7ef00f56cbfbf0a21e9ceb4d4599fa4e06359d9e5 + type_checked_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + unrolled_symbol_table: 3955df6eabb0bfb8f9df5a34a49c11bf3bf95325f88a0affd038b820e7541266 + initial_ast: 61379c55be87e7ee7565d8e12be376fd85ffb8788bef866ae15506e7f6178fd3 + unrolled_ast: 61379c55be87e7ee7565d8e12be376fd85ffb8788bef866ae15506e7f6178fd3 + ssa_ast: 65b83003e129498cdc10b20ad24d947b5f0b67994cfab5ac12f8028821848da1 + flattened_ast: 73ef53422bc3c9440a7d5307e510b46b296d57e7ca252eafe4cb9e6df037b969 + inlined_ast: 73ef53422bc3c9440a7d5307e510b46b296d57e7ca252eafe4cb9e6df037b969 + dce_ast: e234a86efed6736cf155d9c96ed261e878f7ea876405c7a9e17e20e1f07a52ba + bytecode: ea26232ca66042daf7a856c208ce760f7355068171ed4cde5da403f375ab7d65 + warnings: "" diff --git a/tests/expectations/compiler/examples/board.out b/tests/expectations/compiler/examples/board.out index 686167228c..bfd6bee74c 100644 --- a/tests/expectations/compiler/examples/board.out +++ b/tests/expectations/compiler/examples/board.out @@ -6,7 +6,7 @@ outputs: type_checked_symbol_table: 747ce7178d5222a287460a44a6af1dda0d4d2646d3dafca6a24f3a1c71de86ce unrolled_symbol_table: 747ce7178d5222a287460a44a6af1dda0d4d2646d3dafca6a24f3a1c71de86ce initial_ast: b3c58d72d33add0f02515e552c733606df085945543a499a2f31c494a2a57559 - unrolled_ast: b3c58d72d33add0f02515e552c733606df085945543a499a2f31c494a2a57559 + unrolled_ast: 2ed857f28c56edda7253dad37e4355e08d90d379c10f769892bf26beab874189 ssa_ast: 19805d886d0965a1b73a01afeb7598dad3c3f7db562f77d246416b1fe0c1640d flattened_ast: 1227b0d0444d13e494fa1ffd941f0ae60bc5fd1bacb22601607df6090e7b63e2 inlined_ast: 1227b0d0444d13e494fa1ffd941f0ae60bc5fd1bacb22601607df6090e7b63e2 diff --git a/tests/expectations/compiler/examples/move.out b/tests/expectations/compiler/examples/move.out index a1c661c275..047221fcd2 100644 --- a/tests/expectations/compiler/examples/move.out +++ b/tests/expectations/compiler/examples/move.out @@ -6,7 +6,7 @@ outputs: type_checked_symbol_table: 1d7d583684c95811cd86e4ed36c9d20ac015eef8804fa6f5a9a53b5648c5d0c2 unrolled_symbol_table: 1d7d583684c95811cd86e4ed36c9d20ac015eef8804fa6f5a9a53b5648c5d0c2 initial_ast: 2a86fb752956bca7fd055cefa7ca6c22d06a38e88793d2146a3d0287c085f12c - unrolled_ast: 2a86fb752956bca7fd055cefa7ca6c22d06a38e88793d2146a3d0287c085f12c + unrolled_ast: 45608178c7283548ac3b01decc9bcdd8a4dcbe697aa8e182928a72b2ab830d36 ssa_ast: 851e93ba5642957b13104c09f1832fbb6c8fcb74fdddc31578510c5277caa93f flattened_ast: 9b7e343ebbcf93421eb89f53b3667e96841a6fb25ecf28613c395338fdbe5be4 inlined_ast: 9b7e343ebbcf93421eb89f53b3667e96841a6fb25ecf28613c395338fdbe5be4 diff --git a/tests/expectations/compiler/examples/vote.out b/tests/expectations/compiler/examples/vote.out index f01c85a57b..cb04aa7eb4 100644 --- a/tests/expectations/compiler/examples/vote.out +++ b/tests/expectations/compiler/examples/vote.out @@ -6,7 +6,7 @@ outputs: type_checked_symbol_table: 1ffc999a1854e9e7698468455416d3e4a8633b1295681d4598ec850b49e41cc8 unrolled_symbol_table: 1ffc999a1854e9e7698468455416d3e4a8633b1295681d4598ec850b49e41cc8 initial_ast: d7fd06df15cb28e7892e72830f1c1c76b3e62206ce3a2d8f39c5c3bab53161b5 - unrolled_ast: d7fd06df15cb28e7892e72830f1c1c76b3e62206ce3a2d8f39c5c3bab53161b5 + unrolled_ast: 827ec28cf10bd24a787f7a5ce93055081c6885c8994064c5cabae1adcd232f6a ssa_ast: 9a103b5c0d9ee7434392dc7a24bd3f5611970aaf91046c4ec8d05367fa5ff6e8 flattened_ast: 32c82e9bff06c1ca87527a388eb7e8cdb00da3b665ed83f5e47e20b13b27b5e8 inlined_ast: 32c82e9bff06c1ca87527a388eb7e8cdb00da3b665ed83f5e47e20b13b27b5e8 diff --git a/tests/expectations/compiler/function/flatten_inlined_tuples_of_structs.out b/tests/expectations/compiler/function/flatten_inlined_tuples_of_structs.out index b5746faa56..c5b4a351a9 100644 --- a/tests/expectations/compiler/function/flatten_inlined_tuples_of_structs.out +++ b/tests/expectations/compiler/function/flatten_inlined_tuples_of_structs.out @@ -9,7 +9,7 @@ outputs: unrolled_ast: d0c7b5b03691102537ff6ed5b09cfb80f6bd415101c2e7cc3f9839c567c32da8 ssa_ast: da6d80e673840e8c7cf05b00b3e7115869b11bc3eaede28a72741b147e1511d3 flattened_ast: a907c14ec0c3478eae395b3e3d73796082be9e0a296a628fe56ebfa8897bcb34 - inlined_ast: 8e27c6902acaa9ed8aa7d8f352f1dac37a3416ab981ba2cb59b2a226e687c847 - dce_ast: 8e27c6902acaa9ed8aa7d8f352f1dac37a3416ab981ba2cb59b2a226e687c847 - bytecode: 7602c293bf2fee12ca5d58f3651e9a5699a3c1350fc34b8000dfc598ecd77226 + inlined_ast: 8a63b38e183667199cd1ee01dffa9af016ef1d9aacbc48688f086049f2215a0d + dce_ast: 8a63b38e183667199cd1ee01dffa9af016ef1d9aacbc48688f086049f2215a0d + bytecode: fffe093215f68fcc292f2c7b67e847897cd0334cdbf4a410f288d7957541a1d3 warnings: "" diff --git a/tests/expectations/compiler/records/init_expression_shorthand.out b/tests/expectations/compiler/records/init_expression_shorthand.out index 138e3fc1e1..435b522158 100644 --- a/tests/expectations/compiler/records/init_expression_shorthand.out +++ b/tests/expectations/compiler/records/init_expression_shorthand.out @@ -6,7 +6,7 @@ outputs: type_checked_symbol_table: ba25da0ee16aeea7f700fb370ea16e4fc2ba379bcf5fee6639826dcd2541bb14 unrolled_symbol_table: ba25da0ee16aeea7f700fb370ea16e4fc2ba379bcf5fee6639826dcd2541bb14 initial_ast: 6b1bf44c7e9ef01d559558212e8742799820f949a27271ffd8a793909364efaf - unrolled_ast: 6b1bf44c7e9ef01d559558212e8742799820f949a27271ffd8a793909364efaf + unrolled_ast: 15e2bf52e1f3c66abe87a5d64d5aabbe07762eb2f1870f76fc12645b66840e9d ssa_ast: 46e015d3eff7f19d919d90740fba608d7f8ef0ba0bb3a840b73ddaf0c77eb7e9 flattened_ast: bb1547f850fe6a566718209db0dab7b612ebdcb53aae5e0b800255c7c59e2281 inlined_ast: bb1547f850fe6a566718209db0dab7b612ebdcb53aae5e0b800255c7c59e2281 diff --git a/tests/expectations/compiler/records/record_init_out_of_order.out b/tests/expectations/compiler/records/record_init_out_of_order.out index 64d0187768..c1646b48b7 100644 --- a/tests/expectations/compiler/records/record_init_out_of_order.out +++ b/tests/expectations/compiler/records/record_init_out_of_order.out @@ -6,7 +6,7 @@ outputs: type_checked_symbol_table: 6c6790dd39288815379930977d3d72470a1449cd1b1993c0808cd53534d1f826 unrolled_symbol_table: 6c6790dd39288815379930977d3d72470a1449cd1b1993c0808cd53534d1f826 initial_ast: ac8aa81925cd885e67a2879c7024e24fda8a1aa25c619ff53ca5c4120021b798 - unrolled_ast: ac8aa81925cd885e67a2879c7024e24fda8a1aa25c619ff53ca5c4120021b798 + unrolled_ast: d775fd5c8f2fba592e97516a83d185cee76d941cddb360b9b7d041e2f9ce3d30 ssa_ast: 24f5d6faae6587c97cc02f8b7fd4fc3bf6d40808e101d23a9b3bcf205ce896b7 flattened_ast: f67ae475b8beff5c16ae6e134fe2a9770591e8dd8ceff0be0b0275028d5003c8 inlined_ast: f67ae475b8beff5c16ae6e134fe2a9770591e8dd8ceff0be0b0275028d5003c8 diff --git a/tests/expectations/compiler/signature/signature.out b/tests/expectations/compiler/signature/signature.out index a3f482b04d..c42579afdc 100644 --- a/tests/expectations/compiler/signature/signature.out +++ b/tests/expectations/compiler/signature/signature.out @@ -2,14 +2,14 @@ namespace: Compile expectation: Pass outputs: - - - initial_symbol_table: f32367f3791d0e1cd70f702ca24d2d9d9c2bc0ebf91e95d4df773a3e9f110311 - type_checked_symbol_table: ac9e67a73f66c89100172339eb6d66e2b8895f98c53ddeb525d2f42d6e3234ec - unrolled_symbol_table: ac9e67a73f66c89100172339eb6d66e2b8895f98c53ddeb525d2f42d6e3234ec - initial_ast: 4cbc4e58638f7ddf1cd24be73d150f363cc9ed149ebc7c8d4653cafbcec446be - unrolled_ast: 4cbc4e58638f7ddf1cd24be73d150f363cc9ed149ebc7c8d4653cafbcec446be - ssa_ast: 110776a6bbf28c2aa295eb78dd8e62d343505c377152330fa38693fd4546c0cb - flattened_ast: f4dbd7f6d7a0ad6a120dfb1ff7f32a98c9f4ce44764e90e3ba7741da390fa2f6 - inlined_ast: f4dbd7f6d7a0ad6a120dfb1ff7f32a98c9f4ce44764e90e3ba7741da390fa2f6 - dce_ast: f4dbd7f6d7a0ad6a120dfb1ff7f32a98c9f4ce44764e90e3ba7741da390fa2f6 - bytecode: 87b34bffefde3c2b9e23ce08528737a4ef06a28ee9120c02d26ee41989f24cd2 + - - initial_symbol_table: f42679f84a0502913466b98ad0802570b196a03efb92762dbf14ddef9343e2bb + type_checked_symbol_table: badc647bf125be858219463ee7be65a54c641b1a351a7f0b17012263cce0ad5a + unrolled_symbol_table: badc647bf125be858219463ee7be65a54c641b1a351a7f0b17012263cce0ad5a + initial_ast: a761b28adfdddc7ee7097651d7c624441b3d3dffe1348821ff98d70c99966389 + unrolled_ast: a761b28adfdddc7ee7097651d7c624441b3d3dffe1348821ff98d70c99966389 + ssa_ast: 35da2172e3aecdd67c8c874ae537e98a6d06f4a738352b4ad1930a3e226a1dcc + flattened_ast: a3b80418f4f807752bc8121c9c1eba5d22661c4f40e874048abd6888c627b1a2 + inlined_ast: a3b80418f4f807752bc8121c9c1eba5d22661c4f40e874048abd6888c627b1a2 + dce_ast: 5e0961c2a698c27859765b3d25eddd0530db658003f624bc6d2de41dc991c9b2 + bytecode: 9a042a6076c83bb376f10443261e56704956030b03df62da5d5f4742ac10c74d warnings: "" diff --git a/tests/expectations/execution/flattened_function_and_inline_matches.out b/tests/expectations/execution/flattened_function_and_inline_matches.out index 1b9424b315..a736659e1d 100644 --- a/tests/expectations/execution/flattened_function_and_inline_matches.out +++ b/tests/expectations/execution/flattened_function_and_inline_matches.out @@ -2,33 +2,33 @@ namespace: Execute expectation: Pass outputs: - - - initial_symbol_table: 054d3814a6ee68b36846e8bb0a850749c9f80828a06106a3408c3a3445bf9e5c - type_checked_symbol_table: 13284925b72baff0d5ecb7bb256a8bfb9fd6e3f936997707c6c832b3f2d34b43 - unrolled_symbol_table: 13284925b72baff0d5ecb7bb256a8bfb9fd6e3f936997707c6c832b3f2d34b43 - initial_ast: 45ce5078459eed0c5b19ccbdace274c458776f50d2814e1a790c355ca5d118d3 - unrolled_ast: 45ce5078459eed0c5b19ccbdace274c458776f50d2814e1a790c355ca5d118d3 - ssa_ast: df1cbc25fb581864347fcbe1076547078029e020735a1d6189e5cc8a6fd3f8d0 - flattened_ast: 5d0b82327d5b9dd91505824597b12c42dc081c28e017806d9500c3ef2ac89f33 - inlined_ast: 0f5a8fdb7938d1fd88401d4a1fb2c07590c1412dac0a0d3d69573e313b56159d - dce_ast: 0f5a8fdb7938d1fd88401d4a1fb2c07590c1412dac0a0d3d69573e313b56159d - bytecode: 05437006a7a0a278a18c8ff76e9fec336ec4f86f6ff8abfb06b816256babef45 + - - initial_symbol_table: 9ee9bfe1921cee5f4de19fea4d372a2a54deb758471e5745e12164eb44c447cb + type_checked_symbol_table: 8c2546e10d7482d30a2650f0119041c8a6a20201eb47a4facfe20336976e5654 + unrolled_symbol_table: 8c2546e10d7482d30a2650f0119041c8a6a20201eb47a4facfe20336976e5654 + initial_ast: 386489100d2330d1aad26077d7d7204e012331db06cf1ca59d7dddaf8bc98913 + unrolled_ast: 386489100d2330d1aad26077d7d7204e012331db06cf1ca59d7dddaf8bc98913 + ssa_ast: efb6b23b220bbe8b4e9680ad8fe5a94f7d6e43ea4b92cadc2b6ca2fa9b857f5a + flattened_ast: ebb740211be806d7a1c54bfcce26f2dbb7f88618b3d2ba9f8937f5f766f68fd5 + inlined_ast: 72d657c08ebc21d676187d045b44c5a64da85274e409e39e2436668968da3cea + dce_ast: 72d657c08ebc21d676187d045b44c5a64da85274e409e39e2436668968da3cea + bytecode: a52c852c5ea5e31d35c812e4ab15e4c098022431bb58b592d797137abf015e29 warnings: "" results: bar: - input: "[true, true, 1u8, 0u8]" - output: "[1u8, 1u8, {\n a: 1u8,\n b: 0u8,\n c: {\n c: 1u8\n }\n}]" + output: "[4u8, 1u8, {\n a: 2u8,\n b: 1u8,\n c: {\n c: 2u8\n }\n}]" - input: "[true, false, 1u8, 1u8]" output: "[1u8, 1u8, {\n a: 1u8,\n b: 1u8,\n c: {\n c: 1u8\n }\n}]" - input: "[false, true, 2u8, 1u8]" - output: "[1u8, 1u8, {\n a: 2u8,\n b: 1u8,\n c: {\n c: 2u8\n }\n}]" + output: "[5u8, 2u8, {\n a: 2u8,\n b: 1u8,\n c: {\n c: 2u8\n }\n}]" - input: "[false, false, 2u8, 2u8]" output: "[2u8, 2u8, {\n a: 2u8,\n b: 2u8,\n c: {\n c: 2u8\n }\n}]" blar: - input: "[true, true, 1u8, 0u8]" - output: "[1u8, 1u8, {\n a: 1u8,\n b: 1u8,\n c: {\n c: 1u8\n }\n}]" + output: "[4u8, 1u8, {\n a: 2u8,\n b: 1u8,\n c: {\n c: 2u8\n }\n}]" - input: "[true, false, 1u8, 1u8]" output: "[1u8, 1u8, {\n a: 1u8,\n b: 1u8,\n c: {\n c: 1u8\n }\n}]" - input: "[false, true, 2u8, 1u8]" - output: "[1u8, 1u8, {\n a: 1u8,\n b: 1u8,\n c: {\n c: 1u8\n }\n}]" + output: "[5u8, 2u8, {\n a: 2u8,\n b: 1u8,\n c: {\n c: 2u8\n }\n}]" - input: "[false, false, 2u8, 2u8]" output: "[2u8, 2u8, {\n a: 2u8,\n b: 2u8,\n c: {\n c: 2u8\n }\n}]" diff --git a/tests/expectations/execution/mint.out b/tests/expectations/execution/mint.out index 50a761e669..047c9a057c 100644 --- a/tests/expectations/execution/mint.out +++ b/tests/expectations/execution/mint.out @@ -6,7 +6,7 @@ outputs: type_checked_symbol_table: 538833491862c70880a4292ef436391c2be4483e6bd4c144c53d1dbbe3d58740 unrolled_symbol_table: 538833491862c70880a4292ef436391c2be4483e6bd4c144c53d1dbbe3d58740 initial_ast: 8ec3b815a56afa3af5e22f409b21f37e34690bd74c59c719f66882d859fcdeac - unrolled_ast: 8ec3b815a56afa3af5e22f409b21f37e34690bd74c59c719f66882d859fcdeac + unrolled_ast: a166396de9a4a88ae06ce0e5765cc1c0489522b71b69ca59f187b0c7600a6eed ssa_ast: 18b28082728930fdbfe472364fab24d4f42345cb7e2faf316ab37192ba18fa4c flattened_ast: 41413d738d08ca0e94e63e2c6b24a6cb604cbc05fff0f0130495b5efaca19831 inlined_ast: 41413d738d08ca0e94e63e2c6b24a6cb604cbc05fff0f0130495b5efaca19831 diff --git a/tests/expectations/execution/primitive_casts.out b/tests/expectations/execution/primitive_casts.out index b841608029..9fbbf1cf06 100644 --- a/tests/expectations/execution/primitive_casts.out +++ b/tests/expectations/execution/primitive_casts.out @@ -16,46 +16,46 @@ outputs: results: address_casts: - input: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r2 as boolean;): Cannot downcast a field literal to a boolean type (yet).)" + output: "[aleo1hjnn8jdxlzzlqjywamdx4hzcxny5gszzm0q5xmnae4ed6qqn2gys4ugtey, false, 4215828253063057579372973753238191915437678788189540242352627279098623010748field, 4215828253063057579372973753238191915437678788189540242352627279098623010748group, -68i8, -22596i16, -919361604i32, -1115211937480464452i64, 69581248500420848509480883781010433980i128, 188u8, 42940u16, 3375605692u32, 17331532136229087164u64, 69581248500420848509480883781010433980u128, 597325464396926472386380471716694795022991767388272616119577778851337709500scalar]" bool_casts: - input: "[false]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a boolean literal to another type.)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" field_casts: - input: "[0field]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a field literal to an address type.)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" group_casts: - input: "[0group]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r2 as boolean;): Cannot downcast a field literal to a boolean type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" i128_casts: - input: "[0i128]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i128 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" i16_casts: - input: "[0i16]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i16 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" i32_casts: - input: "[0i32]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i32 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" i64_casts: - input: "[0i64]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i64 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" i8_casts: - input: "[0i8]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast an i8 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" scalar_casts: - input: "[0scalar]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a scalar literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" u128_casts: - input: "[0u128]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u128 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" u16_casts: - input: "[0u16]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u16 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" u32_casts: - input: "[0u32]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u32 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" u64_casts: - input: "[0u64]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u64 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" u8_casts: - input: "[0u8]" - output: "SnarkVMError(Failed to execute instruction (cast r0 into r1 as address;): Cannot downcast a u8 literal to another type (yet).)" + output: "[aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc, false, 0field, 0group, 0i8, 0i16, 0i32, 0i64, 0i128, 0u8, 0u16, 0u32, 0u64, 0u128, 0scalar]" diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i128.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i128.leo new file mode 100644 index 0000000000..ef3d9a5e02 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_i128 tests + let a: i128 = Keccak256::hash_to_i128(addr_value); + let b: i128 = Keccak256::hash_to_i128(bool_value); + let c: i128 = Keccak256::hash_to_i128(field_value); + let d: i128 = Keccak256::hash_to_i128(group_value); + let e: i128 = Keccak256::hash_to_i128(i8_value); + let f: i128 = Keccak256::hash_to_i128(i16_value); + let g: i128 = Keccak256::hash_to_i128(i32_value); + let h: i128 = Keccak256::hash_to_i128(i64_value); + let i: i128 = Keccak256::hash_to_i128(i128_value); + let j: i128 = Keccak256::hash_to_i128(u8_value); + let k: i128 = Keccak256::hash_to_i128(u16_value); + let l: i128 = Keccak256::hash_to_i128(u32_value); + let m: i128 = Keccak256::hash_to_i128(u64_value); + let n: i128 = Keccak256::hash_to_i128(u128_value); + let o: i128 = Keccak256::hash_to_i128(scalar_value); + // let p: i128 = Keccak256::hash_to_i128(string_value); + let q: i128 = Keccak256::hash_to_i128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i16.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i16.leo new file mode 100644 index 0000000000..a72047cd5b --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_i16 tests + let a: i16 = Keccak256::hash_to_i16(addr_value); + let b: i16 = Keccak256::hash_to_i16(bool_value); + let c: i16 = Keccak256::hash_to_i16(field_value); + let d: i16 = Keccak256::hash_to_i16(group_value); + let e: i16 = Keccak256::hash_to_i16(i8_value); + let f: i16 = Keccak256::hash_to_i16(i16_value); + let g: i16 = Keccak256::hash_to_i16(i32_value); + let h: i16 = Keccak256::hash_to_i16(i64_value); + let i: i16 = Keccak256::hash_to_i16(i128_value); + let j: i16 = Keccak256::hash_to_i16(u8_value); + let k: i16 = Keccak256::hash_to_i16(u16_value); + let l: i16 = Keccak256::hash_to_i16(u32_value); + let m: i16 = Keccak256::hash_to_i16(u64_value); + let n: i16 = Keccak256::hash_to_i16(u128_value); + let o: i16 = Keccak256::hash_to_i16(scalar_value); + // let p: i16 = Keccak256::hash_to_i16(string_value); + let q: i16 = Keccak256::hash_to_i16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i32.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i32.leo new file mode 100644 index 0000000000..4fd72df1d2 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_i32 tests + let a: i32 = Keccak256::hash_to_i32(addr_value); + let b: i32 = Keccak256::hash_to_i32(bool_value); + let c: i32 = Keccak256::hash_to_i32(field_value); + let d: i32 = Keccak256::hash_to_i32(group_value); + let e: i32 = Keccak256::hash_to_i32(i8_value); + let f: i32 = Keccak256::hash_to_i32(i16_value); + let g: i32 = Keccak256::hash_to_i32(i32_value); + let h: i32 = Keccak256::hash_to_i32(i64_value); + let i: i32 = Keccak256::hash_to_i32(i128_value); + let j: i32 = Keccak256::hash_to_i32(u8_value); + let k: i32 = Keccak256::hash_to_i32(u16_value); + let l: i32 = Keccak256::hash_to_i32(u32_value); + let m: i32 = Keccak256::hash_to_i32(u64_value); + let n: i32 = Keccak256::hash_to_i32(u128_value); + let o: i32 = Keccak256::hash_to_i32(scalar_value); + // let p: i32 = Keccak256::hash_to_i32(string_value); + let q: i32 = Keccak256::hash_to_i32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i64.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i64.leo new file mode 100644 index 0000000000..88ed60a9ec --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_i64 tests + let a: i64 = Keccak256::hash_to_i64(addr_value); + let b: i64 = Keccak256::hash_to_i64(bool_value); + let c: i64 = Keccak256::hash_to_i64(field_value); + let d: i64 = Keccak256::hash_to_i64(group_value); + let e: i64 = Keccak256::hash_to_i64(i8_value); + let f: i64 = Keccak256::hash_to_i64(i16_value); + let g: i64 = Keccak256::hash_to_i64(i32_value); + let h: i64 = Keccak256::hash_to_i64(i64_value); + let i: i64 = Keccak256::hash_to_i64(i128_value); + let j: i64 = Keccak256::hash_to_i64(u8_value); + let k: i64 = Keccak256::hash_to_i64(u16_value); + let l: i64 = Keccak256::hash_to_i64(u32_value); + let m: i64 = Keccak256::hash_to_i64(u64_value); + let n: i64 = Keccak256::hash_to_i64(u128_value); + let o: i64 = Keccak256::hash_to_i64(scalar_value); + // let p: i64 = Keccak256::hash_to_i64(string_value); + let q: i64 = Keccak256::hash_to_i64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i8.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i8.leo new file mode 100644 index 0000000000..88fa58877e --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_i8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_i8 tests + let a: i8 = Keccak256::hash_to_i8(addr_value); + let b: i8 = Keccak256::hash_to_i8(bool_value); + let c: i8 = Keccak256::hash_to_i8(field_value); + let d: i8 = Keccak256::hash_to_i8(group_value); + let e: i8 = Keccak256::hash_to_i8(i8_value); + let f: i8 = Keccak256::hash_to_i8(i16_value); + let g: i8 = Keccak256::hash_to_i8(i32_value); + let h: i8 = Keccak256::hash_to_i8(i64_value); + let i: i8 = Keccak256::hash_to_i8(i128_value); + let j: i8 = Keccak256::hash_to_i8(u8_value); + let k: i8 = Keccak256::hash_to_i8(u16_value); + let l: i8 = Keccak256::hash_to_i8(u32_value); + let m: i8 = Keccak256::hash_to_i8(u64_value); + let n: i8 = Keccak256::hash_to_i8(u128_value); + let o: i8 = Keccak256::hash_to_i8(scalar_value); + // let p: i8 = Keccak256::hash_to_i8(string_value); + let q: i8 = Keccak256::hash_to_i8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u128.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u128.leo new file mode 100644 index 0000000000..329d90f682 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_u128 tests + let a: u128 = Keccak256::hash_to_u128(addr_value); + let b: u128 = Keccak256::hash_to_u128(bool_value); + let c: u128 = Keccak256::hash_to_u128(field_value); + let d: u128 = Keccak256::hash_to_u128(group_value); + let e: u128 = Keccak256::hash_to_u128(i8_value); + let f: u128 = Keccak256::hash_to_u128(i16_value); + let g: u128 = Keccak256::hash_to_u128(i32_value); + let h: u128 = Keccak256::hash_to_u128(i64_value); + let i: u128 = Keccak256::hash_to_u128(i128_value); + let j: u128 = Keccak256::hash_to_u128(u8_value); + let k: u128 = Keccak256::hash_to_u128(u16_value); + let l: u128 = Keccak256::hash_to_u128(u32_value); + let m: u128 = Keccak256::hash_to_u128(u64_value); + let n: u128 = Keccak256::hash_to_u128(u128_value); + let o: u128 = Keccak256::hash_to_u128(scalar_value); + // let p: u128 = Keccak256::hash_to_u128(string_value); + let q: u128 = Keccak256::hash_to_u128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u16.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u16.leo new file mode 100644 index 0000000000..f6398803b7 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_u16 tests + let a: u16 = Keccak256::hash_to_u16(addr_value); + let b: u16 = Keccak256::hash_to_u16(bool_value); + let c: u16 = Keccak256::hash_to_u16(field_value); + let d: u16 = Keccak256::hash_to_u16(group_value); + let e: u16 = Keccak256::hash_to_u16(i8_value); + let f: u16 = Keccak256::hash_to_u16(i16_value); + let g: u16 = Keccak256::hash_to_u16(i32_value); + let h: u16 = Keccak256::hash_to_u16(i64_value); + let i: u16 = Keccak256::hash_to_u16(i128_value); + let j: u16 = Keccak256::hash_to_u16(u8_value); + let k: u16 = Keccak256::hash_to_u16(u16_value); + let l: u16 = Keccak256::hash_to_u16(u32_value); + let m: u16 = Keccak256::hash_to_u16(u64_value); + let n: u16 = Keccak256::hash_to_u16(u128_value); + let o: u16 = Keccak256::hash_to_u16(scalar_value); + // let p: u16 = Keccak256::hash_to_u16(string_value); + let q: u16 = Keccak256::hash_to_u16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u32.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u32.leo new file mode 100644 index 0000000000..2942b5b8bc --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_u32 tests + let a: u32 = Keccak256::hash_to_u32(addr_value); + let b: u32 = Keccak256::hash_to_u32(bool_value); + let c: u32 = Keccak256::hash_to_u32(field_value); + let d: u32 = Keccak256::hash_to_u32(group_value); + let e: u32 = Keccak256::hash_to_u32(i8_value); + let f: u32 = Keccak256::hash_to_u32(i16_value); + let g: u32 = Keccak256::hash_to_u32(i32_value); + let h: u32 = Keccak256::hash_to_u32(i64_value); + let i: u32 = Keccak256::hash_to_u32(i128_value); + let j: u32 = Keccak256::hash_to_u32(u8_value); + let k: u32 = Keccak256::hash_to_u32(u16_value); + let l: u32 = Keccak256::hash_to_u32(u32_value); + let m: u32 = Keccak256::hash_to_u32(u64_value); + let n: u32 = Keccak256::hash_to_u32(u128_value); + let o: u32 = Keccak256::hash_to_u32(scalar_value); + // let p: u32 = Keccak256::hash_to_u32(string_value); + let q: u32 = Keccak256::hash_to_u32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u64.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u64.leo new file mode 100644 index 0000000000..d1a36f06a2 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_u64 tests + let a: u64 = Keccak256::hash_to_u64(addr_value); + let b: u64 = Keccak256::hash_to_u64(bool_value); + let c: u64 = Keccak256::hash_to_u64(field_value); + let d: u64 = Keccak256::hash_to_u64(group_value); + let e: u64 = Keccak256::hash_to_u64(i8_value); + let f: u64 = Keccak256::hash_to_u64(i16_value); + let g: u64 = Keccak256::hash_to_u64(i32_value); + let h: u64 = Keccak256::hash_to_u64(i64_value); + let i: u64 = Keccak256::hash_to_u64(i128_value); + let j: u64 = Keccak256::hash_to_u64(u8_value); + let k: u64 = Keccak256::hash_to_u64(u16_value); + let l: u64 = Keccak256::hash_to_u64(u32_value); + let m: u64 = Keccak256::hash_to_u64(u64_value); + let n: u64 = Keccak256::hash_to_u64(u128_value); + let o: u64 = Keccak256::hash_to_u64(scalar_value); + // let p: u64 = Keccak256::hash_to_u64(string_value); + let q: u64 = Keccak256::hash_to_u64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u8.leo b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u8.leo new file mode 100644 index 0000000000..1df7e292f2 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak256/keccak256_hash_to_u8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_u8 tests + let a: u8 = Keccak256::hash_to_u8(addr_value); + let b: u8 = Keccak256::hash_to_u8(bool_value); + let c: u8 = Keccak256::hash_to_u8(field_value); + let d: u8 = Keccak256::hash_to_u8(group_value); + let e: u8 = Keccak256::hash_to_u8(i8_value); + let f: u8 = Keccak256::hash_to_u8(i16_value); + let g: u8 = Keccak256::hash_to_u8(i32_value); + let h: u8 = Keccak256::hash_to_u8(i64_value); + let i: u8 = Keccak256::hash_to_u8(i128_value); + let j: u8 = Keccak256::hash_to_u8(u8_value); + let k: u8 = Keccak256::hash_to_u8(u16_value); + let l: u8 = Keccak256::hash_to_u8(u32_value); + let m: u8 = Keccak256::hash_to_u8(u64_value); + let n: u8 = Keccak256::hash_to_u8(u128_value); + let o: u8 = Keccak256::hash_to_u8(scalar_value); + // let p: u8 = Keccak256::hash_to_u8(string_value); + let q: u8 = Keccak256::hash_to_u8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i128.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i128.leo new file mode 100644 index 0000000000..180e158b23 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_i128 tests + let a: i128 = Keccak384::hash_to_i128(addr_value); + let b: i128 = Keccak384::hash_to_i128(bool_value); + let c: i128 = Keccak384::hash_to_i128(field_value); + let d: i128 = Keccak384::hash_to_i128(group_value); + let e: i128 = Keccak384::hash_to_i128(i8_value); + let f: i128 = Keccak384::hash_to_i128(i16_value); + let g: i128 = Keccak384::hash_to_i128(i32_value); + let h: i128 = Keccak384::hash_to_i128(i64_value); + let i: i128 = Keccak384::hash_to_i128(i128_value); + let j: i128 = Keccak384::hash_to_i128(u8_value); + let k: i128 = Keccak384::hash_to_i128(u16_value); + let l: i128 = Keccak384::hash_to_i128(u32_value); + let m: i128 = Keccak384::hash_to_i128(u64_value); + let n: i128 = Keccak384::hash_to_i128(u128_value); + let o: i128 = Keccak384::hash_to_i128(scalar_value); + // let p: i128 = Keccak384::hash_to_i128(string_value); + let q: i128 = Keccak384::hash_to_i128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i16.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i16.leo new file mode 100644 index 0000000000..a0d60a327c --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_i16 tests + let a: i16 = Keccak384::hash_to_i16(addr_value); + let b: i16 = Keccak384::hash_to_i16(bool_value); + let c: i16 = Keccak384::hash_to_i16(field_value); + let d: i16 = Keccak384::hash_to_i16(group_value); + let e: i16 = Keccak384::hash_to_i16(i8_value); + let f: i16 = Keccak384::hash_to_i16(i16_value); + let g: i16 = Keccak384::hash_to_i16(i32_value); + let h: i16 = Keccak384::hash_to_i16(i64_value); + let i: i16 = Keccak384::hash_to_i16(i128_value); + let j: i16 = Keccak384::hash_to_i16(u8_value); + let k: i16 = Keccak384::hash_to_i16(u16_value); + let l: i16 = Keccak384::hash_to_i16(u32_value); + let m: i16 = Keccak384::hash_to_i16(u64_value); + let n: i16 = Keccak384::hash_to_i16(u128_value); + let o: i16 = Keccak384::hash_to_i16(scalar_value); + // let p: i16 = Keccak384::hash_to_i16(string_value); + let q: i16 = Keccak384::hash_to_i16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i32.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i32.leo new file mode 100644 index 0000000000..a9fd3deb18 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_i32 tests + let a: i32 = Keccak384::hash_to_i32(addr_value); + let b: i32 = Keccak384::hash_to_i32(bool_value); + let c: i32 = Keccak384::hash_to_i32(field_value); + let d: i32 = Keccak384::hash_to_i32(group_value); + let e: i32 = Keccak384::hash_to_i32(i8_value); + let f: i32 = Keccak384::hash_to_i32(i16_value); + let g: i32 = Keccak384::hash_to_i32(i32_value); + let h: i32 = Keccak384::hash_to_i32(i64_value); + let i: i32 = Keccak384::hash_to_i32(i128_value); + let j: i32 = Keccak384::hash_to_i32(u8_value); + let k: i32 = Keccak384::hash_to_i32(u16_value); + let l: i32 = Keccak384::hash_to_i32(u32_value); + let m: i32 = Keccak384::hash_to_i32(u64_value); + let n: i32 = Keccak384::hash_to_i32(u128_value); + let o: i32 = Keccak384::hash_to_i32(scalar_value); + // let p: i32 = Keccak384::hash_to_i32(string_value); + let q: i32 = Keccak384::hash_to_i32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i64.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i64.leo new file mode 100644 index 0000000000..777bb3d942 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_i64 tests + let a: i64 = Keccak384::hash_to_i64(addr_value); + let b: i64 = Keccak384::hash_to_i64(bool_value); + let c: i64 = Keccak384::hash_to_i64(field_value); + let d: i64 = Keccak384::hash_to_i64(group_value); + let e: i64 = Keccak384::hash_to_i64(i8_value); + let f: i64 = Keccak384::hash_to_i64(i16_value); + let g: i64 = Keccak384::hash_to_i64(i32_value); + let h: i64 = Keccak384::hash_to_i64(i64_value); + let i: i64 = Keccak384::hash_to_i64(i128_value); + let j: i64 = Keccak384::hash_to_i64(u8_value); + let k: i64 = Keccak384::hash_to_i64(u16_value); + let l: i64 = Keccak384::hash_to_i64(u32_value); + let m: i64 = Keccak384::hash_to_i64(u64_value); + let n: i64 = Keccak384::hash_to_i64(u128_value); + let o: i64 = Keccak384::hash_to_i64(scalar_value); + // let p: i64 = Keccak384::hash_to_i64(string_value); + let q: i64 = Keccak384::hash_to_i64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i8.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i8.leo new file mode 100644 index 0000000000..bc3c0a827c --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_i8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_i8 tests + let a: i8 = Keccak384::hash_to_i8(addr_value); + let b: i8 = Keccak384::hash_to_i8(bool_value); + let c: i8 = Keccak384::hash_to_i8(field_value); + let d: i8 = Keccak384::hash_to_i8(group_value); + let e: i8 = Keccak384::hash_to_i8(i8_value); + let f: i8 = Keccak384::hash_to_i8(i16_value); + let g: i8 = Keccak384::hash_to_i8(i32_value); + let h: i8 = Keccak384::hash_to_i8(i64_value); + let i: i8 = Keccak384::hash_to_i8(i128_value); + let j: i8 = Keccak384::hash_to_i8(u8_value); + let k: i8 = Keccak384::hash_to_i8(u16_value); + let l: i8 = Keccak384::hash_to_i8(u32_value); + let m: i8 = Keccak384::hash_to_i8(u64_value); + let n: i8 = Keccak384::hash_to_i8(u128_value); + let o: i8 = Keccak384::hash_to_i8(scalar_value); + // let p: i8 = Keccak384::hash_to_i8(string_value); + let q: i8 = Keccak384::hash_to_i8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u128.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u128.leo new file mode 100644 index 0000000000..cb27ac589c --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_u128 tests + let a: u128 = Keccak384::hash_to_u128(addr_value); + let b: u128 = Keccak384::hash_to_u128(bool_value); + let c: u128 = Keccak384::hash_to_u128(field_value); + let d: u128 = Keccak384::hash_to_u128(group_value); + let e: u128 = Keccak384::hash_to_u128(i8_value); + let f: u128 = Keccak384::hash_to_u128(i16_value); + let g: u128 = Keccak384::hash_to_u128(i32_value); + let h: u128 = Keccak384::hash_to_u128(i64_value); + let i: u128 = Keccak384::hash_to_u128(i128_value); + let j: u128 = Keccak384::hash_to_u128(u8_value); + let k: u128 = Keccak384::hash_to_u128(u16_value); + let l: u128 = Keccak384::hash_to_u128(u32_value); + let m: u128 = Keccak384::hash_to_u128(u64_value); + let n: u128 = Keccak384::hash_to_u128(u128_value); + let o: u128 = Keccak384::hash_to_u128(scalar_value); + // let p: u128 = Keccak384::hash_to_u128(string_value); + let q: u128 = Keccak384::hash_to_u128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u16.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u16.leo new file mode 100644 index 0000000000..b20200cd0e --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_u16 tests + let a: u16 = Keccak384::hash_to_u16(addr_value); + let b: u16 = Keccak384::hash_to_u16(bool_value); + let c: u16 = Keccak384::hash_to_u16(field_value); + let d: u16 = Keccak384::hash_to_u16(group_value); + let e: u16 = Keccak384::hash_to_u16(i8_value); + let f: u16 = Keccak384::hash_to_u16(i16_value); + let g: u16 = Keccak384::hash_to_u16(i32_value); + let h: u16 = Keccak384::hash_to_u16(i64_value); + let i: u16 = Keccak384::hash_to_u16(i128_value); + let j: u16 = Keccak384::hash_to_u16(u8_value); + let k: u16 = Keccak384::hash_to_u16(u16_value); + let l: u16 = Keccak384::hash_to_u16(u32_value); + let m: u16 = Keccak384::hash_to_u16(u64_value); + let n: u16 = Keccak384::hash_to_u16(u128_value); + let o: u16 = Keccak384::hash_to_u16(scalar_value); + // let p: u16 = Keccak384::hash_to_u16(string_value); + let q: u16 = Keccak384::hash_to_u16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u32.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u32.leo new file mode 100644 index 0000000000..ee3bc2ad0a --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_u32 tests + let a: u32 = Keccak384::hash_to_u32(addr_value); + let b: u32 = Keccak384::hash_to_u32(bool_value); + let c: u32 = Keccak384::hash_to_u32(field_value); + let d: u32 = Keccak384::hash_to_u32(group_value); + let e: u32 = Keccak384::hash_to_u32(i8_value); + let f: u32 = Keccak384::hash_to_u32(i16_value); + let g: u32 = Keccak384::hash_to_u32(i32_value); + let h: u32 = Keccak384::hash_to_u32(i64_value); + let i: u32 = Keccak384::hash_to_u32(i128_value); + let j: u32 = Keccak384::hash_to_u32(u8_value); + let k: u32 = Keccak384::hash_to_u32(u16_value); + let l: u32 = Keccak384::hash_to_u32(u32_value); + let m: u32 = Keccak384::hash_to_u32(u64_value); + let n: u32 = Keccak384::hash_to_u32(u128_value); + let o: u32 = Keccak384::hash_to_u32(scalar_value); + // let p: u32 = Keccak384::hash_to_u32(string_value); + let q: u32 = Keccak384::hash_to_u32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u64.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u64.leo new file mode 100644 index 0000000000..9905d6635a --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_u64 tests + let a: u64 = Keccak384::hash_to_u64(addr_value); + let b: u64 = Keccak384::hash_to_u64(bool_value); + let c: u64 = Keccak384::hash_to_u64(field_value); + let d: u64 = Keccak384::hash_to_u64(group_value); + let e: u64 = Keccak384::hash_to_u64(i8_value); + let f: u64 = Keccak384::hash_to_u64(i16_value); + let g: u64 = Keccak384::hash_to_u64(i32_value); + let h: u64 = Keccak384::hash_to_u64(i64_value); + let i: u64 = Keccak384::hash_to_u64(i128_value); + let j: u64 = Keccak384::hash_to_u64(u8_value); + let k: u64 = Keccak384::hash_to_u64(u16_value); + let l: u64 = Keccak384::hash_to_u64(u32_value); + let m: u64 = Keccak384::hash_to_u64(u64_value); + let n: u64 = Keccak384::hash_to_u64(u128_value); + let o: u64 = Keccak384::hash_to_u64(scalar_value); + // let p: u64 = Keccak384::hash_to_u64(string_value); + let q: u64 = Keccak384::hash_to_u64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u8.leo b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u8.leo new file mode 100644 index 0000000000..683457f723 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak384/keccak384_hash_to_u8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_u8 tests + let a: u8 = Keccak384::hash_to_u8(addr_value); + let b: u8 = Keccak384::hash_to_u8(bool_value); + let c: u8 = Keccak384::hash_to_u8(field_value); + let d: u8 = Keccak384::hash_to_u8(group_value); + let e: u8 = Keccak384::hash_to_u8(i8_value); + let f: u8 = Keccak384::hash_to_u8(i16_value); + let g: u8 = Keccak384::hash_to_u8(i32_value); + let h: u8 = Keccak384::hash_to_u8(i64_value); + let i: u8 = Keccak384::hash_to_u8(i128_value); + let j: u8 = Keccak384::hash_to_u8(u8_value); + let k: u8 = Keccak384::hash_to_u8(u16_value); + let l: u8 = Keccak384::hash_to_u8(u32_value); + let m: u8 = Keccak384::hash_to_u8(u64_value); + let n: u8 = Keccak384::hash_to_u8(u128_value); + let o: u8 = Keccak384::hash_to_u8(scalar_value); + // let p: u8 = Keccak384::hash_to_u8(string_value); + let q: u8 = Keccak384::hash_to_u8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i128.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i128.leo new file mode 100644 index 0000000000..9f95cfdb08 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_i128 tests + let a: i128 = Keccak512::hash_to_i128(addr_value); + let b: i128 = Keccak512::hash_to_i128(bool_value); + let c: i128 = Keccak512::hash_to_i128(field_value); + let d: i128 = Keccak512::hash_to_i128(group_value); + let e: i128 = Keccak512::hash_to_i128(i8_value); + let f: i128 = Keccak512::hash_to_i128(i16_value); + let g: i128 = Keccak512::hash_to_i128(i32_value); + let h: i128 = Keccak512::hash_to_i128(i64_value); + let i: i128 = Keccak512::hash_to_i128(i128_value); + let j: i128 = Keccak512::hash_to_i128(u8_value); + let k: i128 = Keccak512::hash_to_i128(u16_value); + let l: i128 = Keccak512::hash_to_i128(u32_value); + let m: i128 = Keccak512::hash_to_i128(u64_value); + let n: i128 = Keccak512::hash_to_i128(u128_value); + let o: i128 = Keccak512::hash_to_i128(scalar_value); + // let p: i128 = Keccak512::hash_to_i128(string_value); + let q: i128 = Keccak512::hash_to_i128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i16.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i16.leo new file mode 100644 index 0000000000..91764a9b9c --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_i16 tests + let a: i16 = Keccak512::hash_to_i16(addr_value); + let b: i16 = Keccak512::hash_to_i16(bool_value); + let c: i16 = Keccak512::hash_to_i16(field_value); + let d: i16 = Keccak512::hash_to_i16(group_value); + let e: i16 = Keccak512::hash_to_i16(i8_value); + let f: i16 = Keccak512::hash_to_i16(i16_value); + let g: i16 = Keccak512::hash_to_i16(i32_value); + let h: i16 = Keccak512::hash_to_i16(i64_value); + let i: i16 = Keccak512::hash_to_i16(i128_value); + let j: i16 = Keccak512::hash_to_i16(u8_value); + let k: i16 = Keccak512::hash_to_i16(u16_value); + let l: i16 = Keccak512::hash_to_i16(u32_value); + let m: i16 = Keccak512::hash_to_i16(u64_value); + let n: i16 = Keccak512::hash_to_i16(u128_value); + let o: i16 = Keccak512::hash_to_i16(scalar_value); + // let p: i16 = Keccak512::hash_to_i16(string_value); + let q: i16 = Keccak512::hash_to_i16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i32.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i32.leo new file mode 100644 index 0000000000..b54b9b6b84 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_i32 tests + let a: i32 = Keccak512::hash_to_i32(addr_value); + let b: i32 = Keccak512::hash_to_i32(bool_value); + let c: i32 = Keccak512::hash_to_i32(field_value); + let d: i32 = Keccak512::hash_to_i32(group_value); + let e: i32 = Keccak512::hash_to_i32(i8_value); + let f: i32 = Keccak512::hash_to_i32(i16_value); + let g: i32 = Keccak512::hash_to_i32(i32_value); + let h: i32 = Keccak512::hash_to_i32(i64_value); + let i: i32 = Keccak512::hash_to_i32(i128_value); + let j: i32 = Keccak512::hash_to_i32(u8_value); + let k: i32 = Keccak512::hash_to_i32(u16_value); + let l: i32 = Keccak512::hash_to_i32(u32_value); + let m: i32 = Keccak512::hash_to_i32(u64_value); + let n: i32 = Keccak512::hash_to_i32(u128_value); + let o: i32 = Keccak512::hash_to_i32(scalar_value); + // let p: i32 = Keccak512::hash_to_i32(string_value); + let q: i32 = Keccak512::hash_to_i32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i64.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i64.leo new file mode 100644 index 0000000000..f8e8ee73a8 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_i64 tests + let a: i64 = Keccak512::hash_to_i64(addr_value); + let b: i64 = Keccak512::hash_to_i64(bool_value); + let c: i64 = Keccak512::hash_to_i64(field_value); + let d: i64 = Keccak512::hash_to_i64(group_value); + let e: i64 = Keccak512::hash_to_i64(i8_value); + let f: i64 = Keccak512::hash_to_i64(i16_value); + let g: i64 = Keccak512::hash_to_i64(i32_value); + let h: i64 = Keccak512::hash_to_i64(i64_value); + let i: i64 = Keccak512::hash_to_i64(i128_value); + let j: i64 = Keccak512::hash_to_i64(u8_value); + let k: i64 = Keccak512::hash_to_i64(u16_value); + let l: i64 = Keccak512::hash_to_i64(u32_value); + let m: i64 = Keccak512::hash_to_i64(u64_value); + let n: i64 = Keccak512::hash_to_i64(u128_value); + let o: i64 = Keccak512::hash_to_i64(scalar_value); + // let p: i64 = Keccak512::hash_to_i64(string_value); + let q: i64 = Keccak512::hash_to_i64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i8.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i8.leo new file mode 100644 index 0000000000..a7ae5b82fd --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_i8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_i8 tests + let a: i8 = Keccak512::hash_to_i8(addr_value); + let b: i8 = Keccak512::hash_to_i8(bool_value); + let c: i8 = Keccak512::hash_to_i8(field_value); + let d: i8 = Keccak512::hash_to_i8(group_value); + let e: i8 = Keccak512::hash_to_i8(i8_value); + let f: i8 = Keccak512::hash_to_i8(i16_value); + let g: i8 = Keccak512::hash_to_i8(i32_value); + let h: i8 = Keccak512::hash_to_i8(i64_value); + let i: i8 = Keccak512::hash_to_i8(i128_value); + let j: i8 = Keccak512::hash_to_i8(u8_value); + let k: i8 = Keccak512::hash_to_i8(u16_value); + let l: i8 = Keccak512::hash_to_i8(u32_value); + let m: i8 = Keccak512::hash_to_i8(u64_value); + let n: i8 = Keccak512::hash_to_i8(u128_value); + let o: i8 = Keccak512::hash_to_i8(scalar_value); + // let p: i8 = Keccak512::hash_to_i8(string_value); + let q: i8 = Keccak512::hash_to_i8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u128.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u128.leo new file mode 100644 index 0000000000..12c666f9dc --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_u128 tests + let a: u128 = Keccak512::hash_to_u128(addr_value); + let b: u128 = Keccak512::hash_to_u128(bool_value); + let c: u128 = Keccak512::hash_to_u128(field_value); + let d: u128 = Keccak512::hash_to_u128(group_value); + let e: u128 = Keccak512::hash_to_u128(i8_value); + let f: u128 = Keccak512::hash_to_u128(i16_value); + let g: u128 = Keccak512::hash_to_u128(i32_value); + let h: u128 = Keccak512::hash_to_u128(i64_value); + let i: u128 = Keccak512::hash_to_u128(i128_value); + let j: u128 = Keccak512::hash_to_u128(u8_value); + let k: u128 = Keccak512::hash_to_u128(u16_value); + let l: u128 = Keccak512::hash_to_u128(u32_value); + let m: u128 = Keccak512::hash_to_u128(u64_value); + let n: u128 = Keccak512::hash_to_u128(u128_value); + let o: u128 = Keccak512::hash_to_u128(scalar_value); + // let p: u128 = Keccak512::hash_to_u128(string_value); + let q: u128 = Keccak512::hash_to_u128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u16.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u16.leo new file mode 100644 index 0000000000..90806acf00 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_u16 tests + let a: u16 = Keccak512::hash_to_u16(addr_value); + let b: u16 = Keccak512::hash_to_u16(bool_value); + let c: u16 = Keccak512::hash_to_u16(field_value); + let d: u16 = Keccak512::hash_to_u16(group_value); + let e: u16 = Keccak512::hash_to_u16(i8_value); + let f: u16 = Keccak512::hash_to_u16(i16_value); + let g: u16 = Keccak512::hash_to_u16(i32_value); + let h: u16 = Keccak512::hash_to_u16(i64_value); + let i: u16 = Keccak512::hash_to_u16(i128_value); + let j: u16 = Keccak512::hash_to_u16(u8_value); + let k: u16 = Keccak512::hash_to_u16(u16_value); + let l: u16 = Keccak512::hash_to_u16(u32_value); + let m: u16 = Keccak512::hash_to_u16(u64_value); + let n: u16 = Keccak512::hash_to_u16(u128_value); + let o: u16 = Keccak512::hash_to_u16(scalar_value); + // let p: u16 = Keccak512::hash_to_u16(string_value); + let q: u16 = Keccak512::hash_to_u16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u32.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u32.leo new file mode 100644 index 0000000000..bd82ce5adf --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_u32 tests + let a: u32 = Keccak512::hash_to_u32(addr_value); + let b: u32 = Keccak512::hash_to_u32(bool_value); + let c: u32 = Keccak512::hash_to_u32(field_value); + let d: u32 = Keccak512::hash_to_u32(group_value); + let e: u32 = Keccak512::hash_to_u32(i8_value); + let f: u32 = Keccak512::hash_to_u32(i16_value); + let g: u32 = Keccak512::hash_to_u32(i32_value); + let h: u32 = Keccak512::hash_to_u32(i64_value); + let i: u32 = Keccak512::hash_to_u32(i128_value); + let j: u32 = Keccak512::hash_to_u32(u8_value); + let k: u32 = Keccak512::hash_to_u32(u16_value); + let l: u32 = Keccak512::hash_to_u32(u32_value); + let m: u32 = Keccak512::hash_to_u32(u64_value); + let n: u32 = Keccak512::hash_to_u32(u128_value); + let o: u32 = Keccak512::hash_to_u32(scalar_value); + // let p: u32 = Keccak512::hash_to_u32(string_value); + let q: u32 = Keccak512::hash_to_u32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u64.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u64.leo new file mode 100644 index 0000000000..e5674d859d --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_u64 tests + let a: u64 = Keccak512::hash_to_u64(addr_value); + let b: u64 = Keccak512::hash_to_u64(bool_value); + let c: u64 = Keccak512::hash_to_u64(field_value); + let d: u64 = Keccak512::hash_to_u64(group_value); + let e: u64 = Keccak512::hash_to_u64(i8_value); + let f: u64 = Keccak512::hash_to_u64(i16_value); + let g: u64 = Keccak512::hash_to_u64(i32_value); + let h: u64 = Keccak512::hash_to_u64(i64_value); + let i: u64 = Keccak512::hash_to_u64(i128_value); + let j: u64 = Keccak512::hash_to_u64(u8_value); + let k: u64 = Keccak512::hash_to_u64(u16_value); + let l: u64 = Keccak512::hash_to_u64(u32_value); + let m: u64 = Keccak512::hash_to_u64(u64_value); + let n: u64 = Keccak512::hash_to_u64(u128_value); + let o: u64 = Keccak512::hash_to_u64(scalar_value); + // let p: u64 = Keccak512::hash_to_u64(string_value); + let q: u64 = Keccak512::hash_to_u64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u8.leo b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u8.leo new file mode 100644 index 0000000000..6c6d5a67e8 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/keccak512/keccak512_hash_to_u8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_u8 tests + let a: u8 = Keccak512::hash_to_u8(addr_value); + let b: u8 = Keccak512::hash_to_u8(bool_value); + let c: u8 = Keccak512::hash_to_u8(field_value); + let d: u8 = Keccak512::hash_to_u8(group_value); + let e: u8 = Keccak512::hash_to_u8(i8_value); + let f: u8 = Keccak512::hash_to_u8(i16_value); + let g: u8 = Keccak512::hash_to_u8(i32_value); + let h: u8 = Keccak512::hash_to_u8(i64_value); + let i: u8 = Keccak512::hash_to_u8(i128_value); + let j: u8 = Keccak512::hash_to_u8(u8_value); + let k: u8 = Keccak512::hash_to_u8(u16_value); + let l: u8 = Keccak512::hash_to_u8(u32_value); + let m: u8 = Keccak512::hash_to_u8(u64_value); + let n: u8 = Keccak512::hash_to_u8(u128_value); + let o: u8 = Keccak512::hash_to_u8(scalar_value); + // let p: u8 = Keccak512::hash_to_u8(string_value); + let q: u8 = Keccak512::hash_to_u8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i128.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i128.leo new file mode 100644 index 0000000000..57815744aa --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_i128 tests + let a: i128 = SHA3_256::hash_to_i128(addr_value); + let b: i128 = SHA3_256::hash_to_i128(bool_value); + let c: i128 = SHA3_256::hash_to_i128(field_value); + let d: i128 = SHA3_256::hash_to_i128(group_value); + let e: i128 = SHA3_256::hash_to_i128(i8_value); + let f: i128 = SHA3_256::hash_to_i128(i16_value); + let g: i128 = SHA3_256::hash_to_i128(i32_value); + let h: i128 = SHA3_256::hash_to_i128(i64_value); + let i: i128 = SHA3_256::hash_to_i128(i128_value); + let j: i128 = SHA3_256::hash_to_i128(u8_value); + let k: i128 = SHA3_256::hash_to_i128(u16_value); + let l: i128 = SHA3_256::hash_to_i128(u32_value); + let m: i128 = SHA3_256::hash_to_i128(u64_value); + let n: i128 = SHA3_256::hash_to_i128(u128_value); + let o: i128 = SHA3_256::hash_to_i128(scalar_value); + // let p: i128 = SHA3_256::hash_to_i128(string_value); + let q: i128 = SHA3_256::hash_to_i128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i16.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i16.leo new file mode 100644 index 0000000000..6dae9c57db --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_i16 tests + let a: i16 = SHA3_256::hash_to_i16(addr_value); + let b: i16 = SHA3_256::hash_to_i16(bool_value); + let c: i16 = SHA3_256::hash_to_i16(field_value); + let d: i16 = SHA3_256::hash_to_i16(group_value); + let e: i16 = SHA3_256::hash_to_i16(i8_value); + let f: i16 = SHA3_256::hash_to_i16(i16_value); + let g: i16 = SHA3_256::hash_to_i16(i32_value); + let h: i16 = SHA3_256::hash_to_i16(i64_value); + let i: i16 = SHA3_256::hash_to_i16(i128_value); + let j: i16 = SHA3_256::hash_to_i16(u8_value); + let k: i16 = SHA3_256::hash_to_i16(u16_value); + let l: i16 = SHA3_256::hash_to_i16(u32_value); + let m: i16 = SHA3_256::hash_to_i16(u64_value); + let n: i16 = SHA3_256::hash_to_i16(u128_value); + let o: i16 = SHA3_256::hash_to_i16(scalar_value); + // let p: i16 = SHA3_256::hash_to_i16(string_value); + let q: i16 = SHA3_256::hash_to_i16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i32.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i32.leo new file mode 100644 index 0000000000..f6e2380284 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_i32 tests + let a: i32 = SHA3_256::hash_to_i32(addr_value); + let b: i32 = SHA3_256::hash_to_i32(bool_value); + let c: i32 = SHA3_256::hash_to_i32(field_value); + let d: i32 = SHA3_256::hash_to_i32(group_value); + let e: i32 = SHA3_256::hash_to_i32(i8_value); + let f: i32 = SHA3_256::hash_to_i32(i16_value); + let g: i32 = SHA3_256::hash_to_i32(i32_value); + let h: i32 = SHA3_256::hash_to_i32(i64_value); + let i: i32 = SHA3_256::hash_to_i32(i128_value); + let j: i32 = SHA3_256::hash_to_i32(u8_value); + let k: i32 = SHA3_256::hash_to_i32(u16_value); + let l: i32 = SHA3_256::hash_to_i32(u32_value); + let m: i32 = SHA3_256::hash_to_i32(u64_value); + let n: i32 = SHA3_256::hash_to_i32(u128_value); + let o: i32 = SHA3_256::hash_to_i32(scalar_value); + // let p: i32 = SHA3_256::hash_to_i32(string_value); + let q: i32 = SHA3_256::hash_to_i32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i64.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i64.leo new file mode 100644 index 0000000000..1f642fcb7c --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_i64 tests + let a: i64 = SHA3_256::hash_to_i64(addr_value); + let b: i64 = SHA3_256::hash_to_i64(bool_value); + let c: i64 = SHA3_256::hash_to_i64(field_value); + let d: i64 = SHA3_256::hash_to_i64(group_value); + let e: i64 = SHA3_256::hash_to_i64(i8_value); + let f: i64 = SHA3_256::hash_to_i64(i16_value); + let g: i64 = SHA3_256::hash_to_i64(i32_value); + let h: i64 = SHA3_256::hash_to_i64(i64_value); + let i: i64 = SHA3_256::hash_to_i64(i128_value); + let j: i64 = SHA3_256::hash_to_i64(u8_value); + let k: i64 = SHA3_256::hash_to_i64(u16_value); + let l: i64 = SHA3_256::hash_to_i64(u32_value); + let m: i64 = SHA3_256::hash_to_i64(u64_value); + let n: i64 = SHA3_256::hash_to_i64(u128_value); + let o: i64 = SHA3_256::hash_to_i64(scalar_value); + // let p: i64 = SHA3_256::hash_to_i64(string_value); + let q: i64 = SHA3_256::hash_to_i64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i8.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i8.leo new file mode 100644 index 0000000000..f80db8b397 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_i8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_i8 tests + let a: i8 = SHA3_256::hash_to_i8(addr_value); + let b: i8 = SHA3_256::hash_to_i8(bool_value); + let c: i8 = SHA3_256::hash_to_i8(field_value); + let d: i8 = SHA3_256::hash_to_i8(group_value); + let e: i8 = SHA3_256::hash_to_i8(i8_value); + let f: i8 = SHA3_256::hash_to_i8(i16_value); + let g: i8 = SHA3_256::hash_to_i8(i32_value); + let h: i8 = SHA3_256::hash_to_i8(i64_value); + let i: i8 = SHA3_256::hash_to_i8(i128_value); + let j: i8 = SHA3_256::hash_to_i8(u8_value); + let k: i8 = SHA3_256::hash_to_i8(u16_value); + let l: i8 = SHA3_256::hash_to_i8(u32_value); + let m: i8 = SHA3_256::hash_to_i8(u64_value); + let n: i8 = SHA3_256::hash_to_i8(u128_value); + let o: i8 = SHA3_256::hash_to_i8(scalar_value); + // let p: i8 = SHA3_256::hash_to_i8(string_value); + let q: i8 = SHA3_256::hash_to_i8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u128.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u128.leo new file mode 100644 index 0000000000..65ec73cee5 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_u128 tests + let a: u128 = SHA3_256::hash_to_u128(addr_value); + let b: u128 = SHA3_256::hash_to_u128(bool_value); + let c: u128 = SHA3_256::hash_to_u128(field_value); + let d: u128 = SHA3_256::hash_to_u128(group_value); + let e: u128 = SHA3_256::hash_to_u128(i8_value); + let f: u128 = SHA3_256::hash_to_u128(i16_value); + let g: u128 = SHA3_256::hash_to_u128(i32_value); + let h: u128 = SHA3_256::hash_to_u128(i64_value); + let i: u128 = SHA3_256::hash_to_u128(i128_value); + let j: u128 = SHA3_256::hash_to_u128(u8_value); + let k: u128 = SHA3_256::hash_to_u128(u16_value); + let l: u128 = SHA3_256::hash_to_u128(u32_value); + let m: u128 = SHA3_256::hash_to_u128(u64_value); + let n: u128 = SHA3_256::hash_to_u128(u128_value); + let o: u128 = SHA3_256::hash_to_u128(scalar_value); + // let p: u128 = SHA3_256::hash_to_u128(string_value); + let q: u128 = SHA3_256::hash_to_u128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u16.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u16.leo new file mode 100644 index 0000000000..33ed79d4c4 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_u16 tests + let a: u16 = SHA3_256::hash_to_u16(addr_value); + let b: u16 = SHA3_256::hash_to_u16(bool_value); + let c: u16 = SHA3_256::hash_to_u16(field_value); + let d: u16 = SHA3_256::hash_to_u16(group_value); + let e: u16 = SHA3_256::hash_to_u16(i8_value); + let f: u16 = SHA3_256::hash_to_u16(i16_value); + let g: u16 = SHA3_256::hash_to_u16(i32_value); + let h: u16 = SHA3_256::hash_to_u16(i64_value); + let i: u16 = SHA3_256::hash_to_u16(i128_value); + let j: u16 = SHA3_256::hash_to_u16(u8_value); + let k: u16 = SHA3_256::hash_to_u16(u16_value); + let l: u16 = SHA3_256::hash_to_u16(u32_value); + let m: u16 = SHA3_256::hash_to_u16(u64_value); + let n: u16 = SHA3_256::hash_to_u16(u128_value); + let o: u16 = SHA3_256::hash_to_u16(scalar_value); + // let p: u16 = SHA3_256::hash_to_u16(string_value); + let q: u16 = SHA3_256::hash_to_u16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u32.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u32.leo new file mode 100644 index 0000000000..85ed0736b6 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_u32 tests + let a: u32 = SHA3_256::hash_to_u32(addr_value); + let b: u32 = SHA3_256::hash_to_u32(bool_value); + let c: u32 = SHA3_256::hash_to_u32(field_value); + let d: u32 = SHA3_256::hash_to_u32(group_value); + let e: u32 = SHA3_256::hash_to_u32(i8_value); + let f: u32 = SHA3_256::hash_to_u32(i16_value); + let g: u32 = SHA3_256::hash_to_u32(i32_value); + let h: u32 = SHA3_256::hash_to_u32(i64_value); + let i: u32 = SHA3_256::hash_to_u32(i128_value); + let j: u32 = SHA3_256::hash_to_u32(u8_value); + let k: u32 = SHA3_256::hash_to_u32(u16_value); + let l: u32 = SHA3_256::hash_to_u32(u32_value); + let m: u32 = SHA3_256::hash_to_u32(u64_value); + let n: u32 = SHA3_256::hash_to_u32(u128_value); + let o: u32 = SHA3_256::hash_to_u32(scalar_value); + // let p: u32 = SHA3_256::hash_to_u32(string_value); + let q: u32 = SHA3_256::hash_to_u32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u64.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u64.leo new file mode 100644 index 0000000000..159df152b4 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_u64 tests + let a: u64 = SHA3_256::hash_to_u64(addr_value); + let b: u64 = SHA3_256::hash_to_u64(bool_value); + let c: u64 = SHA3_256::hash_to_u64(field_value); + let d: u64 = SHA3_256::hash_to_u64(group_value); + let e: u64 = SHA3_256::hash_to_u64(i8_value); + let f: u64 = SHA3_256::hash_to_u64(i16_value); + let g: u64 = SHA3_256::hash_to_u64(i32_value); + let h: u64 = SHA3_256::hash_to_u64(i64_value); + let i: u64 = SHA3_256::hash_to_u64(i128_value); + let j: u64 = SHA3_256::hash_to_u64(u8_value); + let k: u64 = SHA3_256::hash_to_u64(u16_value); + let l: u64 = SHA3_256::hash_to_u64(u32_value); + let m: u64 = SHA3_256::hash_to_u64(u64_value); + let n: u64 = SHA3_256::hash_to_u64(u128_value); + let o: u64 = SHA3_256::hash_to_u64(scalar_value); + // let p: u64 = SHA3_256::hash_to_u64(string_value); + let q: u64 = SHA3_256::hash_to_u64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u8.leo b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u8.leo new file mode 100644 index 0000000000..f1a66d0b2a --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_256/sha3_256_hash_to_u8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_u8 tests + let a: u8 = SHA3_256::hash_to_u8(addr_value); + let b: u8 = SHA3_256::hash_to_u8(bool_value); + let c: u8 = SHA3_256::hash_to_u8(field_value); + let d: u8 = SHA3_256::hash_to_u8(group_value); + let e: u8 = SHA3_256::hash_to_u8(i8_value); + let f: u8 = SHA3_256::hash_to_u8(i16_value); + let g: u8 = SHA3_256::hash_to_u8(i32_value); + let h: u8 = SHA3_256::hash_to_u8(i64_value); + let i: u8 = SHA3_256::hash_to_u8(i128_value); + let j: u8 = SHA3_256::hash_to_u8(u8_value); + let k: u8 = SHA3_256::hash_to_u8(u16_value); + let l: u8 = SHA3_256::hash_to_u8(u32_value); + let m: u8 = SHA3_256::hash_to_u8(u64_value); + let n: u8 = SHA3_256::hash_to_u8(u128_value); + let o: u8 = SHA3_256::hash_to_u8(scalar_value); + // let p: u8 = SHA3_256::hash_to_u8(string_value); + let q: u8 = SHA3_256::hash_to_u8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i128.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i128.leo new file mode 100644 index 0000000000..7ad2d494e1 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_i128 tests + let a: i128 = SHA3_384::hash_to_i128(addr_value); + let b: i128 = SHA3_384::hash_to_i128(bool_value); + let c: i128 = SHA3_384::hash_to_i128(field_value); + let d: i128 = SHA3_384::hash_to_i128(group_value); + let e: i128 = SHA3_384::hash_to_i128(i8_value); + let f: i128 = SHA3_384::hash_to_i128(i16_value); + let g: i128 = SHA3_384::hash_to_i128(i32_value); + let h: i128 = SHA3_384::hash_to_i128(i64_value); + let i: i128 = SHA3_384::hash_to_i128(i128_value); + let j: i128 = SHA3_384::hash_to_i128(u8_value); + let k: i128 = SHA3_384::hash_to_i128(u16_value); + let l: i128 = SHA3_384::hash_to_i128(u32_value); + let m: i128 = SHA3_384::hash_to_i128(u64_value); + let n: i128 = SHA3_384::hash_to_i128(u128_value); + let o: i128 = SHA3_384::hash_to_i128(scalar_value); + // let p: i128 = SHA3_384::hash_to_i128(string_value); + let q: i128 = SHA3_384::hash_to_i128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i16.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i16.leo new file mode 100644 index 0000000000..bc609c6e37 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_i16 tests + let a: i16 = SHA3_384::hash_to_i16(addr_value); + let b: i16 = SHA3_384::hash_to_i16(bool_value); + let c: i16 = SHA3_384::hash_to_i16(field_value); + let d: i16 = SHA3_384::hash_to_i16(group_value); + let e: i16 = SHA3_384::hash_to_i16(i8_value); + let f: i16 = SHA3_384::hash_to_i16(i16_value); + let g: i16 = SHA3_384::hash_to_i16(i32_value); + let h: i16 = SHA3_384::hash_to_i16(i64_value); + let i: i16 = SHA3_384::hash_to_i16(i128_value); + let j: i16 = SHA3_384::hash_to_i16(u8_value); + let k: i16 = SHA3_384::hash_to_i16(u16_value); + let l: i16 = SHA3_384::hash_to_i16(u32_value); + let m: i16 = SHA3_384::hash_to_i16(u64_value); + let n: i16 = SHA3_384::hash_to_i16(u128_value); + let o: i16 = SHA3_384::hash_to_i16(scalar_value); + // let p: i16 = SHA3_384::hash_to_i16(string_value); + let q: i16 = SHA3_384::hash_to_i16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i32.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i32.leo new file mode 100644 index 0000000000..dd73b1771b --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_i32 tests + let a: i32 = SHA3_384::hash_to_i32(addr_value); + let b: i32 = SHA3_384::hash_to_i32(bool_value); + let c: i32 = SHA3_384::hash_to_i32(field_value); + let d: i32 = SHA3_384::hash_to_i32(group_value); + let e: i32 = SHA3_384::hash_to_i32(i8_value); + let f: i32 = SHA3_384::hash_to_i32(i16_value); + let g: i32 = SHA3_384::hash_to_i32(i32_value); + let h: i32 = SHA3_384::hash_to_i32(i64_value); + let i: i32 = SHA3_384::hash_to_i32(i128_value); + let j: i32 = SHA3_384::hash_to_i32(u8_value); + let k: i32 = SHA3_384::hash_to_i32(u16_value); + let l: i32 = SHA3_384::hash_to_i32(u32_value); + let m: i32 = SHA3_384::hash_to_i32(u64_value); + let n: i32 = SHA3_384::hash_to_i32(u128_value); + let o: i32 = SHA3_384::hash_to_i32(scalar_value); + // let p: i32 = SHA3_384::hash_to_i32(string_value); + let q: i32 = SHA3_384::hash_to_i32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i64.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i64.leo new file mode 100644 index 0000000000..f0fc24a143 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_i64 tests + let a: i64 = SHA3_384::hash_to_i64(addr_value); + let b: i64 = SHA3_384::hash_to_i64(bool_value); + let c: i64 = SHA3_384::hash_to_i64(field_value); + let d: i64 = SHA3_384::hash_to_i64(group_value); + let e: i64 = SHA3_384::hash_to_i64(i8_value); + let f: i64 = SHA3_384::hash_to_i64(i16_value); + let g: i64 = SHA3_384::hash_to_i64(i32_value); + let h: i64 = SHA3_384::hash_to_i64(i64_value); + let i: i64 = SHA3_384::hash_to_i64(i128_value); + let j: i64 = SHA3_384::hash_to_i64(u8_value); + let k: i64 = SHA3_384::hash_to_i64(u16_value); + let l: i64 = SHA3_384::hash_to_i64(u32_value); + let m: i64 = SHA3_384::hash_to_i64(u64_value); + let n: i64 = SHA3_384::hash_to_i64(u128_value); + let o: i64 = SHA3_384::hash_to_i64(scalar_value); + // let p: i64 = SHA3_384::hash_to_i64(string_value); + let q: i64 = SHA3_384::hash_to_i64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i8.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i8.leo new file mode 100644 index 0000000000..1186b02594 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_i8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_i8 tests + let a: i8 = SHA3_384::hash_to_i8(addr_value); + let b: i8 = SHA3_384::hash_to_i8(bool_value); + let c: i8 = SHA3_384::hash_to_i8(field_value); + let d: i8 = SHA3_384::hash_to_i8(group_value); + let e: i8 = SHA3_384::hash_to_i8(i8_value); + let f: i8 = SHA3_384::hash_to_i8(i16_value); + let g: i8 = SHA3_384::hash_to_i8(i32_value); + let h: i8 = SHA3_384::hash_to_i8(i64_value); + let i: i8 = SHA3_384::hash_to_i8(i128_value); + let j: i8 = SHA3_384::hash_to_i8(u8_value); + let k: i8 = SHA3_384::hash_to_i8(u16_value); + let l: i8 = SHA3_384::hash_to_i8(u32_value); + let m: i8 = SHA3_384::hash_to_i8(u64_value); + let n: i8 = SHA3_384::hash_to_i8(u128_value); + let o: i8 = SHA3_384::hash_to_i8(scalar_value); + // let p: i8 = SHA3_384::hash_to_i8(string_value); + let q: i8 = SHA3_384::hash_to_i8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u128.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u128.leo new file mode 100644 index 0000000000..d3b03ab88a --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_u128 tests + let a: u128 = SHA3_384::hash_to_u128(addr_value); + let b: u128 = SHA3_384::hash_to_u128(bool_value); + let c: u128 = SHA3_384::hash_to_u128(field_value); + let d: u128 = SHA3_384::hash_to_u128(group_value); + let e: u128 = SHA3_384::hash_to_u128(i8_value); + let f: u128 = SHA3_384::hash_to_u128(i16_value); + let g: u128 = SHA3_384::hash_to_u128(i32_value); + let h: u128 = SHA3_384::hash_to_u128(i64_value); + let i: u128 = SHA3_384::hash_to_u128(i128_value); + let j: u128 = SHA3_384::hash_to_u128(u8_value); + let k: u128 = SHA3_384::hash_to_u128(u16_value); + let l: u128 = SHA3_384::hash_to_u128(u32_value); + let m: u128 = SHA3_384::hash_to_u128(u64_value); + let n: u128 = SHA3_384::hash_to_u128(u128_value); + let o: u128 = SHA3_384::hash_to_u128(scalar_value); + // let p: u128 = SHA3_384::hash_to_u128(string_value); + let q: u128 = SHA3_384::hash_to_u128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u16.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u16.leo new file mode 100644 index 0000000000..d45df86f0d --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_u16 tests + let a: u16 = SHA3_384::hash_to_u16(addr_value); + let b: u16 = SHA3_384::hash_to_u16(bool_value); + let c: u16 = SHA3_384::hash_to_u16(field_value); + let d: u16 = SHA3_384::hash_to_u16(group_value); + let e: u16 = SHA3_384::hash_to_u16(i8_value); + let f: u16 = SHA3_384::hash_to_u16(i16_value); + let g: u16 = SHA3_384::hash_to_u16(i32_value); + let h: u16 = SHA3_384::hash_to_u16(i64_value); + let i: u16 = SHA3_384::hash_to_u16(i128_value); + let j: u16 = SHA3_384::hash_to_u16(u8_value); + let k: u16 = SHA3_384::hash_to_u16(u16_value); + let l: u16 = SHA3_384::hash_to_u16(u32_value); + let m: u16 = SHA3_384::hash_to_u16(u64_value); + let n: u16 = SHA3_384::hash_to_u16(u128_value); + let o: u16 = SHA3_384::hash_to_u16(scalar_value); + // let p: u16 = SHA3_384::hash_to_u16(string_value); + let q: u16 = SHA3_384::hash_to_u16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u32.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u32.leo new file mode 100644 index 0000000000..6d11166106 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_u32 tests + let a: u32 = SHA3_384::hash_to_u32(addr_value); + let b: u32 = SHA3_384::hash_to_u32(bool_value); + let c: u32 = SHA3_384::hash_to_u32(field_value); + let d: u32 = SHA3_384::hash_to_u32(group_value); + let e: u32 = SHA3_384::hash_to_u32(i8_value); + let f: u32 = SHA3_384::hash_to_u32(i16_value); + let g: u32 = SHA3_384::hash_to_u32(i32_value); + let h: u32 = SHA3_384::hash_to_u32(i64_value); + let i: u32 = SHA3_384::hash_to_u32(i128_value); + let j: u32 = SHA3_384::hash_to_u32(u8_value); + let k: u32 = SHA3_384::hash_to_u32(u16_value); + let l: u32 = SHA3_384::hash_to_u32(u32_value); + let m: u32 = SHA3_384::hash_to_u32(u64_value); + let n: u32 = SHA3_384::hash_to_u32(u128_value); + let o: u32 = SHA3_384::hash_to_u32(scalar_value); + // let p: u32 = SHA3_384::hash_to_u32(string_value); + let q: u32 = SHA3_384::hash_to_u32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u64.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u64.leo new file mode 100644 index 0000000000..c6dac38671 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_u64 tests + let a: u64 = SHA3_384::hash_to_u64(addr_value); + let b: u64 = SHA3_384::hash_to_u64(bool_value); + let c: u64 = SHA3_384::hash_to_u64(field_value); + let d: u64 = SHA3_384::hash_to_u64(group_value); + let e: u64 = SHA3_384::hash_to_u64(i8_value); + let f: u64 = SHA3_384::hash_to_u64(i16_value); + let g: u64 = SHA3_384::hash_to_u64(i32_value); + let h: u64 = SHA3_384::hash_to_u64(i64_value); + let i: u64 = SHA3_384::hash_to_u64(i128_value); + let j: u64 = SHA3_384::hash_to_u64(u8_value); + let k: u64 = SHA3_384::hash_to_u64(u16_value); + let l: u64 = SHA3_384::hash_to_u64(u32_value); + let m: u64 = SHA3_384::hash_to_u64(u64_value); + let n: u64 = SHA3_384::hash_to_u64(u128_value); + let o: u64 = SHA3_384::hash_to_u64(scalar_value); + // let p: u64 = SHA3_384::hash_to_u64(string_value); + let q: u64 = SHA3_384::hash_to_u64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u8.leo b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u8.leo new file mode 100644 index 0000000000..b90441ed53 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_384/sha3_384_hash_to_u8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_u8 tests + let a: u8 = SHA3_384::hash_to_u8(addr_value); + let b: u8 = SHA3_384::hash_to_u8(bool_value); + let c: u8 = SHA3_384::hash_to_u8(field_value); + let d: u8 = SHA3_384::hash_to_u8(group_value); + let e: u8 = SHA3_384::hash_to_u8(i8_value); + let f: u8 = SHA3_384::hash_to_u8(i16_value); + let g: u8 = SHA3_384::hash_to_u8(i32_value); + let h: u8 = SHA3_384::hash_to_u8(i64_value); + let i: u8 = SHA3_384::hash_to_u8(i128_value); + let j: u8 = SHA3_384::hash_to_u8(u8_value); + let k: u8 = SHA3_384::hash_to_u8(u16_value); + let l: u8 = SHA3_384::hash_to_u8(u32_value); + let m: u8 = SHA3_384::hash_to_u8(u64_value); + let n: u8 = SHA3_384::hash_to_u8(u128_value); + let o: u8 = SHA3_384::hash_to_u8(scalar_value); + // let p: u8 = SHA3_384::hash_to_u8(string_value); + let q: u8 = SHA3_384::hash_to_u8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i128.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i128.leo new file mode 100644 index 0000000000..4451b1602b --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_i128 tests + let a: i128 = SHA3_512::hash_to_i128(addr_value); + let b: i128 = SHA3_512::hash_to_i128(bool_value); + let c: i128 = SHA3_512::hash_to_i128(field_value); + let d: i128 = SHA3_512::hash_to_i128(group_value); + let e: i128 = SHA3_512::hash_to_i128(i8_value); + let f: i128 = SHA3_512::hash_to_i128(i16_value); + let g: i128 = SHA3_512::hash_to_i128(i32_value); + let h: i128 = SHA3_512::hash_to_i128(i64_value); + let i: i128 = SHA3_512::hash_to_i128(i128_value); + let j: i128 = SHA3_512::hash_to_i128(u8_value); + let k: i128 = SHA3_512::hash_to_i128(u16_value); + let l: i128 = SHA3_512::hash_to_i128(u32_value); + let m: i128 = SHA3_512::hash_to_i128(u64_value); + let n: i128 = SHA3_512::hash_to_i128(u128_value); + let o: i128 = SHA3_512::hash_to_i128(scalar_value); + // let p: i128 = SHA3_512::hash_to_i128(string_value); + let q: i128 = SHA3_512::hash_to_i128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i16.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i16.leo new file mode 100644 index 0000000000..8e1523cdd7 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_i16 tests + let a: i16 = SHA3_512::hash_to_i16(addr_value); + let b: i16 = SHA3_512::hash_to_i16(bool_value); + let c: i16 = SHA3_512::hash_to_i16(field_value); + let d: i16 = SHA3_512::hash_to_i16(group_value); + let e: i16 = SHA3_512::hash_to_i16(i8_value); + let f: i16 = SHA3_512::hash_to_i16(i16_value); + let g: i16 = SHA3_512::hash_to_i16(i32_value); + let h: i16 = SHA3_512::hash_to_i16(i64_value); + let i: i16 = SHA3_512::hash_to_i16(i128_value); + let j: i16 = SHA3_512::hash_to_i16(u8_value); + let k: i16 = SHA3_512::hash_to_i16(u16_value); + let l: i16 = SHA3_512::hash_to_i16(u32_value); + let m: i16 = SHA3_512::hash_to_i16(u64_value); + let n: i16 = SHA3_512::hash_to_i16(u128_value); + let o: i16 = SHA3_512::hash_to_i16(scalar_value); + // let p: i16 = SHA3_512::hash_to_i16(string_value); + let q: i16 = SHA3_512::hash_to_i16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i32.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i32.leo new file mode 100644 index 0000000000..6196d8534e --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_i32 tests + let a: i32 = SHA3_512::hash_to_i32(addr_value); + let b: i32 = SHA3_512::hash_to_i32(bool_value); + let c: i32 = SHA3_512::hash_to_i32(field_value); + let d: i32 = SHA3_512::hash_to_i32(group_value); + let e: i32 = SHA3_512::hash_to_i32(i8_value); + let f: i32 = SHA3_512::hash_to_i32(i16_value); + let g: i32 = SHA3_512::hash_to_i32(i32_value); + let h: i32 = SHA3_512::hash_to_i32(i64_value); + let i: i32 = SHA3_512::hash_to_i32(i128_value); + let j: i32 = SHA3_512::hash_to_i32(u8_value); + let k: i32 = SHA3_512::hash_to_i32(u16_value); + let l: i32 = SHA3_512::hash_to_i32(u32_value); + let m: i32 = SHA3_512::hash_to_i32(u64_value); + let n: i32 = SHA3_512::hash_to_i32(u128_value); + let o: i32 = SHA3_512::hash_to_i32(scalar_value); + // let p: i32 = SHA3_512::hash_to_i32(string_value); + let q: i32 = SHA3_512::hash_to_i32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i64.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i64.leo new file mode 100644 index 0000000000..cc8484a87c --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_i64 tests + let a: i64 = SHA3_512::hash_to_i64(addr_value); + let b: i64 = SHA3_512::hash_to_i64(bool_value); + let c: i64 = SHA3_512::hash_to_i64(field_value); + let d: i64 = SHA3_512::hash_to_i64(group_value); + let e: i64 = SHA3_512::hash_to_i64(i8_value); + let f: i64 = SHA3_512::hash_to_i64(i16_value); + let g: i64 = SHA3_512::hash_to_i64(i32_value); + let h: i64 = SHA3_512::hash_to_i64(i64_value); + let i: i64 = SHA3_512::hash_to_i64(i128_value); + let j: i64 = SHA3_512::hash_to_i64(u8_value); + let k: i64 = SHA3_512::hash_to_i64(u16_value); + let l: i64 = SHA3_512::hash_to_i64(u32_value); + let m: i64 = SHA3_512::hash_to_i64(u64_value); + let n: i64 = SHA3_512::hash_to_i64(u128_value); + let o: i64 = SHA3_512::hash_to_i64(scalar_value); + // let p: i64 = SHA3_512::hash_to_i64(string_value); + let q: i64 = SHA3_512::hash_to_i64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i8.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i8.leo new file mode 100644 index 0000000000..527bfc1b25 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_i8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> i8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_i8 tests + let a: i8 = SHA3_512::hash_to_i8(addr_value); + let b: i8 = SHA3_512::hash_to_i8(bool_value); + let c: i8 = SHA3_512::hash_to_i8(field_value); + let d: i8 = SHA3_512::hash_to_i8(group_value); + let e: i8 = SHA3_512::hash_to_i8(i8_value); + let f: i8 = SHA3_512::hash_to_i8(i16_value); + let g: i8 = SHA3_512::hash_to_i8(i32_value); + let h: i8 = SHA3_512::hash_to_i8(i64_value); + let i: i8 = SHA3_512::hash_to_i8(i128_value); + let j: i8 = SHA3_512::hash_to_i8(u8_value); + let k: i8 = SHA3_512::hash_to_i8(u16_value); + let l: i8 = SHA3_512::hash_to_i8(u32_value); + let m: i8 = SHA3_512::hash_to_i8(u64_value); + let n: i8 = SHA3_512::hash_to_i8(u128_value); + let o: i8 = SHA3_512::hash_to_i8(scalar_value); + // let p: i8 = SHA3_512::hash_to_i8(string_value); + let q: i8 = SHA3_512::hash_to_i8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u128.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u128.leo new file mode 100644 index 0000000000..d9ad3b0600 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u128.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u128 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_u128 tests + let a: u128 = SHA3_512::hash_to_u128(addr_value); + let b: u128 = SHA3_512::hash_to_u128(bool_value); + let c: u128 = SHA3_512::hash_to_u128(field_value); + let d: u128 = SHA3_512::hash_to_u128(group_value); + let e: u128 = SHA3_512::hash_to_u128(i8_value); + let f: u128 = SHA3_512::hash_to_u128(i16_value); + let g: u128 = SHA3_512::hash_to_u128(i32_value); + let h: u128 = SHA3_512::hash_to_u128(i64_value); + let i: u128 = SHA3_512::hash_to_u128(i128_value); + let j: u128 = SHA3_512::hash_to_u128(u8_value); + let k: u128 = SHA3_512::hash_to_u128(u16_value); + let l: u128 = SHA3_512::hash_to_u128(u32_value); + let m: u128 = SHA3_512::hash_to_u128(u64_value); + let n: u128 = SHA3_512::hash_to_u128(u128_value); + let o: u128 = SHA3_512::hash_to_u128(scalar_value); + // let p: u128 = SHA3_512::hash_to_u128(string_value); + let q: u128 = SHA3_512::hash_to_u128(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u16.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u16.leo new file mode 100644 index 0000000000..aa2f862a49 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u16.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u16 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_u16 tests + let a: u16 = SHA3_512::hash_to_u16(addr_value); + let b: u16 = SHA3_512::hash_to_u16(bool_value); + let c: u16 = SHA3_512::hash_to_u16(field_value); + let d: u16 = SHA3_512::hash_to_u16(group_value); + let e: u16 = SHA3_512::hash_to_u16(i8_value); + let f: u16 = SHA3_512::hash_to_u16(i16_value); + let g: u16 = SHA3_512::hash_to_u16(i32_value); + let h: u16 = SHA3_512::hash_to_u16(i64_value); + let i: u16 = SHA3_512::hash_to_u16(i128_value); + let j: u16 = SHA3_512::hash_to_u16(u8_value); + let k: u16 = SHA3_512::hash_to_u16(u16_value); + let l: u16 = SHA3_512::hash_to_u16(u32_value); + let m: u16 = SHA3_512::hash_to_u16(u64_value); + let n: u16 = SHA3_512::hash_to_u16(u128_value); + let o: u16 = SHA3_512::hash_to_u16(scalar_value); + // let p: u16 = SHA3_512::hash_to_u16(string_value); + let q: u16 = SHA3_512::hash_to_u16(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u32.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u32.leo new file mode 100644 index 0000000000..685e9cbf51 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u32.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u32 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_u32 tests + let a: u32 = SHA3_512::hash_to_u32(addr_value); + let b: u32 = SHA3_512::hash_to_u32(bool_value); + let c: u32 = SHA3_512::hash_to_u32(field_value); + let d: u32 = SHA3_512::hash_to_u32(group_value); + let e: u32 = SHA3_512::hash_to_u32(i8_value); + let f: u32 = SHA3_512::hash_to_u32(i16_value); + let g: u32 = SHA3_512::hash_to_u32(i32_value); + let h: u32 = SHA3_512::hash_to_u32(i64_value); + let i: u32 = SHA3_512::hash_to_u32(i128_value); + let j: u32 = SHA3_512::hash_to_u32(u8_value); + let k: u32 = SHA3_512::hash_to_u32(u16_value); + let l: u32 = SHA3_512::hash_to_u32(u32_value); + let m: u32 = SHA3_512::hash_to_u32(u64_value); + let n: u32 = SHA3_512::hash_to_u32(u128_value); + let o: u32 = SHA3_512::hash_to_u32(scalar_value); + // let p: u32 = SHA3_512::hash_to_u32(string_value); + let q: u32 = SHA3_512::hash_to_u32(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u64.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u64.leo new file mode 100644 index 0000000000..a98668db06 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u64.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u64 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_u64 tests + let a: u64 = SHA3_512::hash_to_u64(addr_value); + let b: u64 = SHA3_512::hash_to_u64(bool_value); + let c: u64 = SHA3_512::hash_to_u64(field_value); + let d: u64 = SHA3_512::hash_to_u64(group_value); + let e: u64 = SHA3_512::hash_to_u64(i8_value); + let f: u64 = SHA3_512::hash_to_u64(i16_value); + let g: u64 = SHA3_512::hash_to_u64(i32_value); + let h: u64 = SHA3_512::hash_to_u64(i64_value); + let i: u64 = SHA3_512::hash_to_u64(i128_value); + let j: u64 = SHA3_512::hash_to_u64(u8_value); + let k: u64 = SHA3_512::hash_to_u64(u16_value); + let l: u64 = SHA3_512::hash_to_u64(u32_value); + let m: u64 = SHA3_512::hash_to_u64(u64_value); + let n: u64 = SHA3_512::hash_to_u64(u128_value); + let o: u64 = SHA3_512::hash_to_u64(scalar_value); + // let p: u64 = SHA3_512::hash_to_u64(string_value); + let q: u64 = SHA3_512::hash_to_u64(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u8.leo b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u8.leo new file mode 100644 index 0000000000..de65cd6802 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/integers/sha3_512/sha3_512_hash_to_u8.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> u8 { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_u8 tests + let a: u8 = SHA3_512::hash_to_u8(addr_value); + let b: u8 = SHA3_512::hash_to_u8(bool_value); + let c: u8 = SHA3_512::hash_to_u8(field_value); + let d: u8 = SHA3_512::hash_to_u8(group_value); + let e: u8 = SHA3_512::hash_to_u8(i8_value); + let f: u8 = SHA3_512::hash_to_u8(i16_value); + let g: u8 = SHA3_512::hash_to_u8(i32_value); + let h: u8 = SHA3_512::hash_to_u8(i64_value); + let i: u8 = SHA3_512::hash_to_u8(i128_value); + let j: u8 = SHA3_512::hash_to_u8(u8_value); + let k: u8 = SHA3_512::hash_to_u8(u16_value); + let l: u8 = SHA3_512::hash_to_u8(u32_value); + let m: u8 = SHA3_512::hash_to_u8(u64_value); + let n: u8 = SHA3_512::hash_to_u8(u128_value); + let o: u8 = SHA3_512::hash_to_u8(scalar_value); + // let p: u8 = SHA3_512::hash_to_u8(string_value); + let q: u8 = SHA3_512::hash_to_u8(Foo { a: 1u128, b: 1u128 }); + + return a; + } +} diff --git a/tests/tests/compiler/core/algorithms/keccak256_hash_to_address.leo b/tests/tests/compiler/core/algorithms/keccak256_hash_to_address.leo new file mode 100644 index 0000000000..b22301c568 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak256_hash_to_address.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_address tests + let a: address = Keccak256::hash_to_address(addr_value); + let b: address = Keccak256::hash_to_address(bool_value); + let c: address = Keccak256::hash_to_address(field_value); + let d: address = Keccak256::hash_to_address(group_value); + let e: address = Keccak256::hash_to_address(i8_value); + let f: address = Keccak256::hash_to_address(i16_value); + let g: address = Keccak256::hash_to_address(i32_value); + let h: address = Keccak256::hash_to_address(i64_value); + let i: address = Keccak256::hash_to_address(i128_value); + let j: address = Keccak256::hash_to_address(u8_value); + let k: address = Keccak256::hash_to_address(u16_value); + let l: address = Keccak256::hash_to_address(u32_value); + let m: address = Keccak256::hash_to_address(u64_value); + let n: address = Keccak256::hash_to_address(u128_value); + let o: address = Keccak256::hash_to_address(scalar_value); + // let p: address = Keccak256::hash_to_address(string_value); + let q: address = Keccak256::hash_to_address(Foo { a: 1u128, b: 1u128 }); + + return field_value; + } +} diff --git a/tests/tests/compiler/core/algorithms/keccak256_hash_to_field.leo b/tests/tests/compiler/core/algorithms/keccak256_hash_to_field.leo new file mode 100644 index 0000000000..9c65823c3c --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak256_hash_to_field.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_field tests + let a: field = Keccak256::hash_to_field(addr_value); + let b: field = Keccak256::hash_to_field(bool_value); + let c: field = Keccak256::hash_to_field(field_value); + let d: field = Keccak256::hash_to_field(group_value); + let e: field = Keccak256::hash_to_field(i8_value); + let f: field = Keccak256::hash_to_field(i16_value); + let g: field = Keccak256::hash_to_field(i32_value); + let h: field = Keccak256::hash_to_field(i64_value); + let i: field = Keccak256::hash_to_field(i128_value); + let j: field = Keccak256::hash_to_field(u8_value); + let k: field = Keccak256::hash_to_field(u16_value); + let l: field = Keccak256::hash_to_field(u32_value); + let m: field = Keccak256::hash_to_field(u64_value); + let n: field = Keccak256::hash_to_field(u128_value); + let o: field = Keccak256::hash_to_field(scalar_value); + // let p: field = Keccak256::hash_to_field(string_value); + let q: field = Keccak256::hash_to_field(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/keccak256_hash_to_group.leo b/tests/tests/compiler/core/algorithms/keccak256_hash_to_group.leo new file mode 100644 index 0000000000..870fff846d --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak256_hash_to_group.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> group { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_group tests + let a: group = Keccak256::hash_to_group(addr_value); + let b: group = Keccak256::hash_to_group(bool_value); + let c: group = Keccak256::hash_to_group(field_value); + let d: group = Keccak256::hash_to_group(group_value); + let e: group = Keccak256::hash_to_group(i8_value); + let f: group = Keccak256::hash_to_group(i16_value); + let g: group = Keccak256::hash_to_group(i32_value); + let h: group = Keccak256::hash_to_group(i64_value); + let i: group = Keccak256::hash_to_group(i128_value); + let j: group = Keccak256::hash_to_group(u8_value); + let k: group = Keccak256::hash_to_group(u16_value); + let l: group = Keccak256::hash_to_group(u32_value); + let m: group = Keccak256::hash_to_group(u64_value); + let n: group = Keccak256::hash_to_group(u128_value); + let o: group = Keccak256::hash_to_group(scalar_value); + // let p: group = Keccak256::hash_to_group(string_value); + let q: group = Keccak256::hash_to_group(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/keccak256_hash_to_scalar.leo b/tests/tests/compiler/core/algorithms/keccak256_hash_to_scalar.leo new file mode 100644 index 0000000000..e2cd515362 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak256_hash_to_scalar.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> scalar { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak256 hash_to_scalar tests + let a: scalar = Keccak256::hash_to_scalar(addr_value); + let b: scalar = Keccak256::hash_to_scalar(bool_value); + let c: scalar = Keccak256::hash_to_scalar(field_value); + let d: scalar = Keccak256::hash_to_scalar(group_value); + let e: scalar = Keccak256::hash_to_scalar(i8_value); + let f: scalar = Keccak256::hash_to_scalar(i16_value); + let g: scalar = Keccak256::hash_to_scalar(i32_value); + let h: scalar = Keccak256::hash_to_scalar(i64_value); + let i: scalar = Keccak256::hash_to_scalar(i128_value); + let j: scalar = Keccak256::hash_to_scalar(u8_value); + let k: scalar = Keccak256::hash_to_scalar(u16_value); + let l: scalar = Keccak256::hash_to_scalar(u32_value); + let m: scalar = Keccak256::hash_to_scalar(u64_value); + let n: scalar = Keccak256::hash_to_scalar(u128_value); + let o: scalar = Keccak256::hash_to_scalar(scalar_value); + // let p: scalar = Keccak256::hash_to_scalar(string_value); + let q: scalar = Keccak256::hash_to_scalar(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/keccak384_hash_to_address.leo b/tests/tests/compiler/core/algorithms/keccak384_hash_to_address.leo new file mode 100644 index 0000000000..0edcadb9d4 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak384_hash_to_address.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_address tests + let a: address = Keccak384::hash_to_address(addr_value); + let b: address = Keccak384::hash_to_address(bool_value); + let c: address = Keccak384::hash_to_address(field_value); + let d: address = Keccak384::hash_to_address(group_value); + let e: address = Keccak384::hash_to_address(i8_value); + let f: address = Keccak384::hash_to_address(i16_value); + let g: address = Keccak384::hash_to_address(i32_value); + let h: address = Keccak384::hash_to_address(i64_value); + let i: address = Keccak384::hash_to_address(i128_value); + let j: address = Keccak384::hash_to_address(u8_value); + let k: address = Keccak384::hash_to_address(u16_value); + let l: address = Keccak384::hash_to_address(u32_value); + let m: address = Keccak384::hash_to_address(u64_value); + let n: address = Keccak384::hash_to_address(u128_value); + let o: address = Keccak384::hash_to_address(scalar_value); + // let p: address = Keccak384::hash_to_address(string_value); + let q: address = Keccak384::hash_to_address(Foo { a: 1u128, b: 1u128 }); + + return field_value; + } +} diff --git a/tests/tests/compiler/core/algorithms/keccak384_hash_to_field.leo b/tests/tests/compiler/core/algorithms/keccak384_hash_to_field.leo new file mode 100644 index 0000000000..d4825e23f4 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak384_hash_to_field.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_field tests + let a: field = Keccak384::hash_to_field(addr_value); + let b: field = Keccak384::hash_to_field(bool_value); + let c: field = Keccak384::hash_to_field(field_value); + let d: field = Keccak384::hash_to_field(group_value); + let e: field = Keccak384::hash_to_field(i8_value); + let f: field = Keccak384::hash_to_field(i16_value); + let g: field = Keccak384::hash_to_field(i32_value); + let h: field = Keccak384::hash_to_field(i64_value); + let i: field = Keccak384::hash_to_field(i128_value); + let j: field = Keccak384::hash_to_field(u8_value); + let k: field = Keccak384::hash_to_field(u16_value); + let l: field = Keccak384::hash_to_field(u32_value); + let m: field = Keccak384::hash_to_field(u64_value); + let n: field = Keccak384::hash_to_field(u128_value); + let o: field = Keccak384::hash_to_field(scalar_value); + // let p: field = Keccak384::hash_to_field(string_value); + let q: field = Keccak384::hash_to_field(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/keccak384_hash_to_group.leo b/tests/tests/compiler/core/algorithms/keccak384_hash_to_group.leo new file mode 100644 index 0000000000..8890a28252 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak384_hash_to_group.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> group { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_group tests + let a: group = Keccak384::hash_to_group(addr_value); + let b: group = Keccak384::hash_to_group(bool_value); + let c: group = Keccak384::hash_to_group(field_value); + let d: group = Keccak384::hash_to_group(group_value); + let e: group = Keccak384::hash_to_group(i8_value); + let f: group = Keccak384::hash_to_group(i16_value); + let g: group = Keccak384::hash_to_group(i32_value); + let h: group = Keccak384::hash_to_group(i64_value); + let i: group = Keccak384::hash_to_group(i128_value); + let j: group = Keccak384::hash_to_group(u8_value); + let k: group = Keccak384::hash_to_group(u16_value); + let l: group = Keccak384::hash_to_group(u32_value); + let m: group = Keccak384::hash_to_group(u64_value); + let n: group = Keccak384::hash_to_group(u128_value); + let o: group = Keccak384::hash_to_group(scalar_value); + // let p: group = Keccak384::hash_to_group(string_value); + let q: group = Keccak384::hash_to_group(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/keccak384_hash_to_scalar.leo b/tests/tests/compiler/core/algorithms/keccak384_hash_to_scalar.leo new file mode 100644 index 0000000000..2b487962c6 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak384_hash_to_scalar.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> scalar { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak384 hash_to_scalar tests + let a: scalar = Keccak384::hash_to_scalar(addr_value); + let b: scalar = Keccak384::hash_to_scalar(bool_value); + let c: scalar = Keccak384::hash_to_scalar(field_value); + let d: scalar = Keccak384::hash_to_scalar(group_value); + let e: scalar = Keccak384::hash_to_scalar(i8_value); + let f: scalar = Keccak384::hash_to_scalar(i16_value); + let g: scalar = Keccak384::hash_to_scalar(i32_value); + let h: scalar = Keccak384::hash_to_scalar(i64_value); + let i: scalar = Keccak384::hash_to_scalar(i128_value); + let j: scalar = Keccak384::hash_to_scalar(u8_value); + let k: scalar = Keccak384::hash_to_scalar(u16_value); + let l: scalar = Keccak384::hash_to_scalar(u32_value); + let m: scalar = Keccak384::hash_to_scalar(u64_value); + let n: scalar = Keccak384::hash_to_scalar(u128_value); + let o: scalar = Keccak384::hash_to_scalar(scalar_value); + // let p: scalar = Keccak384::hash_to_scalar(string_value); + let q: scalar = Keccak384::hash_to_scalar(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/keccak512_hash_to_address.leo b/tests/tests/compiler/core/algorithms/keccak512_hash_to_address.leo new file mode 100644 index 0000000000..919c690d04 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak512_hash_to_address.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_address tests + let a: address = Keccak512::hash_to_address(addr_value); + let b: address = Keccak512::hash_to_address(bool_value); + let c: address = Keccak512::hash_to_address(field_value); + let d: address = Keccak512::hash_to_address(group_value); + let e: address = Keccak512::hash_to_address(i8_value); + let f: address = Keccak512::hash_to_address(i16_value); + let g: address = Keccak512::hash_to_address(i32_value); + let h: address = Keccak512::hash_to_address(i64_value); + let i: address = Keccak512::hash_to_address(i128_value); + let j: address = Keccak512::hash_to_address(u8_value); + let k: address = Keccak512::hash_to_address(u16_value); + let l: address = Keccak512::hash_to_address(u32_value); + let m: address = Keccak512::hash_to_address(u64_value); + let n: address = Keccak512::hash_to_address(u128_value); + let o: address = Keccak512::hash_to_address(scalar_value); + // let p: address = Keccak512::hash_to_address(string_value); + let q: address = Keccak512::hash_to_address(Foo { a: 1u128, b: 1u128 }); + + return field_value; + } +} diff --git a/tests/tests/compiler/core/algorithms/keccak512_hash_to_field.leo b/tests/tests/compiler/core/algorithms/keccak512_hash_to_field.leo new file mode 100644 index 0000000000..3fa7c16525 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak512_hash_to_field.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_field tests + let a: field = Keccak512::hash_to_field(addr_value); + let b: field = Keccak512::hash_to_field(bool_value); + let c: field = Keccak512::hash_to_field(field_value); + let d: field = Keccak512::hash_to_field(group_value); + let e: field = Keccak512::hash_to_field(i8_value); + let f: field = Keccak512::hash_to_field(i16_value); + let g: field = Keccak512::hash_to_field(i32_value); + let h: field = Keccak512::hash_to_field(i64_value); + let i: field = Keccak512::hash_to_field(i128_value); + let j: field = Keccak512::hash_to_field(u8_value); + let k: field = Keccak512::hash_to_field(u16_value); + let l: field = Keccak512::hash_to_field(u32_value); + let m: field = Keccak512::hash_to_field(u64_value); + let n: field = Keccak512::hash_to_field(u128_value); + let o: field = Keccak512::hash_to_field(scalar_value); + // let p: field = Keccak512::hash_to_field(string_value); + let q: field = Keccak512::hash_to_field(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/keccak512_hash_to_group.leo b/tests/tests/compiler/core/algorithms/keccak512_hash_to_group.leo new file mode 100644 index 0000000000..7ed8ff5585 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak512_hash_to_group.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> group { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_group tests + let a: group = Keccak512::hash_to_group(addr_value); + let b: group = Keccak512::hash_to_group(bool_value); + let c: group = Keccak512::hash_to_group(field_value); + let d: group = Keccak512::hash_to_group(group_value); + let e: group = Keccak512::hash_to_group(i8_value); + let f: group = Keccak512::hash_to_group(i16_value); + let g: group = Keccak512::hash_to_group(i32_value); + let h: group = Keccak512::hash_to_group(i64_value); + let i: group = Keccak512::hash_to_group(i128_value); + let j: group = Keccak512::hash_to_group(u8_value); + let k: group = Keccak512::hash_to_group(u16_value); + let l: group = Keccak512::hash_to_group(u32_value); + let m: group = Keccak512::hash_to_group(u64_value); + let n: group = Keccak512::hash_to_group(u128_value); + let o: group = Keccak512::hash_to_group(scalar_value); + // let p: group = Keccak512::hash_to_group(string_value); + let q: group = Keccak512::hash_to_group(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/keccak512_hash_to_scalar.leo b/tests/tests/compiler/core/algorithms/keccak512_hash_to_scalar.leo new file mode 100644 index 0000000000..4523f822e1 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/keccak512_hash_to_scalar.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> scalar { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // Keccak512 hash_to_scalar tests + let a: scalar = Keccak512::hash_to_scalar(addr_value); + let b: scalar = Keccak512::hash_to_scalar(bool_value); + let c: scalar = Keccak512::hash_to_scalar(field_value); + let d: scalar = Keccak512::hash_to_scalar(group_value); + let e: scalar = Keccak512::hash_to_scalar(i8_value); + let f: scalar = Keccak512::hash_to_scalar(i16_value); + let g: scalar = Keccak512::hash_to_scalar(i32_value); + let h: scalar = Keccak512::hash_to_scalar(i64_value); + let i: scalar = Keccak512::hash_to_scalar(i128_value); + let j: scalar = Keccak512::hash_to_scalar(u8_value); + let k: scalar = Keccak512::hash_to_scalar(u16_value); + let l: scalar = Keccak512::hash_to_scalar(u32_value); + let m: scalar = Keccak512::hash_to_scalar(u64_value); + let n: scalar = Keccak512::hash_to_scalar(u128_value); + let o: scalar = Keccak512::hash_to_scalar(scalar_value); + // let p: scalar = Keccak512::hash_to_scalar(string_value); + let q: scalar = Keccak512::hash_to_scalar(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/sha3_256_hash_to_address.leo b/tests/tests/compiler/core/algorithms/sha3_256_hash_to_address.leo new file mode 100644 index 0000000000..a3dd846494 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_256_hash_to_address.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_address tests + let a: address = SHA3_256::hash_to_address(addr_value); + let b: address = SHA3_256::hash_to_address(bool_value); + let c: address = SHA3_256::hash_to_address(field_value); + let d: address = SHA3_256::hash_to_address(group_value); + let e: address = SHA3_256::hash_to_address(i8_value); + let f: address = SHA3_256::hash_to_address(i16_value); + let g: address = SHA3_256::hash_to_address(i32_value); + let h: address = SHA3_256::hash_to_address(i64_value); + let i: address = SHA3_256::hash_to_address(i128_value); + let j: address = SHA3_256::hash_to_address(u8_value); + let k: address = SHA3_256::hash_to_address(u16_value); + let l: address = SHA3_256::hash_to_address(u32_value); + let m: address = SHA3_256::hash_to_address(u64_value); + let n: address = SHA3_256::hash_to_address(u128_value); + let o: address = SHA3_256::hash_to_address(scalar_value); + // let p: address = SHA3_256::hash_to_address(string_value); + let q: address = SHA3_256::hash_to_address(Foo { a: 1u128, b: 1u128 }); + + return field_value; + } +} diff --git a/tests/tests/compiler/core/algorithms/sha3_256_hash_to_field.leo b/tests/tests/compiler/core/algorithms/sha3_256_hash_to_field.leo new file mode 100644 index 0000000000..d165218c6c --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_256_hash_to_field.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_field tests + let a: field = SHA3_256::hash_to_field(addr_value); + let b: field = SHA3_256::hash_to_field(bool_value); + let c: field = SHA3_256::hash_to_field(field_value); + let d: field = SHA3_256::hash_to_field(group_value); + let e: field = SHA3_256::hash_to_field(i8_value); + let f: field = SHA3_256::hash_to_field(i16_value); + let g: field = SHA3_256::hash_to_field(i32_value); + let h: field = SHA3_256::hash_to_field(i64_value); + let i: field = SHA3_256::hash_to_field(i128_value); + let j: field = SHA3_256::hash_to_field(u8_value); + let k: field = SHA3_256::hash_to_field(u16_value); + let l: field = SHA3_256::hash_to_field(u32_value); + let m: field = SHA3_256::hash_to_field(u64_value); + let n: field = SHA3_256::hash_to_field(u128_value); + let o: field = SHA3_256::hash_to_field(scalar_value); + // let p: field = SHA3_256::hash_to_field(string_value); + let q: field = SHA3_256::hash_to_field(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/sha3_256_hash_to_group.leo b/tests/tests/compiler/core/algorithms/sha3_256_hash_to_group.leo new file mode 100644 index 0000000000..a91781e5e0 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_256_hash_to_group.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> group { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_group tests + let a: group = SHA3_256::hash_to_group(addr_value); + let b: group = SHA3_256::hash_to_group(bool_value); + let c: group = SHA3_256::hash_to_group(field_value); + let d: group = SHA3_256::hash_to_group(group_value); + let e: group = SHA3_256::hash_to_group(i8_value); + let f: group = SHA3_256::hash_to_group(i16_value); + let g: group = SHA3_256::hash_to_group(i32_value); + let h: group = SHA3_256::hash_to_group(i64_value); + let i: group = SHA3_256::hash_to_group(i128_value); + let j: group = SHA3_256::hash_to_group(u8_value); + let k: group = SHA3_256::hash_to_group(u16_value); + let l: group = SHA3_256::hash_to_group(u32_value); + let m: group = SHA3_256::hash_to_group(u64_value); + let n: group = SHA3_256::hash_to_group(u128_value); + let o: group = SHA3_256::hash_to_group(scalar_value); + // let p: group = SHA3_256::hash_to_group(string_value); + let q: group = SHA3_256::hash_to_group(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/sha3_256_hash_to_scalar.leo b/tests/tests/compiler/core/algorithms/sha3_256_hash_to_scalar.leo new file mode 100644 index 0000000000..78038ada78 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_256_hash_to_scalar.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> scalar { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_256 hash_to_scalar tests + let a: scalar = SHA3_256::hash_to_scalar(addr_value); + let b: scalar = SHA3_256::hash_to_scalar(bool_value); + let c: scalar = SHA3_256::hash_to_scalar(field_value); + let d: scalar = SHA3_256::hash_to_scalar(group_value); + let e: scalar = SHA3_256::hash_to_scalar(i8_value); + let f: scalar = SHA3_256::hash_to_scalar(i16_value); + let g: scalar = SHA3_256::hash_to_scalar(i32_value); + let h: scalar = SHA3_256::hash_to_scalar(i64_value); + let i: scalar = SHA3_256::hash_to_scalar(i128_value); + let j: scalar = SHA3_256::hash_to_scalar(u8_value); + let k: scalar = SHA3_256::hash_to_scalar(u16_value); + let l: scalar = SHA3_256::hash_to_scalar(u32_value); + let m: scalar = SHA3_256::hash_to_scalar(u64_value); + let n: scalar = SHA3_256::hash_to_scalar(u128_value); + let o: scalar = SHA3_256::hash_to_scalar(scalar_value); + // let p: scalar = SHA3_256::hash_to_scalar(string_value); + let q: scalar = SHA3_256::hash_to_scalar(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/sha3_384_hash_to_address.leo b/tests/tests/compiler/core/algorithms/sha3_384_hash_to_address.leo new file mode 100644 index 0000000000..d7716aa77f --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_384_hash_to_address.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_address tests + let a: address = SHA3_384::hash_to_address(addr_value); + let b: address = SHA3_384::hash_to_address(bool_value); + let c: address = SHA3_384::hash_to_address(field_value); + let d: address = SHA3_384::hash_to_address(group_value); + let e: address = SHA3_384::hash_to_address(i8_value); + let f: address = SHA3_384::hash_to_address(i16_value); + let g: address = SHA3_384::hash_to_address(i32_value); + let h: address = SHA3_384::hash_to_address(i64_value); + let i: address = SHA3_384::hash_to_address(i128_value); + let j: address = SHA3_384::hash_to_address(u8_value); + let k: address = SHA3_384::hash_to_address(u16_value); + let l: address = SHA3_384::hash_to_address(u32_value); + let m: address = SHA3_384::hash_to_address(u64_value); + let n: address = SHA3_384::hash_to_address(u128_value); + let o: address = SHA3_384::hash_to_address(scalar_value); + // let p: address = SHA3_384::hash_to_address(string_value); + let q: address = SHA3_384::hash_to_address(Foo { a: 1u128, b: 1u128 }); + + return field_value; + } +} diff --git a/tests/tests/compiler/core/algorithms/sha3_384_hash_to_field.leo b/tests/tests/compiler/core/algorithms/sha3_384_hash_to_field.leo new file mode 100644 index 0000000000..5c49f8ec01 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_384_hash_to_field.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_field tests + let a: field = SHA3_384::hash_to_field(addr_value); + let b: field = SHA3_384::hash_to_field(bool_value); + let c: field = SHA3_384::hash_to_field(field_value); + let d: field = SHA3_384::hash_to_field(group_value); + let e: field = SHA3_384::hash_to_field(i8_value); + let f: field = SHA3_384::hash_to_field(i16_value); + let g: field = SHA3_384::hash_to_field(i32_value); + let h: field = SHA3_384::hash_to_field(i64_value); + let i: field = SHA3_384::hash_to_field(i128_value); + let j: field = SHA3_384::hash_to_field(u8_value); + let k: field = SHA3_384::hash_to_field(u16_value); + let l: field = SHA3_384::hash_to_field(u32_value); + let m: field = SHA3_384::hash_to_field(u64_value); + let n: field = SHA3_384::hash_to_field(u128_value); + let o: field = SHA3_384::hash_to_field(scalar_value); + // let p: field = SHA3_384::hash_to_field(string_value); + let q: field = SHA3_384::hash_to_field(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/sha3_384_hash_to_group.leo b/tests/tests/compiler/core/algorithms/sha3_384_hash_to_group.leo new file mode 100644 index 0000000000..3b174dd970 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_384_hash_to_group.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> group { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_group tests + let a: group = SHA3_384::hash_to_group(addr_value); + let b: group = SHA3_384::hash_to_group(bool_value); + let c: group = SHA3_384::hash_to_group(field_value); + let d: group = SHA3_384::hash_to_group(group_value); + let e: group = SHA3_384::hash_to_group(i8_value); + let f: group = SHA3_384::hash_to_group(i16_value); + let g: group = SHA3_384::hash_to_group(i32_value); + let h: group = SHA3_384::hash_to_group(i64_value); + let i: group = SHA3_384::hash_to_group(i128_value); + let j: group = SHA3_384::hash_to_group(u8_value); + let k: group = SHA3_384::hash_to_group(u16_value); + let l: group = SHA3_384::hash_to_group(u32_value); + let m: group = SHA3_384::hash_to_group(u64_value); + let n: group = SHA3_384::hash_to_group(u128_value); + let o: group = SHA3_384::hash_to_group(scalar_value); + // let p: group = SHA3_384::hash_to_group(string_value); + let q: group = SHA3_384::hash_to_group(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/sha3_384_hash_to_scalar.leo b/tests/tests/compiler/core/algorithms/sha3_384_hash_to_scalar.leo new file mode 100644 index 0000000000..c45b9a22c8 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_384_hash_to_scalar.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> scalar { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_384 hash_to_scalar tests + let a: scalar = SHA3_384::hash_to_scalar(addr_value); + let b: scalar = SHA3_384::hash_to_scalar(bool_value); + let c: scalar = SHA3_384::hash_to_scalar(field_value); + let d: scalar = SHA3_384::hash_to_scalar(group_value); + let e: scalar = SHA3_384::hash_to_scalar(i8_value); + let f: scalar = SHA3_384::hash_to_scalar(i16_value); + let g: scalar = SHA3_384::hash_to_scalar(i32_value); + let h: scalar = SHA3_384::hash_to_scalar(i64_value); + let i: scalar = SHA3_384::hash_to_scalar(i128_value); + let j: scalar = SHA3_384::hash_to_scalar(u8_value); + let k: scalar = SHA3_384::hash_to_scalar(u16_value); + let l: scalar = SHA3_384::hash_to_scalar(u32_value); + let m: scalar = SHA3_384::hash_to_scalar(u64_value); + let n: scalar = SHA3_384::hash_to_scalar(u128_value); + let o: scalar = SHA3_384::hash_to_scalar(scalar_value); + // let p: scalar = SHA3_384::hash_to_scalar(string_value); + let q: scalar = SHA3_384::hash_to_scalar(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/sha3_512_hash_to_address.leo b/tests/tests/compiler/core/algorithms/sha3_512_hash_to_address.leo new file mode 100644 index 0000000000..6c466b9f32 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_512_hash_to_address.leo @@ -0,0 +1,52 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_address tests + let a: address = SHA3_512::hash_to_address(addr_value); + let b: address = SHA3_512::hash_to_address(bool_value); + let c: address = SHA3_512::hash_to_address(field_value); + let d: address = SHA3_512::hash_to_address(group_value); + let e: address = SHA3_512::hash_to_address(i8_value); + let f: address = SHA3_512::hash_to_address(i16_value); + let g: address = SHA3_512::hash_to_address(i32_value); + let h: address = SHA3_512::hash_to_address(i64_value); + let i: address = SHA3_512::hash_to_address(i128_value); + let j: address = SHA3_512::hash_to_address(u8_value); + let k: address = SHA3_512::hash_to_address(u16_value); + let l: address = SHA3_512::hash_to_address(u32_value); + let m: address = SHA3_512::hash_to_address(u64_value); + let n: address = SHA3_512::hash_to_address(u128_value); + let o: address = SHA3_512::hash_to_address(scalar_value); + // let p: address = SHA3_512::hash_to_address(string_value); + let q: address = SHA3_512::hash_to_address(Foo { a: 1u128, b: 1u128 }); + + return field_value; + } +} diff --git a/tests/tests/compiler/core/algorithms/sha3_512_hash_to_field.leo b/tests/tests/compiler/core/algorithms/sha3_512_hash_to_field.leo new file mode 100644 index 0000000000..873661b315 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_512_hash_to_field.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> field { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_field tests + let a: field = SHA3_512::hash_to_field(addr_value); + let b: field = SHA3_512::hash_to_field(bool_value); + let c: field = SHA3_512::hash_to_field(field_value); + let d: field = SHA3_512::hash_to_field(group_value); + let e: field = SHA3_512::hash_to_field(i8_value); + let f: field = SHA3_512::hash_to_field(i16_value); + let g: field = SHA3_512::hash_to_field(i32_value); + let h: field = SHA3_512::hash_to_field(i64_value); + let i: field = SHA3_512::hash_to_field(i128_value); + let j: field = SHA3_512::hash_to_field(u8_value); + let k: field = SHA3_512::hash_to_field(u16_value); + let l: field = SHA3_512::hash_to_field(u32_value); + let m: field = SHA3_512::hash_to_field(u64_value); + let n: field = SHA3_512::hash_to_field(u128_value); + let o: field = SHA3_512::hash_to_field(scalar_value); + // let p: field = SHA3_512::hash_to_field(string_value); + let q: field = SHA3_512::hash_to_field(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/sha3_512_hash_to_group.leo b/tests/tests/compiler/core/algorithms/sha3_512_hash_to_group.leo new file mode 100644 index 0000000000..93c395759f --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_512_hash_to_group.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> group { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_group tests + let a: group = SHA3_512::hash_to_group(addr_value); + let b: group = SHA3_512::hash_to_group(bool_value); + let c: group = SHA3_512::hash_to_group(field_value); + let d: group = SHA3_512::hash_to_group(group_value); + let e: group = SHA3_512::hash_to_group(i8_value); + let f: group = SHA3_512::hash_to_group(i16_value); + let g: group = SHA3_512::hash_to_group(i32_value); + let h: group = SHA3_512::hash_to_group(i64_value); + let i: group = SHA3_512::hash_to_group(i128_value); + let j: group = SHA3_512::hash_to_group(u8_value); + let k: group = SHA3_512::hash_to_group(u16_value); + let l: group = SHA3_512::hash_to_group(u32_value); + let m: group = SHA3_512::hash_to_group(u64_value); + let n: group = SHA3_512::hash_to_group(u128_value); + let o: group = SHA3_512::hash_to_group(scalar_value); + // let p: group = SHA3_512::hash_to_group(string_value); + let q: group = SHA3_512::hash_to_group(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/core/algorithms/sha3_512_hash_to_scalar.leo b/tests/tests/compiler/core/algorithms/sha3_512_hash_to_scalar.leo new file mode 100644 index 0000000000..2ac16dbd21 --- /dev/null +++ b/tests/tests/compiler/core/algorithms/sha3_512_hash_to_scalar.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +*/ + +program test.aleo { + struct Foo { + a: u128, + b: u128, + } + + transition main( + i8_value: i8, + i16_value: i16, + i32_value: i32, + i64_value: i64, + u8_value: u8, + u16_value: u16, + u32_value: u32, + u64_value: u64, + ) -> scalar { + let addr_value: address = aleo10qerras5799u6k7rjtc9y3hcwxuykr45qra7x7dp6jgnc0923czqm0lgta; + let bool_value: bool = true; + let field_value: field = 1field; + let group_value: group = group::GEN; + let i128_value: i128 = 1i128; + let u128_value: u128 = 1u128; + let scalar_value: scalar = 1scalar; + // let string_value: string = "helloworld"; + + // SHA3_512 hash_to_scalar tests + let a: scalar = SHA3_512::hash_to_scalar(addr_value); + let b: scalar = SHA3_512::hash_to_scalar(bool_value); + let c: scalar = SHA3_512::hash_to_scalar(field_value); + let d: scalar = SHA3_512::hash_to_scalar(group_value); + let e: scalar = SHA3_512::hash_to_scalar(i8_value); + let f: scalar = SHA3_512::hash_to_scalar(i16_value); + let g: scalar = SHA3_512::hash_to_scalar(i32_value); + let h: scalar = SHA3_512::hash_to_scalar(i64_value); + let i: scalar = SHA3_512::hash_to_scalar(i128_value); + let j: scalar = SHA3_512::hash_to_scalar(u8_value); + let k: scalar = SHA3_512::hash_to_scalar(u16_value); + let l: scalar = SHA3_512::hash_to_scalar(u32_value); + let m: scalar = SHA3_512::hash_to_scalar(u64_value); + let n: scalar = SHA3_512::hash_to_scalar(u128_value); + let o: scalar = SHA3_512::hash_to_scalar(scalar_value); + // let p: scalar = SHA3_512::hash_to_scalar(string_value); + let q: scalar = SHA3_512::hash_to_scalar(Foo { a: 1u128, b: 1u128 }); + + return a + o; + }} diff --git a/tests/tests/compiler/signature/signature.leo b/tests/tests/compiler/signature/signature.leo index 6d9e6eaff3..5a422871de 100644 --- a/tests/tests/compiler/signature/signature.leo +++ b/tests/tests/compiler/signature/signature.leo @@ -21,4 +21,12 @@ program test.aleo { let second: bool = s.verify(a, v); assert_eq(first, second); } + + transition literal_ops_on_signature(a: bool, b: signature, c: signature) -> signature { + let equal: bool = b == c; + let not_equal: bool = b != c; + let ternary: signature = a ? b : c; + + return ternary; + } } diff --git a/tests/tests/execution/flattened_function_and_inline_matches.leo b/tests/tests/execution/flattened_function_and_inline_matches.leo index 1713215422..0e5799fec7 100644 --- a/tests/tests/execution/flattened_function_and_inline_matches.leo +++ b/tests/tests/execution/flattened_function_and_inline_matches.leo @@ -27,7 +27,7 @@ program test.aleo { c: Extra, } - inline foo(a: u8, b: u8) -> (u8, u8, Data) { + inline foo(a: u8, b: u8, input: Data) -> (u8, u8, Data) { let extra: Extra = Extra { c: a }; let data: Data = Data { a: a, b: b, c: extra }; if (a == b) { @@ -35,11 +35,13 @@ program test.aleo { } let c: u8 = a + b; let d: u8 = a - b; + c = c + input.a; + d = d + input.b; return (c, d, data); } - function floo(a: u8, b: u8) -> (u8, u8, Data) { + function floo(a: u8, b: u8, input: Data) -> (u8, u8, Data) { let extra: Extra = Extra { c: a }; let data: Data = Data { a: a, b: b, c: extra }; if (a == b) { @@ -47,33 +49,43 @@ program test.aleo { } let c: u8 = a + b; let d: u8 = a - b; + c = c + input.a; + d = d + input.b; return (c, d, data); } transition bar(flag1: bool, flag2: bool, a: u8, b: u8) -> (u8, u8, Data) { - let start: (u8, u8, Data) = foo(a, b); + let data: Data = Data { a: a, b: b, c: Extra { c: a } }; + let start: (u8, u8, Data) = foo(a, b, data); + // (2, 1, Data { a: 1, b: 0, c: Extra { c: 1 } }) if flag1 { - start = foo(start.0, start.2.c.c); + // foo (2, 1, Data { a: 1, b: 0, c: Extra { c: 1 } }) + start = foo(start.0, start.2.c.c, start.2); + // } else { if flag2 { - start = foo(start.1, start.2.b); + // foo (1, 0, Data { a: 1, b: 0, c: Extra { c: 1 } }) + start = foo(start.1, start.2.b, start.2); } else { - start = foo(start.2.a, start.1); + // foo (1, 1, Data { a: 1, b: 0, c: Extra { c: 1 } }) + start = foo(start.2.a, start.1, start.2); } } return start; } transition blar(flag1: bool, flag2: bool, a: u8, b: u8) -> (u8, u8, Data) { - let start: (u8, u8, Data) = floo(a, b); + let data: Data = Data { a: a, b: b, c: Extra { c: a } }; + + let start: (u8, u8, Data) = floo(a, b, data); if flag1 { - start = floo(start.0, start.2.c.c); + start = floo(start.0, start.2.c.c, start.2); } else { if flag2 { - start = floo(start.1, start.2.b); + start = floo(start.1, start.2.b, start.2); } else { - start = floo(start.2.a, start.1); + start = floo(start.2.a, start.1, start.2); } } return start;