MA language

A DAG is described with an XML representation which is close to DIET profile representation. In addition to the profile description (problem path and arguments), this description represents also the data dependencies between ports (source/sink), and contains the node identifiers (which must be unique in the DAG) and the precedences between nodes. This last information can be partial since it can be retrieved from the dependencies between ports, however it can be useful to define a temporal dependency without port linking (using the prec id keyword, see xml/matrix.xml for such an example).

The general structure of this description is:

<dag>
  <node id="..." path="...">
    <arg name="..." type="........" value=".."/>
    <in name="..." type="........" source="......."/>
    <inOut name="..." type="........" source="......."/>
    <out name="...." type="........" sink="......"/>
    <out name="...." type="........" sink="......"/>
  </node>
  ....

A node is defined by its identity and the computing problem it requests, i.e., the problem path. For each node, an input data is either specified with a line describing its name, type and possibly from which precedent node it has to be transferred, either with a line describing its name, type and value in case the data is not generated by a previous task. An output data is specified within a line containing its name and type. Note the in order to use a data as a source or a sink, its name must be prefixed with the node identity (which avoids name conflicts).

For example the source of the input port in3 is the port out2 of the node n1 and the data is a DIET_INT, than the element must be described as follow:

    <in name="in3" type="DIET_INT" source="n1#out2"/>

The link between input and output ports must be described either by a source value in the in element, or by a sink value in the out element. Specifying both does not cause an error but duplicates the information.

The example shown in Figure 15.1 can be represented by this XML description:

<dag>
  <node id="n1" path="succ">
    <arg name="in1" type="DIET_INT" value="56"/>
    <out name="out1" type="DIET_INT"/>
    <out name="out2" type="DIET_INT"/>
  </node>
  <node id="n2" path="double">
    <in name="in2" type="DIET_INT" source="n1#out1"/>
    <out name="out3" type="DIET_INT"/>
  </node>
  <node id="n3" path="double">
    <in name="in3" type="DIET_INT" source="n1#out2"/>
    <out name="out4" type="DIET_INT"/>
  </node>
  <node id="n4" path="sum">
    <in name="in4" type="DIET_INT" source="n2#out3"/>
    <in name="in5" type="DIET_INT" source="n3#out4"/>
    <out name="out4" type="DIET_INT"/>
  </node>
</dag>

The DIET Team - Mer 29 nov 2017 15:09:02 EST