normDDe (1158428), страница 3
Текст из файла (страница 3)
<begin of range>::=<integer>
<end of range>::=<integer>
3.9.2Table of conditions
Line of Table of conditions has the form:
| condition body |
<condition body>::=<sequence of tokens>
3.9.3Table of conditional domains
Line of Table of conditional domains has the form :
| name-conditional domain | name-conditional-domain | name-domain | ref-on-condition |
<name-conditional domain>::=<token code>
<name-domain>::=<token code>
<ref-on-condition>::=<reference in Table of conditions >
Main function which do the operations on domains in the process of translation and use the structures described above.
Function peres checks non-emptiness of D1 and D2 intersection.
Arguments: D1, D2 - D1, D2 are <token code>.
Result: 0 if D1 D2=
1 if D1 D2
Function vxodit checks implication of domain D1 into D2.
Arguments: D1, D2 - D1, D2 are <token code>.
Result: 0 if D1 D2=
1 otherwise
3.9.4Table of diagonals
Table of diagonals is used for diagonal domains' representation. Syntax in Norma language:
declaration-of-diagonal-domain :
name-diagonal-domain : name-unconditional-domain / list-condition-on-index
condition-on-index :
name-index rel-except-not-equal-operation name-index [{ +,- } const-expression-without-sign]
Line of Table of diagonals has the form:
|
| diagonal-index | … | diagonal-index |
<name-diagonal domain>::=<token code>
Structure of <diagonal-index> element:
| name-index | name-index | displacement | displacement |
<name-index>::=<token code>
<displacement>::=<integer>
Information about crossing points of diagonals of the type described below with co-ordinate axis name-index1 is held in Table of diagonals
name-index1 =name-index2 [{ +,- } const-expression-without-sign]
These diagonals are set in the frame (name-index1, name-index2). This information is enough find all the points of diagonal domain name-diagonal-domain , having declaration of domain name-unconditional-domain (considering the type of operation rel-except-not-equal-operation).
For example, in the result of processing declarations
KL: ( (k=1..10) ; (l=1..10) ) . Diagonal: KL/ k=l, k<l+5,k>l+1.
given below line is put into Table of diagonals ( accurate to token codes )
|
| k | l | 0 | 0 | k | l | 4 | 2 |
Geometrical interpretation of Diagonal domain:
k k=l+4 k=l+2 k=l
10
4
2
1
0 1 10 l
Domain Diagonal consists of the points with integer co-ordinates placed on line k=l or between the lines k=l+2 and k=l+4.
3.10Table of ordered indexes
Table of ordered indexes is used for fixing the order of index space's directions. This order coincides with the order of indexes' names in the table. Table has the form:
| index |
| index |
| … |
<index>::=<token code>
3.11Table of distribution indexes
Table of distribution indexes is used for holding information about indexes' names (data are distributed to the processors by these indexes' names) and corresponding number of processors.
Table has the form:
| index | number of processors |
| index | number of processors |
<index>::=<token code>
<number of processors>::=<integer>
3.12Table of functional dependencies
Table of functional dependencies is used for holding data dependencies from the operators of Norma-program. Variable X depends on variable Y, if the value of Y is required for X computation in the given operator. If the values of variable Y on domain Domain2 are required for computing the values of variable X on domain Domain1 then domain Domain2 is called domain of required values ( we'll denote this type of domain as need-domain).
In Table of functional dependencies information for the operators of the following types is given: scalar-operator, operator-ASSUME, call-part, declaration-of-input, declaration-of-output.
Line of Table of functional dependencies has the form:
| left-hand-side-variable | dependencies | ref-on-body |
<ref-on-body>::=<reference in Table of operators body >
The value of field <left-hand-side-variable> from the table depending on the type of operator:
| type of operator | left-hand-side-variable |
| scalar-operator | <statement number><variable>’S’ |
| operator-ASSUME | <statement number><variable><name-domain> |
| input-scalar | <statement number><variable>’SV’ |
| input-on-domain | <statement number><variable><name-domain>’V’ |
| output-scalar | <statement number><variable>’SO’ |
| output-on-domain | <statement number><variable><name-domain>’O’ |
| exit-condition | <statement number>’VS’ |
| call-part | <statement number>’R’ |
<statement number> ::=<integer>
<variable>::=<token code>
<name-domain>::=<token code>
The values of field <dependencies> from the table depending on the type of operator:
| type of operator | dependencies |
| scalar-operator | <term-dependencies> |
| operator-ASSUME | <term-dependencies> |
| input-scalar | |
| input-on-domain | |
| output-scalar | |
| output-on-domain | |
| exit-condition | <term-dependencies> |
| call-part | <parameter-dependencies> |
The value of field <term-dependencies> from the table is a reference to the list of dependencies of the following type:
|
| term-dependency | … | term-dependency |
The structure of <term-dependency> element depending on the type of logical or arithmetical expression's term ( for the terms of other types there is no data dependence and they are not put into the table):
| type of term | term-dependency |
| iterated-scalar | <name-scalar ><ind-expr><name-result><need-domain> |
| iterated-variable-on-domain | <name-var><ind-expr><name-result><new-ind-expr><need-domain> |
| name-scalar | <name-scalar >’S’ |
| variable-on-domain | <name-var><ind-expr><name-var><new-ind-expr><need-domain> |
| in-parameter-of-function | <parameter dependencies> |
<name-scalar>::=<token code>
<name-var>::=<token code>
<name-result>::=<token code>
<ind-expr>::=<sequence of token codes>
<new-ind-expr>::=<sequence of token codes>
<need-domain>::=<token code>
The value of field <parameter-dependencies> from the table is a reference to the list of dependencies of the following form:
|
| param-dependency | … | param-dependency |
Structure of <param-dependency> element depending on the type of part parameter (for the parameters of other types there is no data dependence and they are not put into the table):
| type of parameter | param-dependency |
| arithm-expression | <term-dependencies> |
| name-variable-on-domain ON domain-of-parameter | <name-var><need-domain> |
| iterated-variable-on-domain ON domain-of-parameter | <name-var><need-domain> |
<name-var>::=<token code>
<need-domain>::=<token code>
Compiler uses two supplementary tables What-compute table and Where-compute table for optimising algorithm of analysis and processing data dependencies.
3.12.1What-compute table
Line of What-compute table has the form:
| statement number | name-variable | name-domain |
<statement number>::=<integer>
<name-variable>::=<token code>
<name-domain>::=<token code> OR ‘S’
This information means that variable with name name-variable on domain name-domain (if name-variable - name of scalar variable, then <name-domain>=’S’) is computed in the operator with statement number.
3.12.2Where-compute table
Line of Where-compute table has the form:
|
| statement number | name-domain | … | statement number | name-domain |
<statement number>::=<integer>
name-diagonal domain
term-dependency














