Terminating polymorphic type inference program analysis
First Claim
1. A method for performing a polymorphic type inference analysis for a program with a data processing system, the program comprising at least one function call, the method comprising the steps of:
- a) representing parameter values for each function call in the program with separate types; and
b) modifying the types to comply with typing constraints, wherein the modifying step (b) comprises the steps of;
i) determining whether a potential non-terminating loop has been entered, andii) if a potential non-terminating loop has been entered, modifying the types such that the types comply with the typing constraints and such that the type inference analysis will terminate.
2 Assignments
0 Petitions
Accused Products
Abstract
A terminating polymorphic type inference program analysis helps to better optimize, understand, and/or browse computer programs. The analysis represents parameter values for each function call in the program with separate types and modifies the types to comply with typing constraints. The analysis also determines whether a potential non-terminating loop has been entered. If so, the analysis modifies the types such that the types comply with the typing constraints and such that the type inference analysis will terminate. In this manner, the analysis will generate a usable finite set of types for programs regardless of whether the principal typing for the program is infinite in size.
-
Citations
53 Claims
-
1. A method for performing a polymorphic type inference analysis for a program with a data processing system, the program comprising at least one function call, the method comprising the steps of:
-
a) representing parameter values for each function call in the program with separate types; and b) modifying the types to comply with typing constraints, wherein the modifying step (b) comprises the steps of; i) determining whether a potential non-terminating loop has been entered, and ii) if a potential non-terminating loop has been entered, modifying the types such that the types comply with the typing constraints and such that the type inference analysis will terminate. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A method for performing a polymorphic type inference pointer analysis for a program with a data processing system, the program comprising at least one function call, the method comprising the steps of:
-
a) representing locations for the program with separate types, wherein the representing step (a) comprises the step of representing parameter values for each function call in the program with separate types; b) identifying a store usage for at least one location for the program; c) determining whether at least one type representing the at least one location for the identified store usage complies with a typing constraint; d) if the at least one type for the identified store usage does not comply with the typing constraint, modifying the at least one type to comply with the typing constraint; and e) modifying types that represent locations for functions in the program and that are affected by the modifying step (d) to comply with typing constraints, wherein the modifying step (e) comprises the steps of; i) determining whether a potential non-terminating loop has been entered, and ii) if a potential non-terminating loop has been entered, modifying types such that the types comply with typing constraints and such that the type inference analysis will terminate. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27)
-
-
28. A memory for storing software for execution by a data processing system to perform a polymorphic type inference analysis for a program comprising at least one function call, the memory comprising:
-
a) program code stored by the memory for representing parameter values for each function call in the program with separate types; and b) program code stored by the memory for modifying the types to comply with typing constraints, wherein the program code (b) comprises; i) program code for determining whether a potential non-terminating loop has been entered, and ii) program code for modifying the types such that the types comply with the typing constraints and such that the type inference analysis will terminate if a potential non-terminating loop has been entered. - View Dependent Claims (29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42)
-
-
43. A data processing system comprising:
-
a) a translator for translating a program in a first language into code in a second language, wherein the program comprises at least one function call; b) a pointer analyzer for performing a polymorphic type inference pointer analysis for the program, the pointer analyzer for representing parameter values for each function call in the program with separate types, for modifying the types to comply with typing constraints, for determining whether a potential non-terminating loop has been entered, and for modifying the types such that the types comply with the typing constraints and such that the type inference analysis will terminate if a potential non-terminating loop has been entered; c) a store model for storing the types for the program; and d) an optimizer for optimizing the code based on the store model. - View Dependent Claims (44, 45, 46, 47, 48, 49, 50, 51, 52, 53)
-
Specification