Project

General

Profile

root / trunk / compiler / ooasCompiler / src / org / momut / ooas / codegen / ast / protobuf / AstProtoBufRecorder.java @ 12

1
/**
2
  *
3
  *                      OOAS Compiler
4
  *
5
  *       Copyright 2015, AIT Austrian Institute of Technology.
6
  * This code is based on the C# Version of the OOAS Compiler, which is
7
  * copyright 2015 by the Institute of Software Technology, Graz University
8
  * of Technology with portions copyright by the AIT Austrian Institute of
9
  * Technology. All rights reserved.
10
  *
11
  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
12
  *
13
  * If you modify the file please update the list of contributors below to in-
14
  * clude your name. Please also stick to the coding convention of using TABs
15
  * to do the basic (block-level) indentation and spaces for anything after
16
  * that. (Enable the display of special chars and it should be pretty obvious
17
  * what this means.) Also, remove all trailing whitespace.
18
  *
19
  * Contributors:
20
  *               Willibald Krenn (AIT)
21
  *               Stephan Zimmerer (AIT)
22
  *               Markus Demetz (AIT)
23
  *               Christoph Czurda (AIT)
24
  *
25
  */
26

    
27

    
28
package org.momut.ooas.codegen.ast.protobuf;
29

    
30
import org.momut.ooas.ast.expressions.ExpressionKind;
31
import org.momut.ooas.ast.identifiers.IdentifierKind;
32
import org.momut.ooas.ast.identifiers.MainModule;
33
import org.momut.ooas.ast.statements.StatementKind;
34
import org.momut.ooas.ast.types.TypeKind;
35
import org.momut.ooas.codegen.ast.IAstDuplicator;
36
import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd;
37
import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation;
38
import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions;
39
import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers;
40
import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements;
41
import org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes;
42
import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal;
43
import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall;
44
import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter;
45
import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType;
46
import org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue;
47
import org.momut.ooas.utils.exceptions.InternalCompilerException;
48

    
49
import com.google.protobuf.Message;
50

    
51

    
52
/**
53
 * INFO: Methods with return type boolean always return true. Originally the methods depended on the C++ backend
54
 * but in this approach we are independent of the backend. (The return value was discarded in the frontend anyway.)
55
 * */
