Open J2000A opened 1 year ago
The invariant generator for witnesses uses alpha-conversion data from CIL to correctly output invariants w.r.t. the original program's variable names. Could be that the assert transformation also invokes that when it shouldn't since its invariants need to hold in the CIL-transformed program, not the original one.
During the implementation for my bachelor thesis about generating test cases for the incremental analysis I encountered a problem: I use the transformation
assert
to write out__VERIFIER_assert()
that I change to__goblint_check()
.However some of the asserts that are generated by the transformation do fail.
Reproduce by:
cp tests/regression/01-cpa/20-static_var.c input.c
grep -v "__goblint_check(" input.c > tmp.c && mv tmp.c input.c
Remove goblint checks from program./goblint input.c --set trans.activated '["assert"]'
sed -i 's/__VERIFIER_assert/__goblint_check/g' transformed.c
Rename the verifier asserts to goblint checks./goblint transformed.c --html
I think this might have something to do with cil. When inspecting the results a new variable
x___0
is introduced by cil alongsidex
. The checks would hold if they were asserting the variablex___0
instead ofx
.Note: There are also asserts that are unknown or are deadcode. However I would want to wait for the responses to this issue before creating the other issues.
Analogously the problem for failing asserts is found when running the mutation generator on the following regression tests (Warning: The error may only occur on a mutated file. Thus, not all of theses errors can be reproduced without the mutation generator):