Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1159861.1159864acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Type-theoretic design patterns

Published: 16 September 2006 Publication History

Abstract

The development of design patterns in object-oriented programming aims at capturing good software design in a reusable generic form. However, design patterns are not expressible in conventional object-oriented programming languages. To address this shortcoming, we need to model and understand design patterns precisely. We achieve this by identifying operators characterising the most fundamental design patterns in a way that enables the construction of object-oriented programs with provable structural and behavioural properties. We use dependent-type theory to define a simplified, functional model of object-oriented programming. Design patterns are modelled in this setting as operators on object signatures and implementations. We present examples of several basic design operators and design patterns modelled in this setting and show how properties of their composition can be proven.

References

[1]
Martin Abadi and Luca Cardelli. A Theory of Objects. Monographs in Computer Science. Springer Verlag, 1996. ABA m 96:1 1.Ex.
[2]
Vasu Alagar and Ralf Lämmel. Three-tiered specification of microarchitectures. citeseer.ist.psu.edu/493152.html.
[3]
P. Alencar, D. Cowan, K. Lichtner, C. Lucena, and L. Nova. Tool support for formal design patterns. Technical Report CS-9536, University of Waterloo, Waterloo, Ontario, Canada, 1995.
[4]
P. Alencar, D. Cowan, and C. Lucena. A formal approach to architectural design patterns. In Proceedings of the 3rd International Symposium of formal Methods Europe, pages 576--594, 1996.
[5]
P. Alencar, D. Cowan, C. Lucena, and L. Nova. Formal specification of reusable interface objects. In ACM SIGSOFT Symposium on Software Reusability, pages 88--96, 1995.
[6]
Yves Bertot and Pierre Castéran. Interactive Theorem Proving and Program Development. Coq'Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. Springer Verlag, 2004.
[7]
Richard Bird and Oege De Moor. Algebra of Programming. Prentice Hall PTR, September 1996.
[8]
Jan Bosch. Design patterns as language constructs. Journal of Object-Oriented Programming, 11 2):18--32, 1998.
[9]
Peter Buchlovsky and Hayo Thielecke. A type-theoretic reconstruction of the visitor pattern. In 21st Conference on Mathematical Foundations of Programming Semantics. http://www.cl.cam.ac.uk/ pb368/mfps-visitors.pdf.
[10]
S. Bünnig, P. Forbrig, R. Lämmel, and N. Seemann. A programming language for design patterns. http://citeseer.ist.psu.edu/306047.html.
[11]
C. Chambers, B. Harrison, and J. Vlissides. A debate on language and tool support for design patterns. In Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 277--289. ACM Press, 2000.
[12]
James O. Coplien and Douglas C. Schmidt. Pattern languages of program design. ACM Press/Addison-wesley Publishing Co., 1995.
[13]
Thierry Coquand and Gerard Huet. The calculus of constructions. Technical Report 530, INRIA, 1986.
[14]
Jing Dong. A logical framework for design composition. In Proceedings of the 22nd international conference on Software engineering, pages 698--700. ACM Press, 2000.
[15]
A. Eden, J. Gil, and A. Yehudai. A formal language for design patterns (extended abstract). http://citeseer.ist.psu.edu/171003.html.
[16]
A. Eden, J. Gil, and A. Yehudai. Precise specification and automatic application of design patterns. In Proceedings of the 12th IEEE International Automated Software Engineering Conference -- ASE 1997, 1997.
[17]
Peter Forbrig and Ralf Lämmel. Programming with patterns. http://citeseer.ist.psu.edu/312457.html.
[18]
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley, 1995.
[19]
Joseph Gil and David H. Lorenz. Design patterns vs. language design. Lecture Notes in Computer Science, 1357, 1998.
[20]
Joseph (Yossi) Gil and Itay Maman. Micro patterns in java code. SIGPLAN Not., 40(10):97--116, 2005.
[21]
Jean-Yves Girard, Yves Lafont, and Paul Taylor. Proofs and Types, volume 7 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1989.
[22]
K. Lano, J. Bicarregui, and S. Goldsack. Formalising design patterns. In D. Duke and A. Evans, editors, 1st BCS-FACS Northern Formal Methods Workshop, Electronic Workshops in Computing. Ilkley, UK, Springer-Verlag, 1996.
[23]
Erik Meijer, Maarten Fokkinga, and Ross Paterson. Functional programming with bananas, lenses, envelopes and barbed wire. In Proceedings of the 5th ACM conference on Functional programming languages and computer architecture, pages 124--144, New York, NY, USA, 1991. Springer-Verlag New York, Inc.
[24]
Tommi Mikkonen. Formalizing design patterns. In Proceedings of the 20th international conference on Software engineering, pages 115--124. IEEE Computer Society, 1998.
[25]
B. Nordström, K. Petersson, and J.M. Smith. Programming in Martin-Löf's Type Theory: An Introduction. Oxford University Press, 1990.
[26]
Benjamin C. Pierce and David N. Turner. Simple type-theoretic foundations for object-oriented programming. Journal of Functional Programming, 4(2):207--247, 1994.
[27]
Anton Setzer. Object-oriented programming in dependent type theory. In Seventh Symposium on Trends in Functional Programming, 2006.
[28]
J. Smith and D. Stotts. Elemental design patterns: A link between architecture and object semantics, 2002. citeseer.ist.psu.edu/smith02elemental.html.
[29]
Joost Visser. Visitor combination and traversal control. In OOPSLA '01: Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, pages 270--282, New York, NY, USA, 2001. ACM Press.
[30]
Peter Wegner. Concepts and paradigms of object-oriented programming. SIGPLAN OOPS Mess., 1(1):7--87, 1990.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
WGP '06: Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming
September 2006
114 pages
ISBN:1595934928
DOI:10.1145/1159861
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 16 September 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. dependent types
  2. design patterns
  3. formal method
  4. functional objects
  5. functional programming
  6. language features
  7. object-oriented programming
  8. program correctness
  9. reasoning
  10. visitor pattern

Qualifiers

  • Article

Conference

ICFP06
Sponsor:

Acceptance Rates

Overall Acceptance Rate 30 of 43 submissions, 70%

Upcoming Conference

ICFP '24

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 693
    Total Downloads
  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)1
Reflects downloads up to 18 Aug 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media