Links
Links enable a constrained machine to call into another machine.
machine Main(latch, operation_id) {
Arith adder;
operation main<0> x, y -> z;
// - on every row (the boolean flag is `1`)
// - constrain the values of `x`, `y`, and `z` so that `z = adder.add(x, y)`
// TODO: uncomment the link once witness generation supports it
// link 1 x, y -> z = adder.add;
col fixed operation_id = [0]*;
col fixed latch = [1]*;
col witness x;
col witness y;
col witness z;
}
They are defined by:
- a boolean flag which must be on for the link to be active
- parameters to pass to the other machine, in the form of columns defined in the current machine
- an operation or function of the machine which is called