Skip to content

Semantics of assert statements #8223

Closed
Closed
@salvadorer

Description

@salvadorer

Hey,
I'm working with CBMC 5.95.1 and I noticed that CBMC does not add asserted conditions to the path conditions. For e.g.:

#include <assert.h>

extern int __VERIFIER_nondet_int(void);

int main() {
  int x = __VERIFIER_nondet_int();
  assert(x < 0);
  assert(x <= 0);
 }

CBMC would report a warning about both assertions but there's actually no value for x that can trigger the second assertion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions