Skip to content

Commit

Permalink
Make SV-COMP validation strict
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Nov 20, 2023
1 parent f709482 commit ecd48aa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions conf/svcomp24-validate.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
},
"yaml": {
"enabled": false,
"strict": true,
"format-version": "2.0",
"entry-types": [
"location_invariant",
Expand Down
6 changes: 6 additions & 0 deletions src/common/util/options.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2487,6 +2487,12 @@
"type": "string",
"default": ""
},
"strict": {
"title": "witness.yaml.strict",
"description": "",
"type": "boolean",
"default": false
},
"unassume": {
"title": "witness.yaml.unassume",
"description": "YAML witness input path",
Expand Down
13 changes: 10 additions & 3 deletions src/witness/witness.ml
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,18 @@ struct
| Some false -> print_svcomp_result "ERROR (verify)"
| _ ->
if get_string "witness.yaml.validate" <> "" then (
if !YamlWitness.cnt_refuted > 0 then
match get_bool "witness.yaml.strict" with
| true when !YamlWitness.cnt_error > 0 ->
print_svcomp_result "ERROR (witness error)"
| true when !YamlWitness.cnt_unsupported > 0 ->
print_svcomp_result "ERROR (witness unsupported)"
| true when !YamlWitness.cnt_disabled > 0 ->
print_svcomp_result "ERROR (witness disabled)"
| _ when !YamlWitness.cnt_refuted > 0 ->
print_svcomp_result (Result.to_string (False None))
else if !YamlWitness.cnt_unconfirmed > 0 then
| _ when !YamlWitness.cnt_unconfirmed > 0 ->
print_svcomp_result (Result.to_string Unknown)
else
| _ ->
write entrystates
)
else
Expand Down

0 comments on commit ecd48aa

Please sign in to comment.