Modeling and visualizing object-oriented programs with Codecharts

The design of computing systems can only properly succeed if it is well-grounded in theory, andthe important concepts in a theory can only emerge through protracted exposure to application.

– Robin Milner

Abstract

Software design, development and evolution commonly require programmers to model design decisions, visualize implemented programs, and detect conflicts between design and implementation. However, common design notations rarely reconcile theoretical concerns for rigor and minimality with the practical concerns for abstraction, scalability and automated verifiability. The language of Codecharts was designed to overcome these challenges by narrowing its scope to visual specifications that articulate automatically-verifiable statements about the structure and organization of object-oriented programs. The tokens in its visual vocabulary stand for the building-blocks of object-oriented design, such as inheritance class hierarchies, sets of dynamically-bound methods, and their correlations. The formalism was tailored for those pragmatic concerns which arise from modeling class libraries and design patterns, and for visualizing programs of any size at any level of abstraction. We describe design verification, a process of proving or refuting that a Java program (i.e. its native code) conforms to the Codechart specifying it. We also describe a toolkit which supports modeling and visualization with Codecharts, as well as a fully-automated design verification tool. We conclude with empirical results which suggest gains in both speed and accuracy when using Codecharts in software design, development and evolution.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Notes

  1. 1.

    Adapted to our presentation.

  2. 2.

    In particular as implied by the first (“A program must be continuously adapted or else it becomes progressively less satisfactory”) and second (“As a program evolves its complexity increases unless work is done to maintain it”) laws of software evolution [2].

  3. 3.

    Christopher Strachey said about this dissociation: “It has long been my personal view that the separation of practical and theoretical work is artificial and injurious. Much of the practical work done in computing, both in software and in hardware design, is unsound and clumsy because the people who do it have not any clear understanding of the fundamental design principles of their work. Most of the abstract mathematical and theoretical work is sterile because it has no point of contact with real computing” [3].

  4. 4.

    This work was further developed into a Theory of Classes in the Typed Predicate Logic [38].

