-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove memoization of AIR constraints and degree bounds
fix #121
- Loading branch information
1 parent
899f85a
commit a491ffe
Showing
19 changed files
with
691 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,95 @@ | ||
use twenty_first::shared_math::mpolynomial::Degree; | ||
use twenty_first::shared_math::x_field_element::XFieldElement; | ||
|
||
use crate::table::challenges::AllChallenges; | ||
use crate::table::extension_table::Evaluable; | ||
use crate::table::extension_table::Quotientable; | ||
use crate::table::hash_table::ExtHashTable; | ||
|
||
// This file is a placeholder for auto-generated code | ||
// Run `cargo run --bin constraint-evaluation-generator` | ||
// to fill in this file with optimized constraints. | ||
impl Evaluable for ExtHashTable {} | ||
impl Evaluable for ExtHashTable { | ||
fn evaluate_initial_constraints( | ||
&self, | ||
_evaluation_point: &[XFieldElement], | ||
_challenges: &AllChallenges, | ||
) -> Vec<XFieldElement> { | ||
panic!( | ||
"Constraints must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn evaluate_consistency_constraints( | ||
&self, | ||
_evaluation_point: &[XFieldElement], | ||
_challenges: &AllChallenges, | ||
) -> Vec<XFieldElement> { | ||
panic!( | ||
"Constraints must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn evaluate_transition_constraints( | ||
&self, | ||
_current_row: &[XFieldElement], | ||
_next_row: &[XFieldElement], | ||
_challenges: &AllChallenges, | ||
) -> Vec<XFieldElement> { | ||
panic!( | ||
"Constraints must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn evaluate_terminal_constraints( | ||
&self, | ||
_evaluation_point: &[XFieldElement], | ||
_challenges: &AllChallenges, | ||
) -> Vec<XFieldElement> { | ||
panic!( | ||
"Constraints must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
} | ||
|
||
impl Quotientable for ExtHashTable { | ||
fn get_initial_quotient_degree_bounds( | ||
&self, | ||
_padded_height: usize, | ||
_num_trace_randomizers: usize, | ||
) -> Vec<Degree> { | ||
panic!( | ||
"Degree bounds must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn get_consistency_quotient_degree_bounds( | ||
&self, | ||
_padded_height: usize, | ||
_num_trace_randomizers: usize, | ||
) -> Vec<Degree> { | ||
panic!( | ||
"Degree bounds must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn get_transition_quotient_degree_bounds( | ||
&self, | ||
_padded_height: usize, | ||
_num_trace_randomizers: usize, | ||
) -> Vec<Degree> { | ||
panic!( | ||
"Degree bounds must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
impl Quotientable for ExtHashTable {} | ||
fn get_terminal_quotient_degree_bounds( | ||
&self, | ||
_padded_height: usize, | ||
_num_trace_randomizers: usize, | ||
) -> Vec<Degree> { | ||
panic!( | ||
"Degree bounds must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
} |
89 changes: 87 additions & 2 deletions
89
triton-vm/src/table/constraints/instruction_table_constraints.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,95 @@ | ||
use twenty_first::shared_math::mpolynomial::Degree; | ||
use twenty_first::shared_math::x_field_element::XFieldElement; | ||
|
||
use crate::table::challenges::AllChallenges; | ||
use crate::table::extension_table::Evaluable; | ||
use crate::table::extension_table::Quotientable; | ||
use crate::table::instruction_table::ExtInstructionTable; | ||
|
||
// This file is a placeholder for auto-generated code | ||
// Run `cargo run --bin constraint-evaluation-generator` | ||
// to fill in this file with optimized constraints. | ||
impl Evaluable for ExtInstructionTable {} | ||
impl Evaluable for ExtInstructionTable { | ||
fn evaluate_initial_constraints( | ||
&self, | ||
_evaluation_point: &[XFieldElement], | ||
_challenges: &AllChallenges, | ||
) -> Vec<XFieldElement> { | ||
panic!( | ||
"Constraints must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn evaluate_consistency_constraints( | ||
&self, | ||
_evaluation_point: &[XFieldElement], | ||
_challenges: &AllChallenges, | ||
) -> Vec<XFieldElement> { | ||
panic!( | ||
"Constraints must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn evaluate_transition_constraints( | ||
&self, | ||
_current_row: &[XFieldElement], | ||
_next_row: &[XFieldElement], | ||
_challenges: &AllChallenges, | ||
) -> Vec<XFieldElement> { | ||
panic!( | ||
"Constraints must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn evaluate_terminal_constraints( | ||
&self, | ||
_evaluation_point: &[XFieldElement], | ||
_challenges: &AllChallenges, | ||
) -> Vec<XFieldElement> { | ||
panic!( | ||
"Constraints must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
} | ||
|
||
impl Quotientable for ExtInstructionTable { | ||
fn get_initial_quotient_degree_bounds( | ||
&self, | ||
_padded_height: usize, | ||
_num_trace_randomizers: usize, | ||
) -> Vec<Degree> { | ||
panic!( | ||
"Degree bounds must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn get_consistency_quotient_degree_bounds( | ||
&self, | ||
_padded_height: usize, | ||
_num_trace_randomizers: usize, | ||
) -> Vec<Degree> { | ||
panic!( | ||
"Degree bounds must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
fn get_transition_quotient_degree_bounds( | ||
&self, | ||
_padded_height: usize, | ||
_num_trace_randomizers: usize, | ||
) -> Vec<Degree> { | ||
panic!( | ||
"Degree bounds must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
|
||
impl Quotientable for ExtInstructionTable {} | ||
fn get_terminal_quotient_degree_bounds( | ||
&self, | ||
_padded_height: usize, | ||
_num_trace_randomizers: usize, | ||
) -> Vec<Degree> { | ||
panic!( | ||
"Degree bounds must be in place. Run `cargo run --bin constraint-evaluation-generator`." | ||
) | ||
} | ||
} |
Oops, something went wrong.