Skip to content
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

Next steps for CSE #340

Open
1 of 4 tasks
ehildenb opened this issue Feb 6, 2024 · 1 comment
Open
1 of 4 tasks

Next steps for CSE #340

ehildenb opened this issue Feb 6, 2024 · 1 comment
Labels
cse enhancement New feature or request

Comments

@ehildenb
Copy link
Member

ehildenb commented Feb 6, 2024

Following #284, we now have a very simple version of CSE merged into Kontrol. This allows us to take summaries of small functions and use them in executing larger functions. The next steps are to make this practical for real-world examples, which will include:

  • Test on bigger examples. Take engagement codebases, generate summaries for sub-functions, store them, and use them for executing the larger tests. Upstream any examples that cause problems in the CSE process, to fix the bugs and make sure the summaries are useful (committing the output as part of test_foundry_dependency test-harness).
  • Automated detection of call-graph structure. If the user passes the --cse flag, then we should walk the call-graph of the contracts and extract any functions that we can produce summaries for, and make sure the summaries exist before calling the current proof.
  • Internal functions. The current support only works to generate the initial specifications of external functions, then re-using them. Many internal functions are used a lot though, and we would benefit from being able to have summaries of those. This will require extracting from the Solidity compiler the start/stop program counter of the internal function, as well as the wordstack structure associated with it, so that we can build the appropriate LHS of the given internal function.
  • Node merging. Currently, when including a summary, we just include each basic block of execution, meaning we're retaining the branching structure of sub-functions. We should have a way that the user can minimize branching structure of the functions that are being called by doing node-merging. Specifically, the final nodes that are with the same status code EVMC_SUCCESS should all be merged together with the differences between the nodes guarded by #ite conditions. This can be done as two transformations, one which pulls branches up to the root of the CFG, and a second which merges the node with KCFGs behind it.
@PetarMax
Copy link
Contributor

Related issues: #356, #441.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cse enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants