Repository navigation
Conversation
Avoids CIL check conflicts and unsoundly treating AnyPrev variable as the original (due to same vid).
8be1e8f to
ee938e2
Compare
9321553 to
9976c57
Compare
|
I'm worried this may not be sound for path-sensitivity: int c = 0;
int x = 0;
int mode = 0;
while (c < 20) {
c++;
mode = !mode;
x = mode ? c - 100 : c;
}assume that I am partitioning by mode. Maybe the same applies for generation too? |
|
Also, maybe we need to check whether the termination was proven (which goes beyond showing that the transition invariant holds, e.g., because of recursion) before answering |
That happens in a general way for all properties and invariants at analyzer/src/witness/witness.ml Lines 252 to 258 in aafcc37 where write falls back to the verification verdict if validation was fine.
|
Indeed, I found a similar issue with loop unrolling. The simple joining that was just optimized in #2293 doesn't help with either:
This isn't a problem for normal invariant evaluation, but it is for transition invariants because the transition could exactly go from one path/unrolling to another, not necessarily stay in the same one (especially with unrollings). And unless we know better, we'd have to cover transitions from every one to every other one (at a location):
|
This is on top of #1849.
It's enough to self-validate the transition invariants generated with #1849. Also it validates the sv-witnesses example from https://gitlab.com/sosy-lab/benchmarking/sv-witnesses/-/blob/main/examples/terminating-program-example.witness-2.1.yml (added as test).
TODO
\at(...). This is done quite hackily to not require CIL extensions:\at(x, AnyPrev)is replaced with__any_x_AnyPrev__, which is at least valid C syntax.__any_x_AnyPrev__variables to suitable internalvarinfos.