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

3d: allow timeout-limited breadth-first search #135

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tahina-pro
Copy link
Member

So far coverage for Z3 test case generation was conditional on branch depth, specified via --z3_branch_depth , by default 0.

This PR changes the default behavior if --z3_branch_depth is not specified (or if --no_z3_branch_depth is provided): it now computes test cases breadth-first, by indefinitely incrementing branch depth after test cases for all branches at a given depth have been produced.

To this end, this PR also introduces a --z3_global_timeout option, which allows the user to provide a number of seconds after which test case generation should time out. If the user asks for both positive and negative test cases, then the timeout applies to positive test cases separately from negative test cases. If the user asks for differential test cases between two parsers P1, P2, then the timeout applies to "P1 but not P2" separately from "P2 but not P1."

If branch depth is not specified, then the user MUST specify --z3_global_timeout (otherwise the test case generator will throw an error.) The user can explicitly specify --z3_global_timeout unlimited to disable timeout, but then, the test case generator WILL enter an infinite loop unless Z3 can declare that all possible branch depths have been explored.

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

Successfully merging this pull request may close these issues.

1 participant