-
Notifications
You must be signed in to change notification settings - Fork 85
Cache z3 results #464
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 10000 privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I made an experimental pull request for that. It needs lots of improvements, but in general - it works. |
I see, the idea is to build a global cache that works across runs. That's a cool idea! diskcache in particular seems really well suited for that (and I see it has a method to ensure the cache doesn't grow too big) the random-look parts in identifiers comes from the |
The random part also comes from |
@iirekm thanks for your initiatives! it's a great idea overall. indeed, we've been thinking about this, but haven't had the chance to work on it. regarding the two points you mentioned:
|
we could probably use some threshold strategy, for instance only cache queries that took >1s to solve. That way, we would avoid filling the diskcache with queries that can be solved fast. |
z3 can be slow, very slow when codebase grows. On-disk caching would help a lot during development (only new things would be computed).
I tried to do ad-hoc caching with the following wrapper around z3:
It almost works, but the problem is that the variable identifiers change from run to run (e.g. it's
p_x_uint256_9fdce11_00
one run, andp_x_uint256_7721c25_00
another). How to make those identifiers deterministic? From what piece of code do they come from?In long term a better solution could be made, e.g. with popular
joblib.Memory
library.The text was updated successfully, but these errors were encountered: