Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into try_zero
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Jan 28, 2025
2 parents a0ef543 + 8d89d80 commit 0fa2e78
Show file tree
Hide file tree
Showing 43 changed files with 978 additions and 400 deletions.
1 change: 0 additions & 1 deletion .github/workflows/nightly_tests_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ test(=instruction_tests::bge) |
test(=instruction_tests::blt) |
test(=instruction_tests::bltu) |
test(=instruction_tests::bne) |
test(=instruction_tests::divu) |
test(=instruction_tests::j) |
test(=instruction_tests::jal) |
test(=instruction_tests::lb) |
Expand Down
2 changes: 1 addition & 1 deletion ast/src/analyzed/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ impl<T: Display> Display for PhantomBusInteractionIdentity<T> {
f,
"Constr::PhantomBusInteraction({}, [{}], {});",
self.multiplicity,
self.tuple.0.iter().map(ToString::to_string).format(", "),
self.payload.0.iter().map(ToString::to_string).format(", "),
self.latch,
)
}
Expand Down
6 changes: 3 additions & 3 deletions ast/src/analyzed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1011,22 +1011,22 @@ pub struct PhantomBusInteractionIdentity<T> {
pub id: u64,
pub source: SourceRef,
pub multiplicity: AlgebraicExpression<T>,
pub tuple: ExpressionList<T>,
pub payload: ExpressionList<T>,
pub latch: AlgebraicExpression<T>,
}

impl<T> Children<AlgebraicExpression<T>> for PhantomBusInteractionIdentity<T> {
fn children_mut(&mut self) -> Box<dyn Iterator<Item = &mut AlgebraicExpression<T>> + '_> {
Box::new(
once(&mut self.multiplicity)
.chain(self.tuple.children_mut())
.chain(self.payload.children_mut())
.chain(once(&mut self.latch)),
)
}
fn children(&self) -> Box<dyn Iterator<Item = &AlgebraicExpression<T>> + '_> {
Box::new(
once(&self.multiplicity)
.chain(self.tuple.children())
.chain(self.payload.children())
.chain(once(&self.latch)),
)
}
Expand Down
2 changes: 1 addition & 1 deletion backend/src/mock/bus_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl<'a, F: FieldElement> BusChecker<'a, F> {
.unwrap();

let tuple = identity
.tuple
.payload
.children()
.map(|e| evaluator.evaluate(e))
.collect();
Expand Down
2 changes: 1 addition & 1 deletion backend/src/mock/connection_constraint_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl<F: FieldElement> Connection<F> {
ConnectionKind::Permutation,
None,
)),
// TODO(bus_interaction)
// Handled by bus constraint checker
Identity::PhantomBusInteraction(_) => Err(()),
}?;

Expand Down
2 changes: 0 additions & 2 deletions executor/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! Tooling used for execution of compiled programs
use powdr_ast::analyzed::Identity;

pub mod constant_evaluator;
pub mod witgen;
7 changes: 2 additions & 5 deletions executor/src/witgen/block_processor.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use powdr_number::{DegreeType, FieldElement};

use crate::Identity;

use super::{
affine_expression::AlgebraicVariable,
data_structures::mutable_state::MutableState,
data_structures::{identity::Identity, mutable_state::MutableState},
machines::MachineParts,
processor::{OuterQuery, Processor, SolverState},
rows::{RowIndex, UnknownStrategy},
Expand Down Expand Up @@ -184,11 +182,10 @@ mod tests {
let mutable_state = MutableState::new(iter::empty(), &query_callback);

let row_offset = RowIndex::from_degree(0, degree);
let identities = analyzed.identities.iter().collect::<Vec<_>>();
let machine_parts = MachineParts::new(
&fixed_data,
Default::default(),
identities,
fixed_data.identities.iter().collect(),
fixed_data.witness_cols.keys().collect(),
Default::default(),
);
Expand Down
4 changes: 2 additions & 2 deletions executor/src/witgen/bus_accumulator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl<'a, T: FieldElement, Ext: ExtensionField<T> + Sync> BusAccumulatorGenerator

let max_tuple_size = bus_interactions
.iter()
.map(|i| i.tuple.0.len())
.map(|i| i.payload.0.len())
.max()
.unwrap();

Expand Down Expand Up @@ -147,7 +147,7 @@ impl<'a, T: FieldElement, Ext: ExtensionField<T> + Sync> BusAccumulatorGenerator
let multiplicity = evaluator.evaluate(&bus_interaction.multiplicity);

let tuple = bus_interaction
.tuple
.payload
.0
.iter()
.map(|r| evaluator.evaluate(r))
Expand Down
Loading

0 comments on commit 0fa2e78

Please sign in to comment.