Skip to content

Commit 3ce8b4e

Browse files
committed
use FPA theory when generating SMT-LIB2 for Z3
This enables the use of the FPA theory when generating SMT-LIB2 for Z3. This is already the default when using Bitwutzla or CVC 5.
1 parent dc46d28 commit 3ce8b4e

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

CHANGELOG

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# EBMC 6.0
2-
* VCD traces now written into separate files per property
32

3+
* VCD traces now written into separate files per property
44
* SMV: removed legacy keywords EXTERN and switch
5-
65
* SMV: use NuSMV's operator precedence, as opposed to CMU SMV's
7-
86
* SystemVerilog: semantics fix for cover disable iff
7+
* Now uses the FPA theory when emitting SMT-LIB for Z3
98

109
# EBMC 5.11
1110

regression/verilog/expressions/cast_from_real1.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
cast_from_real1.sv
33

44
^EXIT=0$

regression/verilog/expressions/cast_to_real1.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE broken-smt-backend
1+
CORE
22
cast_to_real1.sv
33

44
^EXIT=0$

src/ebmc/ebmc_solver_factory.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ ebmc_solver_factoryt ebmc_solver_factory(const cmdlinet &cmdline)
9090
smt2_solver.value(),
9191
output_file_ptr->stream());
9292

93+
if(smt2_solver == smt2_convt::solvert::Z3)
94+
dec->use_FPA_theory = true;
95+
9396
return ebmc_solvert{std::move(output_file_ptr), std::move(dec)};
9497
};
9598
}
@@ -118,14 +121,19 @@ ebmc_solver_factoryt ebmc_solver_factory(const cmdlinet &cmdline)
118121
}
119122
else
120123
{
121-
return ebmc_solvert{std::make_unique<smt2_dect>(
124+
auto dec = std::make_unique<smt2_dect>(
122125
ns,
123126
"ebmc",
124127
std::string("Generated by EBMC ") + EBMC_VERSION,
125128
"QF_AUFBV",
126129
smt2_solver.value(),
127130
"", // solver binary
128-
message_handler)};
131+
message_handler);
132+
133+
if(smt2_solver == smt2_convt::solvert::Z3)
134+
dec->use_FPA_theory = true;
135+
136+
return ebmc_solvert{std::move(dec)};
129137
}
130138
};
131139
}

0 commit comments

Comments
 (0)