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
Next revision
Previous revision
research:jtransformer:api:java:pefs:4.0:blockt [2015/04/28 12:29]
127.0.0.1 external edit
research:jtransformer:api:java:pefs:4.0:blockt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +----
 +
 +=== blockT(#id, #parent, #​enclMethod,​ [#​statement_1,​...]) ​ ===
 +
 +Represents the block statement.
 +
 +=== Attributes===
 +== ==
 +**#id:** id\\ 
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** id\\ 
 +ID of the parent node.
 +
 +**#​enclMethod:​** [[methodt|methodT]],​ [[constructorT|constructorT]],​ [[classInitializerT |classInitializerT]]\\ ​
 +the ID of the fact that represents the enclosing element.
 +
 +**[#​statement_1,​...]:​** [[plaststatement|statement]]\\ ​
 +List of the statements in this block.
 +
 +=== Sample Java Source ===
 +
 +==  ==
 +<Code lang-java>​
 +method() {               // Enclosing method
 +    f(1,​2); ​             //​corresponding code line to blockT  ​
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +
 +==  ==
 +<Code lang-prolog>​
 +methodT(#​Method,​ #Class, '​method',​ [], type(basic, void, 0), [], #Block),
 +blockT(#​Block,​ #Method, #Method, [#Exec]),
 +execT(#​Exec,​ #Block, #Method, #Call),
 +callT(#​Call,​ #Exec, #Method, '​null',​ '​f',​ [#Literal1, #Literal2], _),
 +literalT(#​Literal1,​ #Call, #Method, type(basic, int, 0), '​1'​),​
 +literalT(#​Literal2,​ #Call, #Method, type(basic, int, 0), '​2'​),​
 +</​Code>​
 + 
 +=== AST Specificaton ===
 +== ==
 +<​Code>​
 +ast_node_type_spec(blockT,​[
 +     ​ast_arg(id, ​     mult(1,1,no ), id,  [blockT]),
 +     ​ast_arg(parent, ​ mult(1,1,no ), id,  [id]),
 +     ​ast_arg(encl, ​   mult(1,1,no ), id,  [methodT, constructorT,​ classInitializerT]),​
 +     ​ast_arg(stmts, ​  ​mult(0,​*,​ord),​ id,  [statementType])
 +]).
 +</​Code>​
 +
  
research/jtransformer/api/java/pefs/4.0/blockt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019