Skip to content

Commit c162a33

Browse files
committed
Fix debug print for intermediates.
1 parent 28307fb commit c162a33

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

executor/src/witgen/jit/debug_formatter.rs

+7-14
Original file line numberDiff line numberDiff line change
@@ -206,26 +206,19 @@ impl<T: FieldElement, FixedEval: FixedEvaluator<T>> DebugFormatter<'_, T, FixedE
206206
}
207207
let [name, value, rc] = match e {
208208
Expression::Reference(r) => {
209-
let (value, range_constraint) = match r.poly_id.ptype {
210-
PolynomialType::Committed | PolynomialType::Constant => {
211-
let variable = Variable::from_reference(r, row_offset);
212-
let value = self.witgen.value(&variable).to_string();
213-
let rc = self.witgen.range_constraint(&variable);
214-
let rc = if rc == RangeConstraint::default()
215-
|| rc.try_to_single_value().is_some()
216-
{
209+
let (value, range_constraint) = {
210+
let variable = Variable::from_reference(r, row_offset);
211+
let value = self.witgen.value(&variable).to_string();
212+
let rc = self.witgen.range_constraint(&variable);
213+
let rc =
214+
if rc == RangeConstraint::default() || rc.try_to_single_value().is_some() {
217215
// Empty string also for single value, since it is already
218216
// printed in the "value" line.
219217
String::new()
220218
} else {
221219
rc.to_string()
222220
};
223-
(value, rc)
224-
}
225-
PolynomialType::Intermediate => {
226-
// TODO we should format the contained intermediates separately.
227-
("<intermediate>".to_string(), String::new())
228-
}
221+
(value, rc)
229222
};
230223
[r.to_string(), value, range_constraint]
231224
}

0 commit comments

Comments
 (0)