Skip to content

Commit 22cd6d1

Browse files
authored
Merge pull request #7145 from tautschnig/bugfixes/smt2-declare-datatypes
SMT2 back-end: make declare-datatypes standards compatible
2 parents f23120d + 5bbb238 commit 22cd6d1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/solvers/smt2/smt2_conv.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5281,8 +5281,8 @@ void smt2_convt::find_symbols_rec(
52815281
"complex." + std::to_string(datatype_map.size());
52825282
datatype_map[type] = smt_typename;
52835283

5284-
out << "(declare-datatypes () ((" << smt_typename << " "
5285-
<< "(mk-" << smt_typename;
5284+
out << "(declare-datatypes ((" << smt_typename << " 0)) "
5285+
<< "(((mk-" << smt_typename;
52865286

52875287
out << " (" << smt_typename << ".imag ";
52885288
convert_type(to_complex_type(type).subtype());
@@ -5310,8 +5310,8 @@ void smt2_convt::find_symbols_rec(
53105310
"vector." + std::to_string(datatype_map.size());
53115311
datatype_map[type] = smt_typename;
53125312

5313-
out << "(declare-datatypes () ((" << smt_typename << " "
5314-
<< "(mk-" << smt_typename;
5313+
out << "(declare-datatypes ((" << smt_typename << " 0)) "
5314+
<< "(((mk-" << smt_typename;
53155315

53165316
for(mp_integer i=0; i!=size; ++i)
53175317
{
@@ -5352,12 +5352,12 @@ void smt2_convt::find_symbols_rec(
53525352
// argument for each member of the struct. The declaration that
53535353
// creates this type looks like:
53545354
//
5355-
// (declare-datatypes () ((struct.0 (mk-struct.0
5355+
// (declare-datatypes ((struct.0 0)) (((mk-struct.0
53565356
// (struct.0.component1 type1)
53575357
// ...
53585358
// (struct.0.componentN typeN)))))
5359-
out << "(declare-datatypes () ((" << smt_typename << " "
5360-
<< "(mk-" << smt_typename << " ";
5359+
out << "(declare-datatypes ((" << smt_typename << " 0)) "
5360+
<< "(((mk-" << smt_typename << " ";
53615361

53625362
for(const auto &component : components)
53635363
{

0 commit comments

Comments
 (0)