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:preserve_omitarraydeclarationt [2014/07/08 13:11]
fabian.noth
research:jtransformer:api:java:pefs:4.0:preserve_omitarraydeclarationt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +----
  
 +=== preserve_omitArrayDeclarationT(#​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
 +
 +=== 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'​),​
 +preserve_omitArrayDeclarationT(NewArray).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_relation_type_spec(preserve_omitArrayDeclarationT,​[
 +     ​ast_arg(id, ​    ​mult(1,​1,​no ), id,   ​[newArrayT]) ​
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/4.0/preserve_omitarraydeclarationt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019