InferInfo InferenceGenerator::nonNegativeCount(Node n, Node e)
{
Assert(n.getType().isBag());
- Assert(e.getType() == n.getType().getBagElementType());
+ Assert(e.getType().isSubtypeOf(n.getType().getBagElementType()));
InferInfo inferInfo(d_im, InferenceId::BAGS_NON_NEGATIVE_COUNT);
Node count = d_nm->mkNode(BAG_COUNT, e, n);
InferInfo InferenceGenerator::bagMake(Node n, Node e)
{
Assert(n.getKind() == BAG_MAKE);
- Assert(e.getType() == n.getType().getBagElementType());
+ Assert(e.getType().isSubtypeOf(n.getType().getBagElementType()));
/*
* (ite (and (= e x) (>= c 1))
InferInfo InferenceGenerator::unionDisjoint(Node n, Node e)
{
Assert(n.getKind() == BAG_UNION_DISJOINT && n[0].getType().isBag());
- Assert(e.getType() == n[0].getType().getBagElementType());
+ Assert(e.getType().isSubtypeOf(n[0].getType().getBagElementType()));
Node A = n[0];
Node B = n[1];
InferInfo InferenceGenerator::unionMax(Node n, Node e)
{
Assert(n.getKind() == BAG_UNION_MAX && n[0].getType().isBag());
- Assert(e.getType() == n[0].getType().getBagElementType());
+ Assert(e.getType().isSubtypeOf(n[0].getType().getBagElementType()));
Node A = n[0];
Node B = n[1];
InferInfo InferenceGenerator::intersection(Node n, Node e)
{
Assert(n.getKind() == BAG_INTER_MIN && n[0].getType().isBag());
- Assert(e.getType() == n[0].getType().getBagElementType());
+ Assert(e.getType().isSubtypeOf(n[0].getType().getBagElementType()));
Node A = n[0];
Node B = n[1];
InferInfo InferenceGenerator::differenceSubtract(Node n, Node e)
{
Assert(n.getKind() == BAG_DIFFERENCE_SUBTRACT && n[0].getType().isBag());
- Assert(e.getType() == n[0].getType().getBagElementType());
+ Assert(e.getType().isSubtypeOf(n[0].getType().getBagElementType()));
Node A = n[0];
Node B = n[1];
InferInfo InferenceGenerator::differenceRemove(Node n, Node e)
{
Assert(n.getKind() == BAG_DIFFERENCE_REMOVE && n[0].getType().isBag());
- Assert(e.getType() == n[0].getType().getBagElementType());
+ Assert(e.getType().isSubtypeOf(n[0].getType().getBagElementType()));
Node A = n[0];
Node B = n[1];
InferInfo InferenceGenerator::duplicateRemoval(Node n, Node e)
{
Assert(n.getKind() == BAG_DUPLICATE_REMOVAL && n[0].getType().isBag());
- Assert(e.getType() == n[0].getType().getBagElementType());
+ Assert(e.getType().isSubtypeOf(n[0].getType().getBagElementType()));
Node A = n[0];
InferInfo inferInfo(d_im, InferenceId::BAGS_DUPLICATE_REMOVAL);