Skip to content

Commit be32fff

Browse files
committed
fix more tests
1 parent 8233dd3 commit be32fff

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

executor/src/witgen/jit/prover_function_heuristics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn try_decode_provide_if_unknown<T>(
122122
}
123123

124124
/// Decodes functions of the form
125-
/// ```
125+
/// ```pil
126126
/// query |<i>| std::prover::handle_query(<Y>, <i>, match std::prover::eval(<pc>) {
127127
/// <value1> => std::prelude::Query::Output(std::convert::int::<fe>(std::prover::eval(<arg1>)), std::prover::eval(<arg2>)),
128128
/// <value2> => std::prelude::Query::Input(std::convert::int::<fe>(std::prover::eval(<arg1>)), std::convert::int::<fe>(std::prover::eval(<arg2>))),

pilopt/src/lib.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ fn remove_unreferenced_definitions<T: FieldElement>(pil_file: &mut Analyzed<T>)
131131
)
132132
}
133133
} else if let Some((_, value)) = pil_file.intermediate_columns.get(n.name.as_ref()) {
134-
assert!(n.type_args.is_none());
134+
assert!(n
135+
.type_args
136+
.as_ref()
137+
.map(|args| args.is_empty())
138+
.unwrap_or(true));
135139
Box::new(value.iter().flat_map(|v| {
136140
v.all_children().flat_map(|e| {
137141
if let AlgebraicExpression::Reference(AlgebraicReference { poly_id, .. }) = e {
@@ -565,7 +569,7 @@ fn extract_constant_lookups<T: FieldElement>(pil_file: &mut Analyzed<T>) {
565569

566570
/// Identifies witness columns that are constrained to a non-shifted (multi)linear expression, replaces the witness column by an intermediate polynomial.
567571
/// The pattern is the following:
568-
/// ```
572+
/// ```pil
569573
/// col witness x;
570574
/// x = lin;
571575
/// ```

pipeline/tests/pil.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ fn halo_without_lookup() {
256256

257257
#[test]
258258
fn add() {
259-
let f = "pil/add.pil";
259+
let f = "pil/mul.pil";
260260
regular_test_gl(f, Default::default());
261261
}
262262

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
namespace Add(8);
1+
namespace Mul(8);
22
let a;
33
let b;
44
let c;
5-
a + b = c;
5+
a * b = c;

test_data/std/fingerprint_test.asm

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ machine Main with degree: 2048 {
3434
col witness stage(1) fingerprint_value1_hint(i) query Query::Hint(fingerprint_hint()[1]);
3535

3636
// Assert consistency between `fingerprint` and `fingerprint_inter`
37-
fingerprint_value0 = fingerprint_value0_hint;
38-
fingerprint_value1 = fingerprint_value1_hint;
37+
// We compare squares to avoid the linear constraint being optimized away, which currently leads to an issue because `fingerprint_value0_hint` has a hint
38+
fingerprint_value0 * fingerprint_value0 = fingerprint_value0_hint * fingerprint_value0_hint;
39+
fingerprint_value1 * fingerprint_value1 = fingerprint_value1_hint * fingerprint_value1_hint;
3940

4041
}

0 commit comments

Comments
 (0)