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:3.0:paramt [2013/07/01 23:21]
127.0.0.1 external edit
research:jtransformer:api:java:pefs:3.0:paramt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +----
 +
 +=== paramT(#id, #parent, #type, '​name'​) ​ ===
 +
 +Represents the program element (method, catch clause, foreach loop) parametrized by this parameter declaration.
 +
 +Renamed in JT 2.8: Up to 2.8.0 it was defined as [[..:​old:​paramdeft|paramDefT]].
 +
 +=== Arguments ===
 +== ==
 +**#id:** id \\ 
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** [[methodt|methodT]] , [[constructorT|constructorT]] , [[catcht|catchT]] , [[foreacht|foreachT]] \\ 
 +ID of the enclosing PEF
 +
 +**#type:** [[typeinst]]\\ ​
 +the id of the type of the parameter
 +
 +**'​name':​** atom \\ 
 +the name of the parameter.
 +
 +=== Sample Java Source ===
 +== ==
 +<Code lang-java>​
 +class HelloWorld ​ { 
 +  public static void main(String[] args){ ​  //​String [] args is the corresponding code part to paramT
 +    ...
 +  }
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +==  ==
 +<Code lang-prolog>​
 +methodT(#​method,​ ..., '​main',​ [#param], #​returnType,​ [], ...).
 +paramT(#​param,​ #method, #paramType, '​args'​).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_def('​Java',​paramT,​[
 +     ​ast_arg(id, ​     mult(1,1,no ),  id,  [paramT]), % <-- convention!!!
 +     ​ast_arg(parent, ​ mult(1,1,no ),  id,  [methodT, constructorT,​ catchT,​foreachT]), ​
 +     ​ast_arg(type, ​   mult(1,1,no ),  id,  [typeInst]), ​
 +     ​ast_arg(name, ​   mult(1,1,no ),  attr,​[atom])
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/3.0/paramt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019