1 /********************* */
4 ** Top contributors (to current version):
5 ** Andrew Reynolds, Dejan Jovanovic, Tim King
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 The care graph datastructure.
14 ** The care graph datastructure.
17 #include "cvc4_private.h"
19 #ifndef CVC4__THEORY__CARE_GRAPH_H
20 #define CVC4__THEORY__CARE_GRAPH_H
24 #include "expr/kind.h" // For TheoryId.
25 #include "expr/node.h"
31 * A (ordered) pair of terms a theory cares about.
35 const TheoryId d_theory
;
37 CarePair(TNode a
, TNode b
, TheoryId theory
)
38 : d_a(a
< b
? a
: b
), d_b(a
< b
? b
: a
), d_theory(theory
)
42 bool operator==(const CarePair
& other
) const {
43 return (d_theory
== other
.d_theory
) && (d_a
== other
.d_a
)
44 && (d_b
== other
.d_b
);
47 bool operator<(const CarePair
& other
) const {
48 if (d_theory
< other
.d_theory
) return true;
49 if (d_theory
> other
.d_theory
) return false;
50 if (d_a
< other
.d_a
) return true;
51 if (d_a
> other
.d_a
) return false;
52 return d_b
< other
.d_b
;
55 }; /* struct CarePair */
58 * A set of care pairs.
60 typedef std::set
<CarePair
> CareGraph
;
65 #endif /* CVC4__THEORY__CARE_GRAPH_H */