NORMA_DD (1158356), страница 11

Файл №1158356 NORMA_DD (Раздаточные материалы) 11 страницаNORMA_DD (1158356) страница 112019-09-18СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 11)

out-parameter :

name-scalar espis2

name-variable-on-domain ON domain-of-parameter espis3,espis4

iterated-variable-on-domain ON domain-of-parameter espis7,espis8

iterated-scalar espis5

This function checks if parameters call-part are allowable and constructs dependencies param-dependency, required to put them into Table of functional dependencies. Besides for out-parameter:

function dopkdc puts information about parameter into What-compute table, setting value <statement number> equal to the value of the top of stack nom,

function dopgdc puts information about parameter into Where-compute table, setting value <statement number> equal to the value of the top of stack nom.

Function paramt fixes errors:

error code 212 'incorrect parameter-result of part '<error context>

error code 213 'missed parameter of part'

error code 214 'incorrect parameter of part: '<error context>' is not declared or declared twice’'

error code 216 'incorrect parameter-result of part '<error context> ': computation on precede (-1) step of ITERATION'

error code 217 'incorrect parameter-result of part : reassignment '<error context>

error code 218 'incorrect parameter of part : incorrect variable'<error context>

error code 219 'incorrect parameter of part : domain'<error context>' is conditional’'

error code 220 'incorrect parameter-result of part :’ <error context>' is not iterated'’

error code 222 'incorrect parameter of part : domain of parameter'<error context>' is not in declaration domain’'

error code 223 'incorrect parameter of part : index' <error context>' with two conditions'

error code 225 'incorrect parameter of part :variable'<error context>' has not index’ <error context>

error code 226 'incorrect parameter of part : domain of operator ASSUME has not index '<error context>' of variable’<error context>

error code 229 'incorrect parameter of part : incorrect condition’ <error context>' on domain’'

error code 230 'incorrect parameter of part : incorrect index’ <error context>' in condition’'

error code 231 'incorrect parameter of part : incorrect variable’ <error context>' in condition on index ’ <error context>

error code 233 'incorrect parameter of part : incorrect condition on index’ <error context>' of variable’'<error context>

Function obrraz makes the value of field <parameter-dependencies> of Table of functional dependencies from the list of dependencies <param-dependency> built by function paramt.

Function zapf puts information about parameter into Table of functional dependencies and the body of operator into Table of operators body.

5.3.6Iteration processing (function kbiter)

It analyses and processes iteration. Syntax in Norma language:

iteration :

head-of-iteration

[ boundary-value ]

initial-value

body-of-iteration

exit-condition

end-iteration

Function receives current declaration of iteration represented in List of iterations, and calls function kb1.

General structure of function kbiter control is given in the following scheme

k biter iterzag itergr iternzn itpolag itexit

kvo1it kvo1it kvo1it

5.3.6.1Additional data structures for processing of iteration

In processing iteration following additional data structures are used.

Stack ite, its top contains <iteration number> of processed iteration. It is used in processing embedded iteration.

Attribute env, determining the type of environment: env =’B’ in processing boundary-value, env =’H’ in processing initial-value, env =’P’ in processing body-of-iteration.

Table of iterated variables is used for holding names of iterated variables and corresponding names of variables-results ( from the previous and current steps of iteration). It is used for optimisation of processing iterated variables. Structure of line from Table of iterated variables:

iterated variable name

first result variable name

second result variable name

Table of copy operators is used for holding information about additional operators generated by compiler in realisation of construction iteration.

Variable-results are introduced for holding values of each iterated variable in Fortran-program generated by compiler (first result variable - for holding values from iteration step n, and second result variable - for holding values from iteration step n-1). After finishing each step of iteration ( each stage of cycle in Fortran -program) it is necessary to provide copying values of second result variable into first result variable. For this purpose compiler generates copy operator which <statement number> is held in Table of copy operators. After establishing the order of operators' execution by the compiler copy operators are put into corresponding place of Fortran-program.

Structure of line from Table of copy operators:

iteration number

<statement number><ref-on-body>

<statement number><ref-on-body>

<statement number>::=<integer>

<ref-on-body>::=<reference in Table of operators body >

5.3.6.2Processing of head-of-iteration (function iterzag)

Norma syntax:

head-of-iteration :

ITERATION list-iterated-element ON name-iteration-index .

iterated-element :

name-variable [ ( list-name-result ) ]

Function puts <iteration number> into stack ite, analyses head-of-iteration, and specified the variables from list-name-result in ymbol table.

Function fixes error:

error code 53 'incorrect list element of iterated variables'<error context>

5.3.6.3Processing of boundary-value (function itergr)

It sets env =’B’ and calls function kvo1it of processing Norma-statements included into iteration.

5.3.6.4Processing of initial-value (function iternzn)

It sets env =’H’ and calls function kvo1it of processing Norma-statements included into iteration.

5.3.6.5Processing of body-of-iteration (function itpolag)

It sets env =’P’ and calls function kvo1it of processing Norma-statements included into iteration.

5.3.6.6Processing of Norma-statements included into iteration (function kvo1it)

Function kvo1it is similar to function kvopr1 (see 5.3.5)

scopit

k vo1it kvit

kvo2i

Function kvo1it calls functions scopit (processing scalar-operator, analogue of function scop (see 5.3.5.1)), kvit (processing operator-ASSUME, analogue of function opv6 (see 5.3.5.2)) or kvo2i (processing call-part in operator-ASSUME or out of operator-ASSUME, analogue of function kvo2 (see 5.3.5.3)) depending on the type of operator.

These functions differ from their analogies by the operations which are to be done during termination of operator's processing.

If computed in the operator variable isn't iterated variable there is no need in additional operations.

If computed in the operator variable is iterated variable additional operations are done for concordance between iterated variable name and result variable name.

For the operators set in initial-value, it is necessary to substitute iterated variable name in the left part of the operator for result variable name and to put information into Table of functional dependencies, What-compute table and Where-compute table considering this substitution.

For the operators from body-of-iteration function perzap generates copy operator for iterated variable. Function perzap puts text of operator in the form of sequence of tokens into group g of List of Norma statements and Table of operators body, and it also puts information about operator into Table of copy operators.

5.3.6.7Processing exit-condition (function itexit)

Norma syntax:

exit-condition :

EXIT WHEN log-expression

Construction exit-condition is considered as scalar-operator with left empty part.

Function analyses log-expression, calling function b1 and a (see 5.3.5.1), puts information (calling function zapf) into Table of functional dependencies and body of log-expression into Table of operators body.

Top of stack ite is cleaned.

5.4Data dependencies graph builder

Function graf is an entry point of unit Data dependencies graph builder , it is called by EndLex of unit Part unit scanner if errors haven't been detected at the previous stages of translation (i.e. error counter osh=0).

Data dependencies graph builder consists of two main blocks:

  1. DDG constructor.

    Functions: data dependencies graph (DDG) creation, entry point graf.

  2. RDDG constructor.

    Functions: reduced data dependencies graph (RDDG) creation, entry point mssg.

Structure of unit Data dependencies graph builder control:

g raf mssg pord

Function pord - entry point of unit Data dependencies graph analyser

5.4.1DDG constructor

Entry point of unit DDG constructor is function graf. General structure of function graf control is given in the following scheme.

g raf reassign strdep pre posl test

Function reassign checks characteristic of single assignment: any variable can be computed in any point of its definitional domain no more than once. Source information for checking this characteristic is Where-compute table. Following operations are done for this table.

Характеристики

Список файлов учебной работы

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
7027
Авторов
на СтудИзбе
260
Средний доход
с одного платного файла
Обучение Подробнее