Browse Prior Art Database

Automatic program composition for debugging and performance optimization

IP.com Disclosure Number: IPCOM000028070D
Original Publication Date: 2004-Apr-22
Included in the Prior Art Database: 2004-Apr-22
Document File: 2 page(s) / 60K

Publishing Venue

IBM

Abstract

A program comprising several functions has a bug, and we have a test that manifests it. The functions having the bug are referred to as "faulty" functions. Available is another interchangeable version of some or all said functions, which produce a program that does not have this bug. These versions are referred to as "backup" functions. Further, each function is executed multiple times in multiple scenarios. Our invention pinpoints the first time a faulty function leads to a bug, in a fully automatic process.

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

Page 1 of 2

Automatic program composition for debugging and performance optimization

Notes: At least one of the "faulty" functions are truely faulty, but possibly (and usually) not all. The backup function can predate the faulty function, being a previous "stable" version, or it could be a later version that includes a proposed fix. Static analysis may be used to infer if two ("backup" and "faulty") versions of a function have the same interface, a prerequisite for them to be interchangeable. A version-control system can automatically maintain versions for each function, along with indications for interchangeability. Another possibility is that the different function versions are obtained by compiling the same functions using different compilers or compiler versions; in this case, interchangeability of function versions is usually guaranteed.

    Another possibility is that instead of a bug there is a performance gap, which we seek to understand and attribute to a specific function/version/iteration.

    This disclosure deals with bugs/performance gaps that are not critically affected by linkage-dependent properties, such as, possibly, code positioning (i.e. will not vanish just by linking functions differently). Another possibility is that, instead of functions, we consider object files, or some other partition of a program into interchangeable parts.

This invention is able to automatically:

Find a minimal set of faulty functions that, when composed with backup versions for all remaining functions, produce a program that still has a bug, and show it to the developer. The set is minimal; any proper subset of faulty functions will not generate the bug.

Find a first iteration N such that, when executing only backup functions for N iterations, followed by an execution of the above set of faulty functions (plus the remaining backup functions for the remaining iterations), the execution produces bad results. But if N is replaced by N-1, the produced results are correct. Find last such iteration analogously. Find a small interval of such iterations analogously. Find a minimal set of such intervals analogously. Find a first iteration N such that when executing only backup functions for N iterations followed an execution of only faulty functions for the remaining iterations, the execution produces bad results. But if N is replaced by N-1, the produced results are correct. Find last such iteration analogously. Find a small interval of such iterations analogously. Find a minimal set of such intervals analogously.

ยท Execute first N-1 interations of said functions using a semi-automatic de...