SU1524055A1 - Device for checking programs - Google Patents
Device for checking programs Download PDFInfo
- Publication number
- SU1524055A1 SU1524055A1 SU884389703A SU4389703A SU1524055A1 SU 1524055 A1 SU1524055 A1 SU 1524055A1 SU 884389703 A SU884389703 A SU 884389703A SU 4389703 A SU4389703 A SU 4389703A SU 1524055 A1 SU1524055 A1 SU 1524055A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- output
- elements
- register
- block
- Prior art date
Links
Abstract
Изобретение относитс к цифровой вычислительной технике и может быть использовано при разработке систем контрол программного обеспечени . Устройство содержит регистры 1 - 6, блоки 7 и 8 элементов И, элементы ИЛИ 9 - 13, блок 19 сравнени , блок 14 пам ти, дешифратор 16 команд, распределитель 15 импульсов, сумматор 17, блок 18 вычитани , элементы 20 и 21 задержки. Изобретение позвол ет повысить достоверность контрол программ за счет контрол правильности выполнени программы по управл ющим и информационным св з м. Правильность выполнени программы определ етс на основании контрол "размерностей" операндов контролируемой операции, которые задаютс разработчиком программы или определ ютс на этапе трансл ции. "размерности" представл ютс числами. При проверке учитываетс , что дл операций сложени , вычитани и сравнени "размерности" операндов должны быть одинаковыми, т.е. последовательность управл ющих и информационных св зей между объектами программы выполн етс правильно. 1 ил.The invention relates to digital computing and can be used in the development of software control systems. The device contains registers 1-6, blocks 7 and 8 elements AND, elements OR 9-13, comparison unit 19, memory block 14, instruction decoder 16, pulse distributor 15, adder 17, subtraction unit 18, delay elements 20 and 21. The invention makes it possible to increase the reliability of program control by controlling the correctness of program execution through control and data communications. The correctness of program execution is determined on the basis of the "dimensions" control of operands of the controlled operation, which are defined by the program developer or are determined during the translation stage. "dimensions" are represented by numbers. The verification takes into account that for the operations of addition, subtraction and comparison of the "dimension" of the operands must be the same, i.e. the sequence of control and information links between program objects is performed correctly. 1 il.
Description
IffIff
сл to о сл сдsl to about sl cl
Изобретение относитс к цифровой вычислительной технике и может быть использовано при разработке систем контрол программного обеспечени .The invention relates to digital computing and can be used in the development of software control systems.
Цель изобретени - повышение достоверности контрол устройства.The purpose of the invention is to increase the reliability of the control device.
На чертеже изображено предлагаемое устройство.The drawing shows the proposed device.
Контроль правильности выполнени программы, основаннь1Й на проверке правильности ее информационных и управл ющих св зей между объектами программы в процессе выполнени , по сн етс примером.Monitoring the correctness of program execution, based on checking the correctness of its informational and control links between program objects in the process of execution, is exemplified.
Пусть вьшолн етс оператор присваивани Let the assignment operator be executed.
(Е+Т)/В.(E + T) / B.
Дл корректно написанной программы в контексте данного оператора должны выполн тьс следующие соотношени между физичecкн ш размерност ми величин (Р, А, С, Е, Т, В):For correctly written programs in the context of this operator, the following relations between the physical dimensions of the quantities (P, A, C, E, T, B) should be fulfilled:
Cp A c3 Ali:c3; ,Cp A c3 Ali: c3; ,
Р (Е-ЬТ) /Б El Bj т В ; ,Р (Е-ЬТ) / Б El Bj t В; ,
где УС сризическа размернос ь объwhere US is the size of a volume
екта X.ekta X.
Проверка правильности выполн емых соотношений по их размерност м и составл ет сущность локализации ошибок при выполнении прогр гмшл. Значени размерностей определ ютс разработчиком или на этапе трансл ции программы и пррдстазш ютс числам. При проверке у1 нтываетс , что дл операций сложени , нычиташш, сравнени размерности операндов должны быт oдинaкoвы D, т.е. последовательность управл ющих и информационных св зей между объектами програмъ. выполн етс правильно. Поэтому, при вы11олнен|-г ЭТ1ГХ операций дл контрол правильности вьшолнени програмгш необходимо сравнивать значени размерностей соответствующих операвдов. Если значени размерностей совпадают, то программа выполн етс правильно, есл не совпадают, то произошло нарушение по упрайл ющим св з м программы (дл выполнени вовлечен какой-либо фрагмент программы из другого участка программы) или нарушение по информа ционным св з м программы (дл вьтол- нени операции выбран не тот объект программы). В процессе вьшолнени программы размерности внутреннихVerifying the correctness of the performed ratios by their dimensions is the essence of the localization of errors when executing software. Dimension values are determined by the developer or at the stage of program translation and are presented to numbers. When checking y1, it is assumed that for addition operations, now, comparisons of the dimensions of the operands must be one D, i.e. a sequence of control and informational links between program objects. performed correctly. Therefore, when performing | -d ET1GH operations, in order to verify the correctness of program execution, it is necessary to compare the values of the dimensions of the corresponding operands. If the values of the dimensions coincide, then the program is executed correctly, if they do not match, then a violation occurred on the program’s direct links (for execution a program fragment from another part of the program is involved) or a violation on the program’s communication links (for For the operation, the wrong program object was selected). In the process of implementing the program of internal dimension
объектов программы (переменных) могут измен тьс при вьтолнении операций сложени и делени . Поэтому при умножении и делении размерности операндов складываютс и вычитаютс соответственно .Program objects (variables) can be changed when performing addition and division operations. Therefore, when multiplying and dividing, the dimensions of the operands are added and subtracted accordingly.
Устройство дл контрол хода программ содержит шесть регистров 1-6,The device for controlling the progress of the programs contains six registers 1-6,
первый и второй блоки элементов И 7 и 8, первый - третий элементы ИЛИ 9-11, два блока элементов ИЛИ 12 и 13, блок 14 пам ти, распределитель 15 импульсов, дешифратор 16 команд,the first and second blocks of elements And 7 and 8, the first - the third elements of OR 9-11, two blocks of elements OR 12 and 13, block 14 of memory, distributor 15 pulses, decoder 16 commands,
сумматор 17, блок 18 вычитани , схе- Miii 19 сравнени , первый и второй элементы задержки 20 и 21, тактовьй вход 22, ггервый, второй,третий информационные входы устройства 23-25,adder 17, subtraction unit 18, comparison circuit Miii 19, first and second delay elements 20 and 21, clock input 22, second, second, third information inputs 23-25,
Выход 26 ошибки устройства.Output 26 is a device error.
Дешифратор команд 16 имеет три В1):;ода. Первый выход соответствует «-дешифрации команды умножени , второй - делени , третий - сложени ,Command decoder 16 has three B1) :; ode. The first output corresponds to “-decoding of the multiply command, the second - dividing, the third - adding,
вычитани и сравнени .subtraction and comparison.
Устройство работает следующим образом .The device works as follows.
Перед началом работы устройства в пам ть заноситс информаци , соот- петствующа выполн емой программе. Она представл ет собой участок пам ти контролируемой программы, в котором по адресам сходных, промежуточных и выходных объектов (переменных ) программы занесены соответствующие значени размерностей, остальные чейки пам ти обнулены. Значени размерностей представлены в виде чисел, которые по соответствую- пшм правилам указываютс разработчиком програьп-м или определ ютс автоматически с помощью специального трансл тора. При готовности устрой- ства к работе на вход распределител 15 импульсов начинают поступать сит налы с тактового входа 22 о том, что процессор подготовил к выполнению очередную команду, при этом на информационные входы устройства 23- 25 поступают.соответственно код операции , адреса первого и второго операндов . С первого, второго и третьего выходов распределител 15 импульсов вьщаютс последовательно управBefore the device starts operation, the information corresponding to the program being executed is stored in the memory. It is a section of the memory of the monitored program, in which the addresses of the similar, intermediate, and output objects (variables) of the program are assigned the corresponding dimension values, the remaining memory cells are set to zero. The dimensions of the dimensions are presented in the form of numbers, which, according to the corresponding rules, are indicated by the developer of the program or are determined automatically using a special translator. When the device is ready for operation, the sitals from the clock input 22 begin to arrive at the input of the distributor 15 pulses that the processor has prepared the next command for execution, while the information inputs of the device 23-25 are received. Accordingly, the operation code, addresses of the first and second operands. From the first, second and third outputs of the distributor 15 pulses are output sequentially
л ющие сигналы, разрешаю1цие запись информации с входов 24, 25 и .3 в первый 4, второй 3 и третий 2 регистры соответственно. ОдновременноThese signals allow the recording of information from inputs 24, 25 and .3 to the first 4, second 3 and third 2 registers, respectively. At the same time
51524055 51524055
третий управл ющий сигнал распреде- первого элемента 20 задержки, где йнthe third control signal of the distribution - the first delay element 20, where
лител 15 импульсов через первый эле- задерживаетс на врем , необходимоеA pulse of 15 pulses through the first delay is delayed by the time required
дл выполнени операции сложени в сумматоре 17. С выхода первого элемента 20 задержки управл ющий сигнал разрешает варись результата суммиромент ИЛИ 9 разрешает прохождение информации , соответствующей адресу первого операнда, с информационного выхода второго регистра 2 через первый элемент И 7 и второй элемент ИЛИ 10 на адресный вход блока 14 . Этот же третий управл ющий сигнал распределител 5 иьтульсов через третий элемент ИЛИ 11 разрешает считывание информации из блока 14 пам ти по адресу, который указан на адресном входе блока 14 пам ти, т.е. считывание информации, соответствующей значению размерности, адрес которой находитс во BTopoi-i регистре 2. Управл ющий сигнал с четвертого выхода распределител 15 импульсов разрешает запись считанного из блока 14 пам ти крда размерностей а регистр 4.to perform the addition operation in the adder 17. From the output of the first delay element 20, the control signal enables the result of adding the result OR 9 allows the information corresponding to the address of the first operand to pass from the information output of the second register 2 through the first element AND 7 and the second element OR 10 to the address input block 14. The same third control signal of the distributor 5 pulses through the third element OR 11 allows reading information from the memory block 14 to the address specified on the address input of the memory block 14, i.e. reading information corresponding to the dimension value, the address of which is in BTopoi-i register 2. The control signal from the fourth output of the distributor 15 pulses permits writing of the dimension a register 4 read from block 14 of the memory.
Аналогично управл ющий сигнал с п того выхода распределител 15 импульсов разрешает считывание кода размерностей, соответствующего адресу второго операнда, которьп поступает из третьего 3 регг.стра через второй элемент И 8 и элемент 1ШИ 10 на адресиьм вход блока 14 пам ти, сигнал считывани поступает через третий элемент ИЛИ 11. Управл ющий сигнал с шестого выхода распределител импульсов разрешает запись считанного кода размерностей в п тый регистр 5.Similarly, the control signal from the fifth output of the pulse distributor 15 permits reading the dimension code corresponding to the address of the second operand, which comes from the third 3 regg.stra through the second element 8 and the 1sh 10 element to the address input of the memory block 14, the read signal goes through the third element OR 11. The control signal from the sixth output of the pulse distributor enables writing the read dimension code to the fifth register 5.
Таким образом, в четвертом и п том регистрах 4 и 5 находитс соот- BeTCTByromirii код размерностей первого и второго операндов контролируемой операции.Thus, in the fourth and fifth registers 4 and 5 there is a corresponding BeTCTByromirii code of the dimensions of the first and second operands of the controlled operation.
Управл ющий сигнал с сед.ьмого выхода , распределител 15 импульсов по10The control signal from the seventh output, the distributor 15 pulses to 10
вани в регистр 6. Эта информаци поступает на вход регистра 6 через п тый элемент ИЛИ 13. В то же врем сигнал с выхода первого элемента 20 задержки через второй элемент 21 задержки поступает иа управл ющий вход записи блока 14 пам ти и одновременноThis information is fed to the input of register 6 through the fifth element OR 13. At the same time, the signal from the output of the first delay element 20 through the second delay element 21 enters the write control input of memory block 14 and simultaneously
15 разрешает прохождение информации об адресе первого операнда с второго регистра 2 через первьш блок элементов И 7 и второй элемент ИЛИ 10 соответственно на адресный вход блока пам 20 ти 14. Блок пам ти производит запись кода размерностей, поступающего с KiecToro регистра 6 на информационный вход бло1са 14 пам ти по адресу, указанному на адресном входе блока15 permits the passage of the information of the address of the first operand from the second register 2 through the first block of elements AND 7 and the second element OR 10, respectively, to the address input of the memory block 20 14. The memory block records the dimension code arriving from KiecToro register 6 to the information input of the block 14 memory at the address specified on the address input of the unit
25 4 пам ти, т.е. по адресу первого операнда выполн емой операции.25 4 memories, i.e. at the address of the first operand of the operation being performed.
Аналогично осуществл етс измене- Hiie значени размерностей, если управл оз; сигнал поступает с второ30 го выхода дешифратора 16 команд, что соответствует выполненио операции делени .Changes of dimensions are carried out in a similar way, if controlla; the signal comes from the second output of the decoder 16 commands, which corresponds to the execution of the division operation.
Если дешифратор 16 команд определ ет команду сложени , вычитани или сравнени , то управл ющий сигнал по вл етс на третьем выходе. Он поступает на управл ющий вход схемы I9 сравнени . При этом в схеме 19 сравнени происходит сравнение кодов, по40 ступающих с регистрО2з 4 и 5. Если значени размерностей совпадают, т.е. коды равны, то контролируема nporpaMt.a выполн етс правильно. Если значени размерностей неIf the decoder 16 of the commands determines the addition, subtraction, or comparison command, then the control signal appears at the third output. It enters the control input of the comparison circuit I9. In this case, in the comparison circuit 19, the codes that are 40 steps to register O2 3 and 5 are compared. If the values of the dimensions coincide, i.e. Since the codes are equal, then the monitored nporpaMt.a is executed correctly. If the dimension values are not
00
вани в регистр 6. Эта информаци поступает на вход регистра 6 через п тый элемент ИЛИ 13. В то же врем сигнал с выхода первого элемента 20 задержки через второй элемент 21 задержки поступает иа управл ющий вход записи блока 14 пам ти и одновременноThis information is fed to the input of register 6 through the fifth element OR 13. At the same time, the signal from the output of the first delay element 20 through the second delay element 21 enters the write control input of memory block 14 and simultaneously
5 разрешает прохождение информации об адресе первого операнда с второго регистра 2 через первьш блок элементов И 7 и второй элемент ИЛИ 10 соответственно на адресный вход блока пам 0 ти 14. Блок пам ти производит запись кода размерностей, поступающего с KiecToro регистра 6 на информационный вход бло1са 14 пам ти по адресу, указанному на адресном входе блока5 permits the passage of the information of the address of the first operand from the second register 2 through the first block of elements AND 7 and the second element OR 10, respectively, to the address input of the memory block 0 and 14. The memory block records the dimension code received from the KiecToro register 6 to the information input of the block 14 memory at the address specified on the address input of the unit
5 4 пам ти, т.е. по адресу первого операнда выполн емой операции.5 4 memories, i.e. at the address of the first operand of the operation being performed.
Аналогично осуществл етс измене- Hiie значени размерностей, если управл оз; сигнал поступает с второ0 го выхода дешифратора 16 команд, что соответствует выполненио операции делени .Changes of dimensions are carried out in a similar way, if controlla; the signal comes from the second output of the decoder 16 commands, which corresponds to the execution of the division operation.
Если дешифратор 16 команд определ ет команду сложени , вычитани или сравнени , то управл ющий сигнал по вл етс на третьем выходе. Он поступает на управл ющий вход схемы I9 сравнени . При этом в схеме 19 сравнени происходит сравнение кодов, по0 ступающих с регистрО2з 4 и 5. Если значени размерностей совпадают, т.е. коды равны, то контролируема nporpaMt.a выполн етс правильно. Если значени размерностей неIf the decoder 16 of the commands determines the addition, subtraction, or comparison command, then the control signal appears at the third output. It enters the control input of the comparison circuit I9. In this case, in the comparison circuit 19, the codes arriving from register O2 3 and 5 are compared. If the values of the dimensions coincide, i.e. Since the codes are equal, then the monitored nporpaMt.a is executed correctly. If the dimension values are not
ступает на управл ющий вход дешифра- дЗ совпадщот, то обнаружена ошибка иstep on the control input of the decipher dZ coincidence, an error is detected and
тора 16 команд, который дешифрует код операции и на его выходе (одном из трех) по вл етс управл ющий сигнал , соответствующий коду операции, Если выполн етс операци умножени , то управл ющий сигнал по вл етс на первом вы: соде дешифратора 16 команд. Этот сигнал поступает на управл ющий вход сумматора 17 и разрешает выполнить операцию сложени значений размерностей , наход щихс в четвертом 4 и п том 5 регистрах. Одновременно этот управл ющий сигнал поступает через четвертый элемент ИЛИ 12 на входTo a command 16 that decrypts the operation code and at its output (one of the three) a control signal appears corresponding to the operation code. If a multiplication operation is performed, the control signal appears on the first you: the decoder of 16 commands. This signal is fed to the control input of the adder 17 and allows the operation to add the values of the dimensions in the fourth 4 and fifth 5 registers. At the same time, this control signal goes through the fourth element OR 12 to the input
5050
с вьп-:ода схем сравнени на выход устройства 26 поступает сигнал оши ки.From sup-: one of the comparison circuits, an error signal is output to the output of the device 26.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU884389703A SU1524055A1 (en) | 1988-03-09 | 1988-03-09 | Device for checking programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU884389703A SU1524055A1 (en) | 1988-03-09 | 1988-03-09 | Device for checking programs |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1524055A1 true SU1524055A1 (en) | 1989-11-23 |
Family
ID=21360191
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU884389703A SU1524055A1 (en) | 1988-03-09 | 1988-03-09 | Device for checking programs |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1524055A1 (en) |
-
1988
- 1988-03-09 SU SU884389703A patent/SU1524055A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР 1176334, кл. G Об F 11/26, 1983. Авторское свидетельство СССР 983712, кл. G 06 F 11/28, 1979. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4313200A (en) | Logic test system permitting test pattern changes without dummy cycles | |
US4199810A (en) | Radiation hardened register file | |
JPH02133834A (en) | In-circuit emulator | |
US4891773A (en) | Logic simulation | |
EP0454636A1 (en) | Method for carrying out a boolean operation between any two bits of any two registers | |
EP0442580B1 (en) | Sequential finite-state machine circuit and integrated circuit comprising such a circuit | |
CA1166752A (en) | Memory management method and apparatus | |
US3411147A (en) | Apparatus for executing halt instructions in a multi-program processor | |
US4453093A (en) | Multiple comparison circuitry for providing a software error trace signal | |
US3618042A (en) | Error detection and instruction reexecution device in a data-processing apparatus | |
US5446851A (en) | Instruction supplier for a microprocessor capable of preventing a functional error operation | |
SU1524055A1 (en) | Device for checking programs | |
US5388253A (en) | Processing system having device for testing the correct execution of instructions | |
US3728690A (en) | Branch facility diagnostics | |
US4150430A (en) | Information selection device | |
US4410988A (en) | Out of cycle error correction apparatus | |
US3238508A (en) | Logical manipulator | |
JPS6049937B2 (en) | Microprogram controlled data processing device | |
JP2581214B2 (en) | Logic simulator | |
RU2029986C1 (en) | Monitoring device | |
SU1104521A1 (en) | Device for debugging programs | |
SU744577A1 (en) | Device for test checking of memory | |
RU2034329C1 (en) | Device for control | |
SU1267421A1 (en) | Device for simulating failures | |
SU1587512A1 (en) | Device for checking counters |