Compile time meta-object protocol systems and methods
AssigneeMicrosoft Corporation
InventorsHenricus Johannes Maria Meijer, Avner Y. Aharoni, David Schach
Life of this patent
Estimating the term…
Abstract
The subject invention pertains to a compilation system and meta-object protocol to facilitate interaction with objects of various types including but not limited to XML documents. More specifically, a delineator or dot operator can be extended to hide idiosyncratic details of interacting with objects. Code details can be generated by a compiler behind the scenes. This enables a programmer to achieve the same results while writing much simpler and intuitive code.
Claims17
A compilation system comprising:
- a processor:
- a memory communicatively coupled to the processor, the memory having stored therein computer-executable instructions configured to implement the compilation system including:
- a receiver component that receives a delimited programmatic expression comprising a first element, a delimiter, and a second element wherein the programmatic expression is a member access expression where the first element is a receiver expression, the second element is a message identifier, and the delimiter is one of a dot (.), a series of dots ( . . . ), an exclamation point (!), or a pound symbol (#);
- a type detection component that determines the type of the first element;
- and
- a generation component that produces a translated expression based on the type of the first element and identities of the first element, the delimiter and the second element, wherein producing the translated expression comprises:
- determining whether the second element represents or is a member of the type of the first element;
- and
- generating a different type of translated expression based on whether the second element represents or is a member of the type of the first element, namely:
- when the second element represents or is a member of the type of the first element, generating a translated expression that incorporates standard methods for the delimiter;
- and
- when the second element does not represent and is not a member of the type of the first element, generating a generic method call as the translated expression, the generic method call not specifying any particular translation and not being bound to any particular method type.
A compilation system comprising:
- a processor;
- a memory communicatively coupled to the processor, the memory having stored therein computer-executable instructions configured to implement the compilation system including:
- means for receiving a delimited programmatic expression comprising;
- a first element;
- a second element;
- and
- a delimiter, separating the first element from the second element, and wherein the delimiter is one of;
- a dot (.);
- a series of dots ( . . . );
- an exclamation point (!);
- or
- a pound symbol (#);
- means for generating a method call based on the received expression and in accordance with a meta-object protocol, wherein a type of the method call is generated differently based on whether the second element is related to or is a member of the type of the first element and includes:
- determining whether the second element represents or is a member of the type of the first element;
- generating a different type of translated expression based on whether the second element represents or is a member of the type of the first element, namely:
- when the second element represents or is a member of the type of the first element, generated a translated expression that incorporates standard methods for the delimiter;
- and
- when the second element does not represent and is not a member of the type of the first element, generating a generic method call as the translated expression, the generic call not specifying any particular translation and not being bound to any particular method type;
- and
- means for incorporating the method call into the received expression to generate a translated expression.
A programmatic expression compilation method comprising:
- using a processor of a computing system:
- receiving a programmatic expression that includes a first element, a delimiter, and a second element, wherein the delimiter immediately follows the first element and the second element immediately follows the delimiter, and wherein the delimiter is one of a dot (.), a series of dots ( . . . ), an exclamation point (!), or a pound symbol (#);
- determining the type of the first element;
- and
- generating a translated expression based on the determined type of the first element and the identities of the first element, delimiter, and second element, wherein generating the translated expression comprises:
- determining whether the second element is a property or field of the type of the first element;
- and
- generating a different type of translated expression based on whether the second element is a property or field of the type of the first element, namely:
- when the second element is a property or field of the type of the first element, generating a translated expression that incorporates standard methods for the delimiter;
- and
- when the second element is not a property or field of the type of the first element, generating a generic method call as the translated expression, the generic method call not specifying any particular translation and not being bound to any particular method type.
Dependencies are inferred from the claim text.