Skip to content
GitLab
Projects Groups Topics 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
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 168
    • Issues 168
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • 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
  • #2026

Identical lvals not equal in Cil_datatype.Lval.Hashtbl

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


Id Project Category View Due Date Updated
ID0001263 Frama-C Kernel public 2012-08-08 2012-09-19
Reporter boris Assigned To virgile Resolution fixed
Priority low Severity feature Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Nitrogen-20111001 Target Version - Fixed in Version Frama-C Oxygen-20120901

Description :

The code below contains an lval this->gear at positions 1,2. If this->gear is hashed at position 1 using Cil_datatype.Lval.Hashtbl, a find for this->gear fails at position 2.

if(inp == up) { if(this->gear < MAX_GEARS && motor_rpm(this, this->gear + 1) >= RPM_MIN) this->gear++; // 1 } else if(inp == down) { if(this->gear > 1 && motor_rpm(this, this->gear + 1) <= RPM_MAX) this->gear--; // 2 }

The problem disappears if the lvals are converted to terms with

let xtl = Logic_utils.lval_to_term_lval false x in Logic_const.term (TLval xtl) (Cil.typeOfTermLval xtl)

and hashed with

module TermHT = Hashtbl.Make(struct type t = Cil_types.term let equal = Logic_utils.is_same_term let hash = Logic_utils.hash_term end)

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