@@ -4,14 +4,8 @@ pub const N_TRACE_COLUMNS: usize = 4;
44pub const N_INTERACTION_COLUMNS : usize = 12 ;
55
66pub const RELATION_USES_PER_ROW : [ RelationUse ; 2 ] = [
7- RelationUse {
8- relation_id : "Gate" ,
9- uses : 1 ,
10- } ,
11- RelationUse {
12- relation_id : "RangeCheck_16" ,
13- uses : 3 ,
14- } ,
7+ RelationUse { relation_id : "Gate" , uses : 1 } ,
8+ RelationUse { relation_id : "RangeCheck_16" , uses : 3 } ,
159] ;
1610
1711#[ allow( unused_variables) ]
@@ -23,44 +17,31 @@ pub fn accumulate_constraints<Value: IValue>(
2317) {
2418 let [ input_m31_col0, input_u32_limb_0_col1, input_u32_limb_1_col2, inv_or_one_col3] =
2519 input. try_into ( ) . unwrap ( ) ;
26- let m31_to_u32_input_addr = acc. get_preprocessed_column ( & PreProcessedColumnId {
27- id : "m31_to_u32_input_addr" . to_owned ( ) ,
28- } ) ;
20+ let m31_to_u32_input_addr = acc
21+ . get_preprocessed_column ( & PreProcessedColumnId { id : "m31_to_u32_input_addr" . to_owned ( ) } ) ;
2922 let m31_to_u32_multiplicity = acc. get_preprocessed_column ( & PreProcessedColumnId {
3023 id : "m31_to_u32_multiplicity" . to_owned ( ) ,
3124 } ) ;
32- let m31_to_u32_output_addr = acc. get_preprocessed_column ( & PreProcessedColumnId {
33- id : "m31_to_u32_output_addr" . to_owned ( ) ,
34- } ) ;
25+ let m31_to_u32_output_addr = acc
26+ . get_preprocessed_column ( & PreProcessedColumnId { id : "m31_to_u32_output_addr" . to_owned ( ) } ) ;
3527 // Use RangeCheck_16.
36- let tuple_0 = & [
37- eval ! ( context, 1008385708 ) ,
38- eval ! ( context, input_u32_limb_0_col1) ,
39- ] ;
28+ let tuple_0 = & [ eval ! ( context, 1008385708 ) , eval ! ( context, input_u32_limb_0_col1) ] ;
4029 let numerator_0 = eval ! ( context, 1 ) ;
4130 acc. add_to_relation ( context, numerator_0, tuple_0) ;
4231
4332 // Use RangeCheck_16.
44- let tuple_1 = & [
45- eval ! ( context, 1008385708 ) ,
46- eval ! ( context, input_u32_limb_1_col2) ,
47- ] ;
33+ let tuple_1 = & [ eval ! ( context, 1008385708 ) , eval ! ( context, input_u32_limb_1_col2) ] ;
4834 let numerator_1 = eval ! ( context, 1 ) ;
4935 acc. add_to_relation ( context, numerator_1, tuple_1) ;
5036
5137 // Use RangeCheck_16.
52- let tuple_2 = & [
53- eval ! ( context, 1008385708 ) ,
54- eval ! ( context, ( 32767 ) - ( input_u32_limb_1_col2) ) ,
55- ] ;
38+ let tuple_2 = & [ eval ! ( context, 1008385708 ) , eval ! ( context, ( 32767 ) - ( input_u32_limb_1_col2) ) ] ;
5639 let numerator_2 = eval ! ( context, 1 ) ;
5740 acc. add_to_relation ( context, numerator_2, tuple_2) ;
5841
5942 //input is zero then limb_low is zero.
60- let constraint_3_value = eval ! (
61- context,
62- ( ( ( input_m31_col0) * ( inv_or_one_col3) ) - ( 1 ) ) * ( input_u32_limb_0_col1)
63- ) ;
43+ let constraint_3_value =
44+ eval ! ( context, ( ( ( input_m31_col0) * ( inv_or_one_col3) ) - ( 1 ) ) * ( input_u32_limb_0_col1) ) ;
6445 acc. add_constraint ( context, constraint_3_value) ;
6546
6647 //input reconstruction.
@@ -164,24 +145,16 @@ mod tests {
164145 ] ;
165146 let preprocessed_columns = HashMap :: from ( [
166147 (
167- PreProcessedColumnId {
168- id : "m31_to_u32_input_addr" . to_owned ( ) ,
169- } ,
148+ PreProcessedColumnId { id : "m31_to_u32_input_addr" . to_owned ( ) } ,
170149 context. constant ( qm31_from_u32s ( 15668215 , 1851966168 , 874056991 , 2075313468 ) ) ,
171150 ) ,
172151 (
173- PreProcessedColumnId {
174- id : "m31_to_u32_output_addr" . to_owned ( ) ,
175- } ,
152+ PreProcessedColumnId { id : "m31_to_u32_output_addr" . to_owned ( ) } ,
176153 context. constant ( qm31_from_u32s ( 701904311 , 1125291129 , 1904795215 , 38357025 ) ) ,
177154 ) ,
178155 (
179- PreProcessedColumnId {
180- id : "m31_to_u32_multiplicity" . to_owned ( ) ,
181- } ,
182- context. constant ( qm31_from_u32s (
183- 1979029033 , 1524573277 , 1930122227 , 1490762084 ,
184- ) ) ,
156+ PreProcessedColumnId { id : "m31_to_u32_multiplicity" . to_owned ( ) } ,
157+ context. constant ( qm31_from_u32s ( 1979029033 , 1524573277 , 1930122227 , 1490762084 ) ) ,
185158 ) ,
186159 ] ) ;
187160 let public_params = HashMap :: from ( [ ] ) ;
0 commit comments