Skip to content

Exception on --smt2 #2499

Closed
Closed
@nchong

Description

@nchong

The following program makes CBMC throw an exception when using the switch --smt2: Unexpected case: smt2_convt::convert_expr: ``function_application' is unsupported. The program is parsed and fails verification (as expected) when --smt2 is removed.

int __CPROVER_uninterpreted_func(int);
int main() {
  int x = __CPROVER_uninterpreted_func(42);
  __CPROVER_assert(0 == 1, "Always fail");
}

Here's the full output:

$ cbmc --smt2 example.c
CBMC version 5.8 64-bit x86_64 macos
Parsing bad.c
Converting
Type-checking bad
Generating GOTO Program
Adding CPROVER library (x86_64)
Removal of function pointers and virtual functions
Partial Inlining
Generic Property Instrumentation
Starting Bounded Model Checking
size of program expression: 34 steps
simple slicing removed 5 assignments
Generated 1 VCC(s), 1 remaining after simplification
Passing problem to SMT2 QF_AUFBV using Z3
converting SSA
Unexpected case: smt2_convt::convert_expr: `function_application' is unsupported

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