diff options
author | mudathirmahgoub <mudathirmahgoub@gmail.com> | 2021-01-08 10:07:50 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 10:07:50 -0600 |
commit | 63d27f031f8942607d869080d0e2cfb6078d40b1 (patch) | |
tree | 0a29a6479a38d700a824951e343334c5d02d0183 /src/expr | |
parent | 819eedc38031d3befb9c3e855bbbfa0afa3bb3cc (diff) |
Add bags inference generator (#5731)
This PR adds inference generator for basic bag rules.
Diffstat (limited to 'src/expr')
-rw-r--r-- | src/expr/type_node.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/expr/type_node.cpp b/src/expr/type_node.cpp index 49fbe73ef..3c038546a 100644 --- a/src/expr/type_node.cpp +++ b/src/expr/type_node.cpp @@ -151,12 +151,12 @@ bool TypeNode::isFiniteInternal(bool usortFinite) TypeNode tnc = getArrayConstituentType(); if (!tnc.isFiniteInternal(usortFinite)) { - // arrays with consistuent type that is infinite are infinite + // arrays with constituent type that is infinite are infinite ret = false; } else if (getArrayIndexType().isFiniteInternal(usortFinite)) { - // arrays with both finite consistuent and index types are finite + // arrays with both finite constituent and index types are finite ret = true; } else @@ -170,6 +170,11 @@ bool TypeNode::isFiniteInternal(bool usortFinite) { ret = getSetElementType().isFiniteInternal(usortFinite); } + else if (isBag()) + { + // there are infinite bags for all element types + ret = false; + } else if (isFunction()) { ret = true; |