anol
anol

Reputation: 8953

How to get rid of the warning: "1 state in saved file ignored. It is invalid in this Frama-C configuration."?

In some situations, e.g. when using Eva's abstract domains, loading a session always emits a warning of the form:

[kernel] Warning: 1 state in saved file ignored. It is invalid in this Frama-C configuration.

For instance, here's how to reproduce it with a simple C file containing nothing but a main function (int main() {}):

frama-c main.c -eva -eva-domains gauges -save framac.sav
frama-c -load framac.sav

The warning also appears when using the template generated by frama-c-script make-template and enabling an abstract domain in EVAFLAGS.

Upvotes: 0

Views: 37

Answers (1)

anol
anol

Reputation: 8953

The warning about ignoring states in saved files is mostly harmless. It simply means that Frama-C had (during the -save) some data that is not used in the current configuration (-load). There are two main situations in which this can happen:

  1. When loading a state with less plug-ins; for instance, if before the -save you loaded some external plug-in, but not before the -load;
  2. When using Eva's alternative domains with memexec (on by default). Eva instantiates a functor with the enabled domains at each execution, and this functor is saved in the session file. When loading it later, it will emit the message, which can be safely ignored.

Another situation which might lead to this warning would be if you recompiled Frama-C after saving a session, and reloaded it with a different binary. Sessions are not portable among different versions, so a version check prevents this from happening accidentally, but when recompiling yourself without changing the version number, this might happen. In that case, the warning should draw attention to the fact, and regenerating the session file should eliminate it.

Upvotes: 2

Related Questions