diff options
author | Tim King <taking@cs.nyu.edu> | 2013-11-14 11:56:34 -0500 |
---|---|---|
committer | Tim King <taking@cs.nyu.edu> | 2013-11-21 10:43:44 -0500 |
commit | 91424455840a7365a328cbcc3d02ec453fe9d0ea (patch) | |
tree | e8072eb0c7dda81feafb1c5f9a4ca2f0fcbc0399 /src/expr/attribute_unique_id.h | |
parent | bd8e9319aab69db90692f72bc52288329879eefc (diff) |
Adding the changes needed to delete rewriter attributes. This includes being able to list attributes. Additionally, added debugging hooks to node manager and attribute manager.
Diffstat (limited to 'src/expr/attribute_unique_id.h')
-rw-r--r-- | src/expr/attribute_unique_id.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/expr/attribute_unique_id.h b/src/expr/attribute_unique_id.h new file mode 100644 index 000000000..79c6bfd8f --- /dev/null +++ b/src/expr/attribute_unique_id.h @@ -0,0 +1,52 @@ + +#pragma once + +#include "cvc4_private.h" +#include <stdint.h> + +// ATTRIBUTE IDs ============================================================ + +namespace CVC4 { +namespace expr { +namespace attr { + +/** A unique id for each attribute table. */ +enum AttrTableId { + AttrTableBool, + AttrTableUInt64, + AttrTableTNode, + AttrTableNode, + AttrTableTypeNode, + AttrTableString, + AttrTablePointer, + AttrTableCDBool, + AttrTableCDUInt64, + AttrTableCDTNode, + AttrTableCDNode, + AttrTableCDString, + AttrTableCDPointer, + LastAttrTable +}; + +/** + * This uniquely indentifies attributes across tables. + */ +class AttributeUniqueId { + AttrTableId d_tableId; + uint64_t d_withinTypeId; + +public: + AttributeUniqueId() : d_tableId(LastAttrTable), d_withinTypeId(0){} + + AttributeUniqueId(AttrTableId tableId, uint64_t within) + : d_tableId(tableId), d_withinTypeId(within) + {} + + AttrTableId getTableId() const{ return d_tableId; } + uint64_t getWithinTypeId() const{ return d_withinTypeId; } + +};/* CVC4::expr::attr::AttributeUniqueId */ + +}/* CVC4::expr::attr namespace */ +}/* CVC4::expr namespace */ +}/* CVC4 namespace */ |