backend.icl 28.2 KB
Newer Older
Ronny Wichers Schreur's avatar
Ronny Wichers Schreur committed
1
implementation module backend;
2
3
4
5
6

//1.3
from StdString import String;
//3.1

7
:: CPtr :== Int;
8
:: *UWorld :== Int;
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
:: *BackEnd :== CPtr;
:: BESymbolP :== CPtr;
:: BETypeNodeP :== CPtr;
:: BETypeArgP :== CPtr;
:: BETypeAltP :== CPtr;
:: BENodeP :== CPtr;
:: BEArgP :== CPtr;
:: BERuleAltP :== CPtr;
:: BEImpRuleP :== CPtr;
:: BETypeP :== CPtr;
:: BEFlatTypeP :== CPtr;
:: BETypeVarP :== CPtr;
:: BETypeVarListP :== CPtr;
:: BEConstructorListP :== CPtr;
:: BEFieldListP :== CPtr;
:: BENodeIdP :== CPtr;
:: BENodeDefP :== CPtr;
:: BEStrictNodeIdP :== CPtr;
:: BECodeParameterP :== CPtr;
:: BECodeBlockP :== CPtr;
:: BEStringListP :== CPtr;
:: BENodeIdListP :== CPtr;
31
:: BENodeIdRefCountListP :== CPtr;
32
33
:: BEUniVarEquations :== CPtr;
:: BEAttributeKindList :== CPtr;
34
35
36
37
38
39
:: BEAnnotation :== Int;
:: BEAttribution :== Int;
:: BESymbKind :== Int;
:: BEArrayFunKind :== Int;
:: BESelectorKind :== Int;
:: BEUpdateKind :== Int;
40
:: BESpecialIdentIndex :== Int;
41
42
43
44

BEGetVersion :: (!Int,!Int,!Int);
BEGetVersion  = code {
	ccall BEGetVersion ":VIII"
45
};
46
// void BEGetVersion (int* current,int* oldestDefinition,int* oldestImplementation);
47
48
49
50

BEInit :: !Int !UWorld -> (!BackEnd,!UWorld);
BEInit a0 a1 = code {
	ccall BEInit "I:I:I"
51
};
52
// BackEnd BEInit (int argc);
53

54
55
56
57
58
59
BECloseFiles :: !BackEnd -> BackEnd;
BECloseFiles a0 = code {
	ccall BECloseFiles ":V:I"
};
// void BECloseFiles ();

60
61
62
BEFree :: !BackEnd !UWorld -> UWorld;
BEFree a0 a1 = code {
	ccall BEFree "I:V:I"
63
};
64
// void BEFree (BackEnd backEnd);
65
66
67
68

BEArg :: !String !BackEnd -> BackEnd;
BEArg a0 a1 = code {
	ccall BEArg "S:V:I"
69
};
70
// void BEArg (CleanString arg);
71
72
73
74

BEDeclareModules :: !Int !BackEnd -> BackEnd;
BEDeclareModules a0 a1 = code {
	ccall BEDeclareModules "I:V:I"
75
};
76
// void BEDeclareModules (int nModules);
77

78
79
80
81
82
83
84
85
86
87
88
89
BEBindSpecialModule :: !BESpecialIdentIndex !Int !BackEnd -> BackEnd;
BEBindSpecialModule a0 a1 a2 = code {
	ccall BEBindSpecialModule "II:V:I"
};
// void BEBindSpecialModule (BESpecialIdentIndex index,int moduleIndex);

BEBindSpecialFunction :: !BESpecialIdentIndex !Int !Int !BackEnd -> BackEnd;
BEBindSpecialFunction a0 a1 a2 a3 = code {
	ccall BEBindSpecialFunction "III:V:I"
};
// void BEBindSpecialFunction (BESpecialIdentIndex index,int functionIndex,int moduleIndex);

90
91
92
BESpecialArrayFunctionSymbol :: !BEArrayFunKind !Int !Int !BackEnd -> (!BESymbolP,!BackEnd);
BESpecialArrayFunctionSymbol a0 a1 a2 a3 = code {
	ccall BESpecialArrayFunctionSymbol "III:I:I"
93
};
94
// BESymbolP BESpecialArrayFunctionSymbol (BEArrayFunKind arrayFunKind,int functionIndex,int moduleIndex);
95
96
97
98

BEDictionarySelectFunSymbol :: !BackEnd -> (!BESymbolP,!BackEnd);
BEDictionarySelectFunSymbol a0 = code {
	ccall BEDictionarySelectFunSymbol ":I:I"
99
};
100
// BESymbolP BEDictionarySelectFunSymbol ();
101
102
103
104

BEDictionaryUpdateFunSymbol :: !BackEnd -> (!BESymbolP,!BackEnd);
BEDictionaryUpdateFunSymbol a0 = code {
	ccall BEDictionaryUpdateFunSymbol ":I:I"
105
};
106
// BESymbolP BEDictionaryUpdateFunSymbol ();
107
108
109
110

BEFunctionSymbol :: !Int !Int !BackEnd -> (!BESymbolP,!BackEnd);
BEFunctionSymbol a0 a1 a2 = code {
	ccall BEFunctionSymbol "II:I:I"
111
};
112
// BESymbolP BEFunctionSymbol (int functionIndex,int moduleIndex);
113
114
115
116

BEConstructorSymbol :: !Int !Int !BackEnd -> (!BESymbolP,!BackEnd);
BEConstructorSymbol a0 a1 a2 = code {
	ccall BEConstructorSymbol "II:I:I"
117
};
118
// BESymbolP BEConstructorSymbol (int constructorIndex,int moduleIndex);
119
120
121
122

BEFieldSymbol :: !Int !Int !BackEnd -> (!BESymbolP,!BackEnd);
BEFieldSymbol a0 a1 a2 = code {
	ccall BEFieldSymbol "II:I:I"
123
};
124
// BESymbolP BEFieldSymbol (int fieldIndex,int moduleIndex);
125
126
127
128

