diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-01-26 07:29:41 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-01-26 07:29:41 +0000 |
commit | 21e01d42ed4c0b6d9fa5855c2e0cfc1a3765d14f (patch) | |
tree | ec785ced868a294e72cc751a293c618488743c8b /src/expr/node.h | |
parent | f2d38a8522579f9b3e434f76a9426fa8d2f06d07 (diff) |
fixes to build structure, util classes, lots of fixes to Node and NodeBuilder. outstanding SEGVs fixed
Diffstat (limited to 'src/expr/node.h')
-rw-r--r-- | src/expr/node.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/expr/node.h b/src/expr/node.h index fd2603ffa..b40443923 100644 --- a/src/expr/node.h +++ b/src/expr/node.h @@ -25,6 +25,7 @@ #include "cvc4_config.h" #include "expr/kind.h" +#include "util/Assert.h" namespace CVC4 { class Node; @@ -105,6 +106,11 @@ public: bool operator==(const Node& e) const { return d_ev == e.d_ev; } bool operator!=(const Node& e) const { return d_ev != e.d_ev; } + Node operator[](int i) const { + Assert(i >= 0 && i < d_ev->d_nchildren); + return Node(d_ev->d_children[i]); + } + /** * We compare by expression ids so, keeping things deterministic and having * that subexpressions have to be smaller than the enclosing expressions. |