Skip to content

GitLab

  • Menu
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 209
    • Issues 209
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • pub
  • frama-c
  • Issues
  • #2473

Closed
Open
Created Apr 07, 2009 by Virgile Prevosto@virgileOwner

type invariants

ID0000025: This issue was created automatically from Mantis Issue 25. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0000025 Frama-C Plug-in > jessie public 2009-04-07 2009-09-21
Reporter virgile Assigned To virgile Resolution open
Priority normal Severity minor Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Lithium-20081201 Target Version - Fixed in Version -

Description :

(bts 6836) I tried the code-example from the 1.4 ACSL document.

void out_char(char c) { int col = 0; //@ global invariant I : 0 <= col <= 79; col++; if (col >= 80) col = 0; }

Doing this, I get:

$ frama-c -jessie-analysis -jessie-int-model exact -jessie-gui invariant.c Parsing [preprocessing] running gcc -C -E -I. -include C:\Frama-C\share\frama-c\jessie\j essie_prolog.h -D JESSIE_EXACT_INT_MODEL -dD invariant.c invariant.c[14:0-0] : syntax error Parsing error Skipping file "invariant.c" that has errors. Cleaning unused parts Symbolic link Your code cannot be parsed. Aborting analysis. Starting semantical analysis Starting Jessie translation Nothing to process. There was probably an error before.

Cheers Christoph

Additional Information :

There are two issues here:

  • global invariant inside function body is not implemented in current Frama-C release
  • the ACSL documentation states that global invariant are meant to be enforced on global data. Hence they are primarily global annotation. They can be found as code annotation when dealing with static local variables (which are in fact global variables with specific scoping rules), but they do not apply to plain local variables such as col in the example above
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking