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:2.9:inlinedeclarationt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +----
  
 +=== inlineDeclarationT(#​firstField,​ [#​otherField1,​ ...]) ===
 +
 +**This fact is part of JTransfomer 2.9. It is not released yet.**
 +
 +This fact is only used for preserving the original appearance of the source code after transformations. It declares that multiple variables are declared in a single declaration,​ being written as
 +<Code lang-java>​int i, j, k; </​Code>​
 +instead of
 +<Code lang-java>​int i;
 + int j;
 + int k; </​Code>​
 +
 +
 +=== Arguments ===
 +== ==
 +**#​firstField:​** [[fieldT|fieldT]],​ [[localT|localT]]\\ ​
 +ID of the first variable.
 +
 +**[#​otherField1,​ ...]:** [[fieldT|fieldT]],​ [[localT|localT]]\\ ​
 +list of IDs of other variables. These facts are marked with an [[inlinedT|inlinedT]] fact.
 +
 +=== Sample Java Source ===
 +== ==
 +<Code lang-java>​
 +...
 +int i, j, k;
 +...
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +==  ==
 +<Code lang-prolog>​
 +fieldT(#​firstField, ​ #parent, #type, '​i',​ null).
 +fieldT(#​secondField,​ #parent, #type, '​j',​ null).
 +fieldT(#​thirdField, ​ #parent, #type, '​k',​ null).
 +inlineDeclarationT(#​firstField,​ [#​secondField,​ #​thirdField]).
 +inlinedT(#​secondField,​ #​firstField).
 +inlinedT(#​thirdField,​ #​firstField).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_relation('​Java',​inlineDeclarationT,​[
 +     ​ast_arg(id, ​   mult(1,1,no ),  id,  [fieldT, localT]), ​
 +     ​ast_arg(ref, ​  ​mult(1,​*,​ord ), id,  [fieldT, localT]) ​
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/2.9/inlinedeclarationt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019