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

research:jtransformer:api:java:pefs:4.2:whilet [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +----
 +
 +=== whileT(#id, #parent, #encl, #condition, #​body) ​ ===
 +
 +Represents the while statement.
 +
 +Formerly called whileLoopT: Renamed since JTransformer 2.3.1_200804151649.
 +
 +=== Arguments ===
 +== ==
 +**#id:** id\\ 
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** id\\ 
 +ID of the parent node.
 +
 +**#encl:** [[methodt|methodT]],​ [[constructort|constructorT]],​ [[classinitializert|classInitializerT]]\\ ​
 +ID of the enclosing element.
 +
 +**#​condition:​** [[plastexpression|expressionType]]\\ ​
 +ID of the expression of this while statement.
 +
 +**#body** [[plaststatement|statementType]]\\ ​
 +ID of the body of this while statement.
 +
 +=== Sample Java Source ===
 +== ==
 +<Code lang-java>​
 +void expression(){
 + while (true){ ​       // corresponding code line to whileT
 + ...
 + }
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +== ==
 +<Code lang-prolog>​
 +methodT(#​enclMethod,​ ..., '​expression',​ [], type(basic, void, 0), [], #parent).
 +blockT(#​parent,​ #​enclMethod,​ #​enclMethod,​ [#id]).
 +whileT(#id, #parent, #​enclMethod,​ #condition, #body).
 +literalT(#​condition,​ #id, #​enclMethod,​ type(basic, boolean, 0), '​true'​).
 +blockT(#​body,​ #id, #​enclMethod,​ [...]).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_type_spec(whileT,​[
 +     ​ast_arg(id, ​    ​mult(1,​1,​no ), id,   ​[whileT]),​
 +     ​ast_arg(parent,​ mult(1,1,no ), id,   ​[id]),​
 +     ​ast_arg(encl, ​  ​mult(1,​1,​no ), id,   ​[methodT,​ constructorT,​ classInitializerT]),​
 +     ​ast_arg(cond, ​  ​mult(1,​1,​no ), id,   ​[expressionType]),​
 +     ​ast_arg(body, ​  ​mult(1,​1,​no ), id,   ​[statementType])
 +]).
 +
 +</​Code>​
research/jtransformer/api/java/pefs/4.2/whilet.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019