Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * This file is part of the cvc5 project. 3 : : * 4 : : * Copyright (c) 2009-2026 by the authors listed in the file AUTHORS 5 : : * in the top-level source directory and their institutional affiliations. 6 : : * All rights reserved. See the file COPYING in the top-level source 7 : : * directory for licensing information. 8 : : * **************************************************************************** 9 : : * 10 : : * [[ Add one-line brief description here ]] 11 : : * 12 : : * [[ Add lengthier description here ]] 13 : : * \todo document this file 14 : : */ 15 : : 16 : : #include "cvc5_private.h" 17 : : 18 : : #pragma once 19 : : 20 : : // ATTRIBUTE IDs ============================================================ 21 : : 22 : : namespace cvc5::internal { 23 : : namespace expr { 24 : : namespace attr { 25 : : 26 : : /** A unique id for each attribute table. */ 27 : : enum AttrTableId 28 : : { 29 : : AttrTableBool, 30 : : AttrTableUInt64, 31 : : AttrTableTNode, 32 : : AttrTableNode, 33 : : AttrTableTypeNode, 34 : : AttrTableString, 35 : : AttrTableCDBool, 36 : : AttrTableCDUInt64, 37 : : AttrTableCDTNode, 38 : : AttrTableCDNode, 39 : : AttrTableCDString, 40 : : AttrTableCDPointer, 41 : : LastAttrTable 42 : : }; 43 : : 44 : : /** 45 : : * This uniquely identifies attributes across tables. 46 : : */ 47 : : class AttributeUniqueId 48 : : { 49 : : AttrTableId d_tableId; 50 : : uint64_t d_withinTypeId; 51 : : 52 : : public: 53 : : AttributeUniqueId() : d_tableId(LastAttrTable), d_withinTypeId(0) {} 54 : : 55 : : AttributeUniqueId(AttrTableId tableId, uint64_t within) 56 : : : d_tableId(tableId), d_withinTypeId(within) 57 : : { 58 : : } 59 : : 60 : 0 : AttrTableId getTableId() const { return d_tableId; } 61 : 0 : uint64_t getWithinTypeId() const { return d_withinTypeId; } 62 : : 63 : : }; /* cvc5::internal::expr::attr::AttributeUniqueId */ 64 : : 65 : : } // namespace attr 66 : : } // namespace expr 67 : : } // namespace cvc5::internal