← Back to Patent Explorer
US5615369A Expired / Lapsed US ⏱️ 0.0 years remaining

Automated detection and correction of uninitialized variables

Assignee: Hewlett Packard Development Co LP
•
Filing: 1994-07-25
•
Granted: 1997-03-25
•
Expires: 2014-07-25
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract In a compiler within a computing system, user definition webs are built for local variables in a subroutine. For each user definition web in which a first local variable is used, if there is a use of the first local variable for which there is no definition on at least one path to an entry point of the subroutine, a definition of the local variable is inserted at every entry point of the subroutine from which the use can be reached. Further, in the preferred embodiment, for each user definition web in which a first local variable is used, if there is a use of the first local variable for which there is no definition on at least one path to an entry point of the subroutine and if no definition can reach the use, the web is reported as definitely undefined. For each user definition web in which a first local variable is used, if there is a use of the first local variable for which there is no definition and if a definition can reach the use, the web is reported as possibly undefined.

Inventors

  • 👤 Anne M. Holler

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-04 02:56
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/42; G06F8/425

Claims Analysis

Total Claims: 16
Claim 1
Independent Claim 130 words
In a compiler within a computing system, a computer implemented method comprising the steps of: (a) for local variables in a subroutine, building user definition webs, a first user definition web for a first variable including every instruction within the subroutine which defines or uses the first variable; and, (b) for the first user definition web when the first local variable is used at least once, performing the following substep: (b.1) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substeps: (b.1.1) if no definition can reach the use, report the web as definitely undefined, and (b.1.2) if a definition can reach the use, report the web as possibly undefined.
Claim 2
Dependent Claim 130 words
In a compiler within a computing system, a computer implemented method comprising the steps of: (a) for local variables in a subroutine, building user definition webs, a first user definition web for a first variable including every instruction within the subroutine which defines or uses the first variable; and, (b) for the first user definition web when the first local variable is used at least once, performing the following substep: (b.1) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substeps: (b.1.1) if no definition can reach the use, report the web as definitely undefined, and (b.1.2) if a definition can reach the use, report the web as possibly undefined.
Claim 3
Dependent Claim 59 words
A method as in claim 1 wherein substep (b.1.1) includes, if no definition can reach the use, inserting a definition of the first local variable at every entry point of the subroutine; and wherein substep (b.1.2) includes, if a definition can reach the use, inserting a definition of the first local variable at every entry point of the subroutine.
Claim 4
Dependent Claim 73 words
A method as in claim 1 wherein substep (b.1.1) includes, if no definition can reach the use, inserting a definition of the first local variable at every entry point of the subroutine from which the use can be reached; and wherein substep (b.1.2) includes, if a definition can reach the use, inserting a definition of the first local variable at every entry point of the subroutine from which the use can be reached.
Claim 5
Dependent Claim 124 words
In a compiler within a computing system, a computer implemented method comprising the steps of: (a) for local variables in a subroutine, building user definition webs, a first user definition web for a first variable including every instruction within the subroutine which defines or uses the first variable; and, (b) for the first user definition web when the first local variable is used at least once, performing the following substep: (b.1) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substep: (b.1.1) inserting a definition of the first local variable at every entry point of the subroutine from which the use can be reached.
Claim 6
Dependent Claim 124 words
In a compiler within a computing system, a computer implemented method comprising the steps of: (a) for local variables in a subroutine, building user definition webs, a first user definition web for a first variable including every instruction within the subroutine which defines or uses the first variable; and, (b) for the first user definition web when the first local variable is used at least once, performing the following substep: (b.1) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substep: (b.1.1) inserting a definition of the first local variable at every entry point of the subroutine from which the use can be reached.
Claim 7
Dependent Claim 88 words
A method as in claim 4, wherein step (b) additionally comprises the following substep, performed for each user definition web in which the first local variable is used: (b.2) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substeps: (b.2.1) if no definition can reach the use, report the web as definitely undefined, and (b.2.2) if a definition can reach the use, report the web as possibly undefined.
Claim 8
Dependent Claim 25 words
A method as in claim 4 wherein substep (b.1.1) includes inserting a definition of the first local variable at every entry point of the subroutine.
Claim 9
Dependent Claim 139 words
Storage media which contains software which, when run on an appropriate computing system, performs a method within a compiler which comprises the steps of: (a) for local variables in a subroutine, building user definition webs, a first user definition web for a first variable including every instruction within the subroutine which defines or uses the first variable; and, (b) for the first user definition web when the first local variable is used at least once, performing the following substep: (b.1) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substeps: (b.1.1) if no definition can reach the use, report the web as definitely undefined, and (b.1.2) if a definition can reach the use, report the web as possibly undefined.
Claim 10
Dependent Claim 139 words
Storage media which contains software which, when run on an appropriate computing system, performs a method within a compiler which comprises the steps of: (a) for local variables in a subroutine, building user definition webs, a first user definition web for a first variable including every instruction within the subroutine which defines or uses the first variable; and, (b) for the first user definition web when the first local variable is used at least once, performing the following substep: (b.1) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substeps: (b.1.1) if no definition can reach the use, report the web as definitely undefined, and (b.1.2) if a definition can reach the use, report the web as possibly undefined.
Claim 11
Dependent Claim 59 words
Storage media as in claim 7 wherein substep (b.1.1) includes, if no definition can reach the use, inserting a definition of the first local variable at every entry point of the subroutine; and wherein substep (b.1.2) includes, if a definition can reach the use, inserting a definition of the first local variable at every entry point of the subroutine.
Claim 12
Dependent Claim 73 words
Storage media as in claim 7 wherein substep (b.1.1) includes, if no definition can reach the use, inserting a definition of the first local variable at every entry point of the subroutine from which the use can be reached; and wherein substep (b.1.2) includes, if a definition can reach the use, inserting a definition of the first local variable at every entry point of the subroutine from which the use can be reached.
Claim 13
Dependent Claim 133 words
Storage media which contains software which, when run on an appropriate computing system, performs a method within a compiler which comprises the steps of: (a) for local variables in a subroutine, building user definition webs, a first user definition web for a first variable including every instruction within the subroutine which defines or uses the first variable; and, (b) for the first user definition web when the first local variable is used at least once, performing the following substep: (b.1) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substep: (b.1.1) inserting a definition of the first local variable at every entry point of the subroutine from which the use can be reached.
Claim 14
Dependent Claim 133 words
Storage media which contains software which, when run on an appropriate computing system, performs a method within a compiler which comprises the steps of: (a) for local variables in a subroutine, building user definition webs, a first user definition web for a first variable including every instruction within the subroutine which defines or uses the first variable; and, (b) for the first user definition web when the first local variable is used at least once, performing the following substep: (b.1) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substep: (b.1.1) inserting a definition of the first local variable at every entry point of the subroutine from which the use can be reached.
Claim 15
Dependent Claim 88 words
Storage media as in claim 10, wherein step (b) additionally comprises the following substep, performed for each user definition web in which the first local variable is used: (b.2) if there is a use of the first local variable for which there is no definition on a path to an entry point of the subroutine, performing the following substeps: (b.2.1) if no definition can reach the use, report the web as definitely undefined, and (b.2.2) if a definition can reach the use, report the web as possibly undefined.
Claim 16
Dependent Claim 25 words
Storage media as in claim 10 wherein substep (b.1.1) includes inserting a definition of the first local variable at every entry point of the subroutine.

References Cited (Backward Citations)

US4601032A Cited
US4595981A Cited
US5038296A Cited
US5210859A Cited
US5339238A Cited
US5428786A Cited
US5429793A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2000-03-24 2000-09-23 2001-03-25 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2004-03-24 2004-09-23 2005-03-25 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2008-03-24 2008-09-23 2009-03-25 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag