Skip to content

Exception is thrown (Invariant check failed) when trying to verify a program from SV-COMP. #181

@jparsert

Description

@jparsert

I get an exception when trying to solve the following program from the SV-COMP competition:

extern void abort(void);
#include <assert.h>
void reach_error() { assert(0); }
extern int __VERIFIER_nondet_int(void);
void __VERIFIER_assert(int cond) {
  if (!(cond)) {
    ERROR: {reach_error();abort();}
  }
  return;
}

#define SZ 2048

int main(void) {
  int A[SZ];
  int B[SZ];
  int i;
  int tmp;

  for (i = 0; i < SZ; i++) {
    A[i] = __VERIFIER_nondet_int();
    B[i] = __VERIFIER_nondet_int();
  }

  for (i = 0; i < SZ; i++) {
    tmp = A[i];
    B[i] = tmp;
  }

  __VERIFIER_assert(A[SZ/2] != B[SZ/2]);
}
--- begin invariant violation report ---
Invariant check failed
File: flattening/boolbv_map.cpp:68 function: get_literals
Condition: map_entry.literal_map.size() == width
Reason: number of literals in the literal map shall equal the bitvector width
Backtrace:
...

EDIT: I also ran into other problem files from the SV-COMP that exhibit the same violation.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions