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
  • #413
Closed
Open
Issue created Jul 29, 2016 by mantis-gitlab-migration@mantis-gitlab-migration

Implicit casting from integer to real causes failure in WP proof generation

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


Id Project Category View Due Date Updated
ID0002241 Frama-C Plug-in > wp public 2016-07-29 2016-07-29
Reporter jrobbins Assigned To correnson Resolution open
Priority normal Severity major Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Aluminium Target Version - Fixed in Version -

Description :

ACSL defines the integer type as a subset of the real type. Therefore, it states, implicit casting from integers to reals is allowed, because one is the subset of another. However, when this is done in practice, the WP plugin will generate goals that provers cannot parse, giving a type error.

Additional Information :

This is confirmed to occur with the alt-ergo and why3 provers.

Tested on both Frama-C Sodium and Aluminum. Sodium produces slightly different errors than Aluminum, but both produce errors.

Steps To Reproduce :

== Input file (bug.c):

/*@ axiomatic Bug { logic integer ibug; logic real rbug = ibug; } */

/*@ requires i == rbug; */ void foo(int i);

void main() { foo(42); }

== Command to reproduce

frama-c -wp bug.c

== Output

[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing) [kernel] Parsing bug.c (with preprocessing) bug.c:13:[kernel] warning: No code nor implicit assigns clause for function foo, generating default assigns from the prototype [wp] warning: Missing RTE guards [wp] 1 goal scheduled /tmp/wp714796.dir/typed/A_Bug.ergo:7:[wp] user error: Alt-Ergo error: characters 1-34:typing error: real and int cannot be unified [wp] [Alt-Ergo] Goal typed_main_call_foo_pre : Failed characters 1-34:typing error: real and int cannot be unified [wp] Proved goals: 0 / 1 Alt-Ergo: 0 (failed: 1)

Attachments

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