projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ea7caf
)
make datatypes enumerator behavior clearer (no exceptions in normal operation)
author
Morgan Deters
<mdeters@cs.nyu.edu>
Thu, 7 Feb 2013 02:30:35 +0000
(21:30 -0500)
committer
Morgan Deters
<mdeters@cs.nyu.edu>
Thu, 7 Feb 2013 02:32:58 +0000
(21:32 -0500)
src/theory/datatypes/type_enumerator.h
patch
|
blob
|
history
diff --git
a/src/theory/datatypes/type_enumerator.h
b/src/theory/datatypes/type_enumerator.h
index 2a14d7fbab13f351f4bebb684092863748652995..8ee275f70927a27845563b9ed7609c1b94cda4da 100644
(file)
--- a/
src/theory/datatypes/type_enumerator.h
+++ b/
src/theory/datatypes/type_enumerator.h
@@
-139,11
+139,10
@@
public:
DatatypesEnumerator& operator++() throw() {
if(d_ctor < d_datatype.getNumConstructors()) {
for(size_t a = d_datatype[d_ctor].getNumArgs(); a > 0; --a) {
- try {
- *++*d_argEnumerators[a - 1];
- return *this;
- } catch(NoMoreValuesException&) {
+ if((++*d_argEnumerators[a - 1]).isFinished()) {
*d_argEnumerators[a - 1] = TypeEnumerator(Node::fromExpr(d_datatype[d_ctor][a - 1].getSelector()).getType()[1]);
+ } else {
+ return *this;
}
}