Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents assignment expressions with shorthand arithmetic operations ('+=','-=', …)
#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 enclosing element.
#lhs: getFieldT, identT, indexedT
ID of the left hand side of this assignment expression.
'operator': atom
assignment operator.
#expr: expression
ID of the right hand side expression.
void assignOperation(){ int i = 5; i += i; //corresponding line to assignopT System.out.println(i); }
assignopT(#id, #parent, #encl, #lhs, '+', #expr), execT(#parent, ..., #encl, #id), methodT(#encl, ..., 'assignOperation', [], type(basic, void, 0), [], ...), identT(#lhs, #id, #encl, 'i', ...), identT(#expr, #id, #encl, 'i', ...),
ast_node_def('Java',assignopT,[ ast_arg(id, mult(1,1,no ), id, [assignopT]), % <-- convention!!! ast_arg(parent, mult(1,1,no ), id, [id]), % <-- convention!!! ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT, fieldT]), ast_arg(lhs, mult(1,1,no ), id, [getFieldT, identT, indexedT]), ast_arg(operator,mult(1,1,no ), attr,[atom]), ast_arg(expr, mult(1,1,no ), id, [expressionType]) ]).