BETypeSymbol :: !Int !Int !BackEnd -> (!BESymbolP,!BackEnd);
BETypeSymbol a0 a1 a2 = code {
	ccall BETypeSymbol "II:I:I"
129
};
130
// BESymbolP BETypeSymbol (int typeIndex,int moduleIndex);
131
132
133
134

BEDontCareDefinitionSymbol :: !BackEnd -> (!BESymbolP,!BackEnd);
BEDontCareDefinitionSymbol a0 = code {
	ccall BEDontCareDefinitionSymbol ":I:I"
135
};
136
// BESymbolP BEDontCareDefinitionSymbol ();
137
138
139
140

BEBoolSymbol :: !Bool !BackEnd -> (!BESymbolP,!BackEnd);
BEBoolSymbol a0 a1 = code {
	ccall BEBoolSymbol "I:I:I"
141
};
142
// BESymbolP BEBoolSymbol (int value);
143
144
145
146

BELiteralSymbol :: !BESymbKind !String !BackEnd -> (!BESymbolP,!BackEnd);
BELiteralSymbol a0 a1 a2 = code {
	ccall BELiteralSymbol "IS:I:I"
147
};
148
// BESymbolP BELiteralSymbol (BESymbKind kind,CleanString value);
149

150
151
152
153
BEPredefineListConstructorSymbol :: !Int !Int !BESymbKind !Int !Int !BackEnd -> BackEnd;
BEPredefineListConstructorSymbol a0 a1 a2 a3 a4 a5 = code {
	ccall BEPredefineListConstructorSymbol "IIIII:V:I"
};
154
// void BEPredefineListConstructorSymbol (int constructorIndex,int moduleIndex,BESymbKind symbolKind,int head_strictness,int tail_strictness);
155
156
157
158
159

BEPredefineListTypeSymbol :: !Int !Int !BESymbKind !Int !Int !BackEnd -> BackEnd;
BEPredefineListTypeSymbol a0 a1 a2 a3 a4 a5 = code {
	ccall BEPredefineListTypeSymbol "IIIII:V:I"
};
160
// void BEPredefineListTypeSymbol (int typeIndex,int moduleIndex,BESymbKind symbolKind,int head_strictness,int tail_strictness);
161
162
163
164
165

BEAdjustStrictListConsInstance :: !Int !Int !BackEnd -> BackEnd;
BEAdjustStrictListConsInstance a0 a1 a2 = code {
	ccall BEAdjustStrictListConsInstance "II:V:I"
};
166
// void BEAdjustStrictListConsInstance (int functionIndex,int moduleIndex);
167
168
169
170
171

BEAdjustUnboxedListDeconsInstance :: !Int !Int !BackEnd -> BackEnd;
BEAdjustUnboxedListDeconsInstance a0 a1 a2 = code {
	ccall BEAdjustUnboxedListDeconsInstance "II:V:I"
};
172
// void BEAdjustUnboxedListDeconsInstance (int functionIndex,int moduleIndex);
173
174
175
176
177

BEAdjustOverloadedNilFunction :: !Int !Int !BackEnd -> BackEnd;
BEAdjustOverloadedNilFunction a0 a1 a2 = code {
	ccall BEAdjustOverloadedNilFunction "II:V:I"
};
178
// void BEAdjustOverloadedNilFunction (int functionIndex,int moduleIndex);
179
180
181
182
183
184
185
186
187
188
189
190
191

BEOverloadedConsSymbol :: !Int !Int !Int !Int !BackEnd -> (!BESymbolP,!BackEnd);
BEOverloadedConsSymbol a0 a1 a2 a3 a4 = code {
	ccall BEOverloadedConsSymbol "IIII:I:I"
};
// BESymbolP BEOverloadedConsSymbol (int constructorIndex,int moduleIndex,int deconsIndex,int deconsModuleIndex);

BEOverloadedPushNode :: !Int !BESymbolP !BEArgP !BENodeIdListP !BENodeP !BackEnd -> (!BENodeP,!BackEnd);
BEOverloadedPushNode a0 a1 a2 a3 a4 a5 = code {
	ccall BEOverloadedPushNode "IIIII:I:I"
};
// BENodeP BEOverloadedPushNode (int arity,BESymbolP symbol,BEArgP arguments,BENodeIdListP nodeIds,BENodeP decons_node);

192
193
194
BEPredefineConstructorSymbol :: !Int !Int !Int !BESymbKind !BackEnd -> BackEnd;
BEPredefineConstructorSymbol a0 a1 a2 a3 a4 = code {
	ccall BEPredefineConstructorSymbol "IIII:V:I"
195
};
196
// void BEPredefineConstructorSymbol (int arity,int constructorIndex,int moduleIndex,BESymbKind symbolKind);
197
198
199
200

BEPredefineTypeSymbol :: !Int !Int !Int !BESymbKind !BackEnd -> BackEnd;
BEPredefineTypeSymbol a0 a1 a2 a3 a4 = code {
	ccall BEPredefineTypeSymbol "IIII:V:I"
201
};
202
// void BEPredefineTypeSymbol (int arity,int typeIndex,int moduleIndex,BESymbKind symbolKind);
203
204
205
206

BEBasicSymbol :: !Int !BackEnd -> (!BESymbolP,!BackEnd);
BEBasicSymbol a0 a1 = code {
	ccall BEBasicSymbol "I:I:I"
207
};
208
// BESymbolP BEBasicSymbol (BESymbKind kind);
209
210
211
212

BEVarTypeNode :: !String !BackEnd -> (!BETypeNodeP,!BackEnd);
BEVarTypeNode a0 a1 = code {
	ccall BEVarTypeNode "S:I:I"
213
};
214
// BETypeNodeP BEVarTypeNode (CleanString name);
215

