root / trunk / compiler / ooasCompiler / src / org / momut / ooas / codegen / ast / protobuf / AstProtoBufRecorder.java @ 7
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);
|
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 initTupleType(Long typeId, Long identifierRef, |
598 |
boolean anonymousType, Long typeListRef) { |
599 |
|
600 |
// DLL bool TIRESIAS_INIT_TUPLETYPE(void* context, void* typeId,
|
601 |
// void* identifierRef, bool anonymousType,
|
602 |
// void* typeListRef);
|
603 |
|
604 |
boolCall(PBTypes.TIRESIAS_INIT_TUPLETYPE |
605 |
, referenceParameter(typeId) |
606 |
, referenceParameter(identifierRef) |
607 |
, boolParameter(anonymousType) |
608 |
, referenceParameter(typeListRef)); |
609 |
return true; |
610 |
} |
611 |
|
612 |
@Override
|
613 |
public boolean initFunctionType(Long typeId, Long identifierRef, |
614 |
boolean anonymousType, Long paramTypeListRef, Long returnTypeRef, |
615 |
int functionKind, boolean isPure) { |
616 |
|
617 |
// DLL bool TIRESIAS_INIT_FUNCTIONTYPE(void* context,
|
618 |
// void* typeId, void* identifierRef,
|
619 |
// bool anonymousType, void* paramTypeListRef,
|
620 |
// void* returnTypeRef, std::int32_t functionKind, bool isPure);
|
621 |
|
622 |
boolCall(PBTypes.TIRESIAS_INIT_FUNCTIONTYPE |
623 |
, referenceParameter(typeId) |
624 |
, referenceParameter(identifierRef) |
625 |
, boolParameter(anonymousType) |
626 |
, referenceParameter(paramTypeListRef) |
627 |
, referenceParameter(returnTypeRef) |
628 |
, int32Parameter(functionKind) |
629 |
, boolParameter(isPure)); |
630 |
return true; |
631 |
} |
632 |
|
633 |
@Override
|
634 |
public boolean initActionSystemInstance(Long instance, Long typeRef, |
635 |
String name, int numOfCreatedObjs, Long parentInstanceRef) { |
636 |
|
637 |
// DLL bool TIRESIAS_INIT_ACTIONSYSTEMINSTANCE(void* context,
|
638 |
// void* instance, void* typeRef, const char* name,
|
639 |
// std::int32_t numOfCreatedObjs, void* parentInstanceRef);
|
640 |
|
641 |
boolCall(PBTypes.TIRESIAS_INIT_ACTIONSYSTEMINSTANCE |
642 |
, referenceParameter(instance) |
643 |
, referenceParameter(typeRef) |
644 |
, stringParameter(name) |
645 |
, int32Parameter(numOfCreatedObjs) |
646 |
, referenceParameter(parentInstanceRef)); |
647 |
return true; |
648 |
} |
649 |
|
650 |
@Override
|
651 |
public boolean initActionSystemType(Long typeId, Long identifierRef, |
652 |
boolean anonymousType, Long baseTypeRef, Long parentScopeRef, |
653 |
Long doOdBlockRef, Long symTab, Long objectsListRef, |
654 |
Long derivedObjectsListRef, boolean autoConstruction, |
655 |
boolean isInSystemDescription) {
|
656 |
|
657 |
// DLL bool TIRESIAS_INIT_ACTIONSYSTEMTYPE(void* context,
|
658 |
// void* typeId, void* identifierRef,
|
659 |
// bool anonymousType, void* baseTypeRef,
|
660 |
// void* parentScopeRef, void* doOdBlockRef,
|
661 |
// void* symTab, void* objectsListRef,
|
662 |
// void* derivedObjectsListRef, bool autoConstruction,
|
663 |
// bool isInSystemDescription);
|
664 |
|
665 |
boolCall(PBTypes.TIRESIAS_INIT_ACTIONSYSTEMTYPE |
666 |
, referenceParameter(typeId) |
667 |
, referenceParameter(identifierRef) |
668 |
, boolParameter(anonymousType) |
669 |
, referenceParameter(baseTypeRef) |
670 |
, referenceParameter(parentScopeRef) |
671 |
, referenceParameter(doOdBlockRef) |
672 |
, referenceParameter(symTab) |
673 |
, referenceParameter(objectsListRef) |
674 |
, referenceParameter(derivedObjectsListRef) |
675 |
, boolParameter(autoConstruction) |
676 |
, boolParameter(isInSystemDescription)); |
677 |
return true; |
678 |
} |
679 |
|
680 |
@Override
|
681 |
public boolean initNullType(Long typeId, Long identifierRef, boolean anonymousType) { |
682 |
|
683 |
// DLL bool TIRESIAS_INIT_NULLTYPE(void* context, void* typeId,
|
684 |
// void* identifierRef, bool anonymousType);
|
685 |
|
686 |
boolCall(PBTypes.TIRESIAS_INIT_NULLTYPE |
687 |
, referenceParameter(typeId) |
688 |
, referenceParameter(identifierRef) |
689 |
, boolParameter(anonymousType)); |
690 |
return true; |
691 |
} |
692 |
|
693 |
@Override
|
694 |
public boolean initSkipStatement(Long stmnt, int line, int col) { |
695 |
|
696 |
// DLL bool TIRESIAS_INIT_SKIP(void* context, void* stmnt,
|
697 |
// std::int32_t line, std::int32_t col);
|
698 |
|
699 |
boolCall(PBStatements.TIRESIAS_INIT_SKIP |
700 |
, referenceParameter(stmnt) |
701 |
, int32Parameter(line) |
702 |
, int32Parameter(col)); |
703 |
return true; |
704 |
} |
705 |
|
706 |
@Override
|
707 |
public boolean initBreakStatement(Long stmnt, int line, int col) { |
708 |
|
709 |
// DLL bool TIRESIAS_INIT_BREAK(void* context, void* stmnt,
|
710 |
// std::int32_t line, std::int32_t col);
|
711 |
|
712 |
boolCall(PBStatements.TIRESIAS_INIT_BREAK |
713 |
, referenceParameter(stmnt) |
714 |
, int32Parameter(line) |
715 |
, int32Parameter(col)); |
716 |
return true; |
717 |
} |
718 |
|
719 |
@Override
|
720 |
public boolean initAbortStatement(Long stmnt, int line, int col) { |
721 |
|
722 |
// DLL bool TIRESIAS_INIT_ABORT(void* context, void* stmnt,
|
723 |
// std::int32_t line, std::int32_t col);
|
724 |
|
725 |
boolCall(PBStatements.TIRESIAS_INIT_ABORT |
726 |
, referenceParameter(stmnt) |
727 |
, int32Parameter(line) |
728 |
, int32Parameter(col)); |
729 |
return true; |
730 |
} |
731 |
|
732 |
@Override
|
733 |
public boolean initNondetBlock(Long block, int line, int col, |
734 |
Long symTabRef, Long stmtListRef, Long scopeRef) { |
735 |
|
736 |
// DLL bool TIRESIAS_INIT_NONDETBLOCK(void* context, void* block,
|
737 |
// std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
|
738 |
// void* scopeRef);
|
739 |
|
740 |
boolCall(PBStatements.TIRESIAS_INIT_NONDETBLOCK |
741 |
, referenceParameter(block) |
742 |
, int32Parameter(line) |
743 |
, int32Parameter(col) |
744 |
, referenceParameter(symTabRef) |
745 |
, referenceParameter(stmtListRef) |
746 |
, referenceParameter(scopeRef)); |
747 |
return true; |
748 |
} |
749 |
|
750 |
@Override
|
751 |
public boolean initSeqBlock(Long block, int line, int col, Long symTabRef, |
752 |
Long stmtListRef, Long scopeRef, Long filterExprRef) { |
753 |
|
754 |
// DLL bool TIRESIAS_INIT_SEQBLOCK(void* context, void* block,
|
755 |
// std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
|
756 |
// void* scopeRef, void* filterExprRef);
|
757 |
|
758 |
boolCall(PBStatements.TIRESIAS_INIT_SEQBLOCK |
759 |
, referenceParameter(block) |
760 |
, int32Parameter(line) |
761 |
, int32Parameter(col) |
762 |
, referenceParameter(symTabRef) |
763 |
, referenceParameter(stmtListRef) |
764 |
, referenceParameter(scopeRef) |
765 |
, referenceParameter(filterExprRef)); |
766 |
return true; |
767 |
} |
768 |
|
769 |
@Override
|
770 |
public boolean initPrioBlock(Long block, int line, int col, Long symTabRef, |
771 |
Long stmtListRef, Long scopeRef) { |
772 |
|
773 |
// DLL bool TIRESIAS_INIT_PRIOBLOCK(void* context, void* block,
|
774 |
// std::int32_t line, std::int32_t col, void* symTabRef, void* stmtListRef,
|
775 |
// void* scopeRef);
|
776 |
|
777 |
boolCall(PBStatements.TIRESIAS_INIT_PRIOBLOCK |
778 |
, referenceParameter(block) |
779 |
, int32Parameter(line) |
780 |
, int32Parameter(col) |
781 |
, referenceParameter(symTabRef) |
782 |
, referenceParameter(stmtListRef) |
783 |
, referenceParameter(scopeRef)); |
784 |
return true; |
785 |
} |
786 |
|
787 |
@Override
|
788 |
public boolean initGuardedCommand(Long stmt, int line, int pos, |
789 |
Long scopeRef, Long guardExprRef, Long bodyRef) { |
790 |
|
791 |
// DLL bool TIRESIAS_INIT_GUARDEDCOMMAND(void* context,
|
792 |
// void* stmt, std::int32_t line, std::int32_t pos, void* scopeRef,
|
793 |
// void* guardExprRef, void* bodyRef);
|
794 |
|
795 |
boolCall(PBStatements.TIRESIAS_INIT_GUARDEDCOMMAND |
796 |
, referenceParameter(stmt) |
797 |
, int32Parameter(line) |
798 |
, int32Parameter(pos) |
799 |
, referenceParameter(scopeRef) |
800 |
, referenceParameter(guardExprRef) |
801 |
, referenceParameter(bodyRef)); |
802 |
return true; |
803 |
} |
804 |
|
805 |
@Override
|
806 |
public boolean initAssignment(Long stmt, int line, int pos, Long scopeRef, |
807 |
Long nonDetExprRef, Long placeExprListRef, Long valueExprListRef, |
808 |
Long symTabRef) {
|
809 |
|
810 |
// DLL bool TIRESIAS_INIT_ASSIGNMENT(void* context, void* stmt,
|
811 |
// std::int32_t line, std::int32_t pos, void* scopeRef, void* nonDetExprRef,
|
812 |
// void* placeExprListRef, void* valueExprListRef,
|
813 |
// void* symTabRef);
|
814 |
|
815 |
boolCall(PBStatements.TIRESIAS_INIT_ASSIGNMENT |
816 |
, referenceParameter(stmt) |
817 |
, int32Parameter(line) |
818 |
, int32Parameter(pos) |
819 |
, referenceParameter(scopeRef) |
820 |
, referenceParameter(nonDetExprRef) |
821 |
, referenceParameter(placeExprListRef) |
822 |
, referenceParameter(valueExprListRef) |
823 |
, referenceParameter(symTabRef)); |
824 |
return true; |
825 |
} |
826 |
|
827 |
@Override
|
828 |
public boolean initCall(Long stmt, int line, int pos, Long callExprRef) { |
829 |
|
830 |
// DLL bool TIRESIAS_INIT_CALL(void* context, void* stmt,
|
831 |
// std::int32_t line, std::int32_t pos, void* callExprRef);
|
832 |
|
833 |
boolCall(PBStatements.TIRESIAS_INIT_CALL |
834 |
, referenceParameter(stmt) |
835 |
, int32Parameter(line) |
836 |
, int32Parameter(pos) |
837 |
, referenceParameter(callExprRef)); |
838 |
return true; |
839 |
} |
840 |
|
841 |
@Override
|
842 |
public boolean initTypeExpression(Long expr, int line, int pos, |
843 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef) { |
844 |
|
845 |
// DLL bool TIRESIAS_INIT_TYPEEXPRESSION(void* context,
|
846 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
847 |
// void* callTargetsIdentifierListRef, void* symbTabRef);
|
848 |
|
849 |
boolCall(PBExpressions.TIRESIAS_INIT_TYPEEXPRESSION |
850 |
, referenceParameter(expr) |
851 |
, int32Parameter(line) |
852 |
, int32Parameter(pos) |
853 |
, referenceParameter(typeRef) |
854 |
, referenceParameter(callTargetsIdentifierListRef) |
855 |
, referenceParameter(symbTabRef)); |
856 |
return true; |
857 |
} |
858 |
|
859 |
@Override
|
860 |
public boolean initIdentifierExpression(Long expr, int line, int pos, |
861 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
862 |
Long identifierRef, boolean isSelf) { |
863 |
|
864 |
// DLL bool TIRESIAS_INIT_IDENTIFIEREXPRESSION(void* context,
|
865 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
866 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
867 |
// void* identifierRef, bool isSelf);
|
868 |
|
869 |
boolCall(PBExpressions.TIRESIAS_INIT_IDENTIFIEREXPRESSION |
870 |
, referenceParameter(expr) |
871 |
, int32Parameter(line) |
872 |
, int32Parameter(pos) |
873 |
, referenceParameter(typeRef) |
874 |
, referenceParameter(callTargetsIdentifierListRef) |
875 |
, referenceParameter(symbTabRef) |
876 |
, referenceParameter(identifierRef) |
877 |
, boolParameter(isSelf)); |
878 |
return true; |
879 |
} |
880 |
|
881 |
@Override
|
882 |
public boolean initUnaryExpression(Long expr, int line, int pos, |
883 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
884 |
Long child) {
|
885 |
|
886 |
// DLL bool TIRESIAS_INIT_UNARYEXPRESSION(void* context,
|
887 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
888 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
889 |
// void* child);
|
890 |
|
891 |
boolCall(PBExpressions.TIRESIAS_INIT_UNARYEXPRESSION |
892 |
, referenceParameter(expr) |
893 |
, int32Parameter(line) |
894 |
, int32Parameter(pos) |
895 |
, referenceParameter(typeRef) |
896 |
, referenceParameter(callTargetsIdentifierListRef) |
897 |
, referenceParameter(symbTabRef) |
898 |
, referenceParameter(child)); |
899 |
return true; |
900 |
} |
901 |
|
902 |
@Override
|
903 |
public boolean initBinaryExpression(Long expr, int line, int pos, |
904 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
905 |
Long left, Long right) { |
906 |
|
907 |
// DLL bool TIRESIAS_INIT_BINARYEXPRESSION(void* context,
|
908 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
909 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
910 |
// void* left, void* right);
|
911 |
|
912 |
boolCall(PBExpressions.TIRESIAS_INIT_BINARYEXPRESSION |
913 |
, referenceParameter(expr) |
914 |
, int32Parameter(line) |
915 |
, int32Parameter(pos) |
916 |
, referenceParameter(typeRef) |
917 |
, referenceParameter(callTargetsIdentifierListRef) |
918 |
, referenceParameter(symbTabRef) |
919 |
, referenceParameter(left) |
920 |
, referenceParameter(right)); |
921 |
return true; |
922 |
} |
923 |
|
924 |
@Override
|
925 |
public boolean initTernaryExpression(Long expr, int line, int pos, |
926 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
927 |
Long left, Long mid, Long right, Long defScopeRef) { |
928 |
|
929 |
// DLL bool TIRESIAS_INIT_TERNARYEXPRESSION(void* context,
|
930 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
931 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
932 |
// void* left, void* mid, void* right, void* defScopeRef);
|
933 |
|
934 |
boolCall(PBExpressions.TIRESIAS_INIT_TERNARYEXPRESSION |
935 |
, referenceParameter(expr) |
936 |
, int32Parameter(line) |
937 |
, int32Parameter(pos) |
938 |
, referenceParameter(typeRef) |
939 |
, referenceParameter(callTargetsIdentifierListRef) |
940 |
, referenceParameter(symbTabRef) |
941 |
, referenceParameter(left) |
942 |
, referenceParameter(mid) |
943 |
, referenceParameter(right) |
944 |
, referenceParameter(defScopeRef)); |
945 |
return true; |
946 |
} |
947 |
|
948 |
@Override
|
949 |
public boolean initIntValueExpression(Long expr, int line, int pos, |
950 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
951 |
int value) {
|
952 |
|
953 |
// DLL bool TIRESIAS_INIT_INTVALUEEXPRESSION(void* context,
|
954 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
955 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
956 |
// std::int32_t value);
|
957 |
|
958 |
boolCall(PBExpressions.TIRESIAS_INIT_INTVALUEEXPRESSION |
959 |
, referenceParameter(expr) |
960 |
, int32Parameter(line) |
961 |
, int32Parameter(pos) |
962 |
, referenceParameter(typeRef) |
963 |
, referenceParameter(callTargetsIdentifierListRef) |
964 |
, referenceParameter(symbTabRef) |
965 |
, int32Parameter(value)); |
966 |
return true; |
967 |
} |
968 |
|
969 |
@Override
|
970 |
public boolean initBoolValueExpression(Long expr, int line, int pos, |
971 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
972 |
boolean value) {
|
973 |
|
974 |
// DLL bool TIRESIAS_INIT_BOOLVALUEEXPRESSION(void* context,
|
975 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
976 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
977 |
// bool value);
|
978 |
|
979 |
boolCall(PBExpressions.TIRESIAS_INIT_BOOLVALUEEXPRESSION |
980 |
, referenceParameter(expr) |
981 |
, int32Parameter(line) |
982 |
, int32Parameter(pos) |
983 |
, referenceParameter(typeRef) |
984 |
, referenceParameter(callTargetsIdentifierListRef) |
985 |
, referenceParameter(symbTabRef) |
986 |
, boolParameter(value)); |
987 |
return true; |
988 |
} |
989 |
|
990 |
@Override
|
991 |
public boolean initNullValueExpression(Long expr, int line, int pos, |
992 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef) { |
993 |
|
994 |
// DLL bool TIRESIAS_INIT_REFVALUEEXPRESSION(void* context,
|
995 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
996 |
// void* callTargetsIdentifierListRef, void* symbTabRef,void* object);
|
997 |
|
998 |
boolCall(PBExpressions.TIRESIAS_INIT_REFVALUEEXPRESSION |
999 |
, referenceParameter(expr) |
1000 |
, int32Parameter(line) |
1001 |
, int32Parameter(pos) |
1002 |
, referenceParameter(typeRef) |
1003 |
, referenceParameter(callTargetsIdentifierListRef) |
1004 |
, referenceParameter(symbTabRef) |
1005 |
, referenceParameter(new Long(0))); |
1006 |
return true; |
1007 |
} |
1008 |
|
1009 |
@Override
|
1010 |
public boolean initListConstructor(Long expr, int line, int pos, |
1011 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
1012 |
Long exprList, Long symTab, Long parentScope, Long comprehension, |
1013 |
boolean hasComprehension) {
|
1014 |
|
1015 |
// DLL bool TIRESIAS_INIT_LISTCONSTRUCTOR(void* context,
|
1016 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
1017 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
1018 |
// void* exprList, void* symTab, void* parentScope,
|
1019 |
// void* comprehension, bool hasComprehension);
|
1020 |
|
1021 |
boolCall(PBExpressions.TIRESIAS_INIT_LISTCONSTRUCTOR |
1022 |
, referenceParameter(expr) |
1023 |
, int32Parameter(line) |
1024 |
, int32Parameter(pos) |
1025 |
, referenceParameter(typeRef) |
1026 |
, referenceParameter(callTargetsIdentifierListRef) |
1027 |
, referenceParameter(symbTabRef) |
1028 |
, referenceParameter(exprList) |
1029 |
, referenceParameter(symTab) |
1030 |
, referenceParameter(parentScope) |
1031 |
, referenceParameter(comprehension) |
1032 |
, boolParameter(hasComprehension)); |
1033 |
return true; |
1034 |
} |
1035 |
|
1036 |
@Override
|
1037 |
public boolean initSetConstructor(Long expr, int line, int pos, |
1038 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
1039 |
Long exprList, Long symTab, Long parentScope, Long comprehension, |
1040 |
boolean hasComprehension) {
|
1041 |
|
1042 |
// DLL bool TIRESIAS_INIT_SETCONSTRUCTOR(void* context,
|
1043 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
1044 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
1045 |
// void* exprList, void* symTab, void* parentScope,
|
1046 |
// void* comprehension, bool hasComprehension);
|
1047 |
|
1048 |
boolCall(PBExpressions.TIRESIAS_INIT_SETCONSTRUCTOR |
1049 |
, referenceParameter(expr) |
1050 |
, int32Parameter(line) |
1051 |
, int32Parameter(pos) |
1052 |
, referenceParameter(typeRef) |
1053 |
, referenceParameter(callTargetsIdentifierListRef) |
1054 |
, referenceParameter(symbTabRef) |
1055 |
, referenceParameter(exprList) |
1056 |
, referenceParameter(symTab) |
1057 |
, referenceParameter(parentScope) |
1058 |
, referenceParameter(comprehension) |
1059 |
, boolParameter(hasComprehension)); |
1060 |
return true; |
1061 |
} |
1062 |
|
1063 |
@Override
|
1064 |
public boolean initTupleConstructor(Long expr, int line, int pos, |
1065 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
1066 |
Long exprList, Long tupleTypeId, boolean isMatcher) { |
1067 |
|
1068 |
// DLL bool TIRESIAS_INIT_TUPLECONSTRUCTOR(void* context,
|
1069 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
1070 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
1071 |
// void* exprList, void* tupleTypeId, bool isMatcher);
|
1072 |
|
1073 |
boolCall(PBExpressions.TIRESIAS_INIT_TUPLECONSTRUCTOR |
1074 |
, referenceParameter(expr) |
1075 |
, int32Parameter(line) |
1076 |
, int32Parameter(pos) |
1077 |
, referenceParameter(typeRef) |
1078 |
, referenceParameter(callTargetsIdentifierListRef) |
1079 |
, referenceParameter(symbTabRef) |
1080 |
, referenceParameter(exprList) |
1081 |
, referenceParameter(tupleTypeId) |
1082 |
, boolParameter(isMatcher)); |
1083 |
return true; |
1084 |
} |
1085 |
|
1086 |
@Override
|
1087 |
public boolean initAccessExpression(Long expr, int line, int pos, |
1088 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
1089 |
Long left, Long right) { |
1090 |
|
1091 |
// DLL bool TIRESIAS_INIT_ACCESSEXPRESSION(void* context,
|
1092 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
1093 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
1094 |
// void* left, void* right);
|
1095 |
|
1096 |
boolCall(PBExpressions.TIRESIAS_INIT_ACCESSEXPRESSION |
1097 |
, referenceParameter(expr) |
1098 |
, int32Parameter(line) |
1099 |
, int32Parameter(pos) |
1100 |
, referenceParameter(typeRef) |
1101 |
, referenceParameter(callTargetsIdentifierListRef) |
1102 |
, referenceParameter(symbTabRef) |
1103 |
, referenceParameter(left) |
1104 |
, referenceParameter(right)); |
1105 |
return true; |
1106 |
} |
1107 |
|
1108 |
@Override
|
1109 |
public boolean initTupleMapAccessExpression(Long expr, int line, int pos, |
1110 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
1111 |
Long child, Long argument) { |
1112 |
|
1113 |
// DLL bool TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION(void* context,
|
1114 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
1115 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
1116 |
// void* child, void* argument);
|
1117 |
|
1118 |
boolCall(PBExpressions.TIRESIAS_INIT_TUPLEMAPACCESSEXPRESSION |
1119 |
, referenceParameter(expr) |
1120 |
, int32Parameter(line) |
1121 |
, int32Parameter(pos) |
1122 |
, referenceParameter(typeRef) |
1123 |
, referenceParameter(callTargetsIdentifierListRef) |
1124 |
, referenceParameter(symbTabRef) |
1125 |
, referenceParameter(child) |
1126 |
, referenceParameter(argument)); |
1127 |
return true; |
1128 |
} |
1129 |
|
1130 |
@Override
|
1131 |
public boolean initCallExpression(Long expr, int line, int pos, |
1132 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
1133 |
Long child, Long argumentList, Long scopeRef) { |
1134 |
|
1135 |
// DLL bool TIRESIAS_INIT_CALLEXPRESSION(void* context,
|
1136 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
1137 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
1138 |
// void* child, void* argumentList, void* scopeRef);
|
1139 |
|
1140 |
boolCall(PBExpressions.TIRESIAS_INIT_CALLEXPRESSION |
1141 |
, referenceParameter(expr) |
1142 |
, int32Parameter(line) |
1143 |
, int32Parameter(pos) |
1144 |
, referenceParameter(typeRef) |
1145 |
, referenceParameter(callTargetsIdentifierListRef) |
1146 |
, referenceParameter(symbTabRef) |
1147 |
, referenceParameter(child) |
1148 |
, referenceParameter(argumentList) |
1149 |
, referenceParameter(scopeRef)); |
1150 |
return true; |
1151 |
} |
1152 |
|
1153 |
@Override
|
1154 |
public boolean initQuantifierExpression(Long expr, int line, int pos, |
1155 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
1156 |
Long child, Long symTabRef, Long scopeRef) { |
1157 |
|
1158 |
// DLL bool TIRESIAS_INIT_QUANTIFIEREXPRESSION(void* context,
|
1159 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
1160 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
1161 |
// void* child, void* symTabRef, void* scopeRef);
|
1162 |
|
1163 |
boolCall(PBExpressions.TIRESIAS_INIT_QUANTIFIEREXPRESSION |
1164 |
, referenceParameter(expr) |
1165 |
, int32Parameter(line) |
1166 |
, int32Parameter(pos) |
1167 |
, referenceParameter(typeRef) |
1168 |
, referenceParameter(callTargetsIdentifierListRef) |
1169 |
, referenceParameter(symbTabRef) |
1170 |
, referenceParameter(child) |
1171 |
, referenceParameter(symTabRef) |
1172 |
, referenceParameter(scopeRef)); |
1173 |
return true; |
1174 |
} |
1175 |
|
1176 |
@Override
|
1177 |
public boolean initObjectConstructor(Long expr, int line, int pos, |
1178 |
Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, |
1179 |
Long instanceList, int currentInstance, String name) { |
1180 |
|
1181 |
// DLL bool TIRESIAS_INIT_OBJECTCONSTRUCTOR(void* context,
|
1182 |
// void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
|
1183 |
// void* callTargetsIdentifierListRef, void* symbTabRef,
|
1184 |
// void* instanceList, std::uint32_t currentInstance, const char* name);
|
1185 |
|
1186 |
boolCall(PBExpressions.TIRESIAS_INIT_OBJECTCONSTRUCTOR |
1187 |
, referenceParameter(expr) |
1188 |
, int32Parameter(line) |
1189 |
, int32Parameter(pos) |
1190 |
, referenceParameter(typeRef) |
1191 |
, referenceParameter(callTargetsIdentifierListRef) |
1192 |
, referenceParameter(symbTabRef) |
1193 |
, referenceParameter(instanceList) |
1194 |
, uint32Parameter(currentInstance) |
1195 |
, stringParameter(name)); |
1196 |
return true; |
1197 |
} |
1198 |
|
1199 |
@Override
|
1200 |
public void setMainModule(MainModule mainModule, Long id) { |
1201 |
m_traversal.setMainModule(id); |
1202 |
m_initialized = true;
|
1203 |
} |
1204 |
|
1205 |
} |