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

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

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

m s sp_new begk

<statement numbers> of operators included into MSCS are chosen from List of MSCS function sp_nem is called.

Function sp_new analyses index expressions of the variables included into в MSCS finds index with all index displacements ³ 0 (or all £ 0). The name of this index is fixed in list newsps (this information will be used in generation of DO loops while the operators included into MSCS are being realised). Then function begk with parameter <statement numbers> of the operators included into MSCS is called for their realisation.

5.6.4MSCS node realisation (function mssv)

Function mssv is used for realisation of the node of <parallel layer scheme> of type <ordered group number>.

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

m ssv begk

<Statement numbers> of the operators included into ordered group are chosen by Table of ordered groups and function begk is called for their realisation.

5.7Fortran DVM code generator

Entry point of unit Fortran DVM code generator is function forprint.

General structure of function forprint control is given in the following scheme.

f orprint serial-head makedimension description

dvm-declaration fp

Function forprint analyses output mode lst and the value of error counter osh in Norma part unit. For lst=2,3 and osh=0 functions of generating text representation and outputting Fortran-program into output file <target-file> are called.

Function serial-head designs operators PROGRAM or SUBROUTINE or FUNCTION in format Intermediate representation of Fortran DVM program, (List FORT), using additional structures such as part parameters list and part type record.

Function makedimension designs arrays' declarations in format Intermediate representation of Fortran DVM program, (List FORT) using Symbol table .

Function description designs declarations of simple variables and external names in format Intermediate representation of Fortran DVM program, (List FORT) using Symbol table.

Function dvm-declaration designs declarations of PROCESSORS, ALIGN, DISTRIBUTE in special comments HPF and DVM format of Intermediate representation of Fortran DVM program, (List FORT) using Table of distributed variables and Table of distribution indexes.

Function fp processes obtained by the previous functions operators and declarations, it also processes List FORT created in the process of unit Fortran DVM intermediate representation generator work. Processing means to translate <fortran-statements> represented as <sequence of token codes> into <sequence of symbols>, to divide <sequence of symbols> into lines according to the rules of Fortran program representation and to pass these lines to function info (unit Listing generator) for output into output file <target-file>.

5.8Input files analyser

Entry point of unit Input files analyser is function isiofile. Besides input data themselves input files in Norma language contain names of variables which these data are to obtain as their values. It could be explained by the fact that compiler orders input operators execution and it is to order input files according to the order of the operators.

Syntax of input files in Norma language:

file :

input-element { input-element }*

input-element :

name-scalar = arithm-constant;

name-variable-on-domain ( list-index-range ) = data ;

index-range :

name-index = int-constant .. int-constant

data :

list-data-element

data-element :

int-constant

body

int-constant ( data )

Source information for unit Input files analyser is Input variables queue and Table of input-output formats.

General structure of function isiofile control is given in the following scheme.

i siofile trees files t1 prefmt gather


fls2 checktree shaketree in-fno


sntx

Function trees chooses next element from Input variables queue and passes it to function files.

Function files calls function fls2 with argument <file-number> for processing input file and after that it calls function t1 for processing input element.

Function fls2 reads data file file with number <file-number> into array of lines data (determining its name by the table of input files' fti) and calls function sntx for checking syntax correctness of this file's contents.

Function fixes errors:

error code 271 ' file'<error context>’ is not found’

Function sntx parsing array of lines data (contents of data file file) and if there is no errors it builds data structure heap used for holding input data in the order set in data file file (this order doesn't correspond to the order set by the queue of Input variables queue).

Element of data structure heap has the form:

name-variable

name-index

range

name-index

range

data

<name-variable>::=<identifier>

<name-index>::=<identifier>

<range>::=<integer><integer>

<data>::=<Norma language notion data>

This information means that values <data> (for scalar variable of field <name-index>there is no <range>)are set for variable with name<name-variable> and indexes <name-index>=<range>, … , <name-index>=<range> in the input file.

Function fixes errors:

error code 249 'incorrect data file: in line'<error context>’missed = or ('

error code 250 'incorrect data file: in line'<error context>’missed =’

error code 251 'incorrect data file: in line'<error context>’missed , or ; or (’

error code 252 'incorrect data file: in line'<error context>’missed , or )’

error code 253 'incorrect data file: in line'<error context>’missed identifier’

error code 254 'incorrect data file: in line'<error context>’missed number’

error code 255 'incorrect data file: in line'<error context>’missed integer’

Function t1 receives next element as an argument from Input variables queue. Field <format> of this element is passed to function prefmt, then structure tree is created, used for holding input data in the order determined by queue Input variables queue. Structure tree is determined in the following way:

<tree>::= (<vector>) OR <tree><tree>

<vector>::=<n>’undefined

<n>::=<integer>

The number of structure tree elements is equal to the number of input variable elements. At start all the values of the elements of tree structure are values ’undefined’. Further processing is in transit of the values from heap structure to tree structure instead of corresponding ’undefined’.

Example. For the element of queue

X

format

I

1

10

J

1

15

K

1

2

structure tree is created

((10 ’undefined’)(15 ’undefined’)) ((10 ’undefined’)(15 ’undefined’))

Function prefmt processes field <format> and puts type of variable, number of digits in line and number of position for one digit into counters type, count, len correspondingly ( these counters will be used in the process of input file lines' creation in function shaketree).

Function gather concords structures heap and tree for the next element of queue Input variables queue. The values which correspond to the element of the queue and belong to heap are transmitted to corresponding positions in tree. Concordance of queue element and structures heap and tree is analysed and

function fixes errors:

error code 257 'incorrect data file: missed data for variable'<error context>

error code 258 'incorrect data file: repeatedly defined data for variable’<error context>

error code 259 'incorrect data file:there are less data for'<error context>’than defined in indexes’

error code 260 'incorrect data file: too much indexes for'<error context>

error code 261 'incorrect data file: not enough indexes for '<error context>

error code 274 'disaccordance of indexes'<error context>'and'<error context>'in variable declaration and in data file’'

error code 275 'disaccordance of indexes values of variable '<error context>' in INPUT and in data file'

Function checktree checks structure tree built before for certainty as there must be no elements with value ’undefined’ left. In other case,

function fixes error:

error code 262 'incorrect data file: there are undefined data for'<error context>

Function shaketree creates lines of the final reordered input file on the base of information from structure tree and counters type, count, len. Function checks correspondence of input data and input format represented by the values of these counters.

Function fixes errors:

error code 264 'incorrect data file:input'<error context>’for integer variable’

error code 265 'incorrect data file:'<error context>’is longer than attribute format'

Function in-fno receives text line as a parameter and puts it into the final input file. The name of this file is normain.in, and if the main part of Norma-program is compiled then - <part-name>.in.

5.9Listing generator

Listing generator contains the number of functions used for:

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

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

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