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:omit_arraydeclarationt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +----
  
 +=== omit_arrayDeclarationT(#​id) ===
 +
 +This fact is only used for preserving the original appearance of the source code after transformations. It declares that an array initialization (represented by a [[newarrayt|newArrayT]] fact) omits the explicit array instantiation in the orginal source code, being written as 
 +<Code lang-java>​int[] a = {1,2,3}; </​Code>​
 +instead of
 +<Code lang-java>​int[] a = new int[] {1,2,3} </​Code>​
 +
 +== History ==
 +  * JTransformer 4.0: Renamed from omitArrayDeclarationT to preserve_omitArrayDeclarationT
 +  * JTransformer 4.1: Renamed to omit_arrayDeclarationT
 +
 +=== Arguments ===
 +== ==
 +**#id:** [[newarrayt|newArrayT]]\\ ​
 +ID of the newArrayT element.
 +
 +=== Sample Java Source ===
 +== ==
 +<Code lang-java>​
 +int[] a = {1,​2,​3}; ​
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +<Code lang-prolog>​
 +fieldT(Field,​ _, _, '​a',​ NewArray),
 +newArrayT(NewArray,​ Field, Field, [], [Entry1, Entry2, Entry3], _),
 +literalT(Entry1,​ NewArray, Field, IntType, '​1'​),​
 +literalT(Entry2,​ NewArray, Field, IntType, '​2'​),​
 +literalT(Entry3,​ NewArray, Field, IntType, '​3'​),​
 +omit_arrayDeclarationT(NewArray).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_relation_type_spec(omit_arrayDeclarationT,​[
 +     ​ast_arg(id, ​    ​mult(1,​1,​no ), id,   ​[newArrayT]) ​
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/4.2/omit_arraydeclarationt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019