216
217
218
219
220
221
222
BETypeVarListElem :: !BETypeVarP !BEAttribution !BackEnd -> (!BETypeVarListP,!BackEnd);
BETypeVarListElem a0 a1 a2 = code {
	ccall BETypeVarListElem "II:I:I"
};
// BETypeVarListP BETypeVarListElem (BETypeVarP typeVar,BEAttribution attribute);

BETypeVars :: !BETypeVarListP !BETypeVarListP !BackEnd -> (!BETypeVarListP,!BackEnd);
223
224
BETypeVars a0 a1 a2 = code {
	ccall BETypeVars "II:I:I"
225
};
226
// BETypeVarListP BETypeVars (BETypeVarListP typeVarListElem,BETypeVarListP typeVarList);
227
228
229
230

BENoTypeVars :: !BackEnd -> (!BETypeVarListP,!BackEnd);
BENoTypeVars a0 = code {
	ccall BENoTypeVars ":I:I"
231
};
232
// BETypeVarListP BENoTypeVars ();
233
234
235
236

BENormalTypeNode :: !BESymbolP !BETypeArgP !BackEnd -> (!BETypeNodeP,!BackEnd);
BENormalTypeNode a0 a1 a2 = code {
	ccall BENormalTypeNode "II:I:I"
237
};
238
// BETypeNodeP BENormalTypeNode (BESymbolP symbol,BETypeArgP args);
239
240
241
242

BEAnnotateTypeNode :: !BEAnnotation !BETypeNodeP !BackEnd -> (!BETypeNodeP,!BackEnd);
BEAnnotateTypeNode a0 a1 a2 = code {
	ccall BEAnnotateTypeNode "II:I:I"
243
};
244
// BETypeNodeP BEAnnotateTypeNode (BEAnnotation annotation,BETypeNodeP typeNode);
245

246
247
248
249
250
251
BEAddForAllTypeVariables :: !BETypeVarListP !BETypeNodeP !BackEnd -> (!BETypeNodeP,!BackEnd);
BEAddForAllTypeVariables a0 a1 a2 = code {
	ccall BEAddForAllTypeVariables "II:I:I"
};
// BETypeNodeP BEAddForAllTypeVariables (BETypeVarListP vars,BETypeNodeP type);

252
253
254
BEAttributeTypeNode :: !BEAttribution !BETypeNodeP !BackEnd -> (!BETypeNodeP,!BackEnd);
BEAttributeTypeNode a0 a1 a2 = code {
	ccall BEAttributeTypeNode "II:I:I"
255
};
256
// BETypeNodeP BEAttributeTypeNode (BEAttribution attribution,BETypeNodeP typeNode);
257

258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
BEAttributeKind :: !BEAttribution !BackEnd -> (!BEAttributeKindList,!BackEnd);
BEAttributeKind a0 a1 = code {
	ccall BEAttributeKind "I:I:I"
};
// BEAttributeKindList BEAttributeKind (BEAttribution attributeKind);

BENoAttributeKinds :: !BackEnd -> (!BEAttributeKindList,!BackEnd);
BENoAttributeKinds a0 = code {
	ccall BENoAttributeKinds ":I:I"
};
// BEAttributeKindList BENoAttributeKinds ();

BEAttributeKinds :: !BEAttributeKindList !BEAttributeKindList !BackEnd -> (!BEAttributeKindList,!BackEnd);
BEAttributeKinds a0 a1 a2 = code {
	ccall BEAttributeKinds "II:I:I"
};
// BEAttributeKindList BEAttributeKinds (BEAttributeKindList elem,BEAttributeKindList list);

BEUniVarEquation :: !BEAttribution !BEAttributeKindList !BackEnd -> (!BEUniVarEquations,!BackEnd);
BEUniVarEquation a0 a1 a2 = code {
	ccall BEUniVarEquation "II:I:I"
};
// BEUniVarEquations BEUniVarEquation (BEAttribution demanded,BEAttributeKindList offered);

BENoUniVarEquations :: !BackEnd -> (!BEUniVarEquations,!BackEnd);
BENoUniVarEquations a0 = code {
	ccall BENoUniVarEquations ":I:I"
};
// BEUniVarEquations BENoUniVarEquations ();

BEUniVarEquationsList :: !BEUniVarEquations !BEUniVarEquations !BackEnd -> (!BEUniVarEquations,!BackEnd);
BEUniVarEquationsList a0 a1 a2 = code {
	ccall BEUniVarEquationsList "II:I:I"
};
// BEUniVarEquations BEUniVarEquationsList (BEUniVarEquations elem,BEUniVarEquations list);

294
295
296
BENoTypeArgs :: !BackEnd -> (!BETypeArgP,!BackEnd);
BENoTypeArgs a0 = code {
	ccall BENoTypeArgs ":I:I"
297
};
298
// BETypeArgP BENoTypeArgs ();
299
300
301
302

BETypeArgs :: !BETypeNodeP !BETypeArgP !BackEnd -> (!BETypeArgP,!BackEnd);
BETypeArgs a0 a1 a2 = code {
	ccall BETypeArgs "II:I:I"
303
};
304
// BETypeArgP BETypeArgs (BETypeNodeP node,BETypeArgP nextArgs);
305

306
307
308
BETypeAlt :: !BETypeNodeP !BETypeNodeP !BEUniVarEquations !BackEnd -> (!BETypeAltP,!BackEnd);
BETypeAlt a0 a1 a2 a3 = code {
	ccall BETypeAlt "III:I:I"
309
};
310
// BETypeAltP BETypeAlt (BETypeNodeP lhs,BETypeNodeP rhs,BEUniVarEquations attributeEquations);
311
312
313
314

BENormalNode :: !BESymbolP !BEArgP !BackEnd -> (!BENodeP,!BackEnd);
BENormalNode a0 a1 a2 = code {
	ccall BENormalNode "II:I:I"
315
};
316
// BENodeP BENormalNode (BESymbolP symbol,BEArgP args);
317
318
319
320

