User Tools

Site Tools


Sidebar

<menu col=1,align=center>

<item>Documentation||[[lara:documentation]]|{{:lara:img:dictionary.png?25}}</item>
<item>Downloads||[[lara:downloads]]| {{:lara:img:projects.png?25}}</item>
<item>Tutorials||[[lara:tutorial]]|{{:lara:img:books.png?25}}</item>
<item>Other uses of LARA||[[lara:other]]|{{:lara:img:globe.png?25}}</item>
<item>About Us||[[https://sites.google.com/site/specsfeup/]]| {{:lara:img:specslogo.png?25}}</item>
<item>Projects||[[lara:usage]]| {{:lara:img:math.png?25}}</item>

</menu>

/* They are empty */ /* <item>FAQ||faq|</item> */ /* <item>Dev. Team||team| </item> */ /* <item>About LARA||about|</item> */

lara:docs:larai

This is an old revision of the document!


larai

The LARA interpreter is a tool able to interpret an Aspect-IR and execute its aspects. larai, in its basis, can execute any arbitrary imperative code and execute tools and commands that are not part of larai. However, this interpreter cannot carry out weaving-related tasks, such as selecting points in the code and apply actions. In order to do so, larai can be connected to a [lara:docs:weavingengine|weaving engine] that is responsible of parsing the target source code, select join points and retrieve attribute information, apply actions, and generate the resulting code.

larai as a standalone has been used for different purposes:

  • As scripting language
  • Tools execution
  • Coordination of a compilation flow (e.g. instrumentation→optimization→compilation→execution→profile).
  • Design-space exploration (e.g. using previous objective)

NOTE: larai has a builtin larac, meaning that larac is not required as a separated tool for lara→Aspect-IR compilation and hence a .lara file may be given as input argument of larai.

Execution

This interpreter may be executed in two different ways: by command line for immediate execution of a lara file or by an IDE for developing and execute/test aspects.

Command Line

larai is an executable jar file (download here) that always expects a .lara| file as the first input argument and has a set of optional arguments:



The following table provides a further explanation of the larac options.

Short Option Long option Argument Description
-a –aspectir - Shows the resulting Aspect-IR in the console
-b –verbose <0-3> Change the message level (default: 3):
0: none
1: errors
2: errors and warnings
3: errors, warnings and logs
-d –debug - Execute in debug mode. This mode displays all information of the compilation to the log stream. Useful for reporting bugs to the larac developer
-h –help - List the available larac options
-i –include <dir+> Include a list of folders that contain lara aspect files. Multiple directories can be listed by separating their path with ';'
-l –language <C/Java/…> Change the concerning programming language (default: C). This option is deprecated and currently ignored by the compiler, as larac now only deals with the language specification.
-o –output <dir> Change Output directory of resulting files. Default: .\
-r –resource <resource+> Include a list of resources that reference lara aspect files. This option is important when working with lara aspects that are part, and thus resources of a Java program (e.g. when working with native aspects of MANET or Kadabra). Separate paths with ';'
-s –stream <file> Change the output stream to a file, instead of using the java default output stream assigned in java.lang.System.out.
-v –version - Shows the version of the LARA language and the compiler
-x –xmlspec <dir> Define the directory in which the language specification is stored (default: .\). The directory must contains the three files of the language specification (see more in Language Specification)

IDE

Weaver Engine API

Default Weaver

New Weaving Environment

lara/docs/larai.1500911613.txt.gz · Last modified: 2019/09/22 15:46 (external edit)