SDA SE WikiSoftware Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents an access to
#id: id
the unique ID assigned to this fact.
#parent: id
ID of the parent node.
#encl: methodT, constructorT, classInitializerT, fieldT
ID of the fact that represents the method, constructor, class initializer or field definition that contains this variable access.
#refToAccessedElement: localT, paramT, thisT, superT
ID of the accessed element.
public Object m(int i) {
int j=0;
...
x = i + j;
...
Object o = super.abc;
...
return this;
}
For better readability IDs are represented by symbolic constants prefixed with #.
methodT(#encl, ..., 'm', [], #refToObject, [], ...).
paramT(#symbol1, ..., #refToInt, 'i').
localT(#symbol2, ..., #encl, #refToInt, 'j', ...).
...
operationT(#parent, ..., #encl, [#id1, #id2], '+', 0).
identT(#id1, #parent, #encl, #symbol1).
identT(#id2, #parent, #encl, #symbol2).
...
localT(#symbol3, ..., #encl, #refToObject, 'o', #fieldAccess).
fieldAccessT(#fieldAccess, #symbol3, #encl, #id3, #abc, #refToFieldType).
identT(#id3, #fieldAccess, #encl, #superclass).
superT(#id3).
...
returnT(#retid, ..., #encl, #ident).
identT(#ident, #retid, #encl, #classOfThis).
thisT(#ident).
ast_node_type_spec(identT,[
ast_arg(id, mult(1,1,no ), id, [identT]),
ast_arg(parent, mult(1,1,no ), id, [id]),
ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT, fieldT]),
ast_arg(ref, mult(1,1,no ), id, [classT,localT,paramT])
]).