-
Notifications
You must be signed in to change notification settings - Fork 44
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
Support YAML violation witnesses #680
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @HelenAnnaMeyer and @schuessf for adding this support!
I've left some smaller comments. I also remember in our discussion after the presentation, it was mentioned that some aspects of the semantics of violation witnesses were not entirely clear (though I forgot what it was). Should we take this up with the authors / at SV-COMP before merging this, or do you think it's better to work with the current implementation and, if necessary, make changes later on?
...ource/WitnessParser/src/de/uni_freiburg/informatik/ultimate/witnessparser/yaml/Waypoint.java
Outdated
Show resolved
Hide resolved
trunk/examples/witness-checking/regression/sequential/violation/assumption.c
Outdated
Show resolved
Hide resolved
trunk/examples/witness-checking/regression/sequential/violation/assumption.c-witness.yml
Show resolved
Hide resolved
trunk/examples/witness-checking/regression/sequential/violation/long_function_call.c
Show resolved
Hide resolved
...ni_freiburg/informatik/ultimate/plugins/generator/buchiautomizer/BuchiAutomizerObserver.java
Show resolved
Hide resolved
...ultimate/plugins/generator/traceabstraction/witnesschecking/YamlWitnessProductAutomaton.java
Outdated
Show resolved
Hide resolved
...ultimate/plugins/generator/traceabstraction/witnesschecking/YamlWitnessProductAutomaton.java
Outdated
Show resolved
Hide resolved
...ultimate/plugins/generator/traceabstraction/witnesschecking/YamlWitnessProductAutomaton.java
Show resolved
Hide resolved
...ultimate/plugins/generator/traceabstraction/witnesschecking/YamlWitnessProductAutomaton.java
Outdated
Show resolved
Hide resolved
...source/WitnessParser/src/de/uni_freiburg/informatik/ultimate/witnessparser/yaml/Witness.java
Outdated
Show resolved
Hide resolved
85a2f64
to
e7b6541
Compare
e7b6541
to
521d0a2
Compare
Use a for-loop to simplify code and avoid exception if witness ends with an assumption
521d0a2
to
09c4861
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I quickly skimmed through the changes and they look good so far. I have also noted a few minor things. You could also consider removing personal data from the example witnesses. This affects in particular the encoding of the user name in the file path of the specified witness files in the metadata section of each witness file.
logger.info( | ||
"Constructing product of automaton with %d states and violation witness of the following lengths: %s", | ||
abstraction.size(), witness.getEntries().stream().map(x -> ((ViolationSequence) x).getSegments().size()) | ||
.collect(Collectors.toList())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some indentation issue. Is this the result of an unfavorable formatter setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but this might have been fixed now, this was before the Java 21 migration, where we also slightly adapted the formatter. I will just keep this for now, we will run the formatter anyway on the dev
branch.
return Stream | ||
.of(parseViolationSequence((List<Map<String, List<Map<String, Object>>>>) entry.get("content"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another example of an unfavorable formatter setting?
This PR adds support for violation witnesses in the YAML format. The main work (thanks to @HelenAnnaMeyer) was the following:
YamlWitnessParser
).IProgramExecution
(seeYamlViolationWitnessGenerator
)YamlWitnessProductAutomaton
): Create a product automaton of a program automaton and a witness to use this product as as the initial abstraction in the verification (TraceAbstraction
/BüchiAutomizer
).In order to work properly, this required the following additional changes:
WitnessTransformer
as an abstraction for violation witnesses in YAML and GraphMLCHandler
) for loops to extract the correct branching condition for the witnessesIBacktranslationValueProvider
There are still some issues / open questions:
RCFGBuilder
. They should however work properly, if theIcfgBuilder
is used instead (i.e., once this branch is merged).ProgramStatePrinter
for this), but we currently only get states at locations that are not legal for assumptions according to the format. This might also change with the usage ofIcfgBuilder
.CHECK_ASSUMPTION_LOCATIONS
inYamlWitnessProductAutomaton
. We need to figure out the best "mode" for validation (combination of block encoding and this flag), especially for the SV-COMP.ReachSafety
. However, I just tested generation and validation for simple examples forNoOverflow
andMemSafety
, and it seems to work in principle. This might require some further testing for SV-COMP.For SV-COMP, we still need to add a benchdef for violation witnesses 2.0, once this PR is merged.