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

Make CSE more useful by reusing the previous proof #896

Open
Stevengre opened this issue Nov 27, 2024 · 3 comments
Open

Make CSE more useful by reusing the previous proof #896

Stevengre opened this issue Nov 27, 2024 · 3 comments
Assignees
Labels

Comments

@Stevengre
Copy link
Contributor

Currently, the proof will re-run all the things when using --reinit and unchange if there is a proof. Therefore, the CSE won't bring a lot of improvement for the tests which just call a function once.

My idea is to provide incremental verification: If only the tests changes, don't re-generate the summary for the external callee functions. Intead, use the summary directly. I think this will significantly enhance the verification experience, especially in scenarios where only the tests will be modified during the audit.

@Stevengre Stevengre self-assigned this Nov 27, 2024
@Stevengre Stevengre added the cse label Nov 27, 2024
@Stevengre
Copy link
Contributor Author

Stevengre commented Dec 6, 2024

Idea 4 incremental CSE:

  • Store the summaries separately.
  • Change the summaries only the file changes (digest changes) or Kontrol/KEVM/K changes.
  • if summary exists, use the summary directly.

Improvement:

  • Reduce the verification time for tests calling the same function. It may happen to a lot of utility functions.
  • Reduce the verification time when only the tests change. This might be the most common situation we faced during auditing.
  • Reduce the verification time when tests use lib functions that are already available in KaaS.

@ehildenb
Copy link
Member

ehildenb commented Dec 6, 2024

On this line:

for include_summary in collect_tests(foundry, options.include_summaries, reinit=False)
, we are collecting the subproofs as summaries to use for CSE, but setting reinit=False to do it, so I'm surprised it's re-executing the summaries hwen you pass --reinit.

@Stevengre
Copy link
Contributor Author

Sorry, I think I may not get the point. But I think that line is provided for --include-summary and will not contribute the --cse option. The automatic cse process always re-prove the callee functions, here:

summary_ids.extend(p.id for p in foundry_prove(new_prove_options, foundry, recorded_state_entries))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants