IP Library › Granted Patent US 8,745,605
Granted Patent B2
US 8,745,605 · App. 12/351,450 · Granted Jun 3, 2014

Execution contexts with polymorphic type implementations

Inventors: Jonathon Michael Stall (Bothell, WA); Renaud Paquay (Redmond, WA); Sonja Keserovic (Kirkland, WA); Michael Gregory Montwill (Seattle, WA)
Assignee: Microsoft Corporation
G06F8/443G06F8/47G06F8/41G06F8/43
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,745,605
App. No.
12/351,450
Granted
Jun 3, 2014
Kind
B2
Abstract

Various domains may wish to specify different implementations of the type; e.g., a compilation domain may describe the type statically, an execution domain may instantiate objects of the given type, while a debugging execution domain may associate additional debugging information such as a symbol name. This may be achieved by specifying a type implementation of a particular type within respective domains which all implement a common type interface. A type binding instruction set may then select a type implementation for the type within the target instruction set according to the domain, and may bind type instances of the type within target instruction set to the selected type implementation for the current domain. This technique yields domain-specific variance in type implementation without having to reconfigure the target instruction set or perform domain-checking logic there-within.

Claims (91)

1. A method of binding type implementations to types on a computer presenting an environment and having a memory and a processor, the method comprising:

storing in the memory a type binding instruction set configured to, upon receiving a request to execute a target instruction set including at least one type instance of a type:

among at least two execution contexts of an execution context set comprising:

a development execution context;

a compiling execution context;

a runtime execution context; and

a debugging execution context,

 the respective execution contexts associated with at least one characteristic of the environment of the computer in which the target instruction set is to be executed, identify a selected execution context for the target instruction set according to the at least one characteristic of the environment of the computer:

select a selected type implementation that implements the type according to the at least one characteristic of the environment associated with the selected execution context; and

bind the selected type implementation to the at least one type instance of the type in the target instruction set; and

executing the type binding instruction set on the processor.

2. The method of claim 1 :

the binding performed during inspection of the target instruction set by a user, and

the binding comprising: displaying for the user at least one aspect of the selected type implementation within the selected execution context.

3. The method of claim 1 :

the binding performed during execution of the target instruction set on the processor, and

the binding comprising: instantiating the respective type instances according to the selected type implementation of the type within the selected execution context.

4. The method of claim 3 , the binding performed during one of:

loading the target instruction set that references the type;

beginning execution of the target instruction set; and

instantiating the type instance during execution of the target instruction set.

5. The method of claim 3 , the type binding instruction set configured to:

upon receiving a request to compare the type instance with a second type instance of the type generated according to a second type implementation in a second execution context:

compare abstractions of respective members of the type instance with abstractions of corresponding respective members of the second type instance to generate a comparison result, and

return the comparison result to fulfill the request.

6. The method of claim 1 , selecting the selected type implementation of the type within the selected execution context comprising: upon failing to identify a selected type implementation within the selected execution context, generating a stub type implementation within the selected execution context.

7. The method of claim 1 , selecting the selected type implementation of the type within the selected execution context comprising:

selecting at least one assembly defining the selected type implementation of the type within the selected execution context, and

retrieving the selected type implementation from the assembly.

8. The method of claim 7 , the at least one assembly selected from among a limited assembly set associated with the selected execution context.

9. The method of claim 7 , selecting the at least one assembly comprising:

soliciting a user selection of at least one candidate assembly defining the type implementation of the type; and

upon receiving the user selection, selecting the assembly specified in the user selection.

10. The method of claim 1 , the type binding instruction set configured to:

upon receiving a request to convert a selected type instance of the selected execution context to a selected type instance according to a second type implementation within a second execution context:

convert the selected type instance to a second type instance according to the second type implementation, and

store the second type instance associated with the second execution context in the memory.

11. The method of claim 10 , the converting comprising:

serializing respective members of the type instance according to the selected type implementation of the selected execution context, and

deserializing the respective members of the type instance according to the second type implementation of the second execution context to generate the second type instance.

12. The method of claim 1 :

the memory associating with at least one execution context a type instance binder configured to bind the selected type implementation of the type to type instances within the execution context; and

the binding comprising: invoking the type instance binder with the selected type implementation of the type to bind the selected type implementation to the type.

13. The method of claim 12 :

the memory comprising at least one type instance cache associating types with cached one type instances generated according to the selected type implementation of the types within the selected execution context; and

the binding comprising:

searching the type instance cache to identify a cached type instance of the type;

upon identifying a cached type instance of the type, cloning the cached type instance to generate the type instance; and

upon failing to identify a cached type instance of the type:

generating a type instance according to the selected type implementation within the selected execution context, and

storing the type instance in the type instance cache associated with the type.

14. A system for binding type implementations to types specified in a target instruction set within an environment of a computer having a processor, the system comprising:

an execution context identifying component configured to, upon receiving a request to execute a target instruction set including at least one type instance of a type, among at least two execution contexts of an execution context set comprising:

a development execution context;

a compiling execution context;

a runtime execution context; and

a debugging execution context,

 the respective execution contexts associated with at least one characteristic of the environment of the computer in which the target respectively associated with at least one characteristic of the environment of the computer, identify a selected execution context for the target instruction set according to the at least one characteristic of the environment of the computer;

a type implementation selecting component configured to select a selected type implementation that implements the type according to the at least one characteristic of the environment associated with the selected execution context; and

a type implementation binding component configured to bind the selected type implementation to the at least one type instance of the type in the target instruction set.

15. The system of claim 14 , comprising:

a type instance converting component configured, upon receiving a request to convert the type instance of the selected execution context to a type instance according to a second type implementation within a second execution context, to:

convert the type instance to a second type instance according to the second type implementation, and

store the second type instance associated with the second execution context in the memory.

16. The system of claim 14 , comprising:

a type instance comparing component configured, upon receiving a request to compare the type instance with a second type instance of the type generated according to a second type implementation in a second execution context, to:

compare abstractions of respective members of the type instance with abstractions of respective members of the second type instance to generate a comparison result, and

return the comparison result to fulfill the request.

17. The system of claim 14 :

the system comprising: at least one execution context comprising a type instance binder configured to bind the selected type implementation of the type to type instances within the execution context; and

the type instance binding component configured to invoke the type instance binder with the selected type implementation of the type to bind the selected type implementation of the type to the type instances.

18. The system of claim 17 :

the system comprising a type instance cache associating at least one type with at least cached one type instance generated according to the selected type implementation of the type within the selected execution context; and

the type instance generating component configured to:

search the type instance cache to identify a cached type instance of the type;

upon identifying the cached type instance of the type, clone the cached type instance to generate the type instance; and

upon failing to identify a cached type instance of the type:

generate a type instance according to the selected type implementation within the selected execution context, and

store the type instance in the type instance cache associated with the type.

19. The system of claim 14 , the type implementation selecting component configured to select the selected type implementation of the type within the selected execution context by:

selecting at least one assembly defining the selected type implementation of the type within the selected execution context, and

retrieving the selected type implementation from the assembly.

20. A nonvolatile computer-readable memory device storing a type binding instruction set configured to, when executed within an environment of a computer having a processor and a memory storing a target instruction set and defining at least two execution contexts, bind type implementations to types specified in the target instruction set by, upon receiving a request to execute a target instruction set having at least one type instance of a type:

among at least two execution contexts of an execution context set comprising:

a development execution context;

a compiling execution context;

a runtime execution context; and

a debugging execution context,

 the respective execution contexts associated with at least one characteristic of the environment of the computer in which the target respectively associated with at least one characteristic of the environment of the computer, identifying a selected execution context for the target instruction set according to the at least one characteristic of the environment of the computer;

selecting a selected type implementation that implements the type according to the at least one characteristic of the environment associated with the selected execution context; and

binding the selected type implementation to the at least one type instance of the type in the target instruction set.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034564/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 23, 2009
From: STALL, JONATHON MICHAEL; PAQUAY, RENAUD; KESEROVIC, SONJA; MONTWILL, MICHAEL GREGORY
To: MICROSOFT CORPORATION
Reel/Frame 022293/0069 →
Continuity (1)
Related Publication 20100180269A1 · Jul 15, 2010