SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
research:jtransformer:api:java:pefs:4.0:assignopt [2014/07/09 11:33]
127.0.0.1 external edit
research:jtransformer:api:java:pefs:4.0:assignopt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +
 +----
 +
 +=== assignopT(#​id,​ #parent, #encl, #lhs, '​operator',​ #​expr) ​ ===
 +
 +Represents assignment expressions with shorthand arithmetic operations ('​+=','​-=',​ ...)
 +
 +=== Attributes ===
 +== ==
 +**#id:** id\\ 
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** id\\ 
 +ID of the parent node.
 +
 +**#encl:** [[methodt|methodT]],​ [[constructorT|constructorT]],​ [[classInitializerT |classInitializerT]],​ [[fieldt|fieldT]]\\
 +ID of the fact that represents the enclosing element.
 +
 +**#lhs:** [[fieldAccessT|fieldAccessT]],​ [[identt|identT]],​ [[indexedt|indexedT]]\\ ​
 +ID of the left hand side of this assignment expression.
 +
 +**'​operator':​** atom\\ ​
 +assignment operator.
 +
 +**#expr:** [[plastexpression|expression]]\\ ​
 +ID of the right hand side expression.
 +
 +=== Sample Java Source ===
 +==  ==
 +<Code lang-java>​
 +void assignOperation(){
 + int i = 5;
 + i += i;                //​corresponding line to assignopT
 + System.out.println(i);​
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +
 +==  ==
 +<Code lang-prolog>​
 +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',​ ...),
 +
 +</​Code>​
 +===AST Specification===
 +== ==
 +<​Code>​
 +ast_node_type_spec(assignopT,​[
 +     ​ast_arg(id, ​     mult(1,1,no ), id,  [assignopT]),​
 +     ​ast_arg(parent, ​ mult(1,1,no ), id,  [id]),
 +     ​ast_arg(encl, ​   mult(1,1,no ), id,  [methodT, constructorT,​ classInitializerT,​fieldT]),​
 +     ​ast_arg(lhs, ​    ​mult(1,​1,​no ), id,  [fieldAccessT,​ identT, indexedT]),
 +     ​ast_arg(operator,​mult(1,​1,​no ), attr,​[atomic]),​
 +     ​ast_arg(rhs, ​    ​mult(1,​1,​no ), id,  [expressionType])
 +]).
 +</​Code>​
 +
  
research/jtransformer/api/java/pefs/4.0/assignopt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019