Claims
- 1. A method for designing a software program comprising a plurality of modules, the method comprising:
defining at least one initialization sequence wherein each module of said plurality of modules is initialized according to a predetermined order; defining calling order constraints wherein a first module may call a second module if said first module succeeds said second module in said predetermined order; and creating a program specification for said software program, said program specification comprising a module specification for each module of said plurality of modules, said module specification indicating other modules called by an implementation of said module.
- 2. The method of claim 1 wherein at least one of said plurality of modules comprises an initialization procedure to be called once before any other procedure in the same module is called.
- 3. The method of claim 1, further comprising determining whether said program specification is consistent with said initialization sequence and said calling order constraints.
- 4. The method of claim 3, further comprising modifying said program specification to make said program specification consistent with said initialization sequence and said calling order constraints if said program specification is inconsistent with said initialization sequence and said calling order constraints.
- 5. The method of claim 1, further comprising determining whether an implementation of said software program is consistent with said program specification, said program specification being consistent with said initialization sequence and said calling order constraints.
- 6. The method of claim 1, further comprising modifying an implementation of said software program to make said implementation consistent with said program specification, said program specification being consistent with said initialization sequence and said calling order constraints.
- 7. The method of claim 1, further comprising:
determining whether said program specification is consistent with said initialization sequence and said calling order constraints; determining whether an implementation of said software program is consistent with said program specification if said program specification is consistent with said initialization sequence and said calling order constraints; and modifying said implementation of said software program to make said implementation consistent with said program specification if said implementation is not consistent with said program specification.
- 8. The method of claim 1 wherein said defining calling order constraints further comprises using at least one annotation in said software program to define said calling order constraints.
- 9. The method of claim 1, further comprising indicating an implementation of said program is consistent if said implementation is consistent with said program specification and if said program specification is consistent with said initialization sequence and said calling order constraints.
- 10. The method of claim 1 wherein said software program includes a boot manager module, said boot manager module configured to be the first module of said program to execute upon execution of said software program.
- 11. The method of claim 1 wherein at least one of said plurality of modules is assigned to one of at least one layer of a plurality of software module layers.
- 12. The method of claim 11 wherein at least one of said plurality of modules is assigned to one of at least one layer of a plurality of software module layers.
- 13. The method of claim 11, further comprising organizing said plurality of modules in said plurality of software module layers into two or more columns of related functionality.
- 14. The method of claim 11 wherein said plurality of software module layers comprises three software module layers.
- 15. The method of claim 11 wherein said plurality of software module layers comprises four software module layers.
- 16. The method of claim 1 wherein at least part of said specification is embedded within said implementation.
- 17. The method of claim 16 wherein at least one annotation including a calling order of a plurality of modules is embedded within said implementation.
- 18. The method of claim 1 wherein said software program is targeted for execution on a resource-constrained device.
- 19. The method of claim 18 wherein said software program is targeted for execution on a smart card.
- 20. The method of claim 19 wherein said software program is targeted for execution on a Java Card™ technology-enabled smart card.
- 21. The method of claim 1 wherein said initialization sequence terminates with the execution of a command interpreter.
- 22. The method of claim 1 wherein said initialization sequence terminates with the execution of a Java Card™ Runtime Environment (JCRE).
- 23. The method of claim 1 wherein said initialization sequence terminates with the execution of a virtual machine (VM).
- 24. The method of claim 1 wherein
at least one of module of said plurality of modules establishes a conditional variable; said at least one initialization sequence comprises a plurality of initialization sequences; and said method further comprises selecting one of said plurality of initialization sequences based on said conditional variable.
- 25. The method of claim 24 wherein said conditional variable is established based at least in part on the presence of one or more markers in a memory.
- 26. The method of claim 24 wherein said conditional variable is established based at least in part on the presence of one or more hardware fuses.
- 27. A program storage device readable by a machine, embodying a program of instructions executable by the machine to perform a method for designing a software program comprising a plurality of modules, the method comprising:
defining at least one initialization sequence wherein each module of said plurality of modules is initialized according to a predetermined order; defining calling order constraints wherein a first module may call a second module if said first module succeeds said second module in said predetermined order; and creating a program specification for said software program, said program specification comprising a module specification for each module of said plurality of modules, said module specification indicating other modules called by an implementation of said module.
- 28. The program storage device of claim 27 wherein at least one of said plurality of modules comprises an initialization procedure to be called once before any other procedure in the same module is called.
- 29. The program storage device of claim 27 wherein said method further comprises determining whether said program specification is consistent with said initialization sequence and said calling order constraints.
- 30. The program storage device of claim 29 wherein said method further comprises modifying said program specification to make said program specification consistent with said initialization sequence and said calling order constraints if said program specification is inconsistent with said initialization sequence and said calling order constraints.
- 31. The program storage device of claim 27 wherein said method further comprises determining whether an implementation of said software program is consistent with said program specification, said program specification being consistent with said initialization sequence and said calling order constraints.
- 32. The program storage device of claim 27 wherein said method further comprises modifying an implementation of said software program to make said implementation consistent with said program specification, said program specification being consistent with said initialization sequence and said calling order constraints.
- 33. The program storage device of claim 27 wherein said method further comprises:
determining whether said program specification is consistent with said initialization sequence and said calling order constraints; determining whether an implementation of said software program is consistent with said program specification if said program specification is consistent with said initialization sequence and said calling order constraints; and modifying said implementation of said software program to make said implementation consistent with said program specification if said implementation is not consistent with said program specification.
- 34. The program storage device of claim 27 wherein said defining calling order constraints further comprises using at least one annotation in said software program to define said calling order constraints.
- 35. The program storage device of claim 27 wherein said method further comprises indicating an implementation of said program is consistent if said implementation is consistent with said program specification and if said program specification is consistent with said initialization sequence and said calling order constraints.
- 36. The program storage device of claim 27 wherein said software program includes a boot manager module, said boot manager module configured to be the first module of said program to execute upon execution of said software program.
- 37. The program storage device of claim 27 wherein at least one of said plurality of modules is assigned to one of at least one layer of a plurality of software module layers.
- 38. The program storage device of claim 37 wherein at least one of said plurality of modules is assigned to one of at least one layer of a plurality of software module layers.
- 39. The program storage device of claim 37 wherein said method further comprises organizing said plurality of modules in said plurality of software module layers into two or more columns of related functionality.
- 40. The program storage device of claim 37 wherein said plurality of software module layers comprises three software module layers.
- 41. The program storage device of claim 37 wherein said plurality of software module layers comprises four software module layers.
- 42. The program storage device of claim 27 wherein at least part of said specification is embedded within said implementation.
- 43. The program storage device of claim 42 wherein at least one annotation including a calling order of a plurality of modules is embedded within said implementation.
- 44. The program storage device of claim 27 wherein said software program is targeted for execution on a resource-constrained device.
- 45. The program storage device of claim 44 wherein said software program is targeted for execution on a smart card.
- 46. The program storage device of claim 45 wherein said software program is targeted for execution on a Java Card™ technology-enabled smart card.
- 47. The program storage device of claim 27 wherein said initialization sequence terminates with the execution of a command interpreter.
- 48. The program storage device of claim 27 wherein said initialization sequence terminates with the execution of a Java Card™ Runtime Environment (JCRE).
- 49. The program storage device of claim 27 wherein said initialization sequence terminates with the execution of a virtual machine (VM).
- 50. The program storage device of claim 27 wherein
at least one of module of said plurality of modules establishes a conditional variable; said at least one initialization sequence comprises a plurality of initialization sequences; and said method further comprises selecting one of said plurality of initialization sequences based on said conditional variable.
- 51. The program storage device of claim 50 wherein said conditional variable is established based at least in part on the presence of one or more markers in a memory.
- 52. The program storage device of claim 50 wherein said conditional variable is established based at least in part on the presence of one or more hardware fuses.
- 53. An apparatus for designing a software program comprising a plurality of modules, the apparatus comprising:
means for defining at least one initialization sequence wherein each module of said plurality of modules is initialized according to a predetermined order; means for defining calling order constraints wherein a first module may call a second module if said first module succeeds said second module in said predetermined order; and means for creating a program specification for said software program, said program specification comprising a module specification for each module of said plurality of modules, said module specification indicating other modules called by an implementation of said module.
- 54. The apparatus of claim 53 wherein at least one of said plurality of modules comprises an initialization procedure to be called once before any other procedure in the same module is called.
- 55. The apparatus of claim 53, further comprising means for determining whether said program specification is consistent with said initialization sequence and said calling order constraints.
- 56. The apparatus of claim 55, further comprising means for modifying said program specification to make said program specification consistent with said initialization sequence and said calling order constraints if said program specification is inconsistent with said initialization sequence and said calling order constraints.
- 57. The apparatus of claim 53, further comprising means for determining whether an implementation of said software program is consistent with said program specification, said program specification being consistent with said initialization sequence and said calling order constraints.
- 58. The apparatus of claim 53, further comprising means for modifying an implementation of said software program to make said implementation consistent with said program specification, said program specification being consistent with said initialization sequence and said calling order constraints.
- 59. The apparatus of claim 53, further comprising:
means for determining whether said program specification is consistent with said initialization sequence and said calling order constraints; means for determining whether an implementation of said software program is consistent with said program specification if said program specification is consistent with said initialization sequence and said calling order constraints; and means for modifying said implementation of said software program to make said implementation consistent with said program specification if said implementation is not consistent with said program specification.
- 60. The apparatus of claim 53 wherein said defining calling order constraints further comprises means for using at least one annotation in said software program to define said calling order constraints.
- 61. The apparatus of claim 53, further comprising means for indicating an implementation of said program is consistent if said implementation is consistent with said program specification and if said program specification is consistent with said initialization sequence and said calling order constraints.
- 62. The apparatus of claim 53 wherein said software program includes a boot manager module, said boot manager module configured to be the first module of said program to execute upon execution of said software program.
- 63. The apparatus of claim 53 wherein at least one of said plurality of modules is assigned to one of at least one layer of a plurality of software module layers.
- 64. The apparatus of claim 63 wherein at least one of said plurality of modules is assigned to one of at least one layer of a plurality of software module layers.
- 65. The apparatus of claim 63, further comprising means for organizing said plurality of modules in said plurality of software module layers into two or more columns of related functionality.
- 66. The apparatus of claim 63 wherein said plurality of software module layers comprises three software module layers.
- 67. The apparatus of claim 63 wherein said plurality of software module layers comprises four software module layers.
- 68. The apparatus of claim 53 wherein at least part of said specification is embedded within said implementation.
- 69. The apparatus of claim 68 wherein at least one annotation including a calling order of a plurality of modules is embedded within said implementation.
- 70. The apparatus of claim 53 wherein said software program is targeted for execution on a resource-constrained device.
- 71. The apparatus of claim 70 wherein said software program is targeted for execution on a smart card.
- 72. The apparatus of claim 71 wherein said software program is targeted for execution on a Java Card™ technology-enabled smart card.
- 73. The apparatus of claim 53 wherein said initialization sequence terminates with the execution of a command interpreter.
- 74. The apparatus of claim 53 wherein said initialization sequence terminates with the execution of a Java Card™ Runtime Environment (JCRE).
- 75. The apparatus of claim 53 wherein said initialization sequence terminates with the execution of a virtual machine (VM).
- 76. The apparatus of claim 53 wherein
at least one of module of said plurality of modules establishes a conditional variable; said at least one initialization sequence comprises a plurality of initialization sequences; and said apparatus further comprises means for selecting one of said plurality of initialization sequences based on said conditional variable.
- 77. The apparatus of claim 76, further comprising means for establishing said conditional variable based at least in part on the presence of one or more markers in a memory.
- 78. The method of claim 76, further comprising means for establishing said conditional variable based at least in part on the presence of one or more hardware fuses.
- 79. An apparatus for analyzing a program specification, the apparatus comprising:
an initialization order constraint tool configured to receive a program specification for a software program, said program specification comprising a module specification for each module of said plurality of modules, said module specification indicating other modules called by an implementation of said module, said tool further configured to determine whether said program specification is consistent with respect to a calling order constraint, said calling order constraint indicating a first module may call a second module only if said first module is initialized after said second module is initialized.
- 80. An apparatus for analyzing a program implementation, the apparatus comprising:
an initialization order constraint tool configured to receive a program implementation for a software program, said program implementation comprising a plurality of modules, said tool further configured to determine whether said program specification is consistent with respect to a calling order constraint, said calling order constraint indicating a first module may call a second module only if said first module is initialized after said second module is initialized.
- 81. An apparatus for analyzing a program, the apparatus comprising:
an initialization order constraint tool configured to receive a program specification for a software program and a program implementation for said software program, said program specification comprising a module specification for each module of said plurality of modules, said module specification indicating other modules called by an implementation of said module, said program implementation comprising said plurality of modules, said tool further configured to determine whether said program implementation is consistent with respect to said program specification, said program specification following a calling order constraint that provides a first module may call a second module only if said first module is initialized after said second module is initialized.
- 82. The apparatus of claim 81 wherein said apparatus is further configured to modify said program implementation to make said program implementation consistent with said program specification if said program implementation is inconsistent with respect to said program specification.
- 83. An apparatus for deployment of high integrity software, the apparatus comprising:
a hardware component comprising:
a processor; a memory coupled to said processor; and a reset indicator coupled to said processor; a kernel component comprising a plurality of modules having at least one defined initialization sequence wherein each module of said plurality of modules is initialized according to a predetermined order, said plurality of modules having defined calling order constraints wherein a first module may call a second module if said first module succeeds said second module in said predetermined order, the first module in said initialization sequence operatively coupled to said reset indicator; and a main component comprising at least one module, said at least one module executed after initialization of said kernel component.
- 84. The apparatus of claim 83 wherein at least one of said plurality of modules is assigned to at least one layer of a plurality of software module layers.
- 85. The apparatus of claim 84 wherein at least one of said plurality of modules is assigned to one of at least one layer of a plurality of software module layers.
- 86. The apparatus of claim 84 wherein said plurality of modules is organized into two or more columns of related functionality.
- 87. The apparatus of claim 84 wherein said plurality of module layers comprises three software module layers.
- 88. The apparatus of claim 84 wherein said plurality of module layers comprises four software module layers.
- 89. The apparatus of claim 84 wherein said device comprises a resource-constrained device.
- 90. The apparatus of claim 89 wherein said apparatus comprises a smart card.
- 91. The apparatus of claim 89 wherein said apparatus comprises a Java Card™ technology-enabled smart card.
- 92. The apparatus of claim 91 wherein said main component comprises a Java Card™ Runtime Environment (JCRE).
- 93. The apparatus of claim 83 wherein said main component comprises a command interpreter.
- 94. The apparatus of claim 83 wherein said processor comprises a virtual machine.
- 95. The apparatus of claim 83 wherein said at least one defined initialization sequence comprises a plurality of initialization sequences, at least one of said plurality of initialization sequences associated with an operational mode based on the presence of one or more markers in said memory.
- 96. The apparatus of claim 83 wherein
said apparatus further comprises a hardware abstraction component comprising a virtual machine configured to execute instructions in said kernel component; and said first module in said initialization sequence is operatively coupled to said reset indicator via said virtual machine.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to the following:
[0002] U.S. patent application Ser. No. ______, filed Mar. 18, 2002 in the name of Eduard de Jong, entitled “Method and Apparatus for Deployment of High Integrity Software Using Reduced Dynamic Memory Allocation”, Attorney Docket No. SUN-P6958, commonly assigned herewith.
[0003] U.S. patent application Ser. No. ______, filed Mar. 18, 2002 in the name of Eduard de Jong and Pieter Hartel, entitled “Method and Apparatus for Deployment of High Integrity Software Using Static Procedure Return Addresses”, Attorney Docket No. SUN-P6959, commonly assigned herewith.
[0004] U.S. patent application Ser. No. ______, filed Mar. 18, 2002 in the name of Eduard de Jong, entitled “Enhanced Memory Management for Portable Devices”, Attorney Docket No. SUN-P7006, commonly assigned herewith.