-
Notifications
You must be signed in to change notification settings - Fork 75
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
SV-COMP "Memory Safety" benchmark additions #1201
SV-COMP "Memory Safety" benchmark additions #1201
Conversation
SV-COMP's memory-safety category
Make sure to do this only if we're in postsolving
src/util/options.schema.json
Outdated
"addNestedScopeAttr": { | ||
"title": "cil.addNestedScopeAttr", | ||
"type": "boolean", | ||
"description": "Indicates whether variables that CIL pulls out of their scope should be marked.", | ||
"default": false |
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.
Why does this need to be an option at all? There's no harm in having the attribute.
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 when you do justci
l, as it will cause many compiler warnings and pollute files. If we want to keep using Goblint to create merged files, we should keep this option imo.
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.
Seems to me that it'd be better to make CIL's printer not just print these special attributes like it already does with some others.
That would avoid this annotation from ever making it to the output, even when you want to both enable it (for memory analyses) and also print the merged file. Currently those annotations would be in the merged file explicitly, so reanalyzing the merged file would incorrectly have some of these attributes on variables which are all pulled up to the function level. If the attribute wasn't printed, there wouldn't be a spurious attribute which would be incorrectly placed onto pulled-up variables.
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 thought about it, but decided against it in the end: the reasoning was that I want some way to inspect where these attributes were put.
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.
Maybe always adding them and then adding an option to CIL (and here) to disable or enable printing them would be a way to achieve everything @sim642?
If yes, I can do this in a follow-up PR.
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.
Maybe, but I don't consider this to be a blocking thing. I just hoped we could get away without introducing new options that allow Goblint to be used in some unintended ways. E.g. enable memory analyses but disable this option (even by default).
Right now the automation is only in the autotuner that isn't enabled by default. So maybe our check_arguments
should have a case for it to prevent this.
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 added a corresponding case to check_arguments
now.
Co-authored-by: Simmo Saan <[email protected]>
Add TODOs for future improvement there
Co-authored-by: Simmo Saan <[email protected]>
Due to the module moves in #1206 GitHub shows conflicts that are "too complex" to solve in the web editor. Actually you can locally just merge master into this branch and there shouldn't be any conflicts. GitHub's merge thing seems to have some move detection disabled that git should do by default. |
I thought this was supposed to be sound, but apparently it's not. For example ./goblint --conf conf/svcomp.json --set ana.specification ../sv-benchmarks/c/properties/valid-memsafety.prp ../sv-benchmarks/c/loops/invert_string-2.c prints |
It was sound when I last checked it, is this task new? |
No, it's a random one I just picked to check. It was present in some BenchExec table that was attached here before and there it correctly returned |
Maybe the autotuner is just not active in the setting you have given where |
|
That was the config we used. |
Maybe it's |
That seems to be it. I made the autotuner enable it automatically like it activates the analyses. Although I'm surprised that the |
CHANGES: Functionally equivalent to Goblint in SV-COMP 2024. * Add termination analysis for loops (goblint/analyzer#1093). * Add memory out-of-bounds analysis (goblint/analyzer#1094, goblint/analyzer#1197). * Add memory leak analysis (goblint/analyzer#1127, goblint/analyzer#1241, goblint/analyzer#1246). * Add SV-COMP `termination`, `valid-memsafety` and `valid-memcleanup` properties support (goblint/analyzer#1220, goblint/analyzer#1228, goblint/analyzer#1201, goblint/analyzer#1199, goblint/analyzer#1259, goblint/analyzer#1262). * Add YAML witness version 2.0 support (goblint/analyzer#1238, goblint/analyzer#1240, goblint/analyzer#1217, goblint/analyzer#1226, goblint/analyzer#1225, goblint/analyzer#1248). * Add final warnings about unsound results (goblint/analyzer#1190, goblint/analyzer#1191). * Add many library function specifications (goblint/analyzer#1167, goblint/analyzer#1174, goblint/analyzer#1203, goblint/analyzer#1205, goblint/analyzer#1212, goblint/analyzer#1220, goblint/analyzer#1239, goblint/analyzer#1242, goblint/analyzer#1244, goblint/analyzer#1254, goblint/analyzer#1269). * Adapt automatic configuration tuning (goblint/analyzer#912, goblint/analyzer#921, goblint/analyzer#987, goblint/analyzer#1168, goblint/analyzer#1214, goblint/analyzer#1234).
CHANGES: Functionally equivalent to Goblint in SV-COMP 2024. * Add termination analysis for loops (goblint/analyzer#1093). * Add memory out-of-bounds analysis (goblint/analyzer#1094, goblint/analyzer#1197). * Add memory leak analysis (goblint/analyzer#1127, goblint/analyzer#1241, goblint/analyzer#1246). * Add SV-COMP `termination`, `valid-memsafety` and `valid-memcleanup` properties support (goblint/analyzer#1220, goblint/analyzer#1228, goblint/analyzer#1201, goblint/analyzer#1199, goblint/analyzer#1259, goblint/analyzer#1262). * Add YAML witness version 2.0 support (goblint/analyzer#1238, goblint/analyzer#1240, goblint/analyzer#1217, goblint/analyzer#1226, goblint/analyzer#1225, goblint/analyzer#1248). * Add final warnings about unsound results (goblint/analyzer#1190, goblint/analyzer#1191). * Add many library function specifications (goblint/analyzer#1167, goblint/analyzer#1174, goblint/analyzer#1203, goblint/analyzer#1205, goblint/analyzer#1212, goblint/analyzer#1220, goblint/analyzer#1239, goblint/analyzer#1242, goblint/analyzer#1244, goblint/analyzer#1254, goblint/analyzer#1269). * Adapt automatic configuration tuning (goblint/analyzer#912, goblint/analyzer#921, goblint/analyzer#987, goblint/analyzer#1168, goblint/analyzer#1214, goblint/analyzer#1234).
This PR:
valid-free
,valid-deref
,valid-memtrack
)valid-memcleanup
property of SV-COMPTODO:
goblint_cil_nested
to localvarinfo
s that are not declared at top scope cil#155 for a further benchmark run as well