BEMatchNode :: !Int !BESymbolP !BENodeP !BackEnd -> (!BENodeP,!BackEnd);
BEMatchNode a0 a1 a2 a3 = code {
	ccall BEMatchNode "III:I:I"
321
};
322
// BENodeP BEMatchNode (int arity,BESymbolP symbol,BENodeP node);
323
324
325
326

BETupleSelectNode :: !Int !Int !BENodeP !BackEnd -> (!BENodeP,!BackEnd);
BETupleSelectNode a0 a1 a2 a3 = code {
	ccall BETupleSelectNode "III:I:I"
327
};
328
// BENodeP BETupleSelectNode (int arity,int index,BENodeP node);
329
330
331
332

BEIfNode :: !BENodeP !BENodeP !BENodeP !BackEnd -> (!BENodeP,!BackEnd);
BEIfNode a0 a1 a2 a3 = code {
	ccall BEIfNode "III:I:I"
333
};
334
// BENodeP BEIfNode (BENodeP cond,BENodeP then,BENodeP elsje);
335
336
337
338

BEGuardNode :: !BENodeP !BENodeDefP !BEStrictNodeIdP !BENodeP !BENodeDefP !BEStrictNodeIdP !BENodeP !BackEnd -> (!BENodeP,!BackEnd);
BEGuardNode a0 a1 a2 a3 a4 a5 a6 a7 = code {
	ccall BEGuardNode "IIIIIII:I:I"
339
};
340
// BENodeP BEGuardNode (BENodeP cond,BENodeDefP thenNodeDefs,BEStrictNodeIdP thenStricts,BENodeP then,BENodeDefP elseNodeDefs,BEStrictNodeIdP elseStricts,BENodeP elsje);
341

342
343
344
345
346
347
348
349
350
351
352
353
BESetNodeDefRefCounts :: !BENodeP !BackEnd -> BackEnd;
BESetNodeDefRefCounts a0 a1 = code {
	ccall BESetNodeDefRefCounts "I:V:I"
};
// void BESetNodeDefRefCounts (BENodeP lhs);

BEAddNodeIdsRefCounts :: !Int !BESymbolP !BENodeIdListP !BackEnd -> BackEnd;
BEAddNodeIdsRefCounts a0 a1 a2 a3 = code {
	ccall BEAddNodeIdsRefCounts "III:V:I"
};
// void BEAddNodeIdsRefCounts (int sequenceNumber,BESymbolP symbol,BENodeIdListP nodeIds);

354
355
356
357
358
359
360
361
362
363
364
365
BESwitchNode :: !BENodeIdP !BEArgP !BackEnd -> (!BENodeP,!BackEnd);
BESwitchNode a0 a1 a2 = code {
	ccall BESwitchNode "II:I:I"
};
// BENodeP BESwitchNode (BENodeIdP nodeId,BEArgP caseNode);

BECaseNode :: !Int !BESymbolP !BENodeDefP !BEStrictNodeIdP !BENodeP !BackEnd -> (!BENodeP,!BackEnd);
BECaseNode a0 a1 a2 a3 a4 a5 = code {
	ccall BECaseNode "IIIII:I:I"
};
// BENodeP BECaseNode (int symbolArity,BESymbolP symbol,BENodeDefP nodeDefs,BEStrictNodeIdP strictNodeIds,BENodeP node);

366
367
368
369
370
371
372
373
374
375
376
377
BEEnterLocalScope :: !BackEnd -> BackEnd;
BEEnterLocalScope a0 = code {
	ccall BEEnterLocalScope ":V:I"
};
// void BEEnterLocalScope ();

BELeaveLocalScope :: !BENodeP !BackEnd -> BackEnd;
BELeaveLocalScope a0 a1 = code {
	ccall BELeaveLocalScope "I:V:I"
};
// void BELeaveLocalScope (BENodeP node);

378
379
380
381
382
383
384
385
386
387
388
389
BEPushNode :: !Int !BESymbolP !BEArgP !BENodeIdListP !BackEnd -> (!BENodeP,!BackEnd);
BEPushNode a0 a1 a2 a3 a4 = code {
	ccall BEPushNode "IIII:I:I"
};
// BENodeP BEPushNode (int arity,BESymbolP symbol,BEArgP arguments,BENodeIdListP nodeIds);

BEDefaultNode :: !BENodeDefP !BEStrictNodeIdP !BENodeP !BackEnd -> (!BENodeP,!BackEnd);
BEDefaultNode a0 a1 a2 a3 = code {
	ccall BEDefaultNode "III:I:I"
};
// BENodeP BEDefaultNode (BENodeDefP nodeDefs,BEStrictNodeIdP strictNodeIds,BENodeP node);

390
391
392
BESelectorNode :: !BESelectorKind !BESymbolP !BEArgP !BackEnd -> (!BENodeP,!BackEnd);
BESelectorNode a0 a1 a2 a3 = code {
	ccall BESelectorNode "III:I:I"
393
};
394
// BENodeP BESelectorNode (BESelectorKind selectorKind,BESymbolP fieldSymbol,BEArgP args);
395
396
397
398

BEUpdateNode :: !BEArgP !BackEnd -> (!BENodeP,!BackEnd);
BEUpdateNode a0 a1 = code {
	ccall BEUpdateNode "I:I:I"
399
};
400
// BENodeP BEUpdateNode (BEArgP args);
401
402
403
404

BENodeIdNode :: !BENodeIdP !BEArgP !BackEnd -> (!BENodeP,!BackEnd);
BENodeIdNode a0 a1 a2 = code {
	ccall BENodeIdNode "II:I:I"
405
};
406
// BENodeP BENodeIdNode (BENodeIdP nodeId,BEArgP args);
407
408
409
410

BENoArgs :: !BackEnd -> (!BEArgP,!BackEnd);
BENoArgs a0 = code {
	ccall BENoArgs ":I:I"
411
};
412
// BEArgP BENoArgs ();
413
414
415
416

