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 : : AttrTableBool, 29 : : AttrTableUInt64, 30 : : AttrTableTNode, 31 : : AttrTableNode, 32 : : AttrTableTypeNode, 33 : : AttrTableString, 34 : : AttrTableCDBool, 35 : : AttrTableCDUInt64, 36 : : AttrTableCDTNode, 37 : : AttrTableCDNode, 38 : : AttrTableCDString, 39 : : AttrTableCDPointer, 40 : : LastAttrTable 41 : : }; 42 : : 43 : : /** 44 : : * This uniquely identifies attributes across tables. 45 : : */ 46 : : class AttributeUniqueId { 47 : : AttrTableId d_tableId; 48 : : uint64_t d_withinTypeId; 49 : : 50 : : public: 51 : : AttributeUniqueId() : d_tableId(LastAttrTable), d_withinTypeId(0){} 52 : : 53 : : AttributeUniqueId(AttrTableId tableId, uint64_t within) 54 : : : d_tableId(tableId), d_withinTypeId(within) 55 : : {} 56 : : 57 : 0 : AttrTableId getTableId() const{ return d_tableId; } 58 : 0 : uint64_t getWithinTypeId() const{ return d_withinTypeId; } 59 : : 60 : : }; /* cvc5::internal::expr::attr::AttributeUniqueId */ 61 : : 62 : : } // namespace attr 63 : : } // namespace expr 64 : : } // namespace cvc5::internal