Skip to content

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.

2 participants