Skip to content

Commit

Permalink
Improve panic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
georgwiese committed Feb 4, 2025
1 parent dd5bd50 commit c13ccbc
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions executor/src/witgen/bus_accumulator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,24 @@ impl<'a, T: FieldElement, Ext: ExtensionField<T> + Sync> BusAccumulatorGenerator
})
.collect::<BTreeMap<_, _>>();

self.pil
let result = self
.pil
.committed_polys_in_source_order()
.filter(|(symbol, _)| symbol.stage == Some(1))
.flat_map(|(symbol, _)| symbol.array_elements())
.map(|(name, poly_id)| (name, columns.remove(&poly_id).unwrap()))
.collect()
.map(|(name, poly_id)| {
let column = columns
.remove(&poly_id)
.unwrap_or_else(|| panic!("Unexpected column: {name}"));
(name, column)
})
.collect();
assert!(
columns.is_empty(),
"Some expected columns not found in the PIL."
);

result
}

fn interaction_columns(
Expand Down

0 comments on commit c13ccbc

Please sign in to comment.