-
Notifications
You must be signed in to change notification settings - Fork 1
/
TLFormulaAtomic_NOT.cpp
64 lines (47 loc) · 1.15 KB
/
TLFormulaAtomic_NOT.cpp
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
58
59
60
61
62
63
/*
* File: TLFormulaAtomic_NOT.cc
* Project: QUEST
* Author: Marc Diefenbruch, Axel M. Hirche
* Date: (C) 1997, 1998 University of Essen, Germany
*/
#include "TLFormulaAtomic_NOT.h"
#if _SC_DMALLOC
#include <dmalloc.h>
#endif
#if _TL_INLINING_ == 0
#include "TLFormulaAtomic_NOT.inl.h"
#endif
TLFormulaAtomic_NOT::~TLFormulaAtomic_NOT (void)
{
/* empty */
}
TLFormula* TLFormulaAtomic_NOT::GetCopy (void) const
{
return new TLFormulaAtomic_NOT (this);
}
TLFormula* TLFormulaAtomic_NOT::PushNegations (SCBoolean) const
{
return new TLFormulaAtomic (StrDup (name),
propFunc);
}
TLFormula* TLFormulaAtomic_NOT::Rewrite (void) const
{
return new TLFormulaAtomic_NOT (this);
}
SCBoolean TLFormulaAtomic_NOT::Evaluate (void) const
{
return !propFunc(); // Return the NEGATION!!!
}
TLFormulaAtomic* TLFormulaAtomic_NOT::GetNegation (void) const
{
if (!negation)
{
negation = new TLFormulaAtomic (StrDup (name),
propFunc);
}
return negation;
}
SCStream& TLFormulaAtomic_NOT::Display (SCStream& out) const
{
return out << "~" << name;
}