Claims
- 1. A method of generating code in a model-based development environment comprising:
modeling a system using graphical modeling entities; attaching a modular code generator routine directly to at least one of the graphical modeling entities; traversing through the graphical modeling entities to access the code generator routine; and, executing the accessed code generator routine so as to generate code for the system.
- 2. The method of claim 1 wherein the attaching a modular code generator routine directly to at least one of the graphical modeling entities comprises attaching the modular code generator to a meta-entity.
- 3. The method of claim 2 wherein the accessing of the code generator routine comprises:
accessing the code generator routine of the modeling entity; and, accessing the code generator routine of the corresponding meta-entity.
- 4. The method of claim 1 wherein the attaching a modular code generator routine directly to at least one of the graphical modeling entities comprises attaching the modular code generator to a collection of entities.
- 5. The method of claim 4 wherein the accessing of the code generator routine comprises:
accessing the code generator routine of the modeling entity; and, accessing the code generator routine of all of the collections of entities to which the modeling entity belongs.
- 6. The method of claim 1 wherein the attaching of a modular code generator routine directly to at least one of the graphical modeling entities comprises attaching a base code generator routine and a specialized code generator routine to the at least one graphical modeling entity, and wherein the executing of the accessed code generator routine comprises executing the specialized code generator routine but not the base code generator routine when the at least one graphical modeling entity is traversed.
- 7. The method of claim 6 wherein the specialized code generator routine comprises a specialized instance code generator routine.
- 8. The method of claim 6 wherein the specialized code generator routine comprises a specialized scoped code generator routine.
- 9. The method of claim 6 wherein the specialized code generator routine comprises a specialized stereotype code generator routine.
- 10. The method of claim 6 wherein the specialized code generator routine comprises a specialized cross-domain code generator routine.
- 11. The method of claim 1 wherein the executing of the accessed code generator routine comprises executing the accessed code generator routine so as to generate textual code.
- 12. The method of claim 11 wherein the textual code comprises programming code.
- 13. The method of claim 11 wherein the textual code comprises configuration file code.
- 14. The method of claim 11 wherein the textual code comprises documentation code.
- 15. The method of claim 11 wherein the textual code comprises tool input code.
- 16. The method of claim 1 wherein the executing of the accessed code generator routine comprises executing the accessed code generator routine so as to generate non-textual code.
- 17. The method of claim 1 wherein the traversal of the modeling entities is determined dynamically at code generation time.
- 18. A method of generating code in a model-based development environment comprising:
modeling a system using graphical modeling entities; attaching modular code generator routines directly to the graphical modeling entities such that each of at least some of the graphical modeling entities has more than one code generator routine attached thereto; accessing the code generator routines such that, for each of the graphical modeling entities having more than one code generator routine attached thereto, only one of the code generator routines is selected based upon some criteria; and, executing each of the selected code generator routines so as to generate the code.
- 19. The method of claim 18 wherein the selection criteria is comprised of a priority scheme.
- 20. The method of claim 18 wherein the selection criteria is comprised of a keyword-based index.
- 21. The method of claim 18 wherein the attaching of modular code generator routines directly to the graphical modeling entities comprises attaching one of the modular code generators to a meta-entity.
- 22. The method of claim 21 wherein the accessing of the code generator routines comprises accessing the code generator routines of the modeling entity; and accessing the code generator routines of the corresponding meta-entity.
- 23. The method of claim 18 wherein the attaching of modular code generator routines directly to the graphical modeling entities comprises attaching one of the modular code generators to a collection of entities.
- 24. The method of claim 23 wherein the accessing of the code generator routines comprises accessing the code generator routines of the modeling entity; and accessing the code generator routines of all of the collections of entities to which the modeling entity belongs.
- 25. The method of claim 18 wherein the attaching of modular code generator routines directly to the graphical modeling entities comprises attaching a base code generator routine and a specialized code generator routine to at least one of the graphical modeling entities, and wherein the accessing of the code generator routines comprises accessing the specialized code generator routine but not the base code generator routine.
- 26. The method of claim 25 wherein the specialized code generator routine comprises a specialized instance code generator routine.
- 27. The method of claim 25 wherein the specialized code generator routine comprises a specialized structural code generator routine.
- 28. The method of claim 25 wherein the specialized code generator routine comprises a specialized stereotype code generator routine.
- 29. The method of claim 25 wherein the specialized code generator routine comprises a specialized cross-domain code generator routine.
- 30. The method of claim 18 wherein the attaching of modular code generator routines directly to the graphical modeling entities comprises attaching first and second specialized code generator routines to at least one of the graphical modeling entities, and wherein the executing of the code generator routines comprises executing the first specialized code generator routine but not the second specialized code generator routine according to the selection criteria.
- 31. The method of claim 30 wherein the first specialized code generator routine comprises a specialized instance code generator routine, and wherein the second specialized code generator routine comprises a specialized scoped code generator routine.
- 32. The method of claim 30 wherein the first specialized code generator routine comprises a specialized instance code generator routine, and wherein the second specialized code generator routine comprises a specialized stereotype code generator routine.
- 33. The method of claim 30 wherein the first specialized code generator routine comprises a specialized instance code generator routine, and wherein the second specialized code generator routine comprises a specialized cross-domain code generator routine.
- 34. The method of claim 30 wherein the first specialized code generator routine comprises a specialized stereotype code generator routine, and wherein the second specialized code generator routine comprises a specialized scoped code generator routine.
- 35. The method of claim 30 wherein the first specialized code generator routine comprises a specialized stereotype code generator routine, and wherein the second specialized code generator routine comprises a specialized cross-domain code generator routine.
- 36. The method of claim 30 wherein the first specialized code generator routine comprises a specialized scoped code generator routine, and wherein the second specialized code generator routine comprises a specialized cross-domain code generator routine.
- 37. The method of claim 18 wherein the executing of each of the accessed code generator routines comprises executing at least one of the accessed code generator routines so as to generate textual code.
- 38. The method of claim 37 wherein the textual code comprises programming code.
- 39. The method of claim 37 wherein the textual code comprises configuration file code.
- 40. The method of claim 37 wherein the textual code comprises documentation code.
- 41. The method of claim 37 wherein the textual code comprises tool input code.
- 42. The method of claim 18 wherein the executing of each of the accessed code generator routines comprises executing at least one of the accessed code generator routines so as to generate non-textual code.
- 43. The method of claim 18 wherein the selected code generator routine executes at least one operation on an outside tool.
- 44. The method of claim 18 wherein the selection of the code generator routine is performed dynamically at code generation time.
- 45. A method of developing code comprising:
attaching at least one modular code generator routine directly to each of a plurality of graphical modeling entities; traversing through the graphical modeling entities; accessing the code generator routines of each traversed modeling entity; selecting only one modular code generator routine per graphical modeling entity; and, executing each of the accessed code generator routines so as to generate the code.
- 46. The method of claim 45 wherein the executing of each of the selected code generator routines comprises executing at least one of the selected code generator routines so as to generate textual code.
- 47. The method of claim 46 wherein the textual code comprises programming code.
- 48. The method of claim 46 wherein the textual code comprises configuration file code.
- 49. The method of claim 46 wherein the textual code comprises documentation code.
- 50. The method of claim 46 wherein the textual code comprises tool input code.
- 51. The method of claim 45 wherein the executing of each of the accessed code generator routines comprises executing at least one of the accessed code generator routines so as to generate non-textual code.
- 52. The method of claim 45 wherein the traversal of the modeling entities is determined dynamically at code generation time.
- 53. The method of claim 45 wherein the selected code generator routine executes at least one operation on an outside tool.
- 54. The method of claim 45 wherein the selection of the code generator routine is performed dynamically at code generation time.
GOVERNMENT FUNDING
[0001] The invention described herein was made with U.S. Government support under Grant Number F33615-00-C-1705 awarded by the United States Air Force. The United States Government has certain rights in the invention.