summaryrefslogtreecommitdiff
path: root/src/expr/attribute.h
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2010-04-26 21:37:34 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2010-04-26 21:37:34 +0000
commit3ee48833fd8cffe897a05a986c08a30d9de57213 (patch)
treedb56dd28b96b12414a763ee9104adc8389225ca5 /src/expr/attribute.h
parent96733823eadf9ff566a177cf74e19d1712c48e4b (diff)
Adding the intermediary TypeNode to represent (and separate) the Types at the Node level.
Diffstat (limited to 'src/expr/attribute.h')
-rw-r--r--src/expr/attribute.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/expr/attribute.h b/src/expr/attribute.h
index 4250bb3ef..f231b701c 100644
--- a/src/expr/attribute.h
+++ b/src/expr/attribute.h
@@ -18,6 +18,7 @@
/* There are strong constraints on ordering of declarations of
* attributes and nodes due to template use */
#include "expr/node.h"
+#include "expr/type_node.h"
#ifndef __CVC4__EXPR__ATTRIBUTE_H
#define __CVC4__EXPR__ATTRIBUTE_H
@@ -59,6 +60,8 @@ class AttributeManager {
AttrHash<TNode> d_tnodes;
/** Underlying hash table for node-valued attributes */
AttrHash<Node> d_nodes;
+ /** Underlying hash table for types attributes */
+ AttrHash<TypeNode> d_types;
/** Underlying hash table for string-valued attributes */
AttrHash<std::string> d_strings;
/** Underlying hash table for pointer-valued attributes */
@@ -241,6 +244,18 @@ struct getTable<Node, false> {
}
};
+/** Access the "d_types" member of AttributeManager. */
+template <>
+struct getTable<TypeNode, false> {
+ typedef AttrHash<TypeNode> table_type;
+ static inline table_type& get(AttributeManager& am) {
+ return am.d_types;
+ }
+ static inline const table_type& get(const AttributeManager& am) {
+ return am.d_types;
+ }
+};
+
/** Access the "d_strings" member of AttributeManager. */
template <>
struct getTable<std::string, false> {
@@ -313,7 +328,7 @@ struct getTable<TNode, true> {
}
};
-/** Access the "d_nodes" member of AttributeManager. */
+/** Access the "d_cdnodes" member of AttributeManager. */
template <>
struct getTable<Node, true> {
typedef CDAttrHash<Node> table_type;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback