Skip to content

Deactivating field-sensitivity in Cprover 5.12 #5824

Open
@sepideha

Description

@sepideha

We have a BMC tool (UpProver & HiFrog) relies on Cprover 5.12 framework for generating GOTO-programs/SSA encoding. We recently upgraded the frontend of our tool from CPROVER 5.10 to 5.12. After this upgrade our tool hits a failure in invariant check in verifying programs with struct or array, for e.g.,

Reason: value_sett::assign types should match
rhs.type(): struct_tag but lhs.type(): struct
For our application we'd need to avoid constant-propagation due to preserving local variables inside functions. When verifying a program with struct we would like to disable field-sensitive L2 SSA renaming and constant propagation.

I tried the followings but didn't help:

  1. using --no-propagation option or options.set_option("propagation", false)
  2. constant_propagation(options.get_bool_option("no-propagation"))
  3. commenting #define ENABLE_ARRAY_FIELD_SENSITIVITY
  4. setting run_apply = false

I am wondering if there is a way to disable "field-sensitive level-2 SSA renaming" within Cprover5.12 framework and keep the old style of handling structs?
If not, is there a stable point right before introducing field-sensitivity that we can downgrade to? (I hope it's not that distant like v. 5.11 released on in Dec 2018 compared to our current v.512 in Feb 2020)

C example:

struct S{
int x;
int y;
};

struct S s;

f(){
s.x = 0;
}

void main(){
s.x = 1;
s.y = 2;
f();
assert(s.x == 0);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions