SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


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:

Split of methodDefT

Up to JTransformer 2.7.1 methodDefT represented all kinds of methods, including constructors and initializers. From 2.8.0 the previous methodDefT PEF has been split into

So methodT represents a smaller set then methodDefT did. The behaviour of methodDefT is simulated by the auxiliary predicate 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:

void myFunction(double i) { ... }            // implicit package visibility  

Corresponding facts (new representation):

methodT(#methodT_ID, ..., 'myFunction', ..., type(basic, void, 0), [], ...).
modifierT(#methodT_ID, 'package').           % explicit package visibility 
research/jtransformer/api/java/migration/2.8.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019