Computer program product containing instructions for providing a processor the capability of executing an application derived from a compiled form
View Patent ↗An integrated circuit card is used with a terminal. The integrated circuit card includes a memory that stores an interpreter and an application that has a high level programming language format. A processor of the card is configured to use the interpreter to interpret the application for execution and to use a communicator of the card to communicate with the terminal.
1. A method of programming a programmable device having a first memory and a second memory and a processor operating according to a set of resource constraints, the method comprising the steps of:
inputting an application program in a first programming language;
compiling the application program in the first programming language into a first intermediate code associated with the first programming language wherein the first intermediate code being interpretable by at least one first intermediate code virtual machine;
converting the first intermediate code into a second intermediate code by performing at least one operation to replace a construct in the first intermediate code with an equivalent construct in the second intermediate code, wherein the second intermediate code is interpretable within the set of resource constraints by a second intermediate code virtual machine; and
loading the second intermediate code into the second memory of the programmable device.
2. The method of programming a programmable device of claim 1 further comprising coalescing at least two class files into one resulting class file by merging a first table from a first of the at least two class files with a second table from the second of the at least two class files thereby producing a shared table for the resulting class file.
3. The method of programming a programmable device of claim 2 wherein the first and second tables are constant pools for each of the first and second class files, respectively, and the shared table is a shared constant pool.
4. The method of programming a programmable device of claim 2 further comprising removing duplicates of information items found in the first and second class files such that the resulting class file lacks duplication of at least one information item occurring in both the first and second class files.
5. The method of programming a programmable device of claim 4 wherein the at least one information item is a string.
6. The method of programming a programmable device of claim 1 further comprising
providing the application with specific privileges; and
upon detecting that the application attempts access to a data item on the programmable device, determining whether the specific privileges of the application are sufficient to allow the application the access to the data item.
7. The method of programming a programmable device of claim 6 wherein providing specific privileges to the application comprises associating an identity with the application.
8. The method of programming a programmable device of claim 6 further comprising determining whether the specific privileges of the application are sufficient to allow the application the access to the data item by delegating the determination to an operating system of the programmable device.
9. The method of programming a programmable device of claim 8 further comprising denying access upon determining that the identity associated with the application is not contained in the access control list associated with the data item.
10. The method of programming a programmable device of claim 8 further comprising granting access upon determining that the identity associated with the application is contained in the access control list associated with the data item.
11. The method of programming a programmable device of claim 1 wherein the converting step comprises converting byte codes of the application from a first set of byte codes associated with a first machine architecture into a second set of byte codes associated with a second machine architecture.
12. The method of programming a programmable device of claim 11 wherein the first machine architecture is a word stack architecture and the second machine architecture is an architecture other than a word stack architecture.
13. The method of programming a programmable device of claim 11 wherein the second machine architecture is a byte stack architecture.
14. The method of programming a programmable device of claim 11 wherein the first and second machine architectures are virtual machine architectures.
15. The method of programming a programmable device of claim 1 wherein the converting step comprises removal of unnecessary program parts.
16. The method of programming a programmable device of claim 15 wherein the unnecessary program parts are attributes.
17. The method of programming a programmable device of claim 15 wherein the unnecessary program parts are program parts not necessary for interpretation by the second code virtual machine.
18. The method of programming a programmable device of claim 15 wherein the unnecessary program parts are parts not necessary for interpretation.
19. The method of programming a programmable device of claim 1 further comprising the second code virtual machine recognizing a method invocation as being an invocation of a native code subroutine and upon recognizing the method invocation as being an invocation of a native code subroutine, transferring control to the native code subroutine.
20. The method of programming a programmable device of claim 19 wherein the second code virtual machine passes parameters to the native code subroutine on a stack associated with the second code virtual machine.
21. The method of programming a programmable device of claim 19 wherein the second code virtual machine passes parameters to the native code subroutine on a stack associated with an operating system of the programmable device.
22. The method of programming a programmable device of claim 1 wherein the second intermediate code comprises a converted form class file, the method further comprising:
receiving the converted form class file;
processing the converted form class file to produce an application interpretable by the second code virtual machine while the second code virtual machine executes on the programmable device; and
storing the produced application interpretable by the second code virtual machine on the programmable device.
23. The method of programming a programmable device of claim 1 further comprising:
multiple applications for the programmable device stored on the second memory of the programmable device;
receiving, from an input device operable to produce an application selection indication, an application selection indicating which application to execute; and
using the second code virtual machine to execute the selected application.
24. The method of programming a programmable device of claim 23 further comprising:
receiving an application selection indication from an input device connected to the programmable device.
25. The method of programming a programmable device of claim 24 wherein the input device connected to the processor and operable to provide an application selection indication is a device operable to communicate with the programmable device.
26. The method of programming a programmable device of claim 25 wherein the input device operable to communicate with the programmable device comprises one or more of an automated teller machine, point-of-sale terminal, access control system, system that communicates with an integrated circuit card, or a system that communicates with a microcontroller.
27. A programmable device, comprising:
a first memory, a second memory and a processor operating under a set of resource constraints connected to the first and second memories;
the second memory storing:
a second intermediate code virtual machine configured to interpret applications in a converted form; and
an application for the programmable device obtained by:
a compiler operable to compile an application program in a first programming language into a first intermediate code associated with the first programming language wherein the first intermediate code is interpretable by at least one first intermediate code virtual machine;
a converter operable to convert the first intermediate code into a second intermediate code by performing at least one operation to replace a construct in the first intermediate code with an equivalent construct in the second intermediate code, wherein the second intermediate code is interpretable within the set of resource constraints by a second intermediate code virtual machine; and
a loader for loading the second intermediate code into the second memory of the programmable device.
28. The programmable device of claim 27 wherein the converter is further operable to coalesce at least two class files into one resulting class file by merging a first table from a first of the at least two class files with a second table from the second of the at least two class files thereby producing a shared table for the resulting class file.
29. The programmable device of claim 28 wherein the first and second tables are constant pools for each of the first and second class files, respectively, and the shared table is a shared constant pool.
30. The programmable device of claim 28 wherein the converter is further operable to remove duplicates of information items found in the first and second class files such that the resulting class file lacks duplication of at least one information item occurring in both the first and second class files.
31. The programmable device of claim 30 wherein the at least one information item is a string.
32. The programmable device of claim 27 wherein the application has associated therewith specific privileges; and wherein the programmable device is operable to, upon detecting that the application attempts access to a data item on the programmable device, determine whether the specific privileges of the application are sufficient to allow the application the access to the data item.
33. The programmable device of claim 32 wherein the specific privileges to the application are associated with an identity associated with the application.
34. The programmable device of claim 33 wherein the programmable device is further operable to grant access upon determining that the identity associated with the application is contained in the access control list associated with the data item.
35. The programmable device of claim 33 wherein the programmable device is further operable to deny access upon determining that the identity associated with the application is not contained in the access control list associated with the data item.
36. The programmable device of claim 27 wherein the application has associated therewith specific privileges; and wherein the programmable device comprises an operating system operable to, upon detecting that the application attempts access to a data item on the programmable device, determine whether the specific privileges of the application are sufficient to allow the application the access to the data item.
37. The programmable device of claim 27 wherein the converter is further operable to convert byte codes of the application from a first set of byte codes associated with a first machine architecture into a second set of byte codes associated with a second machine architecture.
38. The programmable device of claim 37 wherein the first machine architecture is a word stack architecture and the second machine architecture is an architecture other than a word stack architecture.
39. The programmable device of claim 37 wherein the second machine architecture is a byte stack architecture.
40. The programmable device of claim 37 wherein the first and second machine architectures are virtual machine architectures.
41. The programmable device of claim 27 wherein converter is further operable to remove unnecessary program parts.
42. The programmable device of claim 41 wherein the unnecessary program parts are attributes.
43. The programmable device of claim 41 wherein the unnecessary program parts are program parts not necessary for interpretation by the second code virtual machine.
44. The programmable device of claim 41 wherein the unnecessary program parts are parts not necessary for interpretation.
45. The programmable device of claim 27 further comprising the second code virtual machine recognizing a method invocation as being an invocation of a native code subroutine and upon recognizing the method invocation as being an invocation of a native code subroutine, transferring control to the native code subroutine.
46. The programmable device of claim 45 wherein the second code virtual machine passes parameters to the native code subroutine on a stack associated with the second code virtual machine.
47. The programmable device of claim 45 wherein the second code virtual machine passes parameters to the native code subroutine on a stack associated with an operating system of the programmable device.
48. The programmable device of claim 27 wherein the second intermediate code comprises a converted form class file, the converter is further operable to:
receive the converted form class file;
process the converted form class file to produce an application interpretable by the second code virtual machine while the second code virtual machine executes on the programmable device; and
store the produced application interpretable by the second code virtual machine on the programmable device.
49. The programmable device of claim 27 further comprising:
multiple applications for the programmable device stored on the second memory of the programmable device; and
wherein the programmable device is operable to receive an application selection indication from an input device operable to receive an application selection and to produce an application selection indication indicating which application to execute, and the second code virtual machine is operable to execute the selected application.
50. The programmable device of claim 49 wherein the input device is connected to the programmable device.
51. The programmable device of claim 50 wherein the input device connected to the processor and operable to provide an application selection indication is a device operable to communicate with the programmable device.
52. The programmable device of claim 51 wherein the input device operable to communicate with the programmable device comprises one or more of an automated teller machine, point-of-sale terminal, access control system, system that communicates with an integrated circuit card, or a system that communicates with a microcontroller.