summaryrefslogtreecommitdiff
path: root/src/theory
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-02-12 16:24:13 -0600
committerGitHub <noreply@github.com>2020-02-12 16:24:13 -0600
commitf38cd31ddfd3d5caa2ffe3a0ffafbb2b0394391b (patch)
tree33a0fba8f24e64348edf138dc691f8498746d1e0 /src/theory
parent982282eed2b02c1ca4aec2a335e460e622c4e963 (diff)
Ensure ext rewrites for associative ops dont throw assertions for kind arities (#3681)
Diffstat (limited to 'src/theory')
-rw-r--r--src/theory/quantifiers/extended_rewrite.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/theory/quantifiers/extended_rewrite.cpp b/src/theory/quantifiers/extended_rewrite.cpp
index 05e789ce2..9e924f34d 100644
--- a/src/theory/quantifiers/extended_rewrite.cpp
+++ b/src/theory/quantifiers/extended_rewrite.cpp
@@ -155,6 +155,16 @@ Node ExtendedRewriter::extendedRewrite(Node n)
// we may have subsumed children down to one
ret = children[0];
}
+ else if (isAssoc && children.size() > kind::metakind::getUpperBoundForKind(k))
+ {
+ Assert(kind::metakind::getUpperBoundForKind(k) >= 2);
+ // kind may require binary construction
+ ret = children[0];
+ for (unsigned i = 1, nchild = children.size(); i < nchild; i++)
+ {
+ ret = nm->mkNode(k, ret, children[i]);
+ }
+ }
else
{
ret = nm->mkNode(k, children);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback