Skip to main content

Implementation Variants of the Singleton Design Pattern

  • Conference paper
On the Move to Meaningful Internet Systems: OTM 2008 Workshops (OTM 2008)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 5333))

Abstract

We present a study of different implementation variants of the Singleton pattern and propose an intuitive definition of this pattern expressed as a first-order logic formula. We also show that our method for automatically detecting design patterns can be used to detect instances of the Singleton with respect to this definition. We also provide data on experiments with a proof-of-concept implementation of this detection method. These experiments prove the efficiency and high accuracy of the method, which is able to detect many non-standard variants of the Singleton in real source code.

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 129.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.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. Gamma, E., Helm, R., Johnson, R.E., Vlissides, J.M.: Design Patterns. Addison-Wesley, Reading (1994)

    MATH  Google Scholar 

  2. University of Paderborn, G.: Fujaba., http://www.fujaba.de/

  3. Shi, N., Olsson, R.A.: Reverse engineering of design patterns from java source code. In: ASE 2006: Proceedings of the 21st IEEE/ACM International Conference on Automated Software Engineering, Washington, DC, USA, pp. 123–134. IEEE Computer Society Press, Los Alamitos (2006)

    Google Scholar 

  4. Heuzeroth, D., Aßmann, U., Trifu, M., Kuttruff, V.: The COMPOST, COMPASS, Inject/J and RECODER tool suite for invasive software composition: Invasive composition with COMPASS aspect-oriented connectors. In: Lämmel, R., Saraiva, J., Visser, J. (eds.) GTTSE 2005. LNCS, vol. 4143, pp. 357–377. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  5. Stelting, S.A., Leeuwen, O.M.V.: Applied Java Patterns. Prentice Hall Professional Technical Reference (2001)

    Google Scholar 

  6. Węgrzynowicz, P.: The singleton benchmark., http://www.dcubed.pl/

  7. Bansiya, J.: Automating design-pattern identification. Dr. Dobbs Journal (1998)

    Google Scholar 

  8. Keller, R.K., Schauer, R., Robitaille, S., Pagé, P.: Pattern-based reverse-engineering of design components. In: ICSE 1999. Proceedings of the 21st international conference on Software engineering, pp. 226–235. IEEE Computer Society Press, Los Alamitos (1999)

    Google Scholar 

  9. Fabry, J., Mens, T.: Language independent detection of object-oriented design patterns. Computer Languages, Systems and Structures 30(1–2), 21–33 (2004)

    Article  Google Scholar 

  10. Smith, J., Stotts, D.: Formalized design pattern detection and software achitecture analysis. Technical Report TR05-012, Dept. of Computer Science, University of North Carolina (2005)

    Google Scholar 

  11. Tsantalis, N., Chatzigeorgiou, A., Stephanides, G., Halkidis, S.T.: Design pattern detection using similarity scoring. IEEE Trans. Software Eng. 32(11), 896–909 (2006)

    Article  Google Scholar 

  12. Dong, J., Sun, Y., Zhao, Y.: Design pattern detection by template matching. In: Wainwright, R.L., Haddad, H. (eds.) SAC, pp. 765–769. ACM, New York (2008)

    Google Scholar 

  13. Blewitt, A., Bundy, A., Stark, I.: Automatic verification of design patterns in java. In: ASE 2005: Proceedings of the 20th IEEE/ACM international Conference on Automated software engineering, pp. 224–232. ACM, New York (2005)

    Google Scholar 

  14. Hayashi, S., Katada, J., Sakamoto, R., Kobayashi, T., Saeki, M.: Design pattern detection by using meta patterns. IEICE Transactions 91-D(4), 933–944 (2008)

    Article  Google Scholar 

  15. Heuzeroth, D., Holl, T., Högström, G., Löwe, W.: Automatic design pattern detection. In: IWPC, pp. 94–104. IEEE Computer Society, Los Alamitos (2003)

    Google Scholar 

  16. Albin-Amiot, H., Cointe, P., Guéhéneuc, Y.G., Jussien, N.: Instantiating and detecting design patterns: Putting bits and pieces together. In: ASE, pp. 166–173. IEEE Computer Society, Los Alamitos (2001)

    Google Scholar 

  17. Gueheneuc, Y.G., Sahraoui, H., Zaidi, F.: Fingerprinting design patterns. In: WCRE 2004: Proceedings of the 11th Working Conference on Reverse Engineering, Washington, DC, USA, pp. 172–181. IEEE Computer Society Press, Los Alamitos (2004)

    Google Scholar 

  18. Ferenc, R., Beszedes, A., Fulop, L., Lele, J.: Design pattern mining enhanced by machine learning. In: ICSM 2005: Proceedings of the 21st IEEE International Conference on Software Maintenance, Washington, DC, USA, pp. 295–304. IEEE Computer Society Press, Los Alamitos (2005)

    Google Scholar 

  19. Balanyi, Z., Ferenc, R.: Mining design patterns from C++ source code. In: ICSM 2003: Proceedings of the International Conference on Software Maintenance, Washington, DC, USA, p. 305. IEEE Computer Society Press, Los Alamitos (2003)

    Chapter  Google Scholar 

  20. Ferenc, R., Gustafsson, J., Müller, L., Paakki, J.: Recognizing design patterns in C++ programs with integration of columbus and maisa. Acta Cybern. 15(4), 669–682 (2002)

    MATH  Google Scholar 

  21. Dong, J., Peng, T., Qiu, Z.: Commutability of design pattern instantiation and integration. In: TASE, pp. 283–292. IEEE Computer Society, Los Alamitos (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Stencel, K., Węgrzynowicz, P. (2008). Implementation Variants of the Singleton Design Pattern. In: Meersman, R., Tari, Z., Herrero, P. (eds) On the Move to Meaningful Internet Systems: OTM 2008 Workshops. OTM 2008. Lecture Notes in Computer Science, vol 5333. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-88875-8_61

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-88875-8_61

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-88874-1

  • Online ISBN: 978-3-540-88875-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics