-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement dynamic bus (JIT) #2545
Open
georgwiese
wants to merge
4
commits into
main
Choose a base branch
from
dynamic-bus-jit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
8c1cb6e
to
1b2d111
Compare
Schaeff
reviewed
Mar 21, 2025
@@ -65,7 +65,7 @@ impl<T: FieldElement> BusSend<T> { | |||
|
|||
/// Returns the bus ID if it is a static number. | |||
/// Sends and receives can be matched by matching the bus ID. | |||
pub fn bus_id(&self) -> Option<T> { | |||
pub fn static_bus_id(&self) -> Option<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
pub fn static_bus_id(&self) -> Option<T> { | |
pub fn try_to_static_bus_id(&self) -> Option<T> { |
@@ -500,6 +485,12 @@ impl<'a, T: FieldElement, FixedEval: FixedEvaluator<T>> WitgenInference<'a, T, F | |||
) -> Option<AffineSymbolicExpression<T, Variable>> { | |||
Evaluator::new(self).evaluate(expr, offset) | |||
} | |||
|
|||
pub fn evaluate_to_known_number(&self, expr: &Expression<T>, offset: i32) -> Option<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
pub fn evaluate_to_known_number(&self, expr: &Expression<T>, offset: i32) -> Option<T> { | |
pub fn try_evaluate_to_known_number(&self, expr: &Expression<T>, offset: i32) -> Option<T> { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this PR, there is no more
.unwrap()
onBusSend::static_bus_id()
(previouslybus_id()
) andBusSend::try_match_static()
.Note that this will only generate a machine call when the bus ID is "known concrete". Getting there might require branching. To relax this (and require only known, but not concrete), I think we could change
Effect::MachineCall
to take a symbolic expression instead of a concrete value, butCanProcessCall::can_process_call_fully()
still expects a concrete value, which can't easily be changed, so I think this is the best we can do.