Program-interface converter for multiple-platform computer systems
First Claim
1. In a programmable digital computer, a method for generating a synchronized set of translation modules containing program code for executing on a native platform a corresponding set of interface modules written for an emulated platform, the method comprising:
- identifying the set of interface modules written for the emulated platform and requiring translation for the second platform;
for all interface modules in the set, sequentially selecting a source-code file representing one of the set of interface modules as a current module;
extracting from the current-module data representing a group of functions exported by the current module;
matching the current-module data to a group of function templates, at least some of the templates containing generalized program code written for the native platform;
selecting at least one of the templates in response to the matching step; and
for each template selected, converting the generalized program source code in the template into personalized program code constituting at least part of the translation module for the current module.
1 Assignment
0 Petitions
Accused Products
Abstract
A utility program develops and updates an API-translation layer of an emulator for running programs written for one platform on another platform. The utility builds a module for each API from a set of templates to execute the API'"'"'s function on the other platform. Generalized function templates iterates through API functions. Exception templates can override the generalized templates in specific cases. Types templates convert individual arguments of the API. Code templates contain code for incorporation into a number of other templates.
72 Citations
8 Claims
-
1. In a programmable digital computer, a method for generating a synchronized set of translation modules containing program code for executing on a native platform a corresponding set of interface modules written for an emulated platform, the method comprising:
-
identifying the set of interface modules written for the emulated platform and requiring translation for the second platform;
for all interface modules in the set, sequentially selecting a source-code file representing one of the set of interface modules as a current module;
extracting from the current-module data representing a group of functions exported by the current module;
matching the current-module data to a group of function templates, at least some of the templates containing generalized program code written for the native platform; selecting at least one of the templates in response to the matching step; and
for each template selected, converting the generalized program source code in the template into personalized program code constituting at least part of the translation module for the current module. - View Dependent Claims (2, 3, 4, 5, 6, 7)
determining that the current module matches one of a group of exception templates each containing program code; and
generating at least part of the translation module for the current module from the program code of the one exception template.
-
-
3. A method according to claim 2, further comprising:
bypassing matching the current-module data against the function templates when the current module matches one of the group of exception templates.
-
4. A method according to claim 1 wherein the current module has at least one parameter having one of a group of types, further comprising
matching the one parameter to one of a group of types templates; - and
generating at least some of the program code of the current translation module from the one types template.
- and
-
5. A method according to claim 1, further comprising:
-
determining that one of the templates specifies the name of one of a group of a code templates; and
incorporating source code from the specified code template in the one template whenever the one template provides code for a translation module.
-
-
6. A method according to claim 1 wherein the interface modules have an import table and reside in at least one link library, and wherein the identifying step comprises:
-
scanning the link library; and
reading the names of the interface modules in the set from the import tables.
-
-
7. A method according to claim 1, further comprising:
iterating the matching, selecting and converting steps over each of the functions in the group of functions.
-
8. A computer-readable medium bearing representations of instructions and data for causing a computer to perform a method for generating a synchronized set of translation modules containing program code for executing a corresponding set of interface modules written for an emulated platform on a native platform, the method comprising:
-
identifying the set of interface modules written for the emulated platform and requiring translation for the second platform;
for all interface modules in the set, sequentially selecting a source-code file representing one of the set of interface modules as a current module;
extracting from the current module data representing a group of functions exported by the current module;
matching the current-module data to a group of function templates, at least some of the templates containing generalized program code written for the native platform;
selecting at least one of the templates in response to the matching step; and
for each template selected, converting the generalized program source code in the template into personalized program code constituting at least part of the translation module for the current module.
-
Specification