Skip to main content

Description and Verification of Pattern-Based Composition in Coq

  • Conference paper
Book cover Advances in Computational Science and Engineering (FGCN 2008)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 28))

  • 324 Accesses

Abstract

Design patterns were treated as design components, which serve as elemental components and can be composed to construct a large software system. In the process of composition, the key problem is how to ensure the correctness of composition. In this paper, we use First Order Logic to model some elemental entities and relations in Object Oriented Design, which serve as an ontology in the domain. Then we use the vocabulary in the ontology to specify design patterns and formalize the “faithful” principle as theorems in Coq. Finally, we prove these theorems and show the correctness of composition. As a case study, we described and verified the composition of Composite pattern and Decorator pattern. Once a composition is proven to be correct, one can use the composition repeatedly. This would facilitate reuse of design in a larger scale and reduce errors in design phase.

The research in this paper was supported by Research Fund for the Doctoral Program of Higher Education of China, No. 20060269002.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M., Lamport, L.: Composing specifications. ACM Transactions on Programming Languages and Systems 15(1), 73–132 (1993)

    Article  Google Scholar 

  2. Moriconi, M., Qian, X., Riemenschneider, R.A.: Correct architecture refinement. IEEE Transactions on Software Engineering 21(4), 356–372 (1995)

    Article  Google Scholar 

  3. Tommi, M.: Formalizing design pattern. In: Proceedings of the 20th International Conference on Software Engineering, pp. 115–124 (1998)

    Google Scholar 

  4. Taibi, T., Ngo, D.C.L.: Formal specification of design pattern combination using BPSL. International Journal of Information and Software Technology (IST) 45(3), 157–170 (2003)

    Article  Google Scholar 

  5. Eden, A.H., Hirshfeld, Y.: Principles in formal specification of object-oriented architectures. In: Proceedings of the 11th CASCON, Toronto, Canada (November 2001)

    Google Scholar 

  6. Dong, J., Alencar, P., Cowan, D.: Ensuring structure and behavior correctness in design composition. In: Proceedings of the 7th Annual IEEE International Conference and Workshop on Engineering of Computer Based Systems (ECBS), Edinburgh UK, pp. 279–287 (2000)

    Google Scholar 

  7. Keller, R., Reinhard, S.: Design components: towards software composition at the design level. In: Proceedings of the 20th International Conference on Software Engineering, pp. 302–311 (1998)

    Google Scholar 

  8. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns, Elements of Reusable Object-Oriented Software. Addison-Wesley Publishing Company, Reading (1995)

    Google Scholar 

  9. Lamport, L.: The temporal logic of actions. ACM Transactions on Programming Languages and Systems 16(3), 873–923 (1994)

    Article  Google Scholar 

  10. Coquand, T., Huet, G.: The calculus of constructions.Technical Report 530, INRIA (1986)

    Google Scholar 

  11. Girard, J.-Y., Lafont, Y., Taylor, P.: Proofs and Types. Cambridge Tracts in Theoretical Computer Science, vol. 7. Cambridge University Press, Cambridge (1989)

    MATH  Google Scholar 

  12. Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. In: Texts in Theoretical Computer Science. Springer, Heidelberg (2004)

    Google Scholar 

  13. Alencar, P., Cowan, D., Lucena, C.: A formal approach to architectural design patterns. In: Gaudel, M.-C., Woodcock, J.C.P. (eds.) FME 1996. LNCS, vol. 1051, pp. 576–594. Springer, Heidelberg (1996)

    Google Scholar 

  14. Pattern Composition in Coq, http://ecnucs-selab.googlecode.com/files/exampleinpaper

  15. Dong, J., Alencar, P.S.C., Cowan, D.D., Yang, S.: Composingpattern-based components and verifying correctness. The Journal of Systems and Software, 1755–1769 (2007)

    Google Scholar 

  16. Eden, A.H., Hirshfeld, Y., Kazman, R.: Abstraction classes in software design. IEE Software 153(4), 163–182 (2006)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Liu, Q., Ynag, Z., Xie, J. (2009). Description and Verification of Pattern-Based Composition in Coq. In: Kim, Th., et al. Advances in Computational Science and Engineering. FGCN 2008. Communications in Computer and Information Science, vol 28. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-10238-7_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-10238-7_19

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-10237-0

  • Online ISBN: 978-3-642-10238-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics