Invasion analysis to identify open types
AssigneeMicrosoft Corporation
InventorsPatrick W. Sathyanathan, Ten H. Tzen
Life of this patent
Estimating the term…
Abstract
The automated identification of open types of a multi-function input program. The automated identification of open types is performed without annotations in the input program, but rather by identifying a set of invading types of the program, with each of the invading types being an open type. The identification of invading types may be performed iteratively until the set of invading types no longer grows. The set of open types may be used for any purpose such as perhaps the de-virtualization of an input program during compilation.
Claims20
A computer program product comprising one or more physical storage devices having thereon computer-executable instructions that are structured such that, when executed by one or more processors of a computing system, cause the computing system to perform a method for identifying open types of an input program that is to be optimized prior to runtime, the method comprising acts of:
- inputting at an invasion analysis component an input program that is to be optimized prior to runtime the input program including a plurality of functions and a plurality of object types used by one or more of the functions;
- the invasion analysis component automatically identifying an initial set of open types without using annotations of open types in the input program by identifying an initial set of invading types of objects constructed outside the input program which enter the input program in one or more ways;
- the invasion analysis component then automatically performing one or more iterations using the initial set of invading to continue identifying further invading types and adding the identified further invading types to the initial set of invading types until no further invading types are found;
- and
- sending a final set of open types that correspond to the set of all invading types identified by the iterations performed by the invasion analysis component to an optimizer that uses the identified open types to optimize the input program prior to runtime.
A computer-implemented method for identifying open types of an input program that is to be optimized prior to runtime, the computer-implemented method comprising acts of:
- inputting at an invasion analysis component an input program that is to be optimized prior to runtime, the input program including a plurality of functions and a plurality of object types used by one or more of the functions;
- the invasion analysis component automatically identifying an initial set of open types without using annotations of open types in the input program by identifying an initial set of invading types of objects constructed outside the input program which enter the input program in one or more ways;
- the invasion analysis component then automatically performing one or more iterations using the initial set of invading types to continue identifying further invading types and adding the identified further invading types to the initial set of invading types until no further invading types are found;
- and
- sending a final set of open types that correspond to the set of all invading types identified by the iterations performed by the invasion analysis component to an optimizer that uses the identified open types to optimize the input program prior to runtime.
A computer system for compiling an optimized input program prior to runtime, comprising:
- one or more processors;
- and
- one or more memory devices storing executable instructions for implementing a method for identifying open types of the input program, the executable instructions causing the one or more processors to perform the following:
- inputting at an invasion analysis component an input program that is to be optimized prior to runtime, the input program including a plurality of functions and a plurality of object types used by one or more of the functions;
- accessing at the invasion analysis component an external library including a plurality of functions and a plurality of object types used by one or more of the functions of the external library;
- the invasion analysis component automatically identifying an initial set of open types without using annotations of open types in the input program by identifying an initial set of invading types of objects constructed outside the input program which enter the input program in one or more ways, by performing one or more of the following acts:
- identifying one or more entry point functions of the input program which receive as an input parameter an invading object type;
- identifying one or more egress point functions of the external library which receive as an input parameter an escaping object type constructed inside the input program;
- identifying one or more externally defined global variables as being invading object types constructed outside the input program which are received as an input parameter at one or more of the external library functions;
- the invasion analysis component then automatically performing one or more iterations of the following acts:
- determining from the initial set of invading types one or more new egress functions not previously identified and any corresponding new egress types of the one or more new egress functions, and
- then determining from the corresponding new egress types any new entry point functions not previously identified and any corresponding new invading types of the one or more new entry point functions;
- adding the any corresponding new invading types to the initial set of invading types;
- and
- the invasion analysis component continuing to perform iterations of said acts until no new invading types are added to the initial set of invading types;
- and
- sending a final set of open types that correspond to the set of invading types identified by the invasion analysis component to an optimizer that uses the identified open types to optimize the input program prior to runtime.
Dependencies are inferred from the claim text.