Iam trying to compare the source code with the sliced code, but frama-c normalizes the code at parsing time which makes the sliced code statements not identical to the source code statements.
Is it possible to Pre-processes the code using frama-c so that when I slice it using a criteria the resulting sliced statements can be compared to the pre-processed statements?
thanks.
Yes!
Use
frama-c … -print -ocode prep.c
to pre-process. Here is an example:Original:
Normalized version obtained with
frama-c original.c -print -ocode prep.c
:The differences caused by any Frama-C transformation applied to the program are much easier to read by comparing the result to
prep.c
.