BEArgs :: !BENodeP !BEArgP !BackEnd -> (!BEArgP,!BackEnd);
BEArgs a0 a1 a2 = code {
	ccall BEArgs "II:I:I"
417
};
418
// BEArgP BEArgs (BENodeP node,BEArgP nextArgs);
419
420
421
422

BERuleAlt :: !Int !BENodeDefP !BENodeP !BENodeDefP !BEStrictNodeIdP !BENodeP !BackEnd -> (!BERuleAltP,!BackEnd);
BERuleAlt a0 a1 a2 a3 a4 a5 a6 = code {
	ccall BERuleAlt "IIIIII:I:I"
423
};
424
// BERuleAltP BERuleAlt (int line,BENodeDefP lhsDefs,BENodeP lhs,BENodeDefP rhsDefs,BEStrictNodeIdP lhsStrictNodeIds,BENodeP rhs);
425
426
427
428

BERuleAlts :: !BERuleAltP !BERuleAltP !BackEnd -> (!BERuleAltP,!BackEnd);
BERuleAlts a0 a1 a2 = code {
	ccall BERuleAlts "II:I:I"
429
};
430
// BERuleAltP BERuleAlts (BERuleAltP alt,BERuleAltP alts);
431
432
433
434

BENoRuleAlts :: !BackEnd -> (!BERuleAltP,!BackEnd);
BENoRuleAlts a0 = code {
	ccall BENoRuleAlts ":I:I"
435
};
436
// BERuleAltP BENoRuleAlts ();
437
438
439
440

BEDeclareNodeId :: !Int !Int !String !BackEnd -> BackEnd;
BEDeclareNodeId a0 a1 a2 a3 = code {
	ccall BEDeclareNodeId "IIS:V:I"
441
};
442
// void BEDeclareNodeId (int sequenceNumber,int lhsOrRhs,CleanString name);
443
444
445
446

BENodeId :: !Int !BackEnd -> (!BENodeIdP,!BackEnd);
BENodeId a0 a1 = code {
	ccall BENodeId "I:I:I"
447
};
448
// BENodeIdP BENodeId (int sequenceNumber);
449
450
451
452

BEWildCardNodeId :: !BackEnd -> (!BENodeIdP,!BackEnd);
BEWildCardNodeId a0 = code {
	ccall BEWildCardNodeId ":I:I"
453
};
454
// BENodeIdP BEWildCardNodeId ();
455
456
457
458

BENodeDef :: !Int !BENodeP !BackEnd -> (!BENodeDefP,!BackEnd);
BENodeDef a0 a1 a2 = code {
	ccall BENodeDef "II:I:I"
459
};
460
// BENodeDefP BENodeDef (int sequenceNumber,BENodeP node);
461
462
463
464

BENoNodeDefs :: !BackEnd -> (!BENodeDefP,!BackEnd);
BENoNodeDefs a0 = code {
	ccall BENoNodeDefs ":I:I"
465
};
466
// BENodeDefP BENoNodeDefs ();
467
468
469
470

BENodeDefs :: !BENodeDefP !BENodeDefP !BackEnd -> (!BENodeDefP,!BackEnd);
BENodeDefs a0 a1 a2 = code {
	ccall BENodeDefs "II:I:I"
471
};
472
// BENodeDefP BENodeDefs (BENodeDefP nodeDef,BENodeDefP nodeDefs);
473
474
475
476

BEStrictNodeId :: !BENodeIdP !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
BEStrictNodeId a0 a1 = code {
	ccall BEStrictNodeId "I:I:I"
477
};
478
// BEStrictNodeIdP BEStrictNodeId (BENodeIdP nodeId);
479
480
481
482

BENoStrictNodeIds :: !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
BENoStrictNodeIds a0 = code {
	ccall BENoStrictNodeIds ":I:I"
483
};
484
// BEStrictNodeIdP BENoStrictNodeIds ();
485
486
487
488

BEStrictNodeIds :: !BEStrictNodeIdP !BEStrictNodeIdP !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
BEStrictNodeIds a0 a1 a2 = code {
	ccall BEStrictNodeIds "II:I:I"
489
};
490
// BEStrictNodeIdP BEStrictNodeIds (BEStrictNodeIdP strictNodeId,BEStrictNodeIdP strictNodeIds);
491
492
493
494

BERule :: !Int !Int !BETypeAltP !BERuleAltP !BackEnd -> (!BEImpRuleP,!BackEnd);
BERule a0 a1 a2 a3 a4 = code {
	ccall BERule "IIII:I:I"
495
};
496
// BEImpRuleP BERule (int functionIndex,int isCaf,BETypeAltP type,BERuleAltP alts);
497
498
499
500

BEDeclareRuleType :: !Int !Int !String !BackEnd -> BackEnd;
BEDeclareRuleType a0 a1 a2 a3 = code {
	ccall BEDeclareRuleType "IIS:V:I"
501
};
502
// void BEDeclareRuleType (int functionIndex,int moduleIndex,CleanString name);
503
504
505
506

BEDefineRuleType :: !Int !Int !BETypeAltP !BackEnd -> BackEnd;
BEDefineRuleType a0 a1 a2 a3 = code {
	ccall BEDefineRuleType "III:V:I"
507
};
508
// void BEDefineRuleType (int functionIndex,int moduleIndex,BETypeAltP typeAlt);
509
510
511
512

BEAdjustArrayFunction :: !BEArrayFunKind !Int !Int !BackEnd -> BackEnd;
BEAdjustArrayFunction a0 a1 a2 a3 = code {
	ccall BEAdjustArrayFunction "III:V:I"
513
};
514
// void BEAdjustArrayFunction (BEArrayFunKind arrayFunKind,int functionIndex,int moduleIndex);
515
516
517
518

BENoRules :: !BackEnd -> (!BEImpRuleP,!BackEnd);
BENoRules a0 = code {
	ccall BENoRules ":I:I"
519
};
520
// BEImpRuleP BENoRules ();
521
522
523
524

BERules :: !BEImpRuleP !BEImpRuleP !BackEnd -> (!BEImpRuleP,!BackEnd);
BERules a0 a1 a2 = code {
	ccall BERules "II:I:I"
525
};
526
// BEImpRuleP BERules (BEImpRuleP rule,BEImpRuleP rules);
527
528
529
530

BETypes :: !BETypeP !BETypeP !BackEnd -> (!BETypeP,!BackEnd);
BETypes a0 a1 a2 = code {
	ccall BETypes "II:I:I"
531
};
532
// BETypeP BETypes (BETypeP type,BETypeP types);
533
534
535
536

BENoTypes :: !BackEnd -> (!BETypeP,!BackEnd);
BENoTypes a0 = code {
	ccall BENoTypes ":I:I"
537
};
538
// BETypeP BENoTypes ();
539
540
541
542

BEFlatType :: !BESymbolP !BETypeVarListP !BackEnd -> (!BEFlatTypeP,!BackEnd);
BEFlatType a0 a1 a2 = code {
	ccall BEFlatType "II:I:I"
543
};
544
// BEFlatTypeP BEFlatType (BESymbolP symbol,BETypeVarListP arguments);
545
546
547
548

BEAlgebraicType :: !BEFlatTypeP !BEConstructorListP !BackEnd -> BackEnd;
BEAlgebraicType a0 a1 a2 = code {
	ccall BEAlgebraicType "II:V:I"
549
};
550
// void BEAlgebraicType (BEFlatTypeP lhs,BEConstructorListP constructors);
551
552
553
554

BERecordType :: !Int !BEFlatTypeP !BETypeNodeP !BEFieldListP !BackEnd -> BackEnd;
BERecordType a0 a1 a2 a3 a4 = code {
	ccall BERecordType "IIII:V:I"
555
};
556
// void BERecordType (int moduleIndex,BEFlatTypeP lhs,BETypeNodeP constructorType,BEFieldListP fields);
557
558
559
560

BEAbsType :: !BEFlatTypeP !BackEnd -> BackEnd;
BEAbsType a0 a1 = code {
	ccall BEAbsType "I:V:I"
561
};
562
// void BEAbsType (BEFlatTypeP lhs);
563
564
565
566

BEConstructors :: !BEConstructorListP !BEConstructorListP !BackEnd -> (!BEConstructorListP,!BackEnd);
BEConstructors a0 a1 a2 = code {
	ccall BEConstructors "II:I:I"
567
};
568
// BEConstructorListP BEConstructors (BEConstructorListP constructor,BEConstructorListP constructors);
569
570
571
572

BENoConstructors :: !BackEnd -> (!BEConstructorListP,!BackEnd);
BENoConstructors a0 = code {
	ccall BENoConstructors ":I:I"
573
};
574
// BEConstructorListP BENoConstructors ();
575
576
577
578

BEConstructor :: !BETypeNodeP !BackEnd -> (!BEConstructorListP,!BackEnd);
BEConstructor a0 a1 = code {
	ccall BEConstructor "I:I:I"
579
};
580
// BEConstructorListP BEConstructor (BETypeNodeP type);
581
582
583
584

BEDeclareField :: !Int !Int !String !BackEnd -> BackEnd;
BEDeclareField a0 a1 a2 a3 = code {
	ccall BEDeclareField "IIS:V:I"
585
};
586
// void BEDeclareField (int fieldIndex,int moduleIndex,CleanString name);
587
588
589
590

BEField :: !Int !Int !BETypeNodeP !BackEnd -> (!BEFieldListP,!BackEnd);
BEField a0 a1 a2 a3 = code {
	ccall BEField "III:I:I"
591
};
592
// BEFieldListP BEField (int fieldIndex,int moduleIndex,BETypeNodeP type);
593
594
595
596

BEFields :: !BEFieldListP !BEFieldListP !BackEnd -> (!BEFieldListP,!BackEnd);
BEFields a0 a1 a2 = code {
	ccall BEFields "II:I:I"
597
};
598
// BEFieldListP BEFields (BEFieldListP field,BEFieldListP fields);
599
600
601
602

BENoFields :: !BackEnd -> (!BEFieldListP,!BackEnd);
BENoFields a0 = code {
	ccall BENoFields ":I:I"
603
};
604
// BEFieldListP BENoFields ();
605
606
607
608

BEDeclareConstructor :: !Int !Int !String !BackEnd -> BackEnd;
BEDeclareConstructor a0 a1 a2 a3 = code {
	ccall BEDeclareConstructor "IIS:V:I"
609
};
610
// void BEDeclareConstructor (int constructorIndex,int moduleIndex,CleanString name);
611
612
613
614

BETypeVar :: !String !BackEnd -> (!BETypeVarP,!BackEnd);
BETypeVar a0 a1 = code {
	ccall BETypeVar "S:I:I"
615
};
616
// BETypeVarP BETypeVar (CleanString name);
617
618
619
620

BEDeclareType :: !Int !Int !String !BackEnd -> BackEnd;
BEDeclareType a0 a1 a2 a3 = code {
	ccall BEDeclareType "IIS:V:I"
621
};
622
// void BEDeclareType (int typeIndex,int moduleIndex,CleanString name);
623
624
625
626

BEDeclareFunction :: !String !Int !Int !Int !BackEnd -> BackEnd;
BEDeclareFunction a0 a1 a2 a3 a4 = code {
	ccall BEDeclareFunction "SIII:V:I"
627
};
628
// void BEDeclareFunction (CleanString name,int arity,int functionIndex,int ancestor);
629
630
631
632

BECodeAlt :: !Int !BENodeDefP !BENodeP !BECodeBlockP !BackEnd -> (!BERuleAltP,!BackEnd);
BECodeAlt a0 a1 a2 a3 a4 = code {
	ccall BECodeAlt "IIII:I:I"
633
};
634
// BERuleAltP BECodeAlt (int line,BENodeDefP lhsDefs,BENodeP lhs,BECodeBlockP codeBlock);
635
636
637
638

BEString :: !String !BackEnd -> (!BEStringListP,!BackEnd);
BEString a0 a1 = code {
	ccall BEString "S:I:I"
639
};
640
// BEStringListP BEString (CleanString cleanString);
641
642
643
644

BEStrings :: !BEStringListP !BEStringListP !BackEnd -> (!BEStringListP,!BackEnd);
BEStrings a0 a1 a2 = code {
	ccall BEStrings "II:I:I"
645
};
646
// BEStringListP BEStrings (BEStringListP string,BEStringListP strings);
647
648
649
650

BENoStrings :: !BackEnd -> (!BEStringListP,!BackEnd);
BENoStrings a0 = code {
	ccall BENoStrings ":I:I"
651
};
652
// BEStringListP BENoStrings ();
653
654
655
656

BECodeParameter :: !String !BENodeIdP !BackEnd -> (!BECodeParameterP,!BackEnd);
BECodeParameter a0 a1 a2 = code {
	ccall BECodeParameter "SI:I:I"
657
};
658
// BECodeParameterP BECodeParameter (CleanString location,BENodeIdP nodeId);
659
660
661
662

BECodeParameters :: !BECodeParameterP !BECodeParameterP !BackEnd -> (!BECodeParameterP,!BackEnd);
BECodeParameters a0 a1 a2 = code {
	ccall BECodeParameters "II:I:I"
663
};
664
// BECodeParameterP BECodeParameters (BECodeParameterP parameter,BECodeParameterP parameters);
665
666
667
668

BENoCodeParameters :: !BackEnd -> (!BECodeParameterP,!BackEnd);
BENoCodeParameters a0 = code {
	ccall BENoCodeParameters ":I:I"
669
};
670
// BECodeParameterP BENoCodeParameters ();
671

672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
BENodeIdListElem :: !BENodeIdP !BackEnd -> (!BENodeIdListP,!BackEnd);
BENodeIdListElem a0 a1 = code {
	ccall BENodeIdListElem "I:I:I"
};
// BENodeIdListP BENodeIdListElem (BENodeIdP nodeId);

BENodeIds :: !BENodeIdListP !BENodeIdListP !BackEnd -> (!BENodeIdListP,!BackEnd);
BENodeIds a0 a1 a2 = code {
	ccall BENodeIds "II:I:I"
};
// BENodeIdListP BENodeIds (BENodeIdListP nid,BENodeIdListP nids);

BENoNodeIds :: !BackEnd -> (!BENodeIdListP,!BackEnd);
BENoNodeIds a0 = code {
	ccall BENoNodeIds ":I:I"
};
// BENodeIdListP BENoNodeIds ();

690
691
692
BEAbcCodeBlock :: !Bool !BEStringListP !BackEnd -> (!BECodeBlockP,!BackEnd);
BEAbcCodeBlock a0 a1 a2 = code {
	ccall BEAbcCodeBlock "II:I:I"
693
};
694
// BECodeBlockP BEAbcCodeBlock (int inline,BEStringListP instructions);
695
696
697
698

BEAnyCodeBlock :: !BECodeParameterP !BECodeParameterP !BEStringListP !BackEnd -> (!BECodeBlockP,!BackEnd);
BEAnyCodeBlock a0 a1 a2 a3 = code {
	ccall BEAnyCodeBlock "III:I:I"
699
};
700
// BECodeBlockP BEAnyCodeBlock (BECodeParameterP inParams,BECodeParameterP outParams,BEStringListP instructions);
701

702
703
704
BEDeclareIclModule :: !String !String !Int !Int !Int !Int !BackEnd -> BackEnd;
BEDeclareIclModule a0 a1 a2 a3 a4 a5 a6 = code {
	ccall BEDeclareIclModule "SSIIII:V:I"
705
};
706
// void BEDeclareIclModule (CleanString name,CleanString modificationTime,int nFunctions,int nTypes,int nConstructors,int nFields);
707

708
709
710
BEDeclareDclModule :: !Int !String !String !Bool !Int !Int !Int !Int !BackEnd -> BackEnd;
BEDeclareDclModule a0 a1 a2 a3 a4 a5 a6 a7 a8 = code {
	ccall BEDeclareDclModule "ISSIIIII:V:I"
711
};
712
// void BEDeclareDclModule (int moduleIndex,CleanString name,CleanString modificationTime,int systemModule,int nFunctions,int nTypes,int nConstructors,int nFields);
713
714
715
716

BEDeclarePredefinedModule :: !Int !Int !BackEnd -> BackEnd;
BEDeclarePredefinedModule a0 a1 a2 = code {
	ccall BEDeclarePredefinedModule "II:V:I"
717
};
718
// void BEDeclarePredefinedModule (int nTypes,int nConstructors);
719
720
721
722

BEDefineRules :: !BEImpRuleP !BackEnd -> BackEnd;
BEDefineRules a0 a1 = code {
	ccall BEDefineRules "I:V:I"
723
};
724
// void BEDefineRules (BEImpRuleP rules);
725
726
727
728

BEGenerateCode :: !String !BackEnd -> (!Bool,!BackEnd);
BEGenerateCode a0 a1 = code {
	ccall BEGenerateCode "S:I:I"
729
};
730
// int BEGenerateCode (CleanString outputFile);
731
732
733
734

BEExportType :: !Int !Int !BackEnd -> BackEnd;
BEExportType a0 a1 a2 = code {
	ccall BEExportType "II:V:I"
735
};
736
// void BEExportType (int dclTypeIndex,int iclTypeIndex);
737
738
739
740

BESwapTypes :: !Int !Int !BackEnd -> BackEnd;
BESwapTypes a0 a1 a2 = code {
	ccall BESwapTypes "II:V:I"
741
};
742
// void BESwapTypes (int frm,int to);
743
744
745
746