References

  1. 1.

    Brooks FP (1987) No silver bullet: essence and accidents of software engineering. IEEE Comput Mag 20(4):10–19

    MathSciNet  Article  Google Scholar 

  2. 2.

    Lehman MM (1996) Laws of software evolution revisited. In: Proc 5th European workshop software process technology—EWSPT’96, Nancy, France

    Google Scholar 

  3. 3.

    Grant M, Goguen JA (1996) An executable course in the algebraic semantics of imperative programs. In: Dean NC, Hinchey MG (eds) Teaching and learning formal methods. Morgan Kaufmann, San Mateo, pp 161–179

    Google Scholar 

  4. 4.

    Eden AH, Gasparis E, Nicholson J (2007) LePUS3 and Class-Z reference manual. Department of Computer Science, University of Essex, CSM-474, ISSN 1744-8050, Dec

  5. 5.

    Eden AH, Gasparis E, Nicholson J (2007) The ‘Gang of Four’ companion: formal specification of design patterns in LePUS3 and class-Z. Department of Computer Science, University of Essex, CSM-472, Dec

  6. 6.

    Eden AH, Gasparis E (2009) Three controlled experiments in software engineering with the two-tier programming toolkit: final report. University of Essex, CES-496, ISSN 1744-8050

  7. 7.

    Nicholson J, Gasparis E, Eden AH LePUS3 and class-Z home page [Online]. Available: http://www.lepus.org.uk/. Accessed: 27 Aug 2010

  8. 8.

    Nicholson J, Gasparis E, Eden AH The two-tier programming project website [Online]. Available: http://ttp.essex.ac.uk/. Accessed: 14 Apr 2008

  9. 9.

    Gasparis E, Eden AH, Nicholson J, Kazman R (2008) The design navigator: charting Java programs. In: Tool demonstrations, proc of 30th IEEE int’l conf on software engineering—ICSE 2008, Leipzig, Germany

    Google Scholar 

  10. 10.

    Gasparis E, Nicholson J, Eden AH (2008) LePUS3: an object-oriented design description language. In: Proc 5th int’l conf diagrammatic representation & inference, Herrsching, Germany, vol 5223

    Google Scholar 

  11. 11.

    Gasparis E, Nicholson J, Eden AH, Kazman R (2008) Navigating through the design of object-oriented programs. In: Proc of the 15th working conf on reverse engineering—WCRE, Antwerp, Belgium

    Google Scholar 

  12. 12.

    Eden AH, Nicholson J (2011) Codecharts: roadmaps and blueprints for object-oriented programs. Wiley-Blackwell, New York

    MATH  Book  Google Scholar 

  13. 13.

    Medvidovic N, Taylor RN (2000) A classification and comparison framework for software architecture description languages. IEEE Trans Softw Eng 26(1):70–93

    Article  Google Scholar 

  14. 14.

    Taibi T (ed) (2007) Design patterns formalization techniques. IGI Global, Hershey

    Google Scholar 

  15. 15.

    Demeyer S, Ducasse S, Tichelaar S, Tichelaar E (1999) Why unified is not universal: UML shortcomings for coping with round-trip engineering. In: Proc 2nd int’l conf on the unified modeling language, vol 1723, pp 630–645

    Google Scholar 

  16. 16.

    Fowler M (2004) UML distilled: a brief guide to the standard object modeling language, 3rd edn. Addison-Wesley, Boston

    Google Scholar 

  17. 17.

    Harel D (1987) Statecharts: a visual formalism for complex systems. Sci Comput Program 8(3):231–274

    MathSciNet  MATH  Article  Google Scholar 

  18. 18.

    Guttag JV, Horning JJ, Wing J (1982) Some notes on putting formal specifications to productive use. Sci Comput Program 2(1):53–68

    MATH  Article  Google Scholar 

  19. 19.

    Guttag JV, Horning JJ (1993) Larch: languages and tools for formal specification. Springer, New York

    MATH  Book  Google Scholar 

  20. 20.

    Pnueli A (1986) Applications of temporal logic to the specification and verification of reactive systems: a survey of current trends. In: Bakker JW (ed) Current trends in concurrency. Overviews and tutorials. Springer, New York, pp 510–584

    Google Scholar 

  21. 21.

    Jones CB (1990) Systematic software development using VDM, 2nd edn. Prentice Hall International, New York

    MATH  Google Scholar 

  22. 22.

    Peterson J (1981) Petri net theory and the modeling of systems. Prentice-Hall, Englewood Cliffs

    Google Scholar 

  23. 23.

    Hoare CAR (1978) Communicating sequential processes. Commun ACM 21(8):666–677

    MathSciNet  MATH  Article  Google Scholar 

  24. 24.

    Jackson D (2002) Alloy: a lightweight object modeling notation. ACM Trans Softw Eng Methodol 11(2):256–290

    Article  Google Scholar 

  25. 25.

    Abrial J-R (1996) The B-book: assigning programs to meanings. Cambridge University Press, Cambridge

    MATH  Book  Google Scholar 

  26. 26.

    Derrick J, Boiten E (2001) Refinement in Z and object-Z: foundations and advanced applications. Springer, Berlin

    MATH  Google Scholar 

  27. 27.

    France RB, Kim D-K, Ghosh S, Song E (2004) A UML-based pattern specification technique. IEEE Trans Softw Eng 30(3):193–206

    Article  Google Scholar 

  28. 28.

    Kim D-K (2004) A meta-modeling approach to specifying patterns. PhD Dissertation, Colorado State University, Fort Collins, CO, USA

  29. 29.

    Kent S (1997) Constraint diagrams: visualizing invariants in object-oriented models. In: ACM SIGPLAN notices, New York, NY, USA, pp 327–341

    Google Scholar 

  30. 30.

    Howse J, Molina F, Taylor J, Kent S, Gil J (2001) Spider diagrams: a diagrammatic reasoning system. J Vis Lang Comput 12(3):299–324

    Article  Google Scholar 

  31. 31.

    Object Management Group (2005) UML 2.0 superstructure specification, Aug 2005

  32. 32.

    Tufte E (1997) Visual explanations: images and quantities, evidence and narrative. Graphics Press, Cheshire

    MATH  Google Scholar 

  33. 33.

    Maplesden D, Hosking J, Grundy J (2007) A visual language for design pattern modeling and instantiation. In: Taibi T (ed) Design patterns formalization techniques. IGI Global, Hershey

    Google Scholar 

  34. 34.

    Guéhéneuc Y-G, Antoniol G (2008) DeMIMA: a multilayered approach for design pattern identification. IEEE Trans Softw Eng 34(5):667–684

    Article  Google Scholar 

  35. 35.

    Blewitt A, Bundy A, Stark I (2001) Automatic verification of Java design patterns. In: Proceedings of the 16th IEEE international conference on automated software engineering, pp 324–333

    Google Scholar 

  36. 36.

    Gosling J, Joy B, Steele G, Bracha G (2005) The Java language specification, 3rd edn. Addison-Wesley Professional, Reading

    Google Scholar 

  37. 37.

    Smith B (2004) Ontology. In: Floridi L (ed) The Blackwell guide to the philosophy of computing and information. Blackwell Publishers, Malden

    Google Scholar 

  38. 38.

    Nicholson J (2011) On the theoretical foundations of LePUS3 and its application to object-oriented design verification. PhD Dissertation, School of Computer Science and Electronic Engineering, University of Essex

  39. 39.

    Lieberman BA (2006) The art of software modeling, annotated edn. Auerbach Publications, Boca Raton

    Book  Google Scholar 

  40. 40.

    Hoare CAR (1975) Software design: a parable. Softw World 5(9–10):53–56

    Google Scholar 

  41. 41.

    Walsh AE, Gehringer D (2002) Java 3D: API jump-start. Prentice Hall, Upper Saddle River

    Google Scholar 

  42. 42.

    Selman D (2002) Java 3D programming. Manning Publications, Greenwich

    Google Scholar 

  43. 43.

    Cai Y, Ianuzzi D, Wong S (2011) Leveraging design structure matrices in software design education. Presented at the conf on software engineering education and training—CSEET 2011, Honolulu, HI

  44. 44.

    Nicholson J, Eden AH, Gasparis E (2007) Verification of LePUS3/class-Z specifications: sample models and abstract semantics for Java 1.4. Department of Computer Science, University of Essex, Technical Report CSM-471, Dec 2007

  45. 45.

    Gamma E, Helm R, Johnson R, Vlissides J (1995) Design patterns: elements of reusable object-oriented software. Addison Wesley Longman, Reading

    Google Scholar 

  46. 46.

    Chikofsky EJ, Cross JH (1990) Reverse engineering and design recovery: a taxonomy. IEEE Softw 7(1):13–17

    Article  Google Scholar 

  47. 47.

    Gasparis E (2010) Design navigation: recovering design charts from object-oriented programs. PhD Dissertation, School of Computer Science and Electronic Engineering, University of Essex

  48. 48.

    Shermer M (2005) The Feynman-Tufte principle. Sci Am 292(4):38

    Article  Google Scholar 

  49. 49.

    Nicholson J, Gasparis E, Eden AH, Kazman R (2009) Automated verification of design patterns with LePUS3. In: Proc 1st NASA formal methods symp—NFM 2009, Moffett Field, CA

    Google Scholar 

  50. 50.

    Eckel B (2003) Thinking in Java. Prentice Hall Professional, Upper Saddle River

    Google Scholar 

  51. 51.

    Wing JM (1990) A specifier’s introduction to formal methods. Computer 23(9):8–23

    Article  Google Scholar 

  52. 52.

    Hoare CAR (1969) An axiomatic basis for computer programming. Commun ACM 12(10):576–580

    MATH  Article  Google Scholar 

  53. 53.

    Mahoney MS (2002) Software as science: science as software. In: Proc int’l conf history of computing: software issues, Paderborn, Germany, pp 25–48

    Google Scholar 

  54. 54.

    Clarke EM, Wing JM (1996) Formal methods: state of the art and future directions. ACM Comput Surv 28(4):626–643

    Article  Google Scholar 

  55. 55.

    Parnas DL (1994) Software aging. In: Proc 16th int’l conf software engineering, pp 279–287

    Google Scholar 

  56. 56.

    Mens T, Demeyer S (2008) Software evolution. Springer, Berlin

    MATH  Google Scholar 

  57. 57.

    Perry DE, Wolf AL (1992) Foundations for the study of software architecture. SIGSOFT Softw Eng Notes 17(4):40–52

    Article  Google Scholar 

  58. 58.

    Salazar Saltijeral J (2012) Design pattern detection in Java. MSc dissertation, School of Computer Science and Electronic Engineering, University of Essex

  59. 59.

    D’Hondt T, De Volder K, Mens K, De K, Kim V, Wuyts R (2000) Co-evolution of object-oriented software design and implementation. In: Proc int’l symposium on software architectures and component technology— SACT, Amsterdam, The Netherlands

    Google Scholar 

  60. 60.

    Commons C (2001) Creative commons—attribution-NoDerivs 2.0 UK: England & Wales [Online]. Available: http://creativecommons.org/licenses/by-nd/2.0/uk/. Accessed: 20 Apr 2011

Download references

Acknowledgements

The authors wish to thank Raymond Turner for his support throughout this research, which was funded in part by the Research Promotion Fund and the Knowledge Transfer Innovation Fund from the University of Essex, and by the EPSRC. We also wish to thank Olumide Iyaniwura, Gu Bo, Maple Tao Liang, Dimitrious Fragkos, Omololu Ayodeji, Xu Yi and Christina Maniati for their contributions.

Author information

Affiliations

Authors

Corresponding author

Correspondence to A. H. Eden.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Eden, A.H., Gasparis, E., Nicholson, J. et al. Modeling and visualizing object-oriented programs with Codecharts. Form Methods Syst Des 43, 1–28 (2013). https://doi.org/10.1007/s10703-012-0181-1

Download citation

Keywords

  • Design notations and documentation
  • Object-oriented programming
  • Patterns
  • Design concepts