assigns clauses are missing from the sliced program
ID0000393: This issue was created automatically from Mantis Issue 393. Further discussion may take place here.
Id | Project | Category | View | Due Date | Updated |
---|---|---|---|---|---|
ID0000393 | Frama-C | Plug-in > slicing | public | 2010-02-04 | 2010-04-13 |
Reporter | pascal | Assigned To | Anne | Resolution | fixed |
Priority | normal | Severity | feature | Reproducibility | always |
Platform | - | OS | - | OS Version | - |
Product Version | - | Target Version | - | Fixed in Version | Frama-C Boron-20100401 |
Description :
When the original program contains assigns clauses for functions with code, the assigns are always omitted from the generated sliced program.
On the other hand pre- and post-conditions seem to be properly included.
In the attached example, the command produces a sliced program that contains:
/*@ requires \valid(p); behavior default: ensures (p->a > p->b); */ void g_slice_1(las *p ) { ...
The expected behavior is for g_slice_1 to contain in its contract the clause: assigns p->a; in addition to the requires and ensures.
Additional Information :
frama-c -slicing-level 3 -slicing-keep-annotations -slice-assert main -slice-print -ocode slice.foo.c -main main -lib-entry -no-unicode -context-valid-pointers foo.c
pragma JessieIntegerModel(exact)
typedef struct las { int a; int b; } las;
/*@ requires \valid(p); assigns p->a; ensures p->a>p->b; */ void f(las * p){ p->a = p->b + 1;}
/*@ requires \valid(p); assigns p->a; ensures p->a>p->b; */ void g(las * p) { f(p); }
/*@ requires \valid(p); assigns p->a; ensures p->a>p->b; */ void main(las * p) { g(p); //@ assert p->a>p->b; }