1 /********************* */
4 ** Top contributors (to current version):
5 ** Andrew Reynolds, Aina Niemetz, Dejan Jovanovic
6 ** This file is part of the CVC4 project.
7 ** Copyright (c) 2009-2020 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.\endverbatim
12 ** \brief [[ Add one-line brief description here ]]
14 ** [[ Add lengthier description here ]]
15 ** \todo document this file
18 #include "cvc4_public.h"
20 #ifndef CVC4__THEORY__THEORY_ID_H
21 #define CVC4__THEORY__THEORY_ID_H
29 * IMPORTANT: The order of the theories is important. For example, strings
30 * depends on arith, quantifiers needs to come as the very last.
31 * Do not change this order.
52 const TheoryId THEORY_FIRST
= static_cast<TheoryId
>(0);
53 const TheoryId THEORY_SAT_SOLVER
= THEORY_LAST
;
55 TheoryId
& operator++(TheoryId
& id
) CVC4_PUBLIC
;
57 std::ostream
& operator<<(std::ostream
& out
, TheoryId theoryId
);
59 std::string
getStatsPrefix(TheoryId theoryId
) CVC4_PUBLIC
;
62 * A set of theories. Utilities for TheoryIdSet can be found below.
64 typedef uint32_t TheoryIdSet
;
69 /** A set of all theories */
70 static const TheoryIdSet AllTheories
= (1 << theory::THEORY_LAST
) - 1;
72 /** Pops a first theory off the set */
73 static TheoryId
setPop(TheoryIdSet
& set
);
75 /** Returns the size of a set of theories */
76 static size_t setSize(TheoryIdSet set
);
78 /** Returns the index size of a set of theories */
79 static size_t setIndex(TheoryId id
, TheoryIdSet set
);
81 /** Add the theory to the set. If no set specified, just returns a singleton
83 static TheoryIdSet
setInsert(TheoryId theory
, TheoryIdSet set
= 0);
85 /** Add the theory to the set. If no set specified, just returns a singleton
87 static TheoryIdSet
setRemove(TheoryId theory
, TheoryIdSet set
= 0);
89 /** Check if the set contains the theory */
90 static bool setContains(TheoryId theory
, TheoryIdSet set
);
92 /** Set complement of a */
93 static TheoryIdSet
setComplement(TheoryIdSet a
);
95 /** Set intersection of a and b */
96 static TheoryIdSet
setIntersection(TheoryIdSet a
, TheoryIdSet b
);
98 /** Set union of a and b */
99 static TheoryIdSet
setUnion(TheoryIdSet a
, TheoryIdSet b
);
101 /** Set difference of a and b */
102 static TheoryIdSet
setDifference(TheoryIdSet a
, TheoryIdSet b
);
104 /** Convert theorySet to string (for debugging) */
105 static std::string
setToString(TheoryIdSet theorySet
);
108 } // namespace theory