Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreynol committed Jul 25, 2023
1 parent 77c38d7 commit 52eb0ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,16 @@ Expr State::mkExpr(Kind k, const std::vector<Expr>& children)
Expr hd = children[0];
size_t i = 1;
Expr curr = children[isLeft ? i : nchild-i];
AppInfo * ail = getAppInfo(curr.get());
std::vector<Expr> cc{hd, nullptr, nullptr};
size_t nextIndex = isLeft ? 2 : 1;
size_t prevIndex = isLeft ? 1 : 2;
if (ail!=nullptr)
if (ai->d_attrConsTerm!=nullptr)
{
// if the last term is not marked as a list variable and
// we have a null terminator, then we insert the null terminator
if (!ail->hasAttribute(Attr::LIST) && ai->d_attrConsTerm!=nullptr)
AppInfo * ail = getAppInfo(curr.get());
if (ail!=nullptr && !ail->hasAttribute(Attr::LIST))
{
// if the last term is not marked as a list variable and
// we have a null terminator, then we insert the null terminator
cc[prevIndex] = ai->d_attrConsTerm;
cc[nextIndex] = curr;
curr = mkExprInternal(Kind::APPLY, cc);
Expand Down Expand Up @@ -221,7 +221,7 @@ Expr State::mkExpr(Kind k, const std::vector<Expr>& children)
}
// note this could loop
return mkExpr(Kind::APPLY, cchildren);
}
}
break;
default:
break;
Expand Down
2 changes: 0 additions & 2 deletions tests/or-list-null-term.smt2
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


(declare-const true Bool)
(declare-const false Bool)

Expand Down

0 comments on commit 52eb0ed

Please sign in to comment.