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:languagespecification

Language Specification

Join Point Model

The join point model represents a hierarchical structure of the points of interest one can select on the target application.

joinPointModel.xml
<joinpoints>
	<global>
		<select name="all" type="node"/>
	</global>
	<joinpoint name="file" root="true" > <!-- by default, isRoot is considered false -->
		<select name="function" type="function"/> 
	</joinpoint>
	<joinpoint name="function">
		<select name="input" type="var"/>
		<select name="output" type="var"/>
		<select name="body"/> <!-- if no type is  specified, then it is considered that the name already specifies the type-->
							  <!-- or is it more logical to have the type mandatory and the name optional? -->
	</joinpoint>
	<joinpoint name="body" type="section"> <!-- section is a super type of body, i.e., the selects and attributes for section are also available for body! -->
		<select name="first" type="statement"/>
		<select name="last" type="statement"/>
		<select name="statement"/>
		<select name="var"/>
		<select name="if"/>
		<select name="otherIf" type="if"/>
		<!-- ... -->
	</joinpoint>
	<joinpoint name="loop"/>
 
	<joinpoint name="if">
		<select name="condition" type="expression"/>
		<select name="then" type="body"/>
		<select name="elseif"/>
	</joinpoint>
	<joinpoint name="section">
		<select name="test"/>
	</joinpoint>
</joinpoints>

Attributes Model

The information one can retrieve from the join points captured.

artifacts.xml
<artifacts>
	<!-- Attributes for all join points -->
	<global>
		<attribute name="file_name" type="String" />
		<attribute name="initial_col" type="int" />
		<attribute name="initial_line" type="int" />
		<attribute name="end_col" type="int" />
		<attribute name="end_line" type="int" />
		<attribute name="num_oper" type="int" />
		<attribute name="num_calls" type="int" />
		<attribute name="num_array_refs" type="int" />
		<attribute name="num_pointer_refs" type="int" />
	</global>
	<artifact name="file" default="name">
		<attribute name="name" type="String" />
	</artifact>
	<artifact name="var" default="name">
		<attribute name="reference" type="{read,write,all,declaration}" />
		<attribute name="num_read" type="int" />
		<attribute name="num_writes" type="int" />
		<attribute name="num_accesses" type="int" />
		<attribute name="is_const" type="Boolean" />
		<attribute name="scope" type="{local,global}" />
		<attribute name="base_type" type="String" />
		<attribute name="type" type="String" />
		<attribute name="is_array" type="Boolean" />
		<attribute name="is_scalar" type="Boolean" />
		<attribute name="is_pointer" type="Boolean" />
		<attribute name="shape" type="String" />
		<attribute name="size" type="int" />
		<attribute name="name" type="String" />
	</artifact>
	<artifact name="loop" default="type">
		<attribute name="type" type="{for,while,do-while}" />
		<attribute name="num_iterations" type="int" />
		<attribute name="is_bound" type="Boolean" />
		<attribute name="is_normalized" type="Boolean" />
		<attribute name="increment_value" type="int" />
		<attribute name="is_innermost" type="Boolean" />
		<attribute name="nested_level" type="int" />
		<attribute name="num_levels" type="int" />
		<attribute name="num_children" type="int" />
		<attribute name="is_perfect" type="Boolean" />
		<attribute name="interchange_legal" type="Boolean">
			<parameter name="loop2" type="ALoop" />
		</attribute>
	</artifact>
	<artifact name="body">
		<attribute name="num_statements" type="int" />
		<attribute name="num_loops" type="int" />
		<attribute name="num_for" type="int" />
		<attribute name="num_while" type="int" />
		<attribute name="num_dowhile" type="int" />
	</artifact>
	<artifact name="function" default="name">
		<attribute name="name" type="String" />
		<attribute name="return_type" type="String" />
		<attribute name="hardware_kernel" type="Boolean" />
		<attribute name="latency" type="int" />
		<attribute name="exec_time" type="int" />
		<attribute name="resources" type="int" />
		<attribute name="exec_contribution" type="int" />
		<attribute name="complexity" type="String" />
		<attribute name="num_lines" type="int" />
	</artifact>
 
	<object name="SYM">
		<attribute name="name" type="String" />
		<attribute name="type" type="String" />
	</object>
</artifacts>

Action Model

Actions that can be applied over the application.

actionModel.xml
<actions>
    <!-- Actions available within the REFLECT flow -->
	<action name="optimize">
			<parameter name="kind" type="string"/>
			<parameter name="k" type="int" default="0"/>
			<parameter name="l" type="int" default="0"/>
			<parameter name="m" type="int" default="0"/>
	</action>
	<action name="map">
		<parameter name="to" type="string"/>
		<parameter name="id" type="string" default="0"/>
		<parameter name="mode" type="string" default="default"/>
	</action>
	<action name="insert">
			<parameter name="position" type="string" default = "before"/>
			<parameter name="code" type="template"/>
	</action>
	<action name="out">
			<parameter name="code" type="template"/>
	</action>
	<action name="def">
		<parameter name="attribute" type="string"/>
		<parameter name="value" type="Object"/>
	</action>
</actions>
lara/languagespecification.txt · Last modified: 2019/09/22 15:47 (external edit)