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

feat request: add support for user-defined objectives like optimization #397

Open
0xalpharush opened this issue Oct 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@0xalpharush
Copy link

0xalpharush commented Oct 17, 2024

Is your feature request related to a problem? Please describe.
For issues like rounding or trying to maximize the amount of an asset received, it would be nice to have an automated tool to exacerbate the rounding error or maximize the amount received.

Describe the solution you'd like
Create a mode to find minimums/maximums instead of checking for reachability of assertions. Z3 seems to have built-in support for this but it's inner workings or limitations are a mystery to me...

Describe alternatives you've considered
Using a fuzzer or effectively brute force search. It may be possible to repeatedly replace the value returned by Halmos and ask it for N+1 in a loop but I'd assume the SMT solvers have a better way to optimize than this

Additional context
https://microsoft.github.io/z3guide/docs/optimization/arithmeticaloptimization/

@0xalpharush 0xalpharush added the enhancement New feature or request label Oct 17, 2024
@karmacoma-eth
Copy link
Collaborator

We could give this a try, but I'm not convinced that it would work well, if at all. Do you have a motivating example we could try it on?

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

No branches or pull requests

2 participants