mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-04-20 03:03:25 -04:00
Support arrays in witgen.
This commit is contained in:
19
test_data/pil/fib_arrays.pil
Normal file
19
test_data/pil/fib_arrays.pil
Normal file
@@ -0,0 +1,19 @@
|
||||
let N = 16;
|
||||
namespace FibArrays(N);
|
||||
col fixed ISLAST(i) { match i {
|
||||
N - 1 => 1,
|
||||
_ => 0,
|
||||
} };
|
||||
col witness unused;
|
||||
col witness x[2];
|
||||
col witness unused2;
|
||||
|
||||
ISLAST * (x[1]' - 1) = 0;
|
||||
ISLAST * (x[0]' - 1) = 0;
|
||||
|
||||
(1-ISLAST) * (x[0]' - x[1]) = 0;
|
||||
(1-ISLAST) * (x[1]' - (x[0] + x[1])) = 0;
|
||||
|
||||
(unused - 1) * unused2 = 0;
|
||||
|
||||
public out = x[1](N - 1);
|
||||
Reference in New Issue
Block a user