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