-
Notifications
You must be signed in to change notification settings - Fork 1
/
TLFormulaZ_OPER.cpp
86 lines (70 loc) · 1.85 KB
/
TLFormulaZ_OPER.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
* File: TLFormulaZ_OPER.cc
* Project: QUEST
* Author: Marc Diefenbruch, Axel M. Hirche
* Date: (C) 1997, 1998 University of Essen, Germany
*/
//#include <assert.h>
#include "TLFormulaZ_OPER.h"
#include "TLFormulaWAITFOR.h"
#include "TLFormulaALWAYS.h"
#include "TLFormulaUNTIL.h"
#include "TLFormulaV_OPER.h"
#include "TLFormulaTRUE.h"
#include "TLFormulaAND.h"
//#include "SCL/SCListIter.h"
#include "TLFormulaSet.h"
#if _TL_INLINING_ == 0
#include "TLFormulaZ_OPER.inl.h"
#endif
#if _SC_DMALLOC
#include <dmalloc.h>
#endif
TLFormulaZ_OPER::~TLFormulaZ_OPER (void)
{
/* void */
}
TLFormula* TLFormulaZ_OPER::GetCopy (void) const
{
return new TLFormulaZ_OPER (this);
}
TLFormula* TLFormulaZ_OPER::Rewrite (void) const
{
if (TLFormula::partialRewrite)
{
return new TLFormulaZ_OPER (leftOperand->Rewrite(),
rightOperand->Rewrite());
}
else
{
return new TLFormulaUNTIL (rightOperand->Rewrite(),
new TLFormulaAND (leftOperand->Rewrite(),
rightOperand->Rewrite()));
// a Z b <==> b U (a && b)
}
}
TLFormula* TLFormulaZ_OPER::PushNegations (SCBoolean doIt) const
{
if (TLFormula::partialRewrite)
{
if (doIt)
return new TLFormulaWAITFOR (leftOperand->PushNegations(doIt),
rightOperand->PushNegations(doIt));
else
return new TLFormulaZ_OPER (leftOperand->PushNegations(doIt),
rightOperand->PushNegations(doIt));
}
else
{
TLAssert (false, "No Z_OPER allowed.");
return NULL;
}
}
SCNatural TLFormulaZ_OPER::GetPrecedenceLevel (void) const
{
return PREC_LEVEL_1;
}
SCBoolean TLFormulaZ_OPER::HasAcceptanceStateSet (void) const
{
return true;
}