gcc config
[prop.git] / prop-src / timespace.h
blobd0fe4e08d1cf2de46bae9e181445722e91c9d558
1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.6),
3 // last updated on Nov 2, 1999.
4 // The original source file is "timespace.ph".
5 ///////////////////////////////////////////////////////////////////////////////
7 #line 1 "timespace.ph"
8 ///////////////////////////////////////////////////////////////////////////////
9 //
10 // This file describes the structure of the time and space complexity
11 // datatypes. These datatypes are used to represent time and space
12 // complexity in the SETL-like extension language.
14 ///////////////////////////////////////////////////////////////////////////////
15 #ifndef time_and_space_complexity_h
16 #define time_and_space_complexity_h
18 #include "basics.h"
19 #include <iostream>
21 ///////////////////////////////////////////////////////////////////////////////
23 // Complexity expression is represented by the datatype Complexity.
25 ///////////////////////////////////////////////////////////////////////////////
26 #line 25 "timespace.ph"
27 #line 50 "timespace.ph"
28 ///////////////////////////////////////////////////////////////////////////////
30 // Forward class definition for Complexity
32 ///////////////////////////////////////////////////////////////////////////////
33 #ifndef datatype_Complexity_defined
34 #define datatype_Complexity_defined
35 class a_Complexity;
36 typedef a_Complexity * Complexity;
37 #endif
39 ///////////////////////////////////////////////////////////////////////////////
41 // Forward class definition for Time
43 ///////////////////////////////////////////////////////////////////////////////
44 #ifndef datatype_Time_defined
45 #define datatype_Time_defined
46 class a_Time;
47 typedef a_Time * Time;
48 #endif
50 ///////////////////////////////////////////////////////////////////////////////
52 // Forward class definition for Space
54 ///////////////////////////////////////////////////////////////////////////////
55 #ifndef datatype_Space_defined
56 #define datatype_Space_defined
57 class a_Space;
58 typedef a_Space * Space;
59 #endif
61 ///////////////////////////////////////////////////////////////////////////////
63 // Base class for datatype Complexity
65 ///////////////////////////////////////////////////////////////////////////////
66 class a_Complexity : public MEM {
67 public:
68 enum Tag_Complexity {
69 tag_Var = 0, tag_Add = 1, tag_Mul = 2,
70 tag_Div = 3, tag_Power = 4, tag_Log = 5,
71 tag_Const = 6, tag_BigOh = 7, tag_Omega = 8,
72 tag_LittleOh = 9
75 public:
76 const Tag_Complexity tag__; // variant tag
77 protected:
78 inline a_Complexity(Tag_Complexity t__) : tag__(t__) {}
79 public:
81 inline int boxed(const a_Complexity *) { return 1; }
82 inline int untag(const a_Complexity * x) { return x->tag__; }
83 ///////////////////////////////////////////////////////////////////////////////
85 // Class for datatype constructor Complexity::Var
87 ///////////////////////////////////////////////////////////////////////////////
88 class Complexity_Var : public a_Complexity {
89 public:
90 #line 25 "timespace.ph"
91 Id Var;
92 Complexity_Var (Id x_Var);
95 ///////////////////////////////////////////////////////////////////////////////
97 // Class for datatype constructor Complexity::Add
99 ///////////////////////////////////////////////////////////////////////////////
100 class Complexity_Add : public a_Complexity {
101 public:
102 #line 27 "timespace.ph"
103 Complexity _1; Complexity _2;
104 Complexity_Add (Complexity x_1, Complexity x_2);
107 ///////////////////////////////////////////////////////////////////////////////
109 // Class for datatype constructor Complexity::Mul
111 ///////////////////////////////////////////////////////////////////////////////
112 class Complexity_Mul : public a_Complexity {
113 public:
114 #line 28 "timespace.ph"
115 Complexity _1; Complexity _2;
116 Complexity_Mul (Complexity x_1, Complexity x_2);
119 ///////////////////////////////////////////////////////////////////////////////
121 // Class for datatype constructor Complexity::Div
123 ///////////////////////////////////////////////////////////////////////////////
124 class Complexity_Div : public a_Complexity {
125 public:
126 #line 29 "timespace.ph"
127 Complexity _1; Complexity _2;
128 Complexity_Div (Complexity x_1, Complexity x_2);
131 ///////////////////////////////////////////////////////////////////////////////
133 // Class for datatype constructor Complexity::Power
135 ///////////////////////////////////////////////////////////////////////////////
136 class Complexity_Power : public a_Complexity {
137 public:
138 #line 30 "timespace.ph"
139 Complexity _1; Complexity _2;
140 Complexity_Power (Complexity x_1, Complexity x_2);
143 ///////////////////////////////////////////////////////////////////////////////
145 // Class for datatype constructor Complexity::Log
147 ///////////////////////////////////////////////////////////////////////////////
148 class Complexity_Log : public a_Complexity {
149 public:
150 #line 31 "timespace.ph"
151 Complexity Log;
152 Complexity_Log (Complexity x_Log);
155 ///////////////////////////////////////////////////////////////////////////////
157 // Class for datatype constructor Complexity::Const
159 ///////////////////////////////////////////////////////////////////////////////
160 class Complexity_Const : public a_Complexity {
161 public:
162 #line 32 "timespace.ph"
163 double Const;
164 Complexity_Const (double x_Const);
167 ///////////////////////////////////////////////////////////////////////////////
169 // Class for datatype constructor Complexity::BigOh
171 ///////////////////////////////////////////////////////////////////////////////
172 class Complexity_BigOh : public a_Complexity {
173 public:
174 #line 33 "timespace.ph"
175 Complexity BigOh;
176 Complexity_BigOh (Complexity x_BigOh);
179 ///////////////////////////////////////////////////////////////////////////////
181 // Class for datatype constructor Complexity::Omega
183 ///////////////////////////////////////////////////////////////////////////////
184 class Complexity_Omega : public a_Complexity {
185 public:
186 #line 34 "timespace.ph"
187 Complexity Omega;
188 Complexity_Omega (Complexity x_Omega);
191 ///////////////////////////////////////////////////////////////////////////////
193 // Class for datatype constructor Complexity::LittleOh
195 ///////////////////////////////////////////////////////////////////////////////
196 class Complexity_LittleOh : public a_Complexity {
197 public:
198 #line 35 "timespace.ph"
199 Complexity LittleOh;
200 Complexity_LittleOh (Complexity x_LittleOh);
203 ///////////////////////////////////////////////////////////////////////////////
205 // Datatype constructor functions for Complexity
207 ///////////////////////////////////////////////////////////////////////////////
208 extern a_Complexity * Var (Id x_Var);
209 extern a_Complexity * Add (Complexity x_1, Complexity x_2);
210 extern a_Complexity * Mul (Complexity x_1, Complexity x_2);
211 extern a_Complexity * Div (Complexity x_1, Complexity x_2);
212 extern a_Complexity * Power (Complexity x_1, Complexity x_2);
213 extern a_Complexity * Log (Complexity x_Log);
214 extern a_Complexity * Const (double x_Const);
215 extern a_Complexity * BigOh (Complexity x_BigOh);
216 extern a_Complexity * Omega (Complexity x_Omega);
217 extern a_Complexity * LittleOh (Complexity x_LittleOh);
219 ///////////////////////////////////////////////////////////////////////////////
221 // Class for datatype constructor Time::TIME
223 ///////////////////////////////////////////////////////////////////////////////
224 class a_Time : public MEM {
225 public:
226 #line 42 "timespace.ph"
227 Complexity TIME;
228 a_Time (Complexity x_TIME);
230 inline int boxed(const a_Time *) { return 1; }
231 inline int untag(const a_Time *) { return 0; }
232 ///////////////////////////////////////////////////////////////////////////////
234 // Datatype constructor functions for Time
236 ///////////////////////////////////////////////////////////////////////////////
237 extern a_Time * TIME (Complexity x_TIME);
239 ///////////////////////////////////////////////////////////////////////////////
241 // Class for datatype constructor Space::SPACE
243 ///////////////////////////////////////////////////////////////////////////////
244 class a_Space : public MEM {
245 public:
246 #line 49 "timespace.ph"
247 Complexity SPACE;
248 a_Space (Complexity x_SPACE);
250 inline int boxed(const a_Space *) { return 1; }
251 inline int untag(const a_Space *) { return 0; }
252 ///////////////////////////////////////////////////////////////////////////////
254 // Datatype constructor functions for Space
256 ///////////////////////////////////////////////////////////////////////////////
257 extern a_Space * SPACE (Complexity x_SPACE);
259 #line 50 "timespace.ph"
260 #line 50 "timespace.ph"
263 ///////////////////////////////////////////////////////////////////////////////
265 // Pretty printing routines.
267 ///////////////////////////////////////////////////////////////////////////////
268 extern std::ostream& operator << (std::ostream&, Complexity);
269 extern std::ostream& operator << (std::ostream&, Time);
270 extern std::ostream& operator << (std::ostream&, Space);
272 ///////////////////////////////////////////////////////////////////////////////
274 // Functions to simplify and manipulate complexity expressions.
276 ///////////////////////////////////////////////////////////////////////////////
277 extern Complexity simplify (Complexity);
279 #endif
280 #line 69 "timespace.ph"
282 ------------------------------- Statistics -------------------------------
283 Merge matching rules = yes
284 Number of DFA nodes merged = 0
285 Number of ifs generated = 0
286 Number of switches generated = 0
287 Number of labels = 0
288 Number of gotos = 0
289 Adaptive matching = enabled
290 Fast string matching = disabled
291 Inline downcasts = enabled
292 --------------------------------------------------------------------------