Implementation Variants of the Singleton Design Pattern

  • Authors:
  • Krzysztof Stencel;Patrycja Węgrzynowicz

  • Affiliations:
  • Institute of Informatics, Warsaw University, Poland;NASK Research and Academic Computer Network, Poland

  • Venue:
  • OTM '08 Proceedings of the OTM Confederated International Workshops and Posters on On the Move to Meaningful Internet Systems: 2008 Workshops: ADI, AWeSoMe, COMBEK, EI2N, IWSSA, MONET, OnToContent + QSI, ORM, PerSys, RDDS, SEMELS, and SWWS
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

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.