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:migration:2.8 [2011/02/16 12:57]
Günter Kniesel removed
research:jtransformer:api:java:migration:2.8 [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== Migration to AST Version 2.8.0 ======
 +
 +
 +==== PEF renaming: classDefT, methodDefT, paramDefT, and fieldDefT ====
 +
 +We renamed some AST-Nodes by removing the "​Def"​ from there names. Their functionality remained the same:
 +
 +  * [[..:​pefs:​old:​classDefT|classDefT]] -> [[..:​pefs:​2.9:​classT|classT]]
 +  * [[..:​pefs:​old:​fieldDefT|fieldDefT]] -> [[..:​pefs:​2.9:​fieldT|fieldT]]
 +  * [[..:​pefs:​old:​paramDefT|paramDefT]] -> [[..:​pefs:​2.9:​paramt|paramT]]
 +  * [[..:​pefs:​old:​localDefT|localDefT]] -> [[..:​pefs:​2.9:​localt|localT]]
 +
 +
 +==== Split of methodDefT ====
 +
 +
 +Up to JTransformer 2.7.1 [[..:​pefs:​old:​methoddeft|methodDefT]] represented all kinds of methods, including constructors and initializers. From 2.8.0 
 +the previous [[..:​pefs:​old:​methodDefT|methodDefT]] PEF has been split into 
 +  * [[..:​pefs:​2.9:​constructorT|constructorT]] -- for constructors
 +  * [[..:​pefs:​2.9:​classInitializerT|classInitializerT]] -- for class initializers and 
 +  * [[..:​pefs:​2.9:​methodT|methodT]] for proper class and instance methods.
 + 
 +So methodT represents a smaller set then methodDefT did. The behaviour of methodDefT is simulated by the auxiliary predicate [[..:​pefs:​2.9:​methoddef|methodDef]] (note the missing T suffix, indicating that this is not a Tree node but computed as the union of the three new node types). ​
 +
 +==== Explicit package access modifier ====
 +
 +The fact "​modifierT(ID,​ '​package'​)."​ represends the package visibilty of the element with id ID. Before JTransformer 2.8.0 no modifierT fact was created for package visible elements. That mimiked the implicit declaration of package visibility in Java (by not declaring any visibility) but was highly inconvenient because it required special treatment of package visibility in all analyses and CTs. 
 +
 +=== Example ===
 +
 +Java source:
 +<Code lang-java>​
 +void myFunction(double i) { ... }            // implicit package visibility  ​
 +</​Code>​
 +Corresponding facts  (new representation):​
 +<Code lang-prolog>​
 +methodT(#​methodT_ID,​ ..., '​myFunction',​ ..., type(basic, void, 0), [], ...).
 +modifierT(#​methodT_ID,​ '​package'​). ​          % explicit package visibility ​
 +</​Code>​
 +
  
research/jtransformer/api/java/migration/2.8.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019