I want to use frama-c as an analyzer to check if a C source code have undefined behavior. I find the code provide by C-Reduce at here. However, some of flags in this script I can not find it in the new version of frama-c.
The flags I can not find list as follows:
I can find other in frama-c's changelog on github
But anyway, I can not find some flags, even a little bit description.
I am worried about the flag "-precise-unions", because it seems like to check the union. While "-stop-at-first-alarm" seems to save the time.
And I find a code here, that code doesn't using any of the flags that changed. But is it correct?
I really have no idea.
Thanks for your kindness.
Option -stop-at-first-alarm
has been replaced with the more general -eva-stop-at-nth-alarm 1
. You can replace 1 with a higher number, if you wish. What it does is to stop the analysis after the nth alarm is emitted. If your goal is to have 0 alarms and to closely inspect each alarm, this option might save time. But, in general, it does not improve the efficiency of the analysis.
-precise-unions
is a very old option which has been obsoleted in Frama-C Fluorine (2013). It is no longer needed. It does not affect the correctness of the analysis.
The Csmith driver script you mention is indeed using old options, but they do not affect the correctness. By default, without any options, Frama-C/Eva will warn about undefined behaviors in the code. If you want to be more strict than the C standard (e.g. forbid unsigned overflows), then you may need to add extra options, such as -warn-unsigned-overflow
.