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
Last revision Both sides next revision
research:jtransformer:api:meta:sourcelocations:sourcelocationapi [2019/01/11 14:42]
Günter Kniesel
research:jtransformer:api:meta:sourcelocations:sourcelocationapi [2019/01/29 22:05]
Günter Kniesel
Line 5: Line 5:
 Source location information is represented by facts for the following predicates: Source location information is represented by facts for the following predicates:
  
-  * A [[slT]] fact provides source location information for an AST element that has an own ID. 
-  * A [[sl_identifierT]] fact provides source location information for the identifier //part// of an element with own ID. 
-  *  A [[sl_typeT]] fact provides source location information for the type reference //part// of an element with own ID. For instance, a field declaration (MyType myfield;) contains a reference to the type MyType. The sl_typeT stores its source location. ​ 
   * A [[sl_packageT]] fact provides source location information for the package declaration in a compilation unit.   * A [[sl_packageT]] fact provides source location information for the package declaration in a compilation unit.
 +  * A [[slT]] fact provides source location information for any other AST element (no packagTe) that has an own ID. Somethimes, the [[slT]] information is too coarse-grained. To access relvant parts of an element, in particular its identifier and type, we use two additional PEF types:
 +    * A [[sl_identifierT]] fact provides source location information for the identifier //part// of an element with own ID (and an own  [[slT]] fact). ​ For instance, a field declaration (private MyType myfield;) contains a reference to the identifier "​myfield"​. An associated sl_identifierT stores the source location of "​myfield",​ whereas a separate slT fact stores the source location for the entire field declaration.  ​
 +    * A [[sl_typeT]] fact provides source location information for the type reference //part// of an element with own ID  (and an own  [[slT]] fact). For instance, a field declaration (private MyType myfield;) contains a reference to the type "​MyType"​. An associated sl_typeT stores the source location of "​MyType",​ whereas a separate slT fact stores the source location for the entire field declaration.
  
 Implementors of StarTransformer plugins supporting new languages are required to adhere to this specification (that is, to create suitable facts) in order for their plugin to be able to take advantage of the source location related features of StarTransformer. ​ Implementors of StarTransformer plugins supporting new languages are required to adhere to this specification (that is, to create suitable facts) in order for their plugin to be able to take advantage of the source location related features of StarTransformer. ​
research/jtransformer/api/meta/sourcelocations/sourcelocationapi.txt · Last modified: 2019/02/05 13:46 by Günter Kniesel

SEWiki, © 2019