SDA SE Wiki

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

User Tools

Site Tools


sourceT(#id, 'comment text')

Represents the content of a comment. The creation of these facts has to be enabled in the JTransformer Preferences.

Arguments

#id: id
ID of the commentT where this comment belongs to.

comment: atom
the text of the comment.

Sample Java Source

...
// line comment for method m
public void m() {
...
}
...

Its PEF Representation

methodT(#methodId, #classId, m,[], #typeRef, [], #block).
commentT(#commentId, #methodId, lineComment).
sourceT(#commentId, '// line comment for method m').

AST Specification

ast_relation_type_spec(sourceT,[
     ast_arg(id,      mult(1,1,no ), id,   [commentT]),
     ast_arg(comment, mult(1,1,no ), attr, [atomic])
]).
research/jtransformer/api/java/pefs/3.0/sourcet.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2025