Skip to content

Commit 6109869

Browse files
committed
SMT2: relations on the range type
The range type is encoded using binary (using an offset for negative numbers). This adds support for <, <=, >, >= over the range type to the SMT2 backend.
1 parent ee8d275 commit 6109869

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/solvers/smt2/smt2_conv.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3560,9 +3560,11 @@ void smt2_convt::convert_relation(const binary_relation_exprt &expr)
35603560
{
35613561
const typet &op_type=expr.op0().type();
35623562

3563-
if(op_type.id()==ID_unsignedbv ||
3564-
op_type.id()==ID_bv)
3563+
if(
3564+
op_type.id() == ID_unsignedbv || op_type.id() == ID_bv ||
3565+
op_type.id() == ID_range)
35653566
{
3567+
// The range type is encoded in binary
35663568
out << "(";
35673569
if(expr.id()==ID_le)
35683570
out << "bvule";

0 commit comments

Comments
 (0)