Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • F frama-c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 173
    • Issues 173
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • pub
  • frama-c
  • Issues
  • #2390
Closed
Open
Issue created Feb 04, 2010 by Pascal Cuoq@pascal

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; }

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking