-
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
TUM Practical Course Summer 2023: Termination Analyses #1093
Conversation
Direct empty list comparison instead of checking length = 0. Make loop_heads a function with argument ().
# Conflicts: # src/analyses/termination_new.ml # src/util/terminationPreprocessing.ml
# Conflicts: # src/framework/analyses.ml
… pulled check for result of loop analysis outside
# Conflicts: # src/framework/analyses.ml
…overflow is assumed.
What's with the test failures in CI? |
… terminate faster.
…r signed types when sem.int.signed_overflow was set to assume_none.
I see that the test failures are timeouts somehow related to function size. But our regression tests are tiny. Is this termination analysis really that inefficient that it struggles so much on 100-line programs? |
The analysis relies on our relational analyses, and for most test cases uses polyhedra. The termination analysis introduces one counter variable per loop, so a polyhedra-based termination analysis does not scale well with functions containing multiple loops. |
I suppose we'll have to implement variable packing which everyone else has been doing for decades. If nothing concerning shows up in our own preruns with termination analysis, I think this should be good enough to finally merge. |
…no analysis needs to be activated before preprocessing to work.
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 had to make a change so that the termination analysis is activated earlier by the autotuner if the autotuner is active and we have to analyze for termiation, as the termiation analysis needs to be activated before the preprocessing is done (to instrument the program with loop counter variables).
Additionally I had to add a handling if the loop unrolling encounters a all to goblint_bounded
(the special function where the boundedness of the loop is checked); now loops that contain such a check are also unrolled.
I reran this PR with the Regarding sv-comp: the programs analyzed are contained some artificial loop counters. Since the Termination category is excluded from the validation of correctness witnesses, this should not be a problem, right? |
All the non-Apron CI jobs are now failing on master: https://github.com/goblint/analyzer/actions/runs/6917734602. A condition might be missing somewhere. |
Should be fixed, there was a check missing to only run the termination regression tests in configs in which Apron is present. |
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).
Implementation of a sound termination analyses for single-threaded programs.
We handle 2 possible causes for non-termination:
For goto statements we cant proof non termination, if they jump up in the codelines.
(callee_function-> (callee-context -> (caller_function, caller_context) and filling it as we analyse the program, and then search
for cycles in this build callgraph.
If the program gets multithreaded we cant proof non termination.