@@ -6,8 +6,8 @@ use openvm_stark_backend::p3_matrix::dense::DenseMatrix;
66use openvm_stark_sdk:: openvm_stark_backend:: p3_field:: PrimeField32 ;
77use openvm_stark_sdk:: p3_baby_bear:: BabyBear ;
88use powdr_autoprecompiles:: blocks:: BasicBlock ;
9- use powdr_autoprecompiles:: data_driven_constraints :: {
10- DataDrivenConstraints , DebugInfo , ExecutionStatsJson ,
9+ use powdr_autoprecompiles:: empirical_constraints :: {
10+ DebugInfo , EmpiricalConstraints , EmpiricalConstraintsJson ,
1111} ;
1212use std:: collections:: hash_map:: Entry ;
1313use std:: collections:: BTreeMap ;
@@ -30,24 +30,24 @@ struct Trace {
3030 rows_by_pc : HashMap < u32 , Vec < usize > > ,
3131}
3232
33- pub fn execution_stats (
33+ pub fn empirical_constraints (
3434 exe : Arc < VmExe < BabyBear > > ,
3535 vm_config : SpecializedConfig ,
3636 inputs : StdIn ,
3737 blocks : & [ BasicBlock < Instr < BabyBear > > ] ,
38- ) -> DataDrivenConstraints {
38+ ) -> EmpiricalConstraints {
3939 let ( trace, debug_info) = collect_trace ( exe, vm_config, inputs) ;
40- let execution_stats = generate_execution_stats ( blocks, trace) ;
40+ let empirical_constraints = generate_empirical_constraints ( blocks, trace) ;
4141
4242 // Export to disk
43- let export = ExecutionStatsJson {
44- execution_stats : execution_stats . clone ( ) ,
43+ let export = EmpiricalConstraintsJson {
44+ empirical_constraints : empirical_constraints . clone ( ) ,
4545 debug_info,
4646 } ;
4747 let json = serde_json:: to_string_pretty ( & export) . unwrap ( ) ;
48- std:: fs:: write ( "execution_stats .json" , json) . unwrap ( ) ;
48+ std:: fs:: write ( "empirical_constraints .json" , json) . unwrap ( ) ;
4949
50- execution_stats
50+ empirical_constraints
5151}
5252
5353fn collect_trace (
@@ -136,10 +136,10 @@ fn collect_trace(
136136 ( trace, debug_info)
137137}
138138
139- fn generate_execution_stats (
139+ fn generate_empirical_constraints (
140140 blocks : & [ BasicBlock < Instr < BabyBear > > ] ,
141141 trace : Trace ,
142- ) -> DataDrivenConstraints {
142+ ) -> EmpiricalConstraints {
143143 // Block ID -> instruction count mapping
144144 let instruction_counts = blocks
145145 . iter ( )
@@ -236,7 +236,7 @@ fn generate_execution_stats(
236236 } )
237237 . collect ( ) ;
238238
239- DataDrivenConstraints {
239+ EmpiricalConstraints {
240240 column_ranges_by_pc : column_ranges_by_pc. into_iter ( ) . collect ( ) ,
241241 equivalence_classes_by_block : intersected_equivalence_classes,
242242 }
0 commit comments