1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.5),
3 // last updated on Jun 18, 1997.
4 // The original source file is "phase5.pcc".
5 ///////////////////////////////////////////////////////////////////////////////
7 #define PROP_REWRITING_USED
8 #define PROP_STRCMP_USED
9 #define PROP_QUARK_USED
10 #define PROP_TUPLE2_USED
13 #include <AD/pretty/postream.h>
16 ///////////////////////////////////////////////////////////////////////////////
18 // Constructor and destructor for phase5
20 ///////////////////////////////////////////////////////////////////////////////
24 ///////////////////////////////////////////////////////////////////////////////
26 // Method to invoke phase5
28 ///////////////////////////////////////////////////////////////////////////////
29 Exp
Phase5::phase5(Exp e
)
30 { message("Simple find/count query decomposition phase", e
);
31 (*this)(e
); return collect_subqueries(e
);
34 ///////////////////////////////////////////////////////////////////////////////
36 // Transformation to decompose conjunctions
38 ///////////////////////////////////////////////////////////////////////////////
41 ///////////////////////////////////////////////////////////////////////////////
43 // This macro can be redefined by the user for debugging
45 ///////////////////////////////////////////////////////////////////////////////
47 #define DEBUG_Phase5(repl,redex,file,line,rule) repl
49 static const char * Phase5_file_name
= "phase5.pcc";
52 inline void Phase5::labeler(char const * redex
,int& s__
,int)
59 inline void Phase5::labeler(Quark redex
,int& s__
,int)
66 void Phase5::labeler (Exp
& redex
, int& s__
, int r__
)
69 switch(redex
->tag__
) {
73 labeler(_OP(redex
)->_1
, s0__
, r__
);
74 labeler(_OP(redex
)->_2
, s1__
, r__
);
76 case a_Exp::tag_APP
: {
79 labeler(_APP(redex
)->_1
, s0__
, r__
);
80 labeler(_APP(redex
)->_2
, s1__
, r__
);
82 case a_Exp::tag_LIT
: {
84 labeler(_LIT(redex
)->LIT
, s0__
, r__
);
88 labeler(_ID(redex
)->ID
, s0__
, r__
);
90 case a_Exp::tag_TUPLE
: {
92 labeler(_TUPLE(redex
)->TUPLE
, s0__
, r__
);
94 case a_Exp::tag_FORALL
: {
98 labeler(_FORALL(redex
)->_1
, s0__
, r__
);
99 labeler(_FORALL(redex
)->_2
, s1__
, r__
);
100 labeler(_FORALL(redex
)->_3
, s2__
, r__
);
102 case a_Exp::tag_EXISTS
: {
106 labeler(_EXISTS(redex
)->_1
, s0__
, r__
);
107 labeler(_EXISTS(redex
)->_2
, s1__
, r__
);
108 labeler(_EXISTS(redex
)->_3
, s2__
, r__
);
110 case a_Exp::tag_GUARD
: {
113 labeler(_GUARD(redex
)->_1
, s0__
, r__
);
114 labeler(_GUARD(redex
)->_2
, s1__
, r__
);
116 case a_Exp::tag_GENERATOR
: {
121 labeler(_GENERATOR(redex
)->_2
, s1__
, r__
);
122 labeler(_GENERATOR(redex
)->_3
, s2__
, r__
);
128 labeler(_LET(redex
)->_1
, s0__
, r__
);
129 labeler(_LET(redex
)->_2
, s1__
, r__
);
130 labeler(_LET(redex
)->_3
, s2__
, r__
);
135 #line 30 "phase5.pcc"
137 #line 30 "phase5.pcc"
143 void Phase5::labeler (Literal
& redex
, int& s__
, int r__
)
146 switch(redex
->tag__
) {
147 case a_Literal::tag_INT
: {
151 case a_Literal::tag_STRING
: {
153 labeler(_STRING(redex
)->STRING
, s0__
, r__
);
163 void Phase5::labeler (a_List
<Exp
> * & redex
, int& s__
, int r__
)
169 labeler(redex
->_1
, s0__
, r__
);
170 labeler(redex
->_2
, s1__
, r__
);
177 #line 31 "phase5.pcc"
178 #line 31 "phase5.pcc"
181 #line 33 "phase5.pcc"
183 ------------------------------- Statistics -------------------------------
184 Merge matching rules = yes
185 Number of DFA nodes merged = 0
186 Number of ifs generated = 0
187 Number of switches generated = 0
190 Adaptive matching = disabled
191 Fast string matching = disabled
192 Inline downcasts = disabled
193 --------------------------------------------------------------------------