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

Next revision
Previous revision
research:jtransformer:api:java:pefs:2.9:extendst [2011/01/11 16:12]
127.0.0.1 external edit
research:jtransformer:api:java:pefs:2.9:extendst [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +----
 +
 +=== extendsT(#​class,​ #​extendedClass) ​ ===
 +Represents the **immediate** subtype/​supertype relation. Transitive super-/​subtyping is expressed by the predicate [[..:​..:​queries:​subtype|subtype(#​subClass,​ #​superClass)]].
 +
 +=== Arguments ===
 +== ==
 +**#class:** [[classT|classT]] \\ 
 +ID of an object type (class or interface)
 +
 +**#​extendedClass:​** [[classT|classT]] \\ 
 +ID of the direct supertype (superclass or superinterface).\\ ​
 +Note: Interfaces that have no explicit super-interface in the source code have the class java.lang.Object as direct supertype.
 +
 +=== Sample Java Source ===
 +== ==
 +<Code lang-java>​
 +public class HelloWorld extends HelloUniverse {            //#class
 + ...
 +}
 +
 +...
 +public class HelloUniverse {                               //#​extendedClass
 +  ...
 +}
 +
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +==  ==
 +<Code lang-prolog>​
 +extendsT(#​class,​ #​extendedClass).
 +classT(#​class,​ '​null',​ '​HelloWorld',​ _).
 +classT(#​extendedClass,​ '​null',​ '​HelloUniverse',​ _).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_relation('​Java',​extendsT,​[
 +     ​ast_arg(sub, ​  ​mult(1,​1,​no ), id,   ​[classT]), ​
 +     ​ast_arg(super,​ mult(1,1,no ), id,   ​[classT]) ​
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/2.9/extendst.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019