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

Add YAML witness output #744

Merged
merged 19 commits into from
May 27, 2022
Merged

Add YAML witness output #744

merged 19 commits into from
May 27, 2022

Conversation

sim642
Copy link
Member

@sim642 sim642 commented May 24, 2022

Closes #741.

Adds YAML witnesses with options under witness.yaml. These are separate from any of the SV-COMP or GraphML witness options, since we want these witnesses also outside of SV-COMP. However, outside of SV-COMP, the resulting witnesses are "invalid" since they're missing the specification key that we normally simply don't have.

TODO

  • Unify options about where to emit invariants with assert transformation.

@sim642
Copy link
Member Author

sim642 commented May 24, 2022

I think we might want options like trans.assert.only-at-locks which the assert transformation currently has, to also apply to these YAML witnesses. Ideally these wouldn't also duplicate witness.invariant.nodes.

So the question is, what prefix to use for such unified options? Maybe witness.invariant is the appropriate thing and we could consider the assert-annotated C programs also a custom witness format (and thus move/rename the trans.assert options there). Thoughts, @michael-schwarz?

@michael-schwarz
Copy link
Member

and thus move/rename the trans.assert options there

Yes, I think that would make sense!

trans.assert.only-at-locks also apply to these YAML witnesses

Yes, that is a sensible option! However, I am a bit dubious as to how you would achieve this when the dumping of yaml witnesses is not formulated as a transformation of the AST where the AST is easily at hand.

@sim642
Copy link
Member Author

sim642 commented May 24, 2022

However, I am a bit dubious as to how you would achieve this when the dumping of yaml witnesses is not formulated as a transformation of the AST where the AST is easily at hand.

I don't think it's any harder because Statement nodes still provide direct access to the Cil.stmt. It might even be simpler because there's no need to manipulate CIL's instr lists and CFG edges are even more similar with how the analysis itself recognizes locks.

This should be more reliable overall since AST transformations can only do queries based on Cil.location, the mapping of which to a node isn't directly possible.

@sim642 sim642 marked this pull request as ready for review May 24, 2022 13:44
@sim642 sim642 added the sv-comp SV-COMP (analyses, results), witnesses label May 25, 2022
@sim642 sim642 merged commit 75f6130 into master May 27, 2022
@sim642 sim642 deleted the yaml-witness branch May 27, 2022 07:59
sim642 added a commit that referenced this pull request May 27, 2022
@sim642 sim642 added this to the v2.0.0 milestone Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature sv-comp SV-COMP (analyses, results), witnesses usability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to dump asserts in YAML-based witness format
2 participants