SDA SE Wiki

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

User Tools

Site Tools



whileT(#id, #parent, #encl, #condition, #body)

Represents the while statement.

Formerly called whileLoopT: Renamed since JTransformer 2.3.1_200804151649.

Arguments

#id: id
the unique ID assigned to this fact.

#parent: id
ID of the parent node.

#encl: methodT, constructorT, classInitializerT
ID of the enclosing element.

#condition: expressionType
ID of the expression of this while statement.

#body statementType
ID of the body of this while statement.

Sample Java Source

void expression(){
	while (true){        // corresponding code line to whileT
		...
	}
}

Its PEF Representation

methodT(#enclMethod, ..., 'expression', [], type(basic, void, 0), [], #parent).
blockT(#parent, #enclMethod, #enclMethod, [#id]).
whileT(#id, #parent, #enclMethod, #condition, #body).
literalT(#condition, #id, #enclMethod, type(basic, boolean, 0), 'true').
blockT(#body, #id, #enclMethod, [...]).

AST Specification

ast_node_type_spec(whileT,[
     ast_arg(id,     mult(1,1,no ), id,   [whileT]),
     ast_arg(parent, mult(1,1,no ), id,   [id]),
     ast_arg(encl,   mult(1,1,no ), id,   [methodT, constructorT, classInitializerT]),
     ast_arg(cond,   mult(1,1,no ), id,   [expressionType]),
     ast_arg(body,   mult(1,1,no ), id,   [statementType])
]).

research/jtransformer/api/java/pefs/4.2/whilet.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2024