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.
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
mathSqrt summary #51
mathSqrt summary #51
Changes from all commits
a3cdcbd
69574dd
c50019f
00ba216
a6f66df
d43fa62
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Same question from the case
y <= 3 && y != 0
about the cell variablesThere 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.
Here, we are already within the body of the function
mathSqrt
, i.e. to get to this rule the one doing the matching and changes to the configuration related to the call itself has already matched and done its rewriting. So, we don't need to match any of those cells.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.
Is there a reason why the cells:
<this-type>
,<contract-id>
,<contract-fn-id>
, etc. wouldn't be necessary here?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.
Yes. This rule replaces the entire call. So, we do not need to try and find the code of the function, we simply return a TypedVal. We know that a
<contract-fn>
with<contract-fn-id> mathSqrt </contract-fn-id>
exists, but we do not need to find any information from the cells in that<contract-fn>
.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.
You can think of it just like any other summary of en entire call (which it is with these conditions), e.g.
solidity-demo-semantics/src/uniswap-summaries.md
Line 2658 in c94634e