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.1:typetestt [2017/03/03 22:29]
Günter Kniesel
research:jtransformer:api:java:pefs:4.1:typetestt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +----
 +
 +=== typeTestT (#id, #parent, #encl, #type, #​expression) ​ ===
 +
 +
 +represents the instanceof expression.
 +
 +=== Arguments ===
 +== ==
 +**#id:** id\\ 
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** id\\ 
 +ID of the parent node.
 +
 +**#encl:** [[methodT|methodT]],​ [[constructorT|constructorT]],​ [[classInitializerT|classInitializerT]],​ [[fieldT|fieldT]]\\ ​
 +ID of the fact that represents the enclosing method.
 +
 +**#type:** [[typeInst|type]]\\ ​
 +ID of the type for which this instanceof expression tests (= right operand of the expression)
 +
 +**#​expression:​** [[plastexpression|expression]]\\
 +ID of the expression whose type is tested (= left operand of this instanceof expression)
 +
 + 
 +=== Sample Java Source ===
 +== ==
 +<Code lang-java>​
 +if (test instanceof TestChild) return;
 +</​Code>​
 +
 +=== Its PEF Representation ===
 +== ==
 +<Code lang-prolog>​
 +ifT(#​ifT_ID,​ #Parent, _, #Condition, #ThenPart, '​null'​).
 +typeTestT(#​Condition,​ #ifT_ID, _, #typeref, #​expression).
 +identT(#​expression,​ Condition, _, '​test',​ _).
 +returnT(#​ThenPart,​ ID, _, '​null'​).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_type_spec(typeTestT,​[ ​   ​
 +     ​ast_arg(id, ​    ​mult(1,​1,​no ), id,   ​[typeTestT]),​
 +     ​ast_arg(parent,​ mult(1,1,no ), id,   ​[id]),​
 +     ​ast_arg(encl, ​  ​mult(1,​1,​no ), id,   ​[methodT,​ constructorT,​ classInitializerT,​ fieldT]),
 +     ​ast_arg(type, ​  ​mult(1,​1,​no ), id,   ​[type_inst]),​
 +     ​ast_arg(expr, ​  ​mult(1,​1,​no ), id,   ​[expressionType])
 +]).
 +</​Code>​
  
research/jtransformer/api/java/pefs/4.1/typetestt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2020