Previous: Components model, Up: The YvetteML language


4.2.3 YvetteML Graph Description Language

The graph description language is used to describe the graph of an application or the content of a graph component. The previous section presents the various component which represents computation. The graph language allow the coordination and the description of the dependencies between the various component call composing the graph of an application. The language allow the expression of the control flow of the application. This section review all the construction that can appears in the description of the workflow. It begins with the complete grammar of the YvetteML graph description language. Literal terminals are given in single quotes and are case sensitive. Parentheses ( and ) indicate grouping when needed. Square brackets [ and ] enclose optional items. Vertical bars | separate alternatives. Some terminals not directly included in the grammar are uppercase and described below.

     
     graph           : stmt_list
     stmt_list       : [stmt [stmt_list]]
     stmt            : assign_stmt
                       | evt_wait_stmt
                       | evt_notify_stmt
                       | call_stmt
                       | par_stmt
                       | seq_stmt
                       | if_stmt
     assign_stmt     : lvalue ':=' rvalue
     evt_wait_stmt   : 'wait' '(' evt_cond ')'
     evt_notify_stmt : 'notify' '(' lvalue [',' lvalue_list] ')'
     call_stmt       : SCHEDULE_POLICY IDENTIFIER '(' rvalue [',' rvalue_list] ')'
     par_stmt        : 'par' ( par_block_list 'endpar' | do_block )
     par_block_list  : stmt_list ['//' par_block_list]
     seq_stmt        : 'seq' do_block
     if_stmt         : 'if' rvalue 'then' stmt_list
                       ['else' stmt_list] 'endif'
     
     
     do_block        : do_iterator_list do_exclude_list 'do'
                       stmt_list 'enddo'
     do_iterator_list: do_iterator [do_iterator_list]
     do_iterator     : '(' assign_stmt ';' rvalue ')'
     do_exclude_list : [do_exclude [do_exclude_list]]
     do_exclude      : '{' rvalue '}'
     
     
     
     evt_cond        : evt_cond_not ('or'|'and'|'xor') evt_cond_not
     evt_cond_not    : ['not'] evt_cond_single
     evt_cond_single : '(' evt_cond ')'
                       | lvalue
     
     lvalue          : IDENTIFIER range_list
     range_list      : ['[' rvalue ']' range_list]
     lvalue_list     : [lvalue [',' lvalue_list ]]
     
     rvalue          : [rvalue ('and' | 'or' | 'xor' )] rvalue_equality
     rvalue_equality : [rvalue_equality ( 'eq' | 'neq' )] rvalue_comp
     rvalue_comp     : [rvalue_comp ('lt' | 'le' | 'ge' | 'gt')] rvalue_add
     rvalue_add      : [rvalue_add ('+' | '-')] rvalue_mul
     rvalue_mul      : [rvalue_mul ('*' | '/' | '%')]rvalue_single
     rvalue_single   : [IDENTIFIER '::'] IDENTIFIER '(' rvalue_list ')'
                       | '(' rvalue ')'
                       | 'not' rvalue_single
                       | '-' rvalue_single
                       | INTEGER
                       | REAL
                       | STRING
                       | lvalue
     rvalue_list     : [rvalue [',' rvalue_list]]

An IDENTIFIER must respect the following regular expression : [a-zA-Z][a-zA-Z0-9_]*

REAL, INTEGER and STRING have the same meaning as in C and valid C number and string are valid in YvetteML.'true' and 'false' are aliases to INTEGER 1 and 0.

a SCHEDULER_POLICY is one of 'compute' or 'migrate'.

Comments start with a # and finished at the end of line. The number and the kind of spaces are not significant.

We will next present most important construction of the language. Each construction will be illustrated with one or several examples.