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

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

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

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

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

s cop doplfs a b1 zapf dopkdc dopgdc

Function doplfs checks if the variable in the left part of scalar-operator is allowable.

Function fixes error:

error code 72 'incorrect scalar-operator '<error context>

Other functions process the right part of scalar-operator.

Function a builds Polish notation for arithmetical expression in the right part of the operator. If in this procedure errors are detected processing of operator is cancelled.

Function fixes error:

error code 75 'incorrect expression'<error context>

Function b1 checks if the terms of scalar arithmetical expression represented in the Polish notation are allowable. The terms could be scalars, arithmetical constants, domain’s parameters, function calls, variables on domain with index-constants. The line for the terms of these types is created to write into Table of functional dependencies.

Besides additional processing for function calls is performed.

1) For call-reduction-function information is put into additional table summa, which line has the form

statement number

name-reduction-domain

Arithm-expression, which reduction-function is applied to, is passed for processing to function b (see 5.3.5.2). Also name-reduction-domain is put into stack mom.

2) For call-external-function information is put into additional table funpol, which line has the form

statement number

name-external function

and additional table exter which line has the form

name-external function

Function b1 fixes errors:

error code 74 'incorrect scalar expressiion'<error context>

error code 315 'incorrect index of variable'<error context>

error code 317 'incorrect index of scalar'<error context>

error code 5 'value of variable'<error context>’is not in declaration domain’

error code 55 'iteration index'<error context> of variable'<error context>’has false displacement’

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

Function dopkdc writes information about operator into What-compute table.

Function dopgdc writes information about operator into Where-compute table.

5.3.5.2Processing of operator-ASSUME (function opv6)

Norma syntax:

operator-ASSUME

FOR domain ASSUME relation { ; relation }*

relation :

name-variable-on-domain = arithm-expression

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

doprg


o pv6 mnoz doplef a b opv1 zapf

dopkdc dopgdc

Function mnoz (see 5.3.2.1) processes operator's domain. If during this procedure errors are detected operator's processing is cancelled, otherwise token code of operator domain's is put into stack mom.

Function doplef (see 5.3.3) checks if the variable in the left part of -operator-ASSUME is allowable.

Other functions process the right part of scalar--ASSUME.

Function a (see 5.3.5.1) builds Polish notation for arithmetical expression in the right part of operator.

Function b checks if the terms of scalar arithmetical expression represented in the Polish notation are allowable. The terms could be scalars, arithmetical constants, domain’s parameters, indexes, function calls, variables on domain. The line for the terms of these types is created for writing into Table of functional dependencies. Function b is analogue of function b1 (see 5.3.5.1), except additional processing for term variable on domain. This processing is performed by function doprg.

Function b fixes errors:

error code 75 'incorrect expression'<error context>

error code 73 'value of index '<error context>' undefined'

Function doprg checks if variable on domain in operator-ASSUME is used correctly. Thus three conditions are checked:

1) indexes in index expressions of the variable must correspond to the indexes of definitional domain of variable,

2) indexes in index expressions of the variable must correspond to the indexes of operator's domain,

3) domain need-domain for variable must be included into the definitional domain of the value.

Besides checking these conditions function restores full index expressions if some indexes are given by default.

Function doprg fixes errors:

error code 71 'incorrect expression'<error context>

error code 311 'incorrect value of index'<error context>

error code 312 'incorrect index of variable' <error context>': '<error context>' is not integer constant’

error code 313 'incorrect index of variable' <error context>': '<error context>' is not index’

error code 314 'incorrect index of variable' <error context>': there is not sign before constant expression'

error code 315 'incorrect index of variable'<error context>

error code 316 'incorrect index of variable'<error context>': '<error context>' <0’

error code 317 'incorrect index of scalar'<error context>

error code 319 'incorrect index '<error context>' of variable '<error context> ': in ITERATION ON '

Function opv1 processes domain if it is conditional-domain. Logical condition is taken from Table of conditions and processed functions a and b. Information about terms of logical condition is included into Table of functional dependencies by function zapf for analysed operator.

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

Function dopkdc puts information about operator into What-compute table.

Function dopgdc puts information about operator into Where-compute table.

5.3.5.3Processing of call-part (function kvo2)

Norma syntax:

call-part :

COMPUTE name-part [ ( actual-parameters )]

actual-parameters :

[ list-in-parameter ] [ RESULT list-out-parameter ]

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

k vo2 mnoz kvoc paramt obrraz zapf


dopkdc dopgdc

Function mnoz (see 5.3.2.1) processes operator's domain. If in this procedure errors have been detected processing of operator is cancelled otherwise token code of operator's domain is put into stack mom. In processing call-part, which isn't included into operator-ASSUME, function mnoz isn't called and stack mom is empty.

Function kvoc analyses actual-parameters and calls function paramt for processing list-in-parameter and (or) list-out-parameter, setting attributes inout =’R’, env=’O’ in the first case, inout =’L’, env=’O’ in the second case.

Function paramt is universal function for processing list-parameter and in addition it receives attribute inout as an argument (for list-in-parameter inout =’R’, for list-out-parameter inout =’L’), and attribute env (type of call's environment: env =’O’ for call-part, set out of the construction iteration, env =’B’ for call-part set in boundary-value of construction iteration, env =’H’ for call-part set in initial-value of construction iteration, env =’P’ for call-part set in body-of-iteration.

Function chooses current parameter from list-parameter and depending on the type of parameter it calls corresponding function (functions) of parameter's processing:

in-parameter : function

arithm-expression b a

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

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

name-external-simple-part espis1

name-external-function espis1

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

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

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