-
Notifications
You must be signed in to change notification settings - Fork 23
DOC-302 Eyal h/call resolution table #74
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
Open
EyalHochCertora
wants to merge
16
commits into
master
Choose a base branch
from
EyalH/CallResolutionTable
base: master
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
Changes from 2 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3ab0e91
CallResTable
EyalHochCertora 776b863
Merge branch 'master' into EyalH/CallResolutionTable
EyalHochCertora c921b5f
address review comments
EyalHochCertora 7237760
a -> A
EyalHochCertora e0ccdad
Merge branch 'master' into EyalH/CallResolutionTable
EyalHochCertora ce72176
summary types ref
EyalHochCertora 87a1a55
Merge branch 'master' into EyalH/CallResolutionTable
EyalHochCertora 01874cd
add to doctree
EyalHochCertora 145ec62
link ref
EyalHochCertora a09da49
CallResolutionTable.md inside portal dir
EyalHochCertora 8391fdd
Merge branch 'master' into EyalH/CallResolutionTable
EyalHochCertora b79b898
change ref
EyalHochCertora d0b2601
Revert "change ref"
EyalHochCertora ca9d56b
change ref
EyalHochCertora 58c4726
remove summary types
EyalHochCertora be21c3f
Merge branch 'master' into EyalH/CallResolutionTable
mdgeorge4153 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| CallResolutionTable | ||
| ================= | ||
|
|
||
| The `CallResolutionTable` shows information about all the summarized calls in the program. | ||
| It helps the user to better understand decisions made by the Prover- which calls in the rule code got inlined, which were replaced by summaries, and why. | ||
|
|
||
| Attributes | ||
| ------ | ||
|
|
||
| * **Caller**- The caller of the call. Always resolved by the Prover. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
|
|
||
| * **Callee**- The callee of the call. For internal calls, always resolved. For external calls, might be unresolved, depending on linking, summarization, and more. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| See below. | ||
|
|
||
| * **Call Site**- source information of the call itself. Shows the location of the call (which file, which line), and a snippet from the source code (the invocation itself). | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
|
|
||
| * **Summary**- what summary got applied for the call. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
|
|
||
| * **Comments**- a list of comments about the resolution of the callee (which as mentioned above, might be unresolved), the applied summarization. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| See below. | ||
|
|
||
|
|
||
| The Callee | ||
| ------ | ||
|
|
||
| The callee is composed of two elements which should be taken into account: 1. Callee contract 2. Callee sighash. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| The callee contract is the target contract of the call, the callee sighash is the sighash of the invoked function. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| As mentioned above, for internal calls, the callee will always be resolved by the tool, while for external calls, it’s not always the case. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| Here all the cases for unresolved callees are introduced: | ||
|
|
||
| * Fully resolved callee: In such a case, the summary will be applied iff the application policy of the summary is `ALL` | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| (see {doc}`The Methods Block — Certora Prover Documentation 0.0 documentation <summary-types>`). | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| Notice, this does not mean that the call itself is resolved- it might happen, that both the callee contract and the callee sighash are resolved, but the sighash is not found in the contract. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| This might happen, for example, due to a wrong linking in the configuration, or, due to a wrong low level call (`abi.encodeWithSignature("fdgf()")`), which is resolved in the bytecode level, even though it’s not an existing function signature. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
|
|
||
| * Both callee contract, callee sighash are unresolved. | ||
|
|
||
| * Callee contract unresolved, callee sighash resolved. | ||
|
|
||
| * Callee Contract resolved, callee sighash unresolved. | ||
|
|
||
|
|
||
| Comments | ||
| ------ | ||
|
|
||
| In the comments, it is specified what is the resolution status of the callee. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| In addition, they give more insights about why the prover failed to resolve the callee. | ||
| For example, if the callee contract is unresolved due to a wrong linking, a hint is given to the user, which specifies the slot that should be linked, and what are the possible contracts that should be considered to be linked (those that contain a function with the resolved sighash, if it is indeed resolved). | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
| Moreover, the comments specify the summary application reason, which may be due to the configuration in the CLI, a summarization written in the spec, or a decision made by the Prover. | ||
| For example, if the Prover fails to resolve the callee, it decides to havoc the call. | ||
|
EyalHochCertora marked this conversation as resolved.
Outdated
|
||
|
|
||
|
|
||
| Run Example with all the cases (rule per a case): | ||
| [Verification Report][report] | ||
|
|
||
| [report]: https://vaas-stg.certora.com/output/20941/5deeb346152849f3976f4a68a30c8822?anonymousKey=1bf252ca0e1aae98e20d2daac6c0e6b3a03a0819 | ||
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.
Uh oh!
There was an error while loading. Please reload this page.