Skip to content

Commit e7dafeb

Browse files
committed
SMT2 backend: type2id can now do union_tag
The SMT2 backend constructs strings to disambiguate overloaded operations using types, and now supports generating strings for union_tag types.
1 parent b336633 commit e7dafeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/solvers/smt2/smt2_conv.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,10 @@ std::string smt2_convt::type2id(const typet &type) const
996996
else
997997
return "S" + std::to_string(boolbv_width(type));
998998
}
999+
else if(type.id() == ID_union_tag)
1000+
{
1001+
return "U" + std::to_string(boolbv_width(type));
1002+
}
9991003
else if(type.id() == ID_array)
10001004
{
10011005
return "A" + type2id(to_array_type(type).element_type());

0 commit comments

Comments
 (0)