Skip to content

Commit 784e272

Browse files
print weight if it is different from default #2667
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 5f90e72 commit 784e272

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ast/ast_smt2_pp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -957,8 +957,8 @@ class smt2_printer {
957957
unsigned num_lets = 0;
958958
format * f_body = pp_let(m_format_stack.back(), num_lets);
959959
// The current SMT2 frontend uses weight 1 as default.
960-
#define MIN_WEIGHT 1
961-
if (q->has_patterns() || q->get_weight() > MIN_WEIGHT ||
960+
#define DEFAULT_WEIGHT 1
961+
if (q->has_patterns() || q->get_weight() != DEFAULT_WEIGHT ||
962962
q->get_skid() != symbol::null || (q->get_qid() != symbol::null && !q->get_qid().is_numerical())) {
963963
ptr_buffer<format> buf;
964964
buf.push_back(f_body);
@@ -976,7 +976,7 @@ class smt2_printer {
976976
buf.push_back(pp_attribute(":no-pattern ", *it));
977977
}
978978
}
979-
if (q->get_weight() > MIN_WEIGHT) {
979+
if (q->get_weight() != DEFAULT_WEIGHT) {
980980
buf.push_back(pp_simple_attribute(":weight ", q->get_weight()));
981981
}
982982
if (q->get_skid() != symbol::null) {

0 commit comments

Comments
 (0)