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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Gamma, E., Helm, R., Johnson, R.E., Vlissides, J.M.: Design Patterns. Addison-Wesley, Reading (1994)
University of Paderborn, G.: Fujaba., http://www.fujaba.de/
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)
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)
Stelting, S.A., Leeuwen, O.M.V.: Applied Java Patterns. Prentice Hall Professional Technical Reference (2001)
Węgrzynowicz, P.: The singleton benchmark., http://www.dcubed.pl/
Bansiya, J.: Automating design-pattern identification. Dr. Dobbs Journal (1998)
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)
Fabry, J., Mens, T.: Language independent detection of object-oriented design patterns. Computer Languages, Systems and Structures 30(1–2), 21–33 (2004)
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)
Tsantalis, N., Chatzigeorgiou, A., Stephanides, G., Halkidis, S.T.: Design pattern detection using similarity scoring. IEEE Trans. Software Eng. 32(11), 896–909 (2006)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Dong, J., Peng, T., Qiu, Z.: Commutability of design pattern instantiation and integration. In: TASE, pp. 283–292. IEEE Computer Society, Los Alamitos (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)