Pointer analysis by type inference for programs with structured memory objects and potentially inconsistent memory object accesses
First Claim
1. A method for performing a pointer analysis for a program with a data processing system, the method comprising the steps of:
- (a) identifying in the program one or more store usages accessing locations; and
(b) generating a store model to approximate run-time store usage for the program, the store model comprising types having components representing locations for the identified store usage(s) such that the types describe access patterns for the locations for the identified store usage(s) based on how the identified store usage(s) access the locations and such that the types representing the locations for the identified store usage(s) comply with a typing constraint.
2 Assignments
0 Petitions
Accused Products
Abstract
A pointer analysis by type inference for a computer program ith structured memory objects and potentially inconsistent memory object accesses helps approximate run-time store usage for the program. The analysis represents locations for the program with types describing access patterns for the represented locations based on how the locations are accessed in the program. The analysis describes access patterns for structured memory objects, elements of structured memory objects, and memory objects accessed in inconsistent manners in the program. The analysis identifies store usages described by the program and determines whether the location(s) and/or function(s) affected by the identified store usages are well-typed under typing constraints. If the identified store usages are not well-typed, the analysis modifies types for location(s) and/or function(s) affected by the identified store usages as necessary so the store usages are well-typed. When the locations and/or functions for all identified store usages are well-typed, the program is well-typed with the set of types defining a store model for the program.
-
Citations
71 Claims
-
1. A method for performing a pointer analysis for a program with a data processing system, the method comprising the steps of:
-
(a) identifying in the program one or more store usages accessing locations; and
(b) generating a store model to approximate run-time store usage for the program, the store model comprising types having components representing locations for the identified store usage(s) such that the types describe access patterns for the locations for the identified store usage(s) based on how the identified store usage(s) access the locations and such that the types representing the locations for the identified store usage(s) comply with a typing constraint. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
i) determining whether the types representing the locations for one identified store usage comply with the typing constraint, and ii) if the types representing the locations for the one identified store usage do not comply with the typing constraint, modifying types representing locations for the one identified store usage to comply with the typing constraint.
-
-
15. The method of claim 14, wherein the identifying step (a) comprises the step of identifying a form of a program statement describing the one identified store usage, and wherein the determining step (b)(i) comprises the step of determining whether the types representing the locations for the one identified store usage comply with a type rule specifying the typing constraint for the identified program statement form.
-
16. A method for performing a pointer analysis for a program with a data processing system, the method comprising the steps of:
-
identifying in the program a store usage accessing locations;
determining whether types representing the locations for the identified store usage comply with a typing constraint;
identifying any potential constraints for types representing locations for the identified store usage;
if the types representing the locations for the identified store usage do not comply with the typing constraint, modifying types representing locations for the identified store usage to comply with the typing constraint, wherein the modifying step (d) comprises the step of representing locations for the identified store usage with a hierarchy of types describing access patterns for the locations for the identified store usage based on how the identified store usage accesses the locations; and
modifying types representing locations for any identified potential constraints affected by the modifying step (d). - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
wherein the determining step (b) comprises the step of determining whether the types representing the locations for the identified store usage comply with a type rule specifying the typing constraint for the identified program statement form. -
30. The method of claim 16, wherein the method performs the pointer analysis while compiling the program for execution by a data processing system.
-
31. The method of claim 16, wherein the method performs the pointer analysis for a program browser.
-
-
32. A memory for storing software for execution by a data processing system to perform a pointer analysis for a program, the memory comprising:
-
program code stored by the memory for identifying a store usage in the program accessing locations; and
program code stored by the memory for representing locations for the identified store usage with types having components describing access patterns for the locations for the identified store usage based on how the locations for the identified store usage are accessed in the program such that the types representing the locations for the identified store usage comply with a typing constraint. - View Dependent Claims (33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52)
i) program code for determining whether the types representing the locations for the identified store usage comply with the typing constraint, and ii) program code for modifying types representing locations for the identified store usage to comply with the typing constraint if the types representing the locations for the identified store usage do not comply with the typing constraint.
-
-
46. The computer-readable medium of claim 45, wherein the program code (a) comprises program code for identifying a form of a program statement describing the store usage, and
wherein the program code (b)(i) comprises program code for determining whether the types representing the locations for the identified store usage comply with a type rule specifying the typing constraint for the identified program statement form. -
47. The computer-readable medium of claim 32, wherein the program code (b) comprises:
-
i) program code for determining whether the types representing the locations for the identified store usage comply with the typing constraint, ii) program code for identifying any potential constraints for types representing locations for the identified store usage, iii) program code for modifying types representing locations for the identified store usage to comply with the typing constraint if the types representing the locations for the identified store usage do not comply with the typing constraint, and iv) program code for modifying types representing locations for any identified potential constraints affected by the modification of types representing locations for the identified store usage.
-
-
48. The computer-readable medium of claim 47, wherein the program code (b)(ii) comprises program code for identifying a potential constraint in a pending set.
-
49. The computer-readable medium of claim 47, wherein the program code (b)(ii) comprises program code for identifying from the identified store usage an access pattern relationship for types representing locations for the identified store usage.
-
50. The computer-readable medium of claim 47, wherein the program code (b)(ii) comprises program code for identifying from the identified store usage a pointer offset relationship for types representing locations for the identified store usage.
-
51. The computer-readable medium of claim 47, wherein the program code (b)(ii) comprises program code for identifying from the identified store usage any potential points-to relationships for a type representing a non-pointer value.
-
52. The computer-readable medium of claim 47, wherein the program describes a plurality of store usages and wherein the program code of the computer-readable medium, when executed by a data processing system, analyzes each described store usage only one time in an order independent of program control flow.
-
53. A data processing system comprising:
-
a) a translator for translating a program in a first language into code in a second language;
b) a pointer analyzer for performing a pointer analysis for the program, the pointer analyzer for identifying in the program a store usage accessing locations and for representing locations for the identified store usage with a set of hierarchical types describing different access patterns for the locations for the identified store usage based on how the identified store usage accesses the locations such that the types representing the locations for the identified store usage comply with a typing constraint;
c) a store model for storing the types representing locations for the program; and
d) an optimizer for optimizing the code based on the store model. - View Dependent Claims (54, 55, 56, 57, 58, 59, 60, 61, 62)
-
-
63. A method for performing a pointer analysis for a program with a data processing system, the method comprising:
-
(a) identifying in the program one or more store usages accessing locations; and
(b) generating a store model to approximate run-time store usage for the program, the store model comprising types representing locations for the identified store usage(s) such that the types describe access patterns for the locations for the identified store usage(s) based on how the identified store usage(s) access the locations wherein the types are comprised of components defining such access patterns. - View Dependent Claims (64, 65, 66, 67, 68)
-
-
69. A method for identifying utilization of computer storage by a computer program, the method comprising:
-
identifying portions of the program that utilize storage; and
generating a store model by identifyWing each portion as a type from a hierarchy of types, each type identifying different access patterns based on how storage is accessed. - View Dependent Claims (70)
-
-
71. A computer readable medium having instructions stored thereon for causing a computer to execute a method for performing a pointer analysis for a program with a data processing system, the method comprising:
-
(a) identifying in the program one or more store usages accessing locations; and
(b) generating a store model to approximate run-time store usage for the program, the store model comprising types representing locations for the identified store usage(s) such that the types describe access patterns for the locations for the identified store usage(s) based on how the identified store usage(s) access the locations wherein the types are comprised of components defining such access patterns.
-
Specification