frama-c

Frama-C Plugin development: Getting result of value-analysis

时光总嘲笑我的痴心妄想 提交于 2019-11-28 12:44:59
I am working on a Plugin for Frama-C, using the Value-analysis. I simply want to print the state of the variables (values) after each statement (I think the solution is quiet easy, but I couldn't figure it out). I got the current state with Db.Value.get_stmt_state in the vstmt_aux method in the visitor. How can I now get the values of the variables? PS: I found this post, but it didn't help, there is no real solution, and with the help of the description I was not able to do it: How to use functions in Value.Eval_expr, Value.Eval_op etc modules of Frama-c Value plugin Here's a concrete example

Understanding Frama-C slicer results

会有一股神秘感。 提交于 2019-11-28 04:34:21
问题 I'd like to know if it's possible to do some kind of forward conditioned slicing with Frama-C and I'm playing with some examples to understand how one could achieve this. I've got this simple example which seems to result in an imprecise slice and I can't understand why. Here is the function I'd like to slice : int f(int a){ int x; if(a == 0) x = 0; else if(a != 0) x = 1; return x; } If I use this specification : /*@ requires a == 0; @ ensures \old(a) == a; @ ensures \result == 0; */ then

Frama-C Plugin development: Getting result of value-analysis

强颜欢笑 提交于 2019-11-27 07:11:27
问题 I am working on a Plugin for Frama-C, using the Value-analysis. I simply want to print the state of the variables (values) after each statement (I think the solution is quiet easy, but I couldn't figure it out). I got the current state with Db.Value.get_stmt_state in the vstmt_aux method in the visitor. How can I now get the values of the variables? PS: I found this post, but it didn't help, there is no real solution, and with the help of the description I was not able to do it: How to use