Skip to content

Commit d30e0af

Browse files
committed
fix SMT-LIB2 'nor'
This fixes the implementation of 'nor' in the SMT-LIB2 backend, and the comment that describes the semantics of nor_exprt.
1 parent af0b511 commit d30e0af

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/solvers/smt2/smt2_conv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ void smt2_convt::convert_expr(const exprt &expr)
15781578
if(expr.id() == ID_nand)
15791579
out << "(and";
15801580
else if(expr.id() == ID_nor)
1581-
out << "(and";
1581+
out << "(or";
15821582
else if(expr.id() == ID_xnor)
15831583
out << "(xor";
15841584
else

src/util/std_expr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,7 +2103,7 @@ inline and_exprt &to_and_expr(exprt &expr)
21032103
/// Any number of operands that is greater or equal one.
21042104
/// When given one operand, this is equivalent to the negation.
21052105
/// When given three or more operands, this is equivalent to the negation
2106-
/// of the and expression with the same operands.
2106+
/// of the 'and' expression with the same operands.
21072107
class nand_exprt : public multi_ary_exprt
21082108
{
21092109
public:
@@ -2248,7 +2248,7 @@ inline or_exprt &to_or_expr(exprt &expr)
22482248
/// Any number of operands that is greater or equal one.
22492249
/// When given one operand, this is equivalent to the negation.
22502250
/// When given three or more operands, this is equivalent to the negation
2251-
/// of the and expression with the same operands.
2251+
/// of the 'or' expression with the same operands.
22522252
class nor_exprt : public multi_ary_exprt
22532253
{
22542254
public:
@@ -2331,7 +2331,7 @@ inline xor_exprt &to_xor_expr(exprt &expr)
23312331
///
23322332
/// When given one operand, this is equivalent to the negation.
23332333
/// When given three or more operands, this is equivalent to the negation
2334-
/// of the xor expression with the same operands.
2334+
/// of the 'xor' expression with the same operands.
23352335
class xnor_exprt : public multi_ary_exprt
23362336
{
23372337
public:

0 commit comments

Comments
 (0)