I get a backward slice from Frama-c, but looks like its a static slice and not a dynamic slice.
Is a specific option in frama-c to get a dynamic backward slice?
I get a backward slice from Frama-c, but looks like its a static slice and not a dynamic slice.
Is a specific option in frama-c to get a dynamic backward slice?
According to Wikipedia,
A dynamic slice contains all statements that actually affect the value of a variable at a program point for a particular execution of the program rather than all statements that may have affected the value of a variable at a program point for any arbitrary execution of the program.
Frama-C's slicing plug-in is conditioned by the values from the value analysis plug-in, which it takes on faith to represent all the values that happen for an execution in the set of executions of interest. In order to configure Frama-C's slicing plug-in for dynamic slicing, you simply need to have the value analysis correspond to a single execution. Using a main
function without inputs, no volatile
variables, no calls to unknown functions and passing the option -slevel 999999999
to frama-c
should make the value analysis behave as a C interpreter along the single execution of the program of your choice, as documented in this previous answer to another question, this blog post and in this article.