Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Question] Is it possible to add randomness to generated solutions? #7594

Closed
jonathan-dilorenzo opened this issue Mar 25, 2025 · 1 comment
Closed

Comments

@jonathan-dilorenzo
Copy link

Currently (at least in my use of Z3), if I pass Z3 the same formula, it will generate the same solution deterministically every time, which is generally great.

However, I have a use-case (as part of a Fuzzer) where it would be amazing if I could somehow tell Z3 to randomize the solutions more (ideally w.r.t. a seed). Is there any setting that allows for this or do I need to perturb the formula externally to achieve my goal?

@NikolajBjorner
Copy link
Contributor

use options smt.random_seed=NNN and sat.random_seed=NNN to ensure either SMT or SAT core uses randomization.

@Z3Prover Z3Prover locked and limited conversation to collaborators Mar 25, 2025
@NikolajBjorner NikolajBjorner converted this issue into discussion #7595 Mar 25, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants