1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.4),
3 // last updated on Apr 3, 1997.
4 // The original source file is "T11.pcc".
5 ///////////////////////////////////////////////////////////////////////////////
7 #define PROP_REWRITING_USED
8 #define PROP_GARBAGE_COLLECTION_USED
9 #define PROP_QUARK_USED
12 ///////////////////////////////////////////////////////////////////////////////
14 // Forward class definition for Wff
16 ///////////////////////////////////////////////////////////////////////////////
17 #ifndef datatype_Wff_defined
18 #define datatype_Wff_defined
26 ///////////////////////////////////////////////////////////////////////////////
28 // Base class for datatype Wff
30 ///////////////////////////////////////////////////////////////////////////////
31 class a_Wff
: public GCObject
{
34 tag_VAR
= 0, tag_NOT
= 1, tag_AND
= 2,
39 const Tag_Wff tag__
; // variant tag
41 inline a_Wff(Tag_Wff t__
) : tag__(t__
) {
47 inline virtual ~a_Wff()
54 ////////////////////////////////////////////////////////////////////////////
56 // Method for garbage collection tracing
58 ////////////////////////////////////////////////////////////////////////////
60 virtual void trace(GC
*);
63 inline int boxed(const a_Wff
* x
) { return (unsigned long)x
>= 2; }
64 inline int untag(const a_Wff
* x
) { return boxed(x
) ? x
->tag__
+ 2 : (int)x
; }
65 ///////////////////////////////////////////////////////////////////////////////
67 // Class for datatype constructor Wff::VAR
69 ///////////////////////////////////////////////////////////////////////////////
70 class Wff_VAR
: public a_Wff
{
74 inline Wff_VAR (Quark x_VAR
)
75 : a_Wff(tag_VAR
), VAR(x_VAR
)
89 ////////////////////////////////////////////////////////////////////////////
91 // Method for garbage collection tracing
93 ////////////////////////////////////////////////////////////////////////////
95 virtual void trace(GC
*);
99 ///////////////////////////////////////////////////////////////////////////////
101 // Class for datatype constructor Wff::NOT
103 ///////////////////////////////////////////////////////////////////////////////
104 class Wff_NOT
: public a_Wff
{
108 inline Wff_NOT (Wff x_NOT
)
109 : a_Wff(tag_NOT
), NOT(x_NOT
)
123 ////////////////////////////////////////////////////////////////////////////
125 // Method for garbage collection tracing
127 ////////////////////////////////////////////////////////////////////////////
129 virtual void trace(GC
*);
133 ///////////////////////////////////////////////////////////////////////////////
135 // Class for datatype constructor Wff::AND
137 ///////////////////////////////////////////////////////////////////////////////
138 class Wff_AND
: public a_Wff
{
142 inline Wff_AND (Wff x_1
, Wff x_2
)
143 : a_Wff(tag_AND
), _1(x_1
), _2(x_2
)
157 ////////////////////////////////////////////////////////////////////////////
159 // Method for garbage collection tracing
161 ////////////////////////////////////////////////////////////////////////////
163 virtual void trace(GC
*);
167 ///////////////////////////////////////////////////////////////////////////////
169 // Class for datatype constructor Wff::OR
171 ///////////////////////////////////////////////////////////////////////////////
172 class Wff_OR
: public a_Wff
{
176 inline Wff_OR (Wff x_1
, Wff x_2
)
177 : a_Wff(tag_OR
), _1(x_1
), _2(x_2
)
191 ////////////////////////////////////////////////////////////////////////////
193 // Method for garbage collection tracing
195 ////////////////////////////////////////////////////////////////////////////
197 virtual void trace(GC
*);
201 ///////////////////////////////////////////////////////////////////////////////
203 // Datatype constructor functions for Wff
205 ///////////////////////////////////////////////////////////////////////////////
206 inline a_Wff
* VAR (Quark x_VAR
)
208 return new Wff_VAR (x_VAR
);
210 inline a_Wff
* NOT (Wff x_NOT
)
212 return new Wff_NOT (x_NOT
);
214 inline a_Wff
* AND (Wff x_1
, Wff x_2
)
216 return new Wff_AND (x_1
, x_2
);
218 inline a_Wff
* OR (Wff x_1
, Wff x_2
)
220 return new Wff_OR (x_1
, x_2
);
222 ///////////////////////////////////////////////////////////////////////////////
224 // Downcasting functions for Wff
226 ///////////////////////////////////////////////////////////////////////////////
227 inline Wff_VAR
* _VAR(const a_Wff
* _x_
) { return (Wff_VAR
*)_x_
; }
228 inline Wff_NOT
* _NOT(const a_Wff
* _x_
) { return (Wff_NOT
*)_x_
; }
229 inline Wff_AND
* _AND(const a_Wff
* _x_
) { return (Wff_AND
*)_x_
; }
230 inline Wff_OR
* _OR(const a_Wff
* _x_
) { return (Wff_OR
*)_x_
; }
242 ///////////////////////////////////////////////////////////////////////////////
244 // Interface specification of datatype Wff
246 ///////////////////////////////////////////////////////////////////////////////
250 ///////////////////////////////////////////////////////////////////////////////
252 // Instantiation of datatype Wff
254 ///////////////////////////////////////////////////////////////////////////////
256 void a_Wff::trace(GC
* gc__
)
260 void Wff_VAR::trace(GC
* gc__
)
262 // call to method a_Wff::trace() has been optimized out
266 void Wff_NOT::trace(GC
* gc__
)
268 // call to method a_Wff::trace() has been optimized out
269 this->NOT
= (Wff
)gc__
->trace(this->NOT
); // Wff
272 void Wff_AND::trace(GC
* gc__
)
274 // call to method a_Wff::trace() has been optimized out
275 this->_1
= (Wff
)gc__
->trace(this->_1
); // Wff
276 this->_2
= (Wff
)gc__
->trace(this->_2
); // Wff
279 void Wff_OR::trace(GC
* gc__
)
281 // call to method a_Wff::trace() has been optimized out
282 this->_1
= (Wff
)gc__
->trace(this->_1
); // Wff
283 this->_2
= (Wff
)gc__
->trace(this->_2
); // Wff
297 extern void _T_1_1co_X1_rewrite(Wff
& );
298 _T_1_1co_X1_rewrite(wff
);
305 class _T_1_1co_X1
: public BURS
{
307 _T_1_1co_X1(const _T_1_1co_X1
&); // no copy constructor
308 void operator = (const _T_1_1co_X1
&); // no assignment
310 struct _T_1_1co_X1_StateRec
* stack__
, * stack_top__
;
312 void labeler(const char *, int&, int);
313 void labeler(Quark
, int&, int);
314 void labeler(Wff
& redex
, int&, int);
315 inline virtual void operator () (Wff
& redex
) { int s
; labeler(redex
,s
,0); }
318 inline _T_1_1co_X1() {}
320 void _T_1_1co_X1_rewrite(Wff
& _x_
)
325 ///////////////////////////////////////////////////////////////////////////////
327 // This macro can be redefined by the user for debugging
329 ///////////////////////////////////////////////////////////////////////////////
330 #ifndef DEBUG__T_1_1co_X1
331 #define DEBUG__T_1_1co_X1(repl,redex,file,line,rule) repl
333 static const char * _T_1_1co_X1_file_name
= "T11.pcc";
336 static const TreeTables::ShortState _T_1_1co_X1_theta_3
[5] = {
341 static const TreeTables::ShortState _T_1_1co_X1_theta_4
[5][4] = {
350 static const TreeTables::ShortState _T_1_1co_X1_theta_5
[4][3] = {
358 static const TreeTables::ShortState _T_1_1co_X1_mu_3_0
[40] = {
359 0, 1, 2, 3, 0, 4, 3, 0, 0, 0, 4, 4, 4, 3, 0, 0,
360 0, 0, 0, 4, 4, 4, 4, 4, 3, 0, 0, 0, 3, 0, 0, 0,
361 0, 0, 0, 0, 0, 4, 4, 4
365 static const TreeTables::ShortState _T_1_1co_X1_mu_4_0
[40] = {
366 0, 1, 2, 0, 3, 4, 0, 3, 3, 3, 4, 4, 4, 0, 3, 3,
367 3, 3, 3, 4, 4, 4, 4, 4, 0, 3, 3, 3, 0, 3, 3, 3,
368 3, 3, 3, 3, 3, 4, 4, 4
372 static const TreeTables::ShortState _T_1_1co_X1_mu_4_1
[40] = {
373 0, 1, 2, 0, 0, 3, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0,
374 0, 0, 0, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0,
375 0, 0, 0, 0, 0, 3, 3, 3
379 static const TreeTables::ShortState _T_1_1co_X1_mu_5_0
[40] = {
380 0, 1, 2, 0, 0, 3, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0,
381 0, 0, 0, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0,
382 0, 0, 0, 0, 0, 3, 3, 3
386 static const TreeTables::ShortState _T_1_1co_X1_mu_5_1
[40] = {
387 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
388 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
389 0, 0, 0, 0, 0, 0, 0, 0
393 inline void _T_1_1co_X1::labeler(char const * redex
,int& s__
,int)
400 inline void _T_1_1co_X1::labeler(Quark redex
,int& s__
,int)
407 void _T_1_1co_X1::labeler (Wff
& redex
, int& s__
, int r__
)
411 switch(redex
->tag__
) {
412 case a_Wff::tag_VAR
: {
414 labeler(_VAR(redex
)->VAR
, s0__
, r__
);
416 case a_Wff::tag_NOT
: {
418 labeler(_NOT(redex
)->NOT
, s0__
, r__
);
419 s__
= _T_1_1co_X1_theta_3
[_T_1_1co_X1_mu_3_0
[s0__
]]; } break;
420 case a_Wff::tag_AND
: {
423 labeler(_AND(redex
)->_1
, s0__
, r__
);
424 labeler(_AND(redex
)->_2
, s1__
, r__
);
425 s__
= _T_1_1co_X1_theta_4
[_T_1_1co_X1_mu_4_0
[s0__
]][_T_1_1co_X1_mu_4_1
[s1__
]]; } break;
429 labeler(_OR(redex
)->_1
, s0__
, r__
);
430 labeler(_OR(redex
)->_2
, s1__
, r__
);
431 s__
= _T_1_1co_X1_theta_5
[_T_1_1co_X1_mu_5_0
[s0__
]][_T_1_1co_X1_mu_5_1
[s1__
]]; } break;
434 if (((int)redex
)) {s__
= 2;
441 { redex
= DEBUG__T_1_1co_X1(AND(_AND(_AND(redex
)->_1
)->_1
,AND(_AND(_AND(redex
)->_1
)->_2
,_AND(redex
)->_2
)),redex
,_T_1_1co_X1_file_name
,43,"AND (AND (X, Y), Z): ...");
442 r__
= 1; goto replacement__
; }
447 { redex
= DEBUG__T_1_1co_X1(OR(_OR(_OR(redex
)->_1
)->_1
,OR(_OR(_OR(redex
)->_1
)->_2
,_OR(redex
)->_2
)),redex
,_T_1_1co_X1_file_name
,42,"OR (OR (X, Y), Z): ...");
448 r__
= 1; goto replacement__
; }
454 { redex
= DEBUG__T_1_1co_X1(OR(AND(_AND(redex
)->_1
,_OR(_AND(redex
)->_2
)->_1
),AND(_AND(redex
)->_1
,_OR(_AND(redex
)->_2
)->_2
)),redex
,_T_1_1co_X1_file_name
,41,"AND (X, OR (Y, Z)): ...");
455 r__
= 1; goto replacement__
; }
461 { redex
= DEBUG__T_1_1co_X1(OR(AND(_OR(_AND(redex
)->_1
)->_1
,_AND(redex
)->_2
),AND(_OR(_AND(redex
)->_1
)->_2
,_AND(redex
)->_2
)),redex
,_T_1_1co_X1_file_name
,40,"AND (OR (X, Y), Z): ...");
462 r__
= 1; goto replacement__
; }
467 { redex
= DEBUG__T_1_1co_X1(AND(NOT(_OR(_NOT(redex
)->NOT
)->_1
),NOT(_OR(_NOT(redex
)->NOT
)->_2
)),redex
,_T_1_1co_X1_file_name
,38,"NOT OR (X, Y): ...");
468 r__
= 1; goto replacement__
; }
475 { redex
= DEBUG__T_1_1co_X1(F
,redex
,_T_1_1co_X1_file_name
,36,"AND (_, F): ...");
476 r__
= 1; goto replacement__
; }
483 { redex
= DEBUG__T_1_1co_X1(F
,redex
,_T_1_1co_X1_file_name
,35,"AND (F, _): ...");
484 r__
= 1; goto replacement__
; }
492 { redex
= DEBUG__T_1_1co_X1(_AND(redex
)->_1
,redex
,_T_1_1co_X1_file_name
,34,"AND (X, T): ...");
493 r__
= 1; goto replacement__
; }
501 { redex
= DEBUG__T_1_1co_X1(_AND(redex
)->_2
,redex
,_T_1_1co_X1_file_name
,33,"AND (T, X): ...");
502 r__
= 1; goto replacement__
; }
508 { redex
= DEBUG__T_1_1co_X1(_OR(redex
)->_1
,redex
,_T_1_1co_X1_file_name
,32,"OR (X, F): ...");
509 r__
= 1; goto replacement__
; }
515 { redex
= DEBUG__T_1_1co_X1(_OR(redex
)->_2
,redex
,_T_1_1co_X1_file_name
,31,"OR (F, X): ...");
516 r__
= 1; goto replacement__
; }
523 { redex
= DEBUG__T_1_1co_X1(T
,redex
,_T_1_1co_X1_file_name
,30,"OR (_, T): ...");
524 r__
= 1; goto replacement__
; }
531 { redex
= DEBUG__T_1_1co_X1(T
,redex
,_T_1_1co_X1_file_name
,29,"OR (T, _): ...");
532 r__
= 1; goto replacement__
; }
537 { redex
= DEBUG__T_1_1co_X1(_NOT(_NOT(redex
)->NOT
)->NOT
,redex
,_T_1_1co_X1_file_name
,28,"NOT NOT X: ...");
538 r__
= 1; goto replacement__
; }
543 { redex
= DEBUG__T_1_1co_X1(T
,redex
,_T_1_1co_X1_file_name
,27,"NOT F: ...");
544 r__
= 1; goto replacement__
; }
549 { redex
= DEBUG__T_1_1co_X1(F
,redex
,_T_1_1co_X1_file_name
,26,"NOT T: ...");
550 r__
= 1; goto replacement__
; }
558 ------------------------------- Statistics -------------------------------
559 Merge matching rules = yes
560 Number of DFA nodes merged = 0
561 Number of ifs generated = 0
562 Number of switches generated = 0
565 Adaptive matching = disabled
566 Fast string matching = disabled
567 Inline downcasts = disabled
568 --------------------------------------------------------------------------