用Frama-c切片

时间:2017-10-26 19:10:35

标签: ocaml frama-c program-slicing

我在我的MacO上安装了带opam的frama-c。我需要手动切片Hello World。我的意思是不和桂。我在互联网上搜索但我无法理解它是如何做到的。我的英语不够好。那么有人可以帮我切片HelloWorld.c吗?

1 个答案:

答案 0 :(得分:1)

要从命令行启动Frama-C的切片,您必须拥有一个解析的C文件和一个切片标准(返回代码,访问全局变量,语句等)。各种可用标准在http://frama-c.com/slicing.html描述。

此外,如果你想切片,例如在声明中,您必须使用切片编译指示,语法如下:

/*@ slice pragma stmt; */
    Preserves the effects of the next statement. 
/*@ slice pragma expr e; */
    Preserves the value of the ACSL expression e at this control-flow point.