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

[CN-Exec] Provide counterexample reproduction code #840

Open
ZippeyKeys12 opened this issue Jan 25, 2025 · 1 comment
Open

[CN-Exec] Provide counterexample reproduction code #840

ZippeyKeys12 opened this issue Jan 25, 2025 · 1 comment
Labels
CN spec testing cn CN-exec Related to CN executable spec generation, called using `cn instrument` enhancement New feature or request

Comments

@ZippeyKeys12
Copy link
Collaborator

Given a memory state and a CN specification which is satisfied by that state, can we provide C code which would produce a similar state?

If so, you could print reproduction code of counterexample via the instrumentation. You'd have a stack where a new counterexample gets pushed after a precondition is successfully checked, and popped after a postcondition is successfully checked.

Note that a "similar" state might not actually reproduce a bug, since the program under test might only exhibit buggy behavior when a pointer has a specific property that isn't preserved by the reproduction code.

@ZippeyKeys12 ZippeyKeys12 added CN spec testing CN-exec Related to CN executable spec generation, called using `cn instrument` enhancement New feature or request labels Jan 25, 2025
@ZippeyKeys12
Copy link
Collaborator Author

This also has a secondary benefit of making it easy to use our generators for suites of concrete test cases (run generator and get reproduction code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CN spec testing cn CN-exec Related to CN executable spec generation, called using `cn instrument` enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant