Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Program Size Optimizing Technique

IP.com Disclosure Number: IPCOM000087067D
Original Publication Date: 1976-Dec-01
Included in the Prior Art Database: 2005-Mar-03
Document File: 2 page(s) / 14K

Publishing Venue

IBM

Related People

Kellerman, AS: AUTHOR [+2]

Abstract

A technique is described for reducing the size of computer programs. It does so by making "equivalent" sections of programs that are "nearly" equivalent. In so doing, the programs become shorter, clearer and easier to maintain. The technique is an extension of the procedure whereby two "equivalent" groups of instructions (except for operands which can be parameterized) are replaced by calls to a common subroutine. However, replacement of groups of instructions by calls to a common subroutine can only be made when "exact equivalence" exists, or when exact equivalence can be made to exist through use of predefined algorithms.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

Program Size Optimizing Technique

A technique is described for reducing the size of computer programs. It does so by making "equivalent" sections of programs that are "nearly" equivalent. In so doing, the programs become shorter, clearer and easier to maintain. The technique is an extension of the procedure whereby two "equivalent" groups of instructions (except for operands which can be parameterized) are replaced by calls to a common subroutine. However, replacement of groups of instructions by calls to a common subroutine can only be made when "exact equivalence" exists, or when exact equivalence can be made to exist through use of predefined algorithms.

It is frequently possible to modify a group of instructions in a program to make it "equivalent" to another group of instructions, without impacting the function of the program. An example of such a modification is reversing the sequence in which two independent actions are performed. Some modifications to obtain equivalence, such as the above, can be performed mechanically by programs that optimize code.

However, many modifications that could be made to a program without impacting its function cannot be made mechanically because knowledge of the desired function is necessary. For example, given certain conditions, a loss in accuracy for a value being computed by a program may be acceptable.

Using the character string similarity-determining algorithm described in Defensive Publication T922,008, published in the May 7, 1974 issue of the Official Gazette of the U. S. Patent Office, "similar" groups of instructions can be detected, and then a programmer familiar with the intended function of the program can determine if the groups can be replaced by calls to a common subroutine, after possibly modifying the instructions. This is best done interactively, since, as changes are made to the program, the programmer should be informed of the results so that he can rapidly evaluate the consequences, and be able to do...