Browse Prior Art Database

Method of Converting a Symbolic Low-Level Language Computer Program Into a Symbolic High-Level Language Computer Program

IP.com Disclosure Number: IPCOM000034150D
Original Publication Date: 1989-Jan-01
Included in the Prior Art Database: 2005-Jan-26
Document File: 4 page(s) / 92K

Publishing Venue

IBM

Related People

Olgac, E: AUTHOR

Abstract

This method can be implemented fully automatically. It comprises structuring the low-level language program, forming blocks ending with branch information or EOJ (End of Job) commands and the like. Such structuring is shown in the following example which converts an Assembler program (Fig. 1) into a PL1 language program.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 84% of the total text.

Page 1 of 4

Method of Converting a Symbolic Low-Level Language Computer Program Into a Symbolic High-Level Language Computer Program

This method can be implemented fully automatically. It comprises structuring the low-level language program, forming blocks ending with branch information or EOJ (End of Job) commands and the like. Such structuring is shown in the following example which converts an Assembler program (Fig. 1) into a PL1 language program. 1 L 5,A

2 L 6,B 1

3 LTR 7,5

4 BZ AZERO

5 TAKESUM AR 7,6

6 BZ SUMZERO 2 7

MVI FLAG, C'2' 3 8 NEXT EQU * 9 EOJ 4

10 SUMZERO MVI FLAG,C'1'

11 B NEXT 5

12 AZERO LTR 6,6

13 BNZ TAKESUM 6

14 MVI FLAG,C'0'

15 B NEXT 7 FIG.

1 In Fig. 1, lines of code are numbered 1 through 15 and the emboxed blocks 1 through 7. After completion of the restructuring process, a structured path program is prepared (Figs. 2A and 2B). Fig. 2A shows the original control flow, and Fig. 2B shows the structured control flow considering the past program run. An equivalent term, representing the new program structure, is If 1 Then If 6 Then If 2 Then 5 Else 3 End_If

Else 7 End_If

Else If 2 Then 5

Else 3 End_If End_If Sequence 4 Within the context of Assembler language semantics, this term can be interpreted such that it is possible to generate a PL1 equivalent of the new program representation. REG5 = A ;

REG6 = B ;

REG7 = REG5 ;

IF REG7 = 0 THEN IF REG -= 0 THEN DO ;

REG7 = REG7 + REG6 ;

IF REG7 + REG6 = 0 THEN FLAG = '1' ;

ELSE FLAG = '2' ;

END ;

ELSE FLAG = '0' ;

ELSE DO ;

REG7 = REG7 + REG6 ;

IF REG7 + REG6 = 0 THEN FLAG = '1' ;

1

Page 2 of 4

ELSE FLAG = '2' ;

END ;

RETURN ; After simple symbolic execution, i.e., symbolic execution limited to single nodes, the same program will look as follows. REG5 = A ;

REG6 = B ;

REG7 = A ;

IF A = 0 THEN if REG6 -= 0 THEN DO ;

REG7 = REG7 + REG6 ;

IF REG7 + REG6 = 0 THEN FLAG = '1' ;

ELSE FLAG = '2' ;

END;

ELSE FLAG = '0' ;

ELSE DO ;

REG7 = REG7 + REG6 ;

IF REG7 + REG6 = 0 THEN FLAG = '1' ;

ELSE FLAG = '2' ;

END ;

RETURN ; Full symbolic execution yields the following PL1 program after an intermediate step IF A = 0 THEN IF B -= 0 THEN DO ; IF B = 0 THEN FLAG = '1' ; ELSE FLAG = '2' ;

END ;

ELSE FLAG = '0' ;

ELSE DO ;

IF A + B = 0 THEN FLAG = '1' ;...