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:externalt [2015/04/22 13:44]
fabian.noth
research:jtransformer:api:java:pefs:4.0:externalt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +----
 +
 +=== externalT(#​id) ​ ===
 +
 +It expresses that the class with identity #id is only available as byte-code. This has two implications:​
 +  - For byte-code classes JTransformer only generates [[:​research:​jtransformer:​prologast|PEFs]] at interface level
 +  - the class and all the related PEFs cannot be modified by program transformations.
 +
 +The typical use of externalT/1 is therefore in the precondition of a [[..:​..:​..:​..:​tutorial:​transformation| conditional transformation]],​ as a check that the class can be transformed.
 +
 +=== Arguments ===
 +== ==
 +**#id:** [[classt|classT]]\\ ​
 +ID of the byte-code class. This ID is NOT the ID of the externalTfact but just a reference to the fact representing the byte-code class.
 +
 +/*
 +==  ==
 +<Code lang-java>​
 +
 +
 +</​Code>​
 +*/
 +
 +=== PEF Representation ===
 +Consider for example the class "​java.lang.Object"​ that is part of the JDK as a pre-compiled,​ non-modifiable byte-code class.
 +It would be represented as follows:
 +
 +==  ==
 +<​Code>​
 +   ​packageT(#​packageId,​ '​java.lang'​). ​              // Package '​java.lang'​
 +   ​classT(#​classId,​ #packageId, '​Object',​ ...).  // Class '​Object'​
 +   ​externalT(#​classId). ​                              // '​Object'​ is external
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_relation('​Java',​externalT,​[
 +     ​ast_arg(id, ​    ​mult(1,​1,​no ), id,   ​[classT]) ​
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/4.0/externalt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019