/********************* -*- C++ -*- */ /** expr_attribute.h ** This file is part of the CVC4 prototype. ** Copyright (c) 2009 The Analysis of Computer Systems Group (ACSys) ** Courant Institute of Mathematical Sciences ** New York University ** See the file COPYING in the top-level source directory for licensing ** information. ** **/ #ifndef __CVC4_EXPR_ATTRIBUTE_H #define __CVC4_EXPR_ATTRIBUTE_H // TODO WARNING this file needs work ! #include #include "core/config.h" #include "core/context.h" #include "core/cvc4_expr.h" namespace CVC4 { template class AttrTables; // global (or TSS) extern CDMap g_hash_bool; extern CDMap g_hash_int; extern CDMap g_hash_expr; extern CDMap g_hash_ptr; template class AttrTable; template <> class AttrTable { public: class BitAccessor { uint64_t& d_word; unsigned d_bit; public: BitAccessor& operator=(bool b); // continue... }; // bool specialization static CDMap *s_hash; template BitAccessor& find(Expr e, const Attr&); template bool find(Expr e, const Attr&) const; }; template <> class AttrTable { public: // int(egral) specialization static CDMap *s_hash; uint64_t& find(Expr); uint64_t& find(Expr) const; }; template class AttrTable { // pointer specialization static CDMap *s_hash; public: }; template <> class AttrTable { public: // Expr specialization static CDMap *s_hash; Expr find(Expr); }; CDMap* AttrTable::s_hash = &g_hash_bool; CDMap* AttrTable::s_hash = &g_hash_int; CDMap* AttrTable::s_hash = &g_hash_expr; template CDMap* AttrTable::s_hash = &g_hash_ptr; template class AttributeTable { typedef typename Attr::value_type value_type; AttrTable& d_table; }; } /* CVC4 namespace */ #endif /* __CVC4_EXPR_ATTRIBUTE_H */