@@ -5,7 +5,6 @@ use std::ops::ControlFlow;
5
5
6
6
use itertools:: Itertools ;
7
7
use powdr_ast:: analyzed:: AlgebraicExpression ;
8
- use powdr_ast:: analyzed:: AlgebraicReference ;
9
8
use powdr_ast:: analyzed:: Analyzed ;
10
9
use powdr_ast:: analyzed:: {
11
10
Identity , LookupIdentity , PermutationIdentity , PhantomLookupIdentity ,
@@ -15,8 +14,7 @@ use powdr_ast::parsed::visitor::ExpressionVisitable;
15
14
use powdr_ast:: parsed:: visitor:: VisitOrder ;
16
15
use powdr_backend_utils:: referenced_namespaces_algebraic_expression;
17
16
use powdr_executor_utils:: expression_evaluator:: ExpressionEvaluator ;
18
- use powdr_executor_utils:: expression_evaluator:: OwnedGlobalValues ;
19
- use powdr_executor_utils:: expression_evaluator:: TraceValues ;
17
+ use powdr_executor_utils:: expression_evaluator:: TerminalAccess ;
20
18
use powdr_number:: FieldElement ;
21
19
use rayon:: iter:: IntoParallelIterator ;
22
20
use rayon:: iter:: ParallelIterator ;
@@ -152,25 +150,17 @@ impl<F: FieldElement> Connection<F> {
152
150
pub struct ConnectionConstraintChecker < ' a , F : FieldElement > {
153
151
connections : & ' a [ Connection < F > ] ,
154
152
machines : BTreeMap < String , Machine < ' a , F > > ,
155
- global_values : OwnedGlobalValues < F > ,
156
153
}
157
154
158
155
impl < ' a , F : FieldElement > ConnectionConstraintChecker < ' a , F > {
159
156
/// Creates a new connection constraint checker.
160
157
pub fn new (
161
158
connections : & ' a [ Connection < F > ] ,
162
159
machines : BTreeMap < String , Machine < ' a , F > > ,
163
- challenges : & ' a BTreeMap < u64 , F > ,
164
160
) -> Self {
165
- let global_values = OwnedGlobalValues {
166
- // TODO: Support publics.
167
- public_values : BTreeMap :: new ( ) ,
168
- challenge_values : challenges. clone ( ) ,
169
- } ;
170
161
Self {
171
162
connections,
172
163
machines,
173
- global_values,
174
164
}
175
165
}
176
166
}
@@ -276,8 +266,7 @@ impl<'a, F: FieldElement> ConnectionConstraintChecker<'a, F> {
276
266
. into_par_iter ( )
277
267
. filter_map ( |row| {
278
268
let mut evaluator = ExpressionEvaluator :: new (
279
- machine. trace_values . row ( row) ,
280
- & self . global_values ,
269
+ machine. values . row ( row) ,
281
270
& machine. intermediate_definitions ,
282
271
) ;
283
272
let result = evaluator. evaluate ( & selected_expressions. selector ) ;
@@ -300,9 +289,7 @@ impl<'a, F: FieldElement> ConnectionConstraintChecker<'a, F> {
300
289
None => {
301
290
let empty_variables = EmptyVariables { } ;
302
291
let empty_definitions = BTreeMap :: new ( ) ;
303
- let empty_globals = OwnedGlobalValues :: default ( ) ;
304
- let mut evaluator =
305
- ExpressionEvaluator :: new ( empty_variables, & empty_globals, & empty_definitions) ;
292
+ let mut evaluator = ExpressionEvaluator :: new ( empty_variables, & empty_definitions) ;
306
293
let selector_value: F = evaluator. evaluate ( & selected_expressions. selector ) ;
307
294
308
295
match selector_value. to_degree ( ) {
@@ -339,14 +326,7 @@ impl<'a, F: FieldElement> ConnectionConstraintChecker<'a, F> {
339
326
340
327
struct EmptyVariables ;
341
328
342
- impl < T > TraceValues < T > for EmptyVariables
343
- where
344
- T : FieldElement ,
345
- {
346
- fn get ( & self , _reference : & AlgebraicReference ) -> T {
347
- panic ! ( )
348
- }
349
- }
329
+ impl < T : FieldElement > TerminalAccess < T > for EmptyVariables { }
350
330
351
331
/// Converts a slice to a multi-set, represented as a map from elements to their count.
352
332
fn to_multi_set < T : Ord > ( a : & [ T ] ) -> BTreeMap < & T , usize > {
0 commit comments