summaryrefslogtreecommitdiff
path: root/src/expr
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-05-10 17:43:48 -0500
committerHaniel Barbosa <hanielbbarbosa@gmail.com>2018-05-10 17:43:48 -0500
commit2ac2c2a0c6ab1318736c026dfeb7533b5ffc7f29 (patch)
tree7e5a72e5ad46ab5b1ca2293b7eea641df58467aa /src/expr
parentadcbee78823120baa47eb8ba868b614512a121a9 (diff)
Exclude Boolean connectives from ITE conditions in SygusUnifStrat (#1900)
Diffstat (limited to 'src/expr')
-rw-r--r--src/expr/datatype.cpp6
-rw-r--r--src/expr/datatype.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/expr/datatype.cpp b/src/expr/datatype.cpp
index bcd3a0784..d697a6aaf 100644
--- a/src/expr/datatype.cpp
+++ b/src/expr/datatype.cpp
@@ -1141,6 +1141,12 @@ Expr DatatypeConstructor::getSelector(std::string name) const {
return (*this)[name].getSelector();
}
+Type DatatypeConstructor::getArgType(unsigned index) const
+{
+ PrettyCheckArgument(index < getNumArgs(), index, "index out of bounds");
+ return static_cast<SelectorType>((*this)[index].getType()).getRangeType();
+}
+
bool DatatypeConstructor::involvesExternalType() const{
for(const_iterator i = begin(); i != end(); ++i) {
if(! SelectorType((*i).getSelector().getType()).getRangeType().isDatatype()) {
diff --git a/src/expr/datatype.h b/src/expr/datatype.h
index fffabac77..826711897 100644
--- a/src/expr/datatype.h
+++ b/src/expr/datatype.h
@@ -390,6 +390,11 @@ class CVC4_PUBLIC DatatypeConstructor {
* is returned.
*/
Expr getSelector(std::string name) const;
+ /**
+ * Get argument type. Returns the return type of the i^th selector of this
+ * constructor.
+ */
+ Type getArgType(unsigned i) const;
/** get selector internal
*
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback