Hostable compiler utilizing type information from a host application
AssigneeMicrosoft Technology Licensing, LLC
InventorJoseph Pamer
Life of this patent
Estimating the term…
Abstract
A hostable compiler interacts with a host application to enable the host application to execute program code supported by the hostable compiler. The host application and the hostable compiler exchange data through an interface that allows the hostable compiler to receive type information pertaining to data elements used in applications executing within the host application process. This type information may then be used by the hostable compiler in the compilation of source code to infer a type for data elements used in the source code that are not declared yet associated with a value of an expression used in an application executed within the host application process.
Claims20
A computer-implemented method, comprising:
- obtaining a first type, the first type associated with a value of an expression used in a first source code hosted by a host application;
- inferring a second type for a value of an expression used in a second source code based on the first type, the value of the expression used in the second source code not associated with a type, the second source code hosted by the host application, the first source code written in a dynamic type programming language, the second source code written in a strongly typed programming language;
- and
- compiling the second source code using at least one of the first type, type information from source code executed in the host application and type information from external references, for the value of the expression used in the second source code.
A device comprising:
- at least one processor and a memory;
- the at least one processor configured to:
- receive a first type for a value of an expression used in a first source code fragment associated with a host application;
- use the first type to infer a second type for a value of an expression not declared in a second source code fragment associated with the host application;
- and
- compile the second source code fragment using for the value of the expression in the second source code fragment at least one of the second type, type information from source code executed in the host application and type information from external references,
- the first source code fragment written in a dynamic type programming language and the second source code fragment written in a strongly typed programming language.
A system having at least one processor and a memory, the system comprising:
- a host application, having instructions that when executed on the at least one processor, passes type information of interpreted source code within a host application process to a hostable compiler;
- and
- the hostable compiler, having instructions that when executed on the at least one processor, type checks expressions in a program source code within the host application process using at least one of type information from the interpreted source code executed within the host application process, type information from source code executed in the host application and type information from external references, wherein the interpreted source code is written in a dynamic type programming language and the program source code is written in a strongly typed programming language, wherein the hostable compiler infers a type for a value of an expression used in the program source code that is not associated with a type, with a type associated with the value in the interpreted source code.
Dependencies are inferred from the claim text.