BEExportConstructor :: !Int !Int !BackEnd -> BackEnd;
BEExportConstructor a0 a1 a2 = code {
	ccall BEExportConstructor "II:V:I"
747
};
748
// void BEExportConstructor (int dclConstructorIndex,int iclConstructorIndex);
749
750
751
752

BEExportField :: !Int !Int !BackEnd -> BackEnd;
BEExportField a0 a1 a2 = code {
	ccall BEExportField "II:V:I"
753
};
754
// void BEExportField (int dclTypeIndex,int iclTypeIndex);
755
756
757
758

BEExportFunction :: !Int !Int !BackEnd -> BackEnd;
BEExportFunction a0 a1 a2 = code {
	ccall BEExportFunction "II:V:I"
759
};
760
// void BEExportFunction (int dclFunctionIndex,int iclFunctionIndex);
761
762
763
764

BEDefineImportedObjsAndLibs :: !BEStringListP !BEStringListP !BackEnd -> BackEnd;
BEDefineImportedObjsAndLibs a0 a1 a2 = code {
	ccall BEDefineImportedObjsAndLibs "II:V:I"
765
};
766
// void BEDefineImportedObjsAndLibs (BEStringListP objs,BEStringListP libs);
767
768
769
770

BESetMainDclModuleN :: !Int !BackEnd -> BackEnd;
BESetMainDclModuleN a0 a1 = code {
	ccall BESetMainDclModuleN "I:V:I"
771
};
772
// void BESetMainDclModuleN (int main_dcl_module_n_parameter);
773

774
775
776
777
778
779
780
781
782
783
784
785
BEStrictPositions :: !Int !BackEnd -> (!Int,!Int,!BackEnd);
BEStrictPositions a0 a1 = code {
	ccall BEStrictPositions "I:VII:I"
};
// void BEStrictPositions (int functionIndex,int* bits,int** positions);

BECopyInts :: !Int !Int !Int -> Int;
BECopyInts a0 a1 a2 = code {
	ccall BECopyInts "III:I"
};
// int BECopyInts (int cLength,int* ints,int* cleanArray);

786
787
788
BEDeclareDynamicTypeSymbol :: !Int !Int !BackEnd -> BackEnd;
BEDeclareDynamicTypeSymbol a0 a1 a2 = code {
	ccall BEDeclareDynamicTypeSymbol "II:V:I"
789
};
790
// void BEDeclareDynamicTypeSymbol (int typeIndex,int moduleIndex);
791
792
793
794

BEDynamicTempTypeSymbol :: !BackEnd -> (!BESymbolP,!BackEnd);
BEDynamicTempTypeSymbol a0 = code {
	ccall BEDynamicTempTypeSymbol ":I:I"
795
};
796
// BESymbolP BEDynamicTempTypeSymbol ();
797
kBEVersionCurrent:==0x02000800;
798
kBEVersionOldestDefinition:==0x02000213;
799
kBEVersionOldestImplementation:==0x02000216;
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
kBEDebug:==1;
kPredefinedModuleIndex:==1;
BENoAnnot:==0;
BEStrictAnnot:==1;
BENoUniAttr:==0;
BENotUniqueAttr:==1;
BEUniqueAttr:==2;
BEExistsAttr:==3;
BEUniqueVariable:==4;
BEFirstUniVarNumber:==5;
BEIntType:==0;
BEBoolType:==1;
BECharType:==2;
BERealType:==3;
BEFileType:==4;
BEStringType:==5;
BEWorldType:==6;
BEProcIdType:==7;
BERedIdType:==8;
BENrOfBasicTypes:==9;
BEIntDenot:==10;
BEBoolDenot:==11;
BECharDenot:==12;
BERealDenot:==13;
BENrOfBasicDenots:==14;
BEStringDenot:==15;
BEFunType:==16;
BEArrayType:==17;
BEStrictArrayType:==18;
BEUnboxedArrayType:==19;
BEListType:==20;
BETupleType:==21;
BEEmptyType:==22;
BEDynamicType:==23;
BENrOfPredefTypes:==24;
BETupleSymb:==25;
BEConsSymb:==26;
BENilSymb:==27;
BEApplySymb:==28;
BEIfSymb:==29;
BEFailSymb:==30;
BEAllSymb:==31;
BESelectSymb:==32;
BENrOfPredefFunsOrConses:==33;
BEDefinition:==34;
BENewSymbol:==35;
BEInstanceSymb:==36;
BEEmptySymbol:==37;
BEFieldSymbolList:==38;
BEErroneousSymb:==39;
BECreateArrayFun:==0;
BEArraySelectFun:==1;
BEUnqArraySelectFun:==2;
BEArrayUpdateFun:==3;
BEArrayReplaceFun:==4;
BEArraySizeFun:==5;
BEUnqArraySizeFun:==6;
BE_CreateArrayFun:==7;
BE_UnqArraySelectFun:==8;
BE_UnqArraySelectNextFun:==9;
BE_UnqArraySelectLastFun:==10;
BE_ArrayUpdateFun:==11;
BENoArrayFun:==12;
BESelectorDummy:==0;
BESelector:==1;
BESelector_U:==2;
BESelector_F:==3;
BESelector_L:==4;
BESelector_N:==5;
BEUpdateDummy:==0;
BEUpdate:==1;
BEUpdate_U:==2;
872
873
874
875
876
877
878
BESpecialIdentStdMisc:==0;
BESpecialIdentAbort:==1;
BESpecialIdentUndef:==2;
BESpecialIdentStdBool:==3;
BESpecialIdentAnd:==4;
BESpecialIdentOr:==5;
BESpecialIdentCount:==6;
879
880
881
882
BELhsNodeId:==0;
BERhsNodeId:==1;
BEIsNotACaf:==0;
BEIsACaf:==1;