56
public class AstProtoBufRecorder implements IAstDuplicator<Long> {
57

    
58
        private final PBAstTraversal.Builder m_traversal;
59
        private boolean m_initialized;
60
        private Long count = new Long(1); //IDs start with 1, so that 0 is reserved for nullptr
61

    
62
        public AstProtoBufRecorder(){
63
                m_traversal = PBAstTraversal.newBuilder();
64
        }
65

    
66
        public Message getAst(){
67
                if(!m_initialized)
68
                        throw new InternalCompilerException("No AST available. (Must set MainModule first.)");
69
                return m_traversal.build();
70
        }
71

    
72
        private PBParameter.Builder referenceParameter(Long reference){
73
                final long value = reference == null ? 0 : reference;
74
                return PBParameter.newBuilder().setUint64Value(value);
75
        }
76

    
77
        private PBParameter.Builder int32Parameter(int value){
78
                return PBParameter.newBuilder().setInt32Value(value);
79
        }
80

    
81
        private PBParameter.Builder uint32Parameter(int value){
82
                return PBParameter.newBuilder().setUint32Value(value);
83
        }
84

    
85
        private PBParameter.Builder stringParameter(String text){
86
                return PBParameter.newBuilder().setLiteralValue(text == null ? "" : text);
87
        }
88

    
89
        private PBParameter.Builder boolParameter(boolean value){
90
                return PBParameter.newBuilder().setBoolValue(value);
91
        }
92

    
93
        private PBFunctionCall.Builder unnamedCall(PBReturnValue.Builder returnValue, PBParameter.Builder ... parameters){
94
                final PBFunctionCall.Builder call = PBFunctionCall.newBuilder().setReturnValue(returnValue);
95
                for(final PBParameter.Builder p : parameters)
96
                        call.addParameters(p);
97
                return call;
98
        }
99

    
100
        private PBFunctionCall.Builder unnamedBoolCall(PBParameter.Builder ... parameters){
101
                final PBReturnValue.Builder boolType = PBReturnValue.newBuilder().setReturnType(PBReturnType.type_boolean);
102
                return unnamedCall(boolType, parameters);
103
        }
104

    
105
        private void boolCall(PBAdd name, PBParameter.Builder ... parameters){
106
                final PBFunctionCall.Builder call = unnamedBoolCall(parameters).setAdd(name);
107
                m_traversal.addCalls(call);
108
        }
109

    
110
        private void boolCall(PBIdentifiers name, PBParameter.Builder ... parameters){
111
                final PBFunctionCall.Builder call =  unnamedBoolCall(parameters).setIdentifier(name);
112
                m_traversal.addCalls(call);
113
        }
114

    
115
        private void boolCall(PBTypes name, PBParameter.Builder ... parameters){
116
                final PBFunctionCall.Builder call =  unnamedBoolCall(parameters).setType(name);
117
                m_traversal.addCalls(call);
118
        }
119

    
120
        private void boolCall(PBStatements name, PBParameter.Builder ... parameters){
121
                final PBFunctionCall.Builder call =  unnamedBoolCall(parameters).setStatement(name);
122
                m_traversal.addCalls(call);
123
        }
124

    
125
        private void boolCall(PBExpressions name, PBParameter.Builder ... parameters){
126
                final PBFunctionCall.Builder call =  unnamedBoolCall(parameters).setExpression(name);
127
                m_traversal.addCalls(call);
128
        }
129

    
130
        private Long referenceCall(PBAllocation name, PBParameter.Builder ... parameters){
131
                final PBReturnValue.Builder returnValue = PBReturnValue.newBuilder()
132
                                .setReturnType(PBReturnType.type_voidPointer).setReturnId(count);
133
                final PBFunctionCall.Builder call = unnamedCall(returnValue, parameters).setAllocate(name);
134
                m_traversal.addCalls(call);
135
                return count++;
136
        }
137

    
138
        @Override
139
        public Long createIdentifier(IdentifierKind kind, int subOrd) {
140
                // DLL void* TIRESIAS_CREATE_IDENTIFIER(void* context, std::int32_t ordinal, std::int32_t subOrd);
141
                final PBParameter.Builder kindBuilder = int32Parameter(kind.integerValue);
142
                final PBParameter.Builder subOrdBuilder = int32Parameter(subOrd);
143
                return referenceCall(PBAllocation.TIRESIAS_CREATE_IDENTIFIER, kindBuilder, subOrdBuilder);
144
        }
145

    
146
        @Override
147
        public Long createType(TypeKind kind) {
148
                // DLL void* TIRESIAS_CREATE_TYPE(void* context, std::int32_t ordinal);
149
                final PBParameter.Builder kindBuilder = PBParameter.newBuilder().setInt32Value(kind.integerValue);
150
                return referenceCall(PBAllocation.TIRESIAS_CREATE_TYPE, kindBuilder);
151
        }
152

    
153
        @Override
154
        public Long createExpression(ExpressionKind kind, int subOrd) {
155
                // DLL void* TIRESIAS_CREATE_EXPRESSION(void* context, std::int32_t ordinal, std::int32_t subOrd);
156
                final PBParameter.Builder kindBuilder = PBParameter.newBuilder().setInt32Value(kind.integerValue);
157
                final PBParameter.Builder subOrdBuilder = PBParameter.newBuilder().setInt32Value(subOrd);
158
                return referenceCall(PBAllocation.TIRESIAS_CREATE_EXPRESSION, kindBuilder, subOrdBuilder);
159
        }
160

    
161
        @Override
162
        public Long createStatement(StatementKind kind) {
163
                // DLL void* TIRESIAS_CREATE_STATEMENT(void* context, std::int32_t ordinal);
164
                final PBParameter.Builder kindBuilder = PBParameter.newBuilder().setInt32Value(kind.integerValue);
165
                return referenceCall(PBAllocation.TIRESIAS_CREATE_STATEMENT, kindBuilder);
166
        }
167

    
168
        @Override
169
        public Long createActionSystemInstance() {
170
                // DLL void* TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE(void* context);
171
                return referenceCall(PBAllocation.TIRESIAS_CREATE_ACTIONSYSTEMINSTANCE);
172
        }
173

    
174
        @Override
175
        public Long createSymbolTable() {
176
                // DLL void* TIRESIAS_CREATE_SYMBTAB(void* context);
177
                return referenceCall(PBAllocation.TIRESIAS_CREATE_SYMBTAB);
178
        }
179

    
180
        @Override
181
        public Long createParameterList() {
182
                // DLL void* TIRESIAS_CREATE_PARAMLIST(void* context);
183
                return referenceCall(PBAllocation.TIRESIAS_CREATE_PARAMLIST);
184
        }
185

    
186
        @Override
187
        public Long createTypeList() {
188
                // DLL void* TIRESIAS_CREATE_TYPELIST(void* context);
189
                return referenceCall(PBAllocation.TIRESIAS_CREATE_TYPELIST);
190
        }
191

    
192
        @Override
193
        public Long createActionSystemInstanceList() {
194
                // DLL void* TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST(void* context);
195
                return referenceCall(PBAllocation.TIRESIAS_CREATE_ACTIONSYSTEMINSTANCELIST);
196
        }
197

    
198
        @Override
199
        public Long createStatementList() {
200
                // DLL void* TIRESIAS_CREATE_STATEMENTLIST(void* context);
201
                return referenceCall(PBAllocation.TIRESIAS_CREATE_STATEMENTLIST);
202
        }
203

    
204
        @Override
205
        public Long createExpressionList() {
206
                // DLL void* TIRESIAS_CREATE_EXPRESSIONLIST(void* context);
207
                return referenceCall(PBAllocation.TIRESIAS_CREATE_EXPRESSIONLIST);
208
        }
209

    
210
        @Override
211
        public Long createIdentifierList() {
212
                // DLL void* TIRESIAS_CREATE_IDENTIFIERLIST(void* context);
213
                return referenceCall(PBAllocation.TIRESIAS_CREATE_IDENTIFIERLIST);
214
        }
215

    
216
        @Override
217
        public Long castToIScope(Long input) {
218
                // DLL void* TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE(void* context, void* astelement);
219
                final PBParameter.Builder inputBuilder = PBParameter.newBuilder().setUint64Value(input);
220
                return referenceCall(PBAllocation.TIRESIAS_CAST_ASTELEMENT_TO_ISCOPE, inputBuilder);
221
        }
222

    
223
        @Override
224
        public boolean addIdentifierToSymbolTable(Long symbolTable, Long identifier) {
225
                // DLL bool TIRESIAS_ADD_IDTOSYMBTAB(void* context, void* symbolTable, void* identifier);
226
                boolCall(PBAdd.TIRESIAS_ADD_IDTOSYMBTAB
227
                                , referenceParameter(symbolTable)
228
                                , referenceParameter(identifier));
229
                return true;
230
        }
231

    
232
        @Override
233
        public boolean addParameterIdentifierToList(Long parameterList, Long param) {
234
                // DLL bool TIRESIAS_ADD_PARAMTOLIST(void* context, void* parameterList, void* par);
235
                boolCall(PBAdd.TIRESIAS_ADD_PARAMTOLIST
236
                                , referenceParameter(parameterList)
237
                                , referenceParameter(param));
238
                return true;
239
        }
240

    
241
        @Override
242
        public boolean addTypeToList(Long typeList, Long type) {
243
                // DLL bool TIRESIAS_ADD_TYPETOLIST(void* context, void* typeList, void* type);
244
                boolCall(PBAdd.TIRESIAS_ADD_TYPETOLIST
245
                                , referenceParameter(typeList)
246
                                , referenceParameter(type));
247
                return true;
248
        }
249

    
250
        @Override
251
        public boolean addActionSystemInstanceToList(Long objectsList, Long instanceRef) {
252
                // DLL bool TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST(void* context, void* objectsList, void* instanceRef);
253
                boolCall(PBAdd.TIRESIAS_ADD_ACTIONSYSTEMINSTANCETOLIST
254
                                , referenceParameter(objectsList)
255
                                , referenceParameter(instanceRef));
256
                return true;
257
        }
258

    
259
        @Override
260
        public boolean addIdentifierToBlock(Long idBlock, Long idRef) {
261
                // DLL bool TIRESIAS_ADD_IDENTIFIERTOBLOCK(void* context, void* idList, void* idRef);
262
                boolCall(PBAdd.TIRESIAS_ADD_IDENTIFIERTOBLOCK
263
                                , referenceParameter(idBlock)
264
                                , referenceParameter(idRef));
265
                return true;
266
        }
267

    
268
        @Override
269
        public boolean addStatementToList(Long stmtList, Long stmntRef) {
270
                // DLL bool TIRESIAS_ADD_STATEMENTTOLIST(void* context, void* stmtList, void* stmntRef);
271
                boolCall(PBAdd.TIRESIAS_ADD_STATEMENTTOLIST
272
                                , referenceParameter(stmtList)
273
                                , referenceParameter(stmntRef));
274
                return true;
275
        }
276

    
277
        @Override
278
        public boolean addExpressionToList(Long exprList, Long exprRef) {
279
                // DLL bool TIRESIAS_ADD_EXPRESSIONTOLIST(void* context, void* exprList, void* exprRef);
280
                boolCall(PBAdd.TIRESIAS_ADD_EXPRESSIONTOLIST
281
                                , referenceParameter(exprList)
282
                                , referenceParameter(exprRef));
283
                return true;
284
        }
285

    
286
        @Override
287
        public boolean addIdentifierToList(Long idList, Long idRef) {
288
                // DLL bool TIRESIAS_ADD_IDENTIFIERTOLIST(void* context, void* idList, void* idRef);
289
                boolCall(PBAdd.TIRESIAS_ADD_IDENTIFIERTOLIST
290
                                , referenceParameter(idList)
291
                                , referenceParameter(idRef));
292
                return true;
293
        }
294

    
295
        @Override
296
        public boolean initEnumIdentifier(Long enumId, int line, int col,
297
                        String text, Long scopeRef, Long typeRef, boolean haveValue,
298
                        int value) {
299
//                DLL bool TIRESIAS_INIT_ENUMIDENTIFIER(void* context,
300
//                                void* enumId, std::int32_t line, std::int32_t col, const char* text,
301
//                                void* scopeRef, void* typeRef, bool haveValue, std::int32_t value);
302
                boolCall(PBIdentifiers.TIRESIAS_INIT_ENUMIDENTIFIER
303
                                , referenceParameter(enumId)
304
                                , int32Parameter(line)
305
                                , int32Parameter(col)
306
                                , stringParameter(text)
307
                                , referenceParameter(scopeRef)
308
                                , referenceParameter(typeRef)
309
                                , boolParameter(haveValue)
310
                                , int32Parameter(value));
311
                return true;
312
        }
313

    
314
        @Override
315
        public boolean initConstantIdentifier(Long constId, int line, int col,
316
                        String text, Long scopeRef, Long typeRef, Long valueRef) {
317
//                DLL bool TIRESIAS_INIT_CONSTIDENTIFIER(void* context,
318
//                                void* constId, std::int32_t line, std::int32_t col, const char* text,
319
//                                void* scopeRef, void* typeRef, void* valueRef);
320

    
321
                boolCall(PBIdentifiers.TIRESIAS_INIT_CONSTIDENTIFIER
322
                                , referenceParameter(constId)
323
                                , int32Parameter(line)
324
                                , int32Parameter(col)
325
                                , stringParameter(text)
326
                                , referenceParameter(scopeRef)
327
                                , referenceParameter(typeRef)
328
                                , referenceParameter(valueRef));
329
                return true;
330
        }
331

    
332
        @Override
333
        public boolean initAttributeIdentifier(Long attrId, int line, int col,
334
                        String text, Long scopeRef, Long typeRef, Long initRef,
335
                        boolean isStatic, boolean isControllable, boolean isObservable) {
336
//                DLL bool TIRESIAS_INIT_ATTRIDENTIFIER(void* context,
337
//                                void* attrId, std::int32_t line, std::int32_t col, const char* text,
338
//                                void* scopeRef, void* typeRef, void* initRef,
339
//                                bool isStatic, bool isControllable, bool isObservable);
340

    
341
                boolCall(PBIdentifiers.TIRESIAS_INIT_ATTRIDENTIFIER
342
                                , referenceParameter(attrId)
343
                                , int32Parameter(line)
344
                                , int32Parameter(col)
345
                                , stringParameter(text)
346
                                , referenceParameter(scopeRef)
347
                                , referenceParameter(typeRef)
348
                                , referenceParameter(initRef)
349
                                , boolParameter(isStatic)
350
                                , boolParameter(isControllable)
351
                                , boolParameter(isObservable));
352
                return true;
353
        }
354

    
355
        @Override
356
        public boolean initExprVarIdentifier(Long exprVarId, int line, int col,
357
                        String text, Long scopeRef, Long typeRef, boolean initialized) {
358

    
359
//                DLL bool TIRESIAS_INIT_EXPRVARIDENTIFIER(void* context,
360
//                                void* exprVarId, std::int32_t line, std::int32_t col, const char* text,
361
//                                void* scopeRef, void* typeRef, bool initialized);
362

    
363
                boolCall(PBIdentifiers.TIRESIAS_INIT_EXPRVARIDENTIFIER
364
                                , referenceParameter(exprVarId)
365
                                , int32Parameter(line)
366
                                , int32Parameter(col)
367
                                , stringParameter(text)
368
                                , referenceParameter(scopeRef)
369
                                , referenceParameter(typeRef)
370
                                , boolParameter(initialized));
371
                return true;
372
        }
373

    
374
        @Override
375
        public boolean initParamIdentifier(Long paramId, int line, int column,
376
                        String text, Long scopeRef, Long typeRef) {
377

    
378
//                DLL bool TIRESIAS_INIT_PARAMIDENTIFIER(void* context,
379
//                                void* paramId, std::int32_t line, std::int32_t column, const char* text,
380
//                                void* scopeRef, void* typeRef);
381

    
382
                boolCall(PBIdentifiers.TIRESIAS_INIT_PARAMIDENTIFIER
383
                                , referenceParameter(paramId)
384
                                , int32Parameter(line)
385
                                , int32Parameter(column)
386
                                , stringParameter(text)
387
                                , referenceParameter(scopeRef)
388
                                , referenceParameter(typeRef));
389
                return true;
390
        }
391

    
392
        @Override
393
        public boolean initLocalVarIdentifier(Long locVarId, int line, int column,
394
                        String text, Long scopeRef, Long typeRef) {
395

    
396
//                DLL bool TIRESIAS_INIT_LOCVARIDENTIFIER(void* context,
397
//                                void* locVarId, std::int32_t line, std::int32_t column, const char* text,
398
//                                void* scopeRef, void* typeRef);
399

    
400
                boolCall(PBIdentifiers.TIRESIAS_INIT_LOCVARIDENTIFIER
401
                                , referenceParameter(locVarId)
402
                                , int32Parameter(line)
403
                                , int32Parameter(column)
404
                                , stringParameter(text)
405
                                , referenceParameter(scopeRef)
406
                                , referenceParameter(typeRef));
407
                return true;
408
        }
409

    
410
        @Override
411
        public boolean initTypeIdentifier(Long typeId, int line, int column,
412
                        String text, Long scopeRef, Long typeRef, String prefix) {
413

    
414
//                DLL bool TIRESIAS_INIT_TYPEIDENTIFIER(void* context,
415
//                                void* typeId, std::int32_t line, std::int32_t column, const char* text,
416
//                                void* scopeRef, void* typeRef, const char* prefix);
417

    
418
                boolCall(PBIdentifiers.TIRESIAS_INIT_TYPEIDENTIFIER
419
                                , referenceParameter(typeId)
420
                                , int32Parameter(line)
421
                                , int32Parameter(column)
422
                                , stringParameter(text)
423
                                , referenceParameter(scopeRef)
424
                                , referenceParameter(typeRef)
425
                                , stringParameter(prefix));
426
                return true;
427
        }
428

    
429
        @Override
430
        public boolean initSelfIdentifier(Long typeId, int line, int column,
431
                        String text, Long scopeRef, Long typeRef, String prefix) {
432

    
433
//                DLL bool TIRESIAS_INIT_SELFIDENTIFIER(void* context,
434
//                                void* typeId, std::int32_t line, std::int32_t column, const char* text,
435
//                                void* scopeRef, void* typeRef, const char* prefix);
436

    
437
                boolCall(PBIdentifiers.TIRESIAS_INIT_SELFIDENTIFIER
438
                                , referenceParameter(typeId)
439
                                , int32Parameter(line)
440
                                , int32Parameter(column)
441
                                , stringParameter(text)
442
                                , referenceParameter(scopeRef)
443
                                , referenceParameter(typeRef)
444
                                , stringParameter(prefix));
445
                return true;
446
        }
447

    
448
        @Override
449
        public boolean initMethodIdentifier(Long methodId, int line, int column,
450
                        String text, Long scopeRef, Long typeRef, String prefix,
451
                        Long parameterListRef, Long symbolTableRef, Long bodyRef) {
452

    
453
//                DLL bool TIRESIAS_INIT_METHODIDENTIFIER(void* context,
454
//                                void* methodId, std::int32_t line, std::int32_t column, const char* text,
455
//                                void* scopeRef, void* typeRef, const char* prefix, void* parameterListRef,
456
//                                void* symbolTableRef, void* bodyRef);
457

    
458
                boolCall(PBIdentifiers.TIRESIAS_INIT_METHODIDENTIFIER
459
                                , referenceParameter(methodId)
460
                                , int32Parameter(line)
461
                                , int32Parameter(column)
462
                                , stringParameter(text)
463
                                , referenceParameter(scopeRef)
464
                                , referenceParameter(typeRef)
465
                                , stringParameter(prefix)
466
                                , referenceParameter(parameterListRef)
467
                                , referenceParameter(symbolTableRef)
468
                                , referenceParameter(bodyRef));
469
                return true;
470
        }
471

    
472
        @Override
473
        public boolean initModule(Long moduleId, int line, int column, String text,
474
                        Long scopeRef, Long typeRef, String prefix, Long symTabRef) {
475

    
476
//                DLL bool TIRESIAS_INIT_MODULE(void* context, void* moduleId,
477
//                                int line, int column, const char* text, void* scopeRef,
478
//                                void* typeRef, const char* prefix, void* symTabRef);
479

    
480
                boolCall(PBIdentifiers.TIRESIAS_INIT_MODULE
481
                                , referenceParameter(moduleId)
482
                                , int32Parameter(line)
483
                                , int32Parameter(column)
484
                                , stringParameter(text)
485
                                , referenceParameter(scopeRef)
486
                                , referenceParameter(typeRef)
487
                                , stringParameter(prefix)
488
                                , referenceParameter(symTabRef));
489
                return true;
490
        }
491

    
492
        @Override
493
        public boolean initMainModule(Long moduleId, int line, int column,
494
                        String text, Long scopeRef, Long typeRef, String prefix,
495
                        Long symTabRef, Long identifierListRef) {
496

    
497
//                DLL bool TIRESIAS_INIT_MAINMODULE(void* context,
498
//                                void* moduleId, int line, int column, const char* text,
499
//                                void* scopeRef, void* typeRef, const char* prefix,
500
//                                void* symTabRef, void* identifierListRef);
501

    
502
                boolCall(PBIdentifiers.TIRESIAS_INIT_MAINMODULE
503
                                , referenceParameter(moduleId)
504
                                , int32Parameter(line)
505
                                , int32Parameter(column)
506
                                , stringParameter(text)
507
                                , referenceParameter(scopeRef)
508
                                , referenceParameter(typeRef)
509
                                , stringParameter(prefix)
510
                                , referenceParameter(symTabRef)
511
                                , referenceParameter(identifierListRef));
512
                return true;
513
        }
514

    
515
        @Override
516
        public boolean initIntType(Long typeId, Long identifierRef,
517
                        boolean anonymousType, int low, int high) {
518

    
519
//                DLL bool TIRESIAS_INIT_INTTYPE(void* context, void* typeId,
520
//                                void* identifierRef, bool anonymousType, std::int32_t low,
521
//                                std::int32_t high);
522

    
523
                boolCall(PBTypes.TIRESIAS_INIT_INTTYPE
524
                                , referenceParameter(typeId)
525
                                , referenceParameter(identifierRef)
526
                                , boolParameter(anonymousType)
527
                                , int32Parameter(low)
528
                                , int32Parameter(high));
529
                return true;
530
        }
531

    
532
        @Override
533
        public boolean initBoolType(Long typeId, Long identifierRef,
534
                        boolean anonymousType) {
535

    
536
//                DLL bool TIRESIAS_INIT_BOOLTYPE(void* context, void* typeId,
537
//                                void* identifierRef, bool anonymousType);
538

    
539
                boolCall(PBTypes.TIRESIAS_INIT_BOOLTYPE
540
                                , referenceParameter(typeId)
541
                                , referenceParameter(identifierRef)
542
                                , boolParameter(anonymousType));
543
                return true;
544
        }
545

    
546
        @Override
547
        public boolean initValuedEnumType(Long typeId, Long identifierRef,
548
                        boolean anonymousType, Long symTabRef, Long intTypeRef) {
549

    
550
//                DLL bool TIRESIAS_INIT_VALUEDENUMTYPE(void* context,
551
//                                void* typeId, void* identifierRef,
552
//                                bool anonymousType, void* symTabRef, void* intTypeRef);
553

    
554
                boolCall(PBTypes.TIRESIAS_INIT_VALUEDENUMTYPE
555
                                , referenceParameter(typeId)
556
                                , referenceParameter(identifierRef)
557
                                , boolParameter(anonymousType)
558
                                , referenceParameter(symTabRef)
559
                                , referenceParameter(intTypeRef));
560
                return true;
561
        }
562

    
563
        @Override
564
        public boolean initEnumType(Long typeId, Long identifierRef,
565
                        boolean anonymousType, Long symTabRef) {
566

    
567
//                DLL bool TIRESIAS_INIT_ENUMTYPE(void* context, void* typeId,
568
//                                void* identifierRef, bool anonymousType,
569
//                                void* symTabRef);
570

    
571
                boolCall(PBTypes.TIRESIAS_INIT_ENUMTYPE
572
                                , referenceParameter(typeId)
573
                                , referenceParameter(identifierRef)
574
                                , boolParameter(anonymousType)
575
                                , referenceParameter(symTabRef));
576
                return true;
577
        }
578

    
579
        @Override
580
        public boolean initListType(Long typeId, Long identifierRef,
581
                        boolean anonymousType, Long innerTypeRef, int maxNumberOfElements) {
582

    
583
//                DLL bool TIRESIAS_INIT_LISTTYPE(void* context, void* typeId,
584
//                                void* identifierRef, bool anonymousType,
585
//                                void* innerTypeRef, std::uint32_t maxNumberOfElements);
586

    
587
                boolCall(PBTypes.TIRESIAS_INIT_LISTTYPE
588
                                , referenceParameter(typeId)
589
                                , referenceParameter(identifierRef)
590
                                , boolParameter(anonymousType)
591
                                , referenceParameter(innerTypeRef)
592
                                , uint32Parameter(maxNumberOfElements));
593
                return true;
594
        }
595

    
596
        @Override
597
        public boolean initMetaType(Long typeId, Long identifierRef,
598
                        boolean anonymousType, Long innerTypeRef) {
599

    
600
//                DLL bool TIRESIAS_INIT_METATYPE(void* context, void* typeId,
601
//                void* identifierRef, bool anonymousType,
602
//                void* innerTypeRef);
603
                boolCall(PBTypes.TIRESIAS_INIT_METATYPE
604
                                , referenceParameter(typeId)
605
                                , referenceParameter(identifierRef)
606
                                , boolParameter(anonymousType)
607
                                , referenceParameter(innerTypeRef));
608

    
609
                return true;
610
        }
611

    
612
        @Override
613
        public boolean initTupleType(Long typeId, Long identifierRef,
614
                        boolean anonymousType, Long typeListRef) {
615

    
616
//                DLL bool TIRESIAS_INIT_TUPLETYPE(void* context, void* typeId,
617
//                                void* identifierRef, bool anonymousType,
618
//                                void* typeListRef);
619

    
620
                boolCall(PBTypes.TIRESIAS_INIT_TUPLETYPE
621
                                , referenceParameter(typeId)
622
                                , referenceParameter(identifierRef)
623
                                , boolParameter(anonymousType)
624
                                , referenceParameter(typeListRef));
625
                return true;
626
        }
627

    
628
        @Override
629
        public boolean initFunctionType(Long typeId, Long identifierRef,
630
                        boolean anonymousType, Long paramTypeListRef, Long returnTypeRef,
631
                        int functionKind, boolean isPure) {
632

    
633
//                DLL bool TIRESIAS_INIT_FUNCTIONTYPE(void* context,
634
//                                void* typeId, void* identifierRef,
635
//                                bool anonymousType, void* paramTypeListRef,
636
//                                void* returnTypeRef, std::int32_t functionKind, bool isPure);
637

    
638
                boolCall(PBTypes.TIRESIAS_INIT_FUNCTIONTYPE
639
                                , referenceParameter(typeId)
640
                                , referenceParameter(identifierRef)
641
                                , boolParameter(anonymousType)
642
                                , referenceParameter(paramTypeListRef)
643
                                , referenceParameter(returnTypeRef)
644
                                , int32Parameter(functionKind)
645
                                , boolParameter(isPure));
646
                return true;
647
        }
648

    
649
        @Override
650
        public boolean initActionSystemInstance(Long instance, Long typeRef,
651
                        String name, int numOfCreatedObjs, Long parentInstanceRef) {
652

    
653
//                DLL bool TIRESIAS_INIT_ACTIONSYSTEMINSTANCE(void* context,
654
//                                void* instance, void* typeRef, const char* name,
655
//                                std::int32_t numOfCreatedObjs, void* parentInstanceRef);
656

    
657
                boolCall(PBTypes.TIRESIAS_INIT_ACTIONSYSTEMINSTANCE
658
                                , referenceParameter(instance)
659
                                , referenceParameter(typeRef)
660
                                , stringParameter(name)
661
                                , int32Parameter(numOfCreatedObjs)
662
                                , referenceParameter(parentInstanceRef));
663
                return true;
664
        }
665

    
666
        @Override
667
        public boolean initActionSystemType(Long typeId, Long identifierRef,
668
                        boolean anonymousType, Long baseTypeRef, Long parentScopeRef,
669
                        Long doOdBlockRef, Long symTab, Long objectsListRef,
670
                        Long derivedObjectsListRef, boolean autoConstruction,
671
                        boolean isInSystemDescription) {
672

    
673
//                DLL bool TIRESIAS_INIT_ACTIONSYSTEMTYPE(void* context,
674
//                                void* typeId, void* identifierRef,
675
//                                bool anonymousType, void* baseTypeRef,
676
//                                void* parentScopeRef, void* doOdBlockRef,
677
//                                void* symTab, void* objectsListRef,
678
//                                void* derivedObjectsListRef, bool autoConstruction,
679
//                                bool isInSystemDescription);
680

    
681
                boolCall(PBTypes.TIRESIAS_INIT_ACTIONSYSTEMTYPE
682
                                , referenceParameter(typeId)
683
                                , referenceParameter(identifierRef)
684
                                , boolParameter(anonymousType)
685
                                , referenceParameter(baseTypeRef)
686
                                , referenceParameter(parentScopeRef)
687
                                , referenceParameter(doOdBlockRef)
688
                                , referenceParameter(symTab)
689
                                , referenceParameter(objectsListRef)
690
                                , referenceParameter(derivedObjectsListRef)
691
                                , boolParameter(autoConstruction)
692
                                , boolParameter(isInSystemDescription));
693
                return true;
694
        }
695

    
696
        @Override
697
        public boolean initNullType(Long typeId, Long identifierRef, boolean anonymousType) {
698

    
699
//                DLL bool TIRESIAS_INIT_NULLTYPE(void* context, void* typeId,
700
//                                void* identifierRef, bool anonymousType);
701

    
702
                boolCall(PBTypes.TIRESIAS_INIT_NULLTYPE
703
                                , referenceParameter(typeId)
704
                                , referenceParameter(identifierRef)
705
                                , boolParameter(anonymousType));
706
                return true;
707
        }
708

    
709
        @Override
710
        public boolean initSkipStatement(Long stmnt, int line, int col) {
711

    
712
//                DLL bool TIRESIAS_INIT_SKIP(void* context, void* stmnt,
713
//                                std::int32_t line, std::int32_t col);
714

    
715
                boolCall(PBStatements.TIRESIAS_INIT_SKIP
716
                                , referenceParameter(stmnt)
717
                                , int32Parameter(line)
718
                                , int32Parameter(col));
719
                return true;
720
        }
721

    
722
        @Override
723
        public boolean initBreakStatement(Long stmnt, int line, int col) {
724

    
725
//                DLL bool TIRESIAS_INIT_BREAK(void* context, void* stmnt,
726
//                                std::int32_t line, std::int32_t col);
727

    
728
                boolCall(PBStatements.TIRESIAS_INIT_BREAK
729
                                , referenceParameter(stmnt)
730
                                , int32Parameter(line)
731
                                , int32Parameter(col));
732
                return true;
733
        }
734

    
735
        @Override
736
        public boolean initAbortStatement(Long stmnt, int line, int col) {
737

    
738
//                DLL bool TIRESIAS_INIT_ABORT(void* context, void* stmnt,
739
//                                std::int32_t line, std::int32_t col);
740

    
741
                boolCall(PBStatements.TIRESIAS_INIT_ABORT
742
                                , referenceParameter(stmnt)
743
                                , int32Parameter(line)
744
                                , int32Parameter(col));
745
                return true;
746
        }
747

    
748
        @Override
749
        public boolean initNondetBlock(Long block, int line, int col,
750
                        Long symTabRef, Long stmtListRef, Long scopeRef) {
751

    
752
//                DLL bool TIRESIAS_INIT_NONDETBLOCK(void* context, void* block,
753
//                                std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
754
//                                void* scopeRef);
755

    
756
                boolCall(PBStatements.TIRESIAS_INIT_NONDETBLOCK
757
                                , referenceParameter(block)
758
                                , int32Parameter(line)
759
                                , int32Parameter(col)
760
                                , referenceParameter(symTabRef)
761
                                , referenceParameter(stmtListRef)
762
                                , referenceParameter(scopeRef));
763
                return true;
764
        }
765

    
766
        @Override
767
        public boolean initSeqBlock(Long block, int line, int col, Long symTabRef,
768
                        Long stmtListRef, Long scopeRef, Long filterExprRef) {
769

    
770
//                DLL bool TIRESIAS_INIT_SEQBLOCK(void* context, void* block,
771
//                                std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
772
//                                void* scopeRef, void* filterExprRef);
773

    
774
                boolCall(PBStatements.TIRESIAS_INIT_SEQBLOCK
775
                                , referenceParameter(block)
776
                                , int32Parameter(line)
777
                                , int32Parameter(col)
778
                                , referenceParameter(symTabRef)
779
                                , referenceParameter(stmtListRef)
780
                                , referenceParameter(scopeRef)
781
                                , referenceParameter(filterExprRef));
782
                return true;
783
        }
784

    
785
        @Override
786
        public boolean initPrioBlock(Long block, int line, int col, Long symTabRef,
787
                        Long stmtListRef, Long scopeRef) {
788

    
789
//                DLL bool TIRESIAS_INIT_PRIOBLOCK(void* context, void* block,
790
//                                std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
791
//                                void* scopeRef);
792

    
793
                boolCall(PBStatements.TIRESIAS_INIT_PRIOBLOCK
794
                                , referenceParameter(block)
795
                                , int32Parameter(line)
796
                                , int32Parameter(col)
797
                                , referenceParameter(symTabRef)
798
                                , referenceParameter(stmtListRef)
799
                                , referenceParameter(scopeRef));
800
                return true;
801
        }
802

    
803
        @Override
804
        public boolean initGuardedCommand(Long stmt, int line, int pos,
805
                        Long scopeRef, Long guardExprRef, Long bodyRef) {
806

    
807
//                DLL bool TIRESIAS_INIT_GUARDEDCOMMAND(void* context,
808
//                                void* stmt, std::int32_t line, std::int32_t pos, void* scopeRef,
809
//                                void* guardExprRef, void* bodyRef);
810

    
811
                boolCall(PBStatements.TIRESIAS_INIT_GUARDEDCOMMAND
812
                                , referenceParameter(stmt)
813
                                , int32Parameter(line)
814
                                , int32Parameter(pos)
815
                                , referenceParameter(scopeRef)
816
                                , referenceParameter(guardExprRef)
817
                                , referenceParameter(bodyRef));
818
                return true;
819
        }
820

    
821
        @Override
822
        public boolean initAssignment(Long stmt, int line, int pos, Long scopeRef,
823
                        Long nonDetExprRef, Long placeExprListRef, Long valueExprListRef,
824
                        Long symTabRef) {
825

    
826
//                DLL bool TIRESIAS_INIT_ASSIGNMENT(void* context, void* stmt,
827
//                                std::int32_t line, std::int32_t pos, void* scopeRef, void* nonDetExprRef,
828
//                                void* placeExprListRef, void* valueExprListRef,
829
//                                void* symTabRef);
830

    
831
                boolCall(PBStatements.TIRESIAS_INIT_ASSIGNMENT
832
                                , referenceParameter(stmt)
833
                                , int32Parameter(line)
834
                                , int32Parameter(pos)
835
                                , referenceParameter(scopeRef)
836
                                , referenceParameter(nonDetExprRef)
837
                                , referenceParameter(placeExprListRef)
838
                                , referenceParameter(valueExprListRef)
839
                                , referenceParameter(symTabRef));
840
                return true;
841
        }
842

    
843
        @Override
844
        public boolean initCall(Long stmt, int line, int pos, Long callExprRef) {
845

    
846
//                DLL bool TIRESIAS_INIT_CALL(void* context, void* stmt,
847
//                                std::int32_t line, std::int32_t pos, void* callExprRef);
848

    
849
                boolCall(PBStatements.TIRESIAS_INIT_CALL
850
                                , referenceParameter(stmt)
851
                                , int32Parameter(line)
852
                                , int32Parameter(pos)
853
                                , referenceParameter(callExprRef));
854
                return true;
855
        }
856

    
857
        @Override
858
        public boolean initTypeExpression(Long expr, int line, int pos,
859
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, Long referredTypeRef) {
860

    
861
//                DLL bool TIRESIAS_INIT_TYPEEXPRESSION(void* context,
862
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
863
//                                void* callTargetsIdentifierListRef, void* symbTabRef, void* referredTypeRef);
864

    
865
                boolCall(PBExpressions.TIRESIAS_INIT_TYPEEXPRESSION
866
                                , referenceParameter(expr)
867
                                , int32Parameter(line)
868
                                , int32Parameter(pos)
869
                                , referenceParameter(typeRef)
870
                                , referenceParameter(callTargetsIdentifierListRef)
871
                                , referenceParameter(symbTabRef)
872
                                , referenceParameter(referredTypeRef));
873
                return true;
874
        }
875

    
876
        @Override
877
        public boolean initIdentifierExpression(Long expr, int line, int pos,
878
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
879
                        Long identifierRef, boolean isSelf) {
880

    
881
//                DLL bool TIRESIAS_INIT_IDENTIFIEREXPRESSION(void* context,
882
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
883
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
884
//                                void* identifierRef, bool isSelf);
885

    
886
                boolCall(PBExpressions.TIRESIAS_INIT_IDENTIFIEREXPRESSION
887
                                , referenceParameter(expr)
888
                                , int32Parameter(line)
889
                                , int32Parameter(pos)
890
                                , referenceParameter(typeRef)
891
                                , referenceParameter(callTargetsIdentifierListRef)
892
                                , referenceParameter(symbTabRef)
893
                                , referenceParameter(identifierRef)
894
                                , boolParameter(isSelf));
895
                return true;
896
        }
897

    
898
        @Override
899
        public boolean initUnaryExpression(Long expr, int line, int pos,
900
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
901
                        Long child) {
902

    
903
//                DLL bool TIRESIAS_INIT_UNARYEXPRESSION(void* context,
904
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
905
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
906
//                                void* child);
907

    
908
                boolCall(PBExpressions.TIRESIAS_INIT_UNARYEXPRESSION
909
                                , referenceParameter(expr)
910
                                , int32Parameter(line)
911
                                , int32Parameter(pos)
912
                                , referenceParameter(typeRef)
913
                                , referenceParameter(callTargetsIdentifierListRef)
914
                                , referenceParameter(symbTabRef)
915
                                , referenceParameter(child));
916
                return true;
917
        }
918

    
919
        @Override
920
        public boolean initBinaryExpression(Long expr, int line, int pos,
921
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
922
                        Long left, Long right) {
923

    
924
//                DLL bool TIRESIAS_INIT_BINARYEXPRESSION(void* context,
925
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
926
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
927
//                                void* left, void* right);
928

    
929
                boolCall(PBExpressions.TIRESIAS_INIT_BINARYEXPRESSION
930
                                , referenceParameter(expr)
931
                                , int32Parameter(line)
932
                                , int32Parameter(pos)
933
                                , referenceParameter(typeRef)
934
                                , referenceParameter(callTargetsIdentifierListRef)
935
                                , referenceParameter(symbTabRef)
936
                                , referenceParameter(left)
937
                                , referenceParameter(right));
938
                return true;
939
        }
940

    
941
        @Override
942
        public boolean initTernaryExpression(Long expr, int line, int pos,
943
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
944
                        Long left, Long mid, Long right, Long defScopeRef) {
945

    
946
//                DLL bool TIRESIAS_INIT_TERNARYEXPRESSION(void* context,
947
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
948
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
949
//                                void* left, void* mid, void* right, void* defScopeRef);
950

    
951
                boolCall(PBExpressions.TIRESIAS_INIT_TERNARYEXPRESSION
952
                                , referenceParameter(expr)
953
                                , int32Parameter(line)
954
                                , int32Parameter(pos)
955
                                , referenceParameter(typeRef)
956
                                , referenceParameter(callTargetsIdentifierListRef)
957
                                , referenceParameter(symbTabRef)
958
                                , referenceParameter(left)
959
                                , referenceParameter(mid)
960
                                , referenceParameter(right)
961
                                , referenceParameter(defScopeRef));
962
                return true;
963
        }
964

    
965
        @Override
966
        public boolean initIntValueExpression(Long expr, int line, int pos,
967
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
968
                        int value) {
969

    
970
//                DLL bool TIRESIAS_INIT_INTVALUEEXPRESSION(void* context,
971
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
972
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
973
//                                std::int32_t value);
974

    
975
                boolCall(PBExpressions.TIRESIAS_INIT_INTVALUEEXPRESSION
976
                                , referenceParameter(expr)
977
                                , int32Parameter(line)
978
                                , int32Parameter(pos)
979
                                , referenceParameter(typeRef)
980
                                , referenceParameter(callTargetsIdentifierListRef)
981
                                , referenceParameter(symbTabRef)
982
                                , int32Parameter(value));
983
                return true;
984
        }
985

    
986
        @Override
987
        public boolean initBoolValueExpression(Long expr, int line, int pos,
988
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
989
                        boolean value) {
990

    
991
//                DLL bool TIRESIAS_INIT_BOOLVALUEEXPRESSION(void* context,
992
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
993
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
994
//                                bool value);
995

    
996
                boolCall(PBExpressions.TIRESIAS_INIT_BOOLVALUEEXPRESSION
997
                                , referenceParameter(expr)
998
                                , int32Parameter(line)
999
                                , int32Parameter(pos)
1000
                                , referenceParameter(typeRef)
1001
                                , referenceParameter(callTargetsIdentifierListRef)
1002
                                , referenceParameter(symbTabRef)
1003
                                , boolParameter(value));
1004
                return true;
1005
        }
1006

    
1007
        @Override
1008
        public boolean initNullValueExpression(Long expr, int line, int pos,
1009
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef) {
1010

    
1011
//                DLL bool TIRESIAS_INIT_REFVALUEEXPRESSION(void* context,
1012
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
1013
//                                void* callTargetsIdentifierListRef, void* symbTabRef,void* object);
1014

    
1015
                boolCall(PBExpressions.TIRESIAS_INIT_REFVALUEEXPRESSION
1016
                                , referenceParameter(expr)
1017
                                , int32Parameter(line)
1018
                                , int32Parameter(pos)
1019
                                , referenceParameter(typeRef)
1020
                                , referenceParameter(callTargetsIdentifierListRef)
1021
                                , referenceParameter(symbTabRef)
1022
                                , referenceParameter(new Long(0)));
1023
                return true;
1024
        }
1025

    
1026
        @Override
1027
        public boolean initListConstructor(Long expr, int line, int pos,
1028
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
1029
                        Long exprList, Long symTab, Long parentScope, Long comprehension,
1030
                        boolean hasComprehension) {
1031

    
1032
//                DLL bool TIRESIAS_INIT_LISTCONSTRUCTOR(void* context,
1033
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
1034
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
1035
//                                void* exprList, void* symTab, void* parentScope,
1036
//                                void* comprehension, bool hasComprehension);
1037

    
1038
                boolCall(PBExpressions.TIRESIAS_INIT_LISTCONSTRUCTOR
1039
                                , referenceParameter(expr)
1040
                                , int32Parameter(line)
1041
                                , int32Parameter(pos)
1042
                                , referenceParameter(typeRef)
1043
                                , referenceParameter(callTargetsIdentifierListRef)
1044
                                , referenceParameter(symbTabRef)
1045
                                , referenceParameter(exprList)
1046
                                , referenceParameter(symTab)
1047
                                , referenceParameter(parentScope)
1048
                                , referenceParameter(comprehension)
1049
                                , boolParameter(hasComprehension));
1050
                return true;
1051
        }
1052

    
1053
        @Override
1054
        public boolean initSetConstructor(Long expr, int line, int pos,
1055
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
1056
                        Long exprList, Long symTab, Long parentScope, Long comprehension,
1057
                        boolean hasComprehension) {
1058

    
1059
//                DLL bool TIRESIAS_INIT_SETCONSTRUCTOR(void* context,
1060
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
1061
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
1062
//                                void* exprList, void* symTab, void* parentScope,
1063
//                                void* comprehension, bool hasComprehension);
1064

    
1065
                boolCall(PBExpressions.TIRESIAS_INIT_SETCONSTRUCTOR
1066
                                , referenceParameter(expr)
1067
                                , int32Parameter(line)
1068
                                , int32Parameter(pos)
1069
                                , referenceParameter(typeRef)
1070
                                , referenceParameter(callTargetsIdentifierListRef)
1071
                                , referenceParameter(symbTabRef)
1072
                                , referenceParameter(exprList)
1073
                                , referenceParameter(symTab)
1074
                                , referenceParameter(parentScope)
1075
                                , referenceParameter(comprehension)
1076
                                , boolParameter(hasComprehension));
1077
                return true;
1078
        }
1079

    
1080
        @Override
1081
        public boolean initTupleConstructor(Long expr, int line, int pos,
1082
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
1083
                        Long exprList, Long tupleTypeId, boolean isMatcher) {
1084

    
1085
//                DLL bool TIRESIAS_INIT_TUPLECONSTRUCTOR(void* context,
1086
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
1087
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
1088
//                                void* exprList, void* tupleTypeId, bool isMatcher);
1089

    
1090
                boolCall(PBExpressions.TIRESIAS_INIT_TUPLECONSTRUCTOR
1091
                                , referenceParameter(expr)
1092
                                , int32Parameter(line)
1093
                                , int32Parameter(pos)
1094
                                , referenceParameter(typeRef)
1095
                                , referenceParameter(callTargetsIdentifierListRef)
1096
                                , referenceParameter(symbTabRef)
1097
                                , referenceParameter(exprList)
1098
                                , referenceParameter(tupleTypeId)
1099
                                , boolParameter(isMatcher));
1100
                return true;
1101
        }
1102

    
1103
        @Override
1104
        public boolean initAccessExpression(Long expr, int line, int pos,
1105
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
1106
                        Long left, Long right) {
1107

    
1108
//                DLL bool TIRESIAS_INIT_ACCESSEXPRESSION(void* context,
1109
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
1110
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
1111
//                                void* left, void* right);
1112

    
1113
                boolCall(PBExpressions.TIRESIAS_INIT_ACCESSEXPRESSION
1114
                                , referenceParameter(expr)
1115
                                , int32Parameter(line)
1116
                                , int32Parameter(pos)
1117
                                , referenceParameter(typeRef)
1118
                                , referenceParameter(callTargetsIdentifierListRef)
1119
                                , referenceParameter(symbTabRef)
1120
                                , referenceParameter(left)
1121
                                , referenceParameter(right));
1122
                return true;
1123
        }
1124

    
1125
        @Override
1126
        public boolean initTupleMapAccessExpression(Long expr, int line, int pos,
1127
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
1128
                        Long child, Long argument) {
1129

    
1130
//                DLL bool TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION(void* context,
1131
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
1132
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
1133
//                                void* child, void* argument);
1134

    
1135
                boolCall(PBExpressions.TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION
1136
                                , referenceParameter(expr)
1137
                                , int32Parameter(line)
1138
                                , int32Parameter(pos)
1139
                                , referenceParameter(typeRef)
1140
                                , referenceParameter(callTargetsIdentifierListRef)
1141
                                , referenceParameter(symbTabRef)
1142
                                , referenceParameter(child)
1143
                                , referenceParameter(argument));
1144
                return true;
1145
        }
1146

    
1147
        @Override
1148
        public boolean initCallExpression(Long expr, int line, int pos,
1149
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
1150
                        Long child, Long argumentList, Long scopeRef) {
1151

    
1152
//                DLL bool TIRESIAS_INIT_CALLEXPRESSION(void* context,
1153
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
1154
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
1155
//                                void* child, void* argumentList, void* scopeRef);
1156

    
1157
                boolCall(PBExpressions.TIRESIAS_INIT_CALLEXPRESSION
1158
                                , referenceParameter(expr)
1159
                                , int32Parameter(line)
1160
                                , int32Parameter(pos)
1161
                                , referenceParameter(typeRef)
1162
                                , referenceParameter(callTargetsIdentifierListRef)
1163
                                , referenceParameter(symbTabRef)
1164
                                , referenceParameter(child)
1165
                                , referenceParameter(argumentList)
1166
                                , referenceParameter(scopeRef));
1167
                return true;
1168
        }
1169

    
1170
        @Override
1171
        public boolean initQuantifierExpression(Long expr, int line, int pos,
1172
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
1173
                        Long child, Long symTabRef, Long scopeRef) {
1174

    
1175
//                DLL bool TIRESIAS_INIT_QUANTIFIEREXPRESSION(void* context,
1176
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
1177
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
1178
//                                void* child, void* symTabRef, void* scopeRef);
1179

    
1180
                boolCall(PBExpressions.TIRESIAS_INIT_QUANTIFIEREXPRESSION
1181
                                , referenceParameter(expr)
1182
                                , int32Parameter(line)
1183
                                , int32Parameter(pos)
1184
                                , referenceParameter(typeRef)
1185
                                , referenceParameter(callTargetsIdentifierListRef)
1186
                                , referenceParameter(symbTabRef)
1187
                                , referenceParameter(child)
1188
                                , referenceParameter(symTabRef)
1189
                                , referenceParameter(scopeRef));
1190
                return true;
1191
        }
1192

    
1193
        @Override
1194
        public boolean initObjectConstructor(Long expr, int line, int pos,
1195
                        Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef,
1196
                        Long instanceList, int currentInstance, String name) {
1197

    
1198
//                DLL bool TIRESIAS_INIT_OBJECTCONSTRUCTOR(void* context,
1199
//                                void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
1200
//                                void* callTargetsIdentifierListRef, void* symbTabRef,
1201
//                                void* instanceList, std::uint32_t currentInstance, const char* name);
1202

    
1203
                boolCall(PBExpressions.TIRESIAS_INIT_OBJECTCONSTRUCTOR
1204
                                , referenceParameter(expr)
1205
                                , int32Parameter(line)
1206
                                , int32Parameter(pos)
1207
                                , referenceParameter(typeRef)
1208
                                , referenceParameter(callTargetsIdentifierListRef)
1209
                                , referenceParameter(symbTabRef)
1210
                                , referenceParameter(instanceList)
1211
                                , uint32Parameter(currentInstance)
1212
                                , stringParameter(name));
1213
                return true;
1214
        }
1215

    
1216
        @Override
1217
        public void setMainModule(MainModule mainModule, Long id) {
1218
                m_traversal.setMainModule(id);
1219
                m_initialized = true;
1220
        }
1221

    
1222
}