User Tools

Site Tools


lara:tutorial:languagespecification

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
lara:tutorial:languagespecification [2015/04/06 23:33]
tdrc [Action Model]
lara:tutorial:languagespecification [2019/09/22 15:47] (current)
Line 1: Line 1:
-====== ​Tutorial - Target Language Specification ====== +====== ​Writing a Target Language Specification ====== 
 +;#; 
 +[[lara:​tutorial:​advanced| ← Advanced LARA ]] | [[lara:​tutorial:​languagespecification| Language Specification ]] | [[lara:​tutorial:​larai|Basic larai → ]] 
 +;#;
 The most critical element of an aspect-oriented language mechanism is the join point The most critical element of an aspect-oriented language mechanism is the join point
 model, the model that represents the programming language’s points of interest, like method model, the model that represents the programming language’s points of interest, like method
Line 9: Line 11:
 supported points of interest. ​ supported points of interest. ​
  
-One of the aspects of the LARA language is that it is partially agnostic to the target language. How LARA knows the join point model, the available attributes, and action that can be applied, is by using an external representation of the target language. This is accomplished by defining three files that represents the join point model and the attributes of a certain programming language, and the actions available in the weaver that will execute the LARA aspects. This approach proves an important feature of the meta-language ​that+One of the aspects of the LARA language is that it is partially agnostic to the target language. How LARA knows the join point model, the available attributes, and action that can be applied, is by using an external representation of the target language. This is accomplished by defining three files that represents the join point model and the attributes of a certain programming language, and the actions available in the weaver that will execute the LARA aspects. This approach proves an important feature of LARA that
 represents its flexibility and expandability. The three files are defined in an XML format, each with specific tags and attributes. represents its flexibility and expandability. The three files are defined in an XML format, each with specific tags and attributes.
  
Line 19: Line 21:
  
   - The gray arrow between **assignExpr** → **expr** means that **assignExpr** inherits everything that **expr** contains, including selectable join points, attributes and actions;   - The gray arrow between **assignExpr** → **expr** means that **assignExpr** inherits everything that **expr** contains, including selectable join points, attributes and actions;
-  - The arrows between **body** ↔ **loop** defines that **body** is able to select the loops inside itself and, in turn, *loop* is able to select its own body;+  - The arrows between **body** ↔ **loop** defines that **body** is able to select the loops inside itself and, in turn, **loop** is able to select its own body;
   - The two arrows connecting **body** → **stmt** means that in the first connection (without label) we are able to select all statements inside the body and in the second connection (with label **first_stmt**) we are going to select one type of statement (the first statement of the body). This is an example of having different selects for the same type of join point.   - The two arrows connecting **body** → **stmt** means that in the first connection (without label) we are able to select all statements inside the body and in the second connection (with label **first_stmt**) we are going to select one type of statement (the first statement of the body). This is an example of having different selects for the same type of join point.
 <​imgcaption jmpGraph|A simple example of a join point model hierarchy.>​ <​imgcaption jmpGraph|A simple example of a join point model hierarchy.>​
Line 373: Line 375:
 </​actions>​ </​actions>​
 </​code>​ </​code>​
 +
 +;#;
 +[[lara:​tutorial:​advanced| ← Advanced LARA ]] | [[lara:​tutorial:​languagespecification| Language Specification ]] | [[lara:​tutorial:​larai|Basic larai → ]]
 +;#;
lara/tutorial/languagespecification.1428355981.txt.gz · Last modified: 2019/09/22 15:46 (external edit)