diff --git a/linker/src/lib.rs b/linker/src/lib.rs index 1a5da4135b..5cbef29d69 100644 --- a/linker/src/lib.rs +++ b/linker/src/lib.rs @@ -601,7 +601,7 @@ machine NegativeForUnsigned { machine SubVM with latch: latch, operation_id: operation_id, min_degree: 64, max_degree: 128 { operation add5<0> x -> y; - col witness operation_id; + let operation_id; col fixed latch = [1]*; col witness x; @@ -669,7 +669,7 @@ namespace main__rom(4); pol constant operation_id = [0]*; pol constant latch = [1]*; namespace main_vm(64..128); - pol commit operation_id; + let operation_id; pol constant latch = [1]*; pol commit x; pol commit y; @@ -945,7 +945,7 @@ namespace main__rom(32); pol constant operation_id = [0]*; pol constant latch = [1]*; namespace main_submachine(32); - pol commit operation_id; + let operation_id; pol constant latch = [1]*; pol commit x; pol commit y; diff --git a/std/machines/binary.asm b/std/machines/binary.asm index aef49030f1..9871d8f730 100644 --- a/std/machines/binary.asm +++ b/std/machines/binary.asm @@ -10,8 +10,8 @@ machine ByteBinary with { operation run<0> P_operation, P_A, P_B -> P_C; - col fixed latch = [1]*; - col fixed operation_id = [0]*; + let latch: col = |i| 1; + let operation_id: col = |i| 0; let bit_counts = [256, 256, 3]; let min_degree = std::array::product(bit_counts); diff --git a/std/machines/hash/poseidon_bn254.asm b/std/machines/hash/poseidon_bn254.asm index 82b6971f31..09ce14a9b9 100644 --- a/std/machines/hash/poseidon_bn254.asm +++ b/std/machines/hash/poseidon_bn254.asm @@ -34,9 +34,9 @@ machine PoseidonBN254 with let PARTIAL_ROUNDS = 57; let ROWS_PER_HASH = FULL_ROUNDS + PARTIAL_ROUNDS + 1; - pol constant L0 = [1] + [0]*; - pol constant FIRSTBLOCK(i) { if i % ROWS_PER_HASH == 0 { 1 } else { 0 } }; - pol constant LASTBLOCK(i) { if i % ROWS_PER_HASH == ROWS_PER_HASH - 1 { 1 } else { 0 } }; + let L0: col = |i| if i == 0 { 1 } else { 0 }; + let FIRSTBLOCK: col = |i| { if i % ROWS_PER_HASH == 0 { 1 } else { 0 } }; + let LASTBLOCK: col = |i| { if i % ROWS_PER_HASH == ROWS_PER_HASH - 1 { 1 } else { 0 } }; // Like LASTBLOCK, but also 1 in the last row of the table // Specified this way because we can't access the degree in the match statement pol constant LAST = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]* + [1]; diff --git a/test_data/asm/block_machine_cache_miss.asm b/test_data/asm/block_machine_cache_miss.asm index cf25bcc1d7..4650f1e992 100644 --- a/test_data/asm/block_machine_cache_miss.asm +++ b/test_data/asm/block_machine_cache_miss.asm @@ -6,7 +6,7 @@ machine Arith with operation double<0> x -> y; operation square<1> x -> y; - col witness operation_id; + let operation_id; col fixed latch = [1]*; col fixed X(i) {i}; col fixed DOUBLE(i) {2*i}; diff --git a/test_data/asm/book/instructions.asm b/test_data/asm/book/instructions.asm index babdc3936e..9f9de5763d 100644 --- a/test_data/asm/book/instructions.asm +++ b/test_data/asm/book/instructions.asm @@ -15,7 +15,7 @@ machine SubMachine with latch: latch, operation_id: operation_id { - col witness operation_id; + let operation_id; col fixed latch = [1]*; operation add<0> x, y -> z; diff --git a/test_data/asm/book/instructions2.asm b/test_data/asm/book/instructions2.asm index 73f16614e5..e2f2dee802 100644 --- a/test_data/asm/book/instructions2.asm +++ b/test_data/asm/book/instructions2.asm @@ -3,7 +3,7 @@ machine SubMachine with latch: latch, operation_id: operation_id { - col witness operation_id; + let operation_id; col fixed latch = [1]*; operation add<0> x, y -> z; diff --git a/test_data/asm/dynamic_vadcop.asm b/test_data/asm/dynamic_vadcop.asm index 01f637ced3..78076ea853 100644 --- a/test_data/asm/dynamic_vadcop.asm +++ b/test_data/asm/dynamic_vadcop.asm @@ -56,7 +56,7 @@ machine Arith with operation mul<1> x[0], x[1] -> y; col fixed latch = [1]*; - col witness operation_id; + let operation_id; col witness x[2]; col witness y; diff --git a/test_data/asm/multiple_signatures.asm b/test_data/asm/multiple_signatures.asm index 5949989728..04e75de8d0 100644 --- a/test_data/asm/multiple_signatures.asm +++ b/test_data/asm/multiple_signatures.asm @@ -9,7 +9,7 @@ machine Add with // The compiler enforces that there is an operation ID if there are // multiple operations, even though we want the constraints to be // the same in both cases... - col witness operation_id; + let operation_id; let latch = 1; // A and B provided => C will be the sum. diff --git a/test_data/asm/permutations/link_merging.asm b/test_data/asm/permutations/link_merging.asm index a0a77174ba..f206d41528 100644 --- a/test_data/asm/permutations/link_merging.asm +++ b/test_data/asm/permutations/link_merging.asm @@ -2,7 +2,7 @@ machine SubMachine with latch: latch, operation_id: operation_id { - col witness operation_id; + let operation_id; col fixed latch = [1]*; operation add<0> x, y -> z; diff --git a/test_data/asm/permutations/vm_to_block_multiple_links.asm b/test_data/asm/permutations/vm_to_block_multiple_links.asm index 7bed5317ad..d9dbdb8250 100644 --- a/test_data/asm/permutations/vm_to_block_multiple_links.asm +++ b/test_data/asm/permutations/vm_to_block_multiple_links.asm @@ -54,7 +54,7 @@ machine Arith with operation sub<1> z, x -> y; - col witness operation_id; + let operation_id; col fixed latch = [1]*; col witness x; col witness y; diff --git a/test_data/asm/side_effects.asm b/test_data/asm/side_effects.asm index 1542a15c3d..2348c679e1 100644 --- a/test_data/asm/side_effects.asm +++ b/test_data/asm/side_effects.asm @@ -18,7 +18,7 @@ machine MemoryProxy with { operation mstore<0> addr, step, value ->; - col witness operation_id; + let operation_id; col fixed latch = [1]*; Byte2 byte2; diff --git a/test_data/asm/vm_instr_param_mapping.asm b/test_data/asm/vm_instr_param_mapping.asm index 9e9f717f66..be9bf5be28 100644 --- a/test_data/asm/vm_instr_param_mapping.asm +++ b/test_data/asm/vm_instr_param_mapping.asm @@ -23,7 +23,7 @@ machine AddVM with { operation add<0> x,y -> z; - col witness operation_id; + let operation_id; col fixed latch = [1]*; col witness x; diff --git a/test_data/asm/vm_to_block_array.asm b/test_data/asm/vm_to_block_array.asm index 2ed39be394..18eecfdbd9 100644 --- a/test_data/asm/vm_to_block_array.asm +++ b/test_data/asm/vm_to_block_array.asm @@ -28,7 +28,7 @@ machine Arith with operation mul<1> x[0], x[1] -> y; col fixed latch = [1]*; - col witness operation_id; + let operation_id; col witness x[2]; col witness y; diff --git a/test_data/asm/vm_to_block_multiple_interfaces.asm b/test_data/asm/vm_to_block_multiple_interfaces.asm index beaacb74db..38a48b1849 100644 --- a/test_data/asm/vm_to_block_multiple_interfaces.asm +++ b/test_data/asm/vm_to_block_multiple_interfaces.asm @@ -9,7 +9,7 @@ machine Arith with operation sub<1> z, x -> y; - col witness operation_id; + let operation_id; col fixed latch = [1]*; col witness x; col witness y; diff --git a/test_data/asm/vm_to_block_to_block.asm b/test_data/asm/vm_to_block_to_block.asm index e042176181..6c0f682215 100644 --- a/test_data/asm/vm_to_block_to_block.asm +++ b/test_data/asm/vm_to_block_to_block.asm @@ -5,7 +5,7 @@ machine Inc with { operation inc<0> x -> y; - col witness operation_id; + let operation_id; col fixed latch = [1]*; col witness x; col witness y; @@ -24,7 +24,7 @@ machine Assert1 with // Increment x by calling into inc machine link => y = inc.inc(x); - col witness operation_id; + let operation_id; col fixed latch = [1]*; col witness x; col witness y; diff --git a/test_data/asm/vm_to_block_unique_interface.asm b/test_data/asm/vm_to_block_unique_interface.asm index c2592336c7..59b8792297 100644 --- a/test_data/asm/vm_to_block_unique_interface.asm +++ b/test_data/asm/vm_to_block_unique_interface.asm @@ -7,7 +7,7 @@ machine Binary with operation or<1> x, y -> z; - col witness operation_id; + let operation_id; col fixed latch = [1]*; col witness x; col witness y; @@ -28,7 +28,7 @@ machine Arith with operation sub<1> x, y -> z; - col witness operation_id; + let operation_id; col fixed latch = [1]*; col witness x; col witness y; diff --git a/test_data/asm/vm_to_vm_to_block.asm b/test_data/asm/vm_to_vm_to_block.asm index df5fd9b199..c2db9ac48a 100644 --- a/test_data/asm/vm_to_vm_to_block.asm +++ b/test_data/asm/vm_to_vm_to_block.asm @@ -59,7 +59,7 @@ machine Arith with operation mul<1> x1, x2 -> y; col fixed latch = [1]*; - col witness operation_id; + let operation_id; col witness x1; col witness x2; col witness y;