From 4aad1d24b2f03840f5818a8895a5735400c1f1ec Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 30 Oct 2023 19:37:34 +0100 Subject: [PATCH] Test next operator in macro. --- test_data/pil/fib_macro.pil | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test_data/pil/fib_macro.pil b/test_data/pil/fib_macro.pil index f17f40e4fb..35aa4a71ef 100644 --- a/test_data/pil/fib_macro.pil +++ b/test_data/pil/fib_macro.pil @@ -20,16 +20,13 @@ pol constant ISLAST(i) { one_hot(i, %last_row) }; // ANCHOR: constraint_macro_definitions macro constrain_equal_expr(A, B) { A - B }; -macro force_equal_on_last_row(poly, value) { ISLAST * constrain_equal_expr(poly, value) = 0; }; +macro force_equal_on_first_row(poly, value) { ISLAST * constrain_equal_expr(poly', value) = 0; }; // ANCHOR_END: constraint_macro_definitions - // TODO would be easier if we could use "'" as an operator, - // then we could write a "force_equal_on_first_row" macro, - // and the macro would add a "'" to the parameter. // ANCHOR: constraint_macro_usage -force_equal_on_last_row(x', 1); +force_equal_on_first_row(x, 1); // ANCHOR_END: constraint_macro_usage - force_equal_on_last_row(y', 1); + force_equal_on_first_row(y, 1); macro on_regular_row(cond) { (1 - ISLAST) * cond = 0; };