3d: allow timeout-limited breadth-first search #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.