normDDe (1158428), страница 9
Текст из файла (страница 9)
Function zapu writes condition-on-domain into Table of conditions and returns <reference in Table of conditions >.
Function usls1 writes line
| name-conditional domain | name-conditional-domain | name-domain | ref-on-condition |
into Table of conditional domains.
Function protes receives name-domain as an argument and produces true root domain (it is name-domain, if name-domain is an unconditional domain, or the result of recursive search in Table of conditional domains of unconditional root domain).
Besides, function checks if the conditions for name-conditional domain in the condition chain are contradictory as it happens when name-domain is a conditional domain. The principle of checking is described below. The line containing name-conditional domain is taken from Table of conditional domains. Then ref-on-condition is chosen and attribute ‘Y’ or ‘N’ are determined depending on the condition being true or false for name-conditional domain. Besides name-domain is chosen and the procedure of choosing the conditions and attributes for it is kept repeating till current name-domain is unconditional. If in the resulted chain of conditions and attributes there are at least two identical ref-on-condition with different attributes it means that conditions are contradictory and domain name-conditional domain is empty. In this case
Function fixes error:
error code 13 'domain’ <error context>’is empty’
Function usls2 writes information about both domains name-conditional domain into Symbol table and Table of domains.
5.3.3Group e statements processing (function kbbxo)
It analyses and processes declaration-of-input. Syntax in Norma language:
declaration-of-input :
INPUT list-input-scalar
INPUT input-on-domain
input-scalar :
name-scalar [ attributes ]
input-on-domain :
list input-output-variable ON unconditional domain
input-output-variable :
name-variable-on-domain [ attributes ]
Function receives a declaration of input variables from group e of List of Norma statements and calls function kbin.
General structure of function opiska control is given in the following scheme.
pack
obpbxs doplef
k
bbxo obpbx
obpsc zapf dopkdc dopgdc
pack
Function obpbx chooses current element list input-output-variable or list-input-scalar and depending on the type of this element calls function obpbxs or obpsс. While choosing current element operation kba=kba+1 is done, i.e. the list of input is divided into separate statements and each statement is given its own statement number.
Function fixes error:
error code 201 'incorrect element list of input variables'<error context>
Function obpbxs processes input-output-variable ON unconditional domain. This construction is considered as an operator with empty right part.
Function pack processes attributes of input-output and puts information about attributes into Table of input-output formats.
Function fixes errors:
error code 234 'incorrect format: missed characteristic in specifier of format'
error code 235 'incorrect format: missed index'<error context> 'from attribute ORDER'.
error code 236 'incorrect format: missed , after attribute'
error code 237 'incorrect format: incorrect attribute '<error context>
error code 238 'incorrect format: attribute ORDER must be unic'
error code 239 'incorrect format: attribute FILE must be unic'
error code 240 'incorrect format: missed attribute ORDER'
error code 241 'incorrect format: scalar variable'<error context>' has attribute ORDER'.'
error code 242 'incorrect format: variable '<error context>' has not index '<error context>'
error code 243 'incorrect format: missed attribute STR'
error code 244 'incorrect format: attribute format must be uni'
error code 245 'incorrect format: missed = in attribute FILE'
error code 246 'incorrect format: missed file name in attribute FILE'
error code 247 'incorrect file name'
error code 248 'incorrect format: forbidden attribute for INPUT'
error code 256 'incorrect format: '<error context>' is not index'
error code 266 'incorrect format: repeated attribute ALL'
error code 269 'incorrect format: forbidden attribute for variable on domain in OUTPUT'
error code 270 'incorrect format: forbidden attribute for scalar in OUTPUT'
error code 276 'incorrect format: attribute STR or TAB or SPACE is not integer'
error code 277 'incorrect format: missed . in attribute format'
Function doplef checks if the variable is allowable in the left part of the operator. This variable must be declared as a variable declared on domain and declared domain must include operator's domain.
Function fixes errors:
error code 411 'incorrect declaration or using variable'<error context>
error code 77 'domain of operator is not in declaration domain of variable' <error context>
error code 78 'indexes'<error context>' of variable '<error context>' are not indexes’ <error context>' of operator domain'
error code 79 'dimension'<error context>' of variable '<error context>' is not equal ot dimension’ <error context>' of operator domain'
Function obpsc processes input-scalar. This construction is considered as an operator with an empty left part.
Function zapf puts information about current element of input list into Table of functional dependencies and puts information about the body of the element of input list into Table of operators body.
Function dopkdc puts information about current element of input list into What-compute table.
Function dopgdc puts information about current element of input list into Where-compute table.
5.3.4Group f statements processing (function kbbyx)
It analyses and processes declaration-of-output. Syntax in Norma language:
declaration-of-output :
OUTPUT list-output-scalar
OUTPUT output-on-domain
output-scalar :
name-scalar [ attributes ]
output-on-domain :
list- input-output-variable ON domain
input-output-variable :
name-variable-on-domain [ attributes ]
Function receives current declaration of output variables from group f of List of Norma statements and calls function kbout.
General structure of function kbbyx control is given in the following scheme.
pack
obrs vxodit
k
bbyx obpbyb
obrsc zapf dopkdc
pack
Function obpbyb chooses current element list input-output-variable or list-input-scalar and depending on the type of this element calls function obrs or obrsс. While choosing current element operation kba=kba+1 is done, i.e. the list of input is divided into separate statements and each statement is given its own statement number
Function fixes error:
error code 200 'incorrect element list of output variables'<error context>
Function obprs processes input-output-variable ON domain. This construction is considered as an operator with an empty left part.
Function fixes errors:
error code 411 'incorrect declaration or using variable'<error context>
error code 205 'domain of output variable'<error context>’is not in declaration domain’
Function pack processes attributes of input-output and puts information about attributes into Table of input-output formats.
Function vxodit checks if a variable in the right part of the operator is allowable.
Function obpsc processes input-scalar. This construction is considered as an operator with an empty left part.
Function fixes error:
error code 411 'incorrect declaration or using variable'<error context>
Function zapf puts information about current element of output list into Table of functional dependencies and puts the body of the element of output list into Table of operators body.
Function dopkdc puts information about current element of output list into What-compute table.
5.3.5Group g statements processing (function kvopr1)
It analyses and processes construction operator. Syntax in Norma language:
operator :
scalar-operator
operator-ASSUME
call-part
Function receives current operator from group g of List of Norma statements and calls function kbfor.
The result of function's work is information about the variable (variables) computed in the operator written into Table of functional dependencies, What-compute table, Where-compute table, and body of operator written into Table of operators body. If the errors have been detected in the result of operator's analyses information isn't written.
Stacks nom and mom are used in processing of any operator. Top of stack nom contains statement number of operator being processed at the moment ( for scalar-operator stack scalar-operator is empty at start).
General structure of function kvopr1 control is given in the following scheme.
scop
k
vopr1 opv6
kvo2
Function kvopr1 calls function scop (processing scalar-operator), opv6 (processing operator-ASSUME) or kvo2 (processing call-part in operator-ASSUME or out of operator-ASSUME) depending on the type of operator.
Function fixes errors:
error code 80 'incorrect left side of operator ASSUME: '<error context>' can not have indexes'
error code 415 'incorrect operator'
5.3.5.1Processing scalar-operator (function scop)
Norma syntax:
scalar-operator :
name-scalar = scalar-arithm-expression















