blob: ea435d9b704da97e68bcade6baf5904cc464684a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/********************* */
/*! \file term_info.h
** \verbatim
** Original author: Kshitij Bansal
** Major contributors: none
** Minor contributors (to current version): none
** This file is part of the CVC4 project.
** Copyright (c) 2013-2014 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
** \brief Term info.
**
** Term info.
**/
#include "cvc4_private.h"
#pragma once
namespace CVC4 {
namespace theory {
namespace sets {
typedef context::CDList<TNode> CDTNodeList;
typedef context::CDHashSet<Node, NodeHashFunction> CDNodeSet;
typedef context::CDHashSet<Node, NodeHashFunction> CDNodeSet;
class TheorySetsTermInfo {
public:
CDTNodeList* elementsInThisSet;
CDTNodeList* elementsNotInThisSet;
CDTNodeList* parents;
TheorySetsTermInfo(context::Context* c)
{
elementsInThisSet = new(true)CDTNodeList(c);
elementsNotInThisSet = new(true)CDTNodeList(c);
parents = new(true)CDTNodeList(c);
}
void addToElementList(TNode n, bool polarity) {
if(polarity) elementsInThisSet -> push_back(n);
else elementsNotInThisSet -> push_back(n);
}
~TheorySetsTermInfo() {
elementsInThisSet -> deleteSelf();
elementsNotInThisSet -> deleteSelf();
parents -> deleteSelf();
}
};
}/* CVC4::theory::sets namespace */
}/* CVC4::theory namespace */
}/* CVC4 namespace */
|