• Aug 25, 2016 News!Vol.4, No.3 has been published with online version. 15 peer reviewed articles from 3 specific areas are published in this issue.   [Click]
  • May 03, 2016 News!Vol. 3, No. 3 has been indexed by EI (Inspec).   [Click]
  • May 03, 2016 News!Vol. 3, No. 2 has been indexed by EI (Inspec).   [Click]
General Information
    • ISSN: 2301-3559
    • Frequency: Quarterly
    • DOI: 10.18178/LNSE
    • Editor-in-Chief: Prof. Jemal Antidze
    • Executive Editor: Ms. Nina Lee
    • Abstracting/ Indexing: EI (INSPEC, IET), DOAJ, Electronic Journals Library, Engineering & Technology Digital Library, Ulrich's Periodicals Directory, International Computer Science Digital Library (ICSDL), ProQuest and Google Scholar.
    • E-mail: lnse@ejournal.net
Prof. Jemal Antidze
I. Vekua Scientific Institute of Applied Mathematics
Tbilisi State University, Georgia
I'm happy to take on the position of editor in chief of LNSE. We encourage authors to submit papers concerning any branch of Software Engineering.

LNSE 2015 Vol.3(3): 229-233 ISSN: 2301-3559
DOI: 10.7763/LNSE.2015.V3.196

A Comparative Study on State Programming: Hierarchical State Machine (HSM) Pattern and State Pattern

A. Cüneyd Tantuğ and Özdemir Kavak
Abstract—State machines can be implemented by using several methods. Although state pattern (SP) implementation is one of the most popular methods, nowadays usage of hierarchical state machine (HSM) pattern is increasing. In this paper our motivation is making a metric based comparison between HSM and SP pattern. In addition, effect of increase in usage of inheritance in HSM pattern is analyzed. SP and HSM pattern belongs to different software methodologies, thus usage of object-oriented (OO) metrics is not applicable. However, both patterns implement state machines. For this reason, a new metric suit for state machines is proposed. As a result of this study, it is shown that using inheritance effectively in HSM pattern increases software quality. In addition, it is shown that HSM pattern handles enter/exit actions more effectively than SP.

Index Terms—Hierarchical state machine, software metrics, state machine, state pattern.

A. C. Tantuğ is with the Computer and Informatics Faculty of ITU, Maslak, Sarıyer, Istanbul 34469 Turkey (e-mail: tantug@itu.edu.tr).
Ö. Kavak is with the Scientific and Technological Research Council of Turkey, Gebze, 41470 Turkey (e-mail: ozdemir.kavak@tubitak.gov.tr).


Cite: A. Cüneyd Tantuğ and Özdemir Kavak, "A Comparative Study on State Programming: Hierarchical State Machine (HSM) Pattern and State Pattern," Lecture Notes on Software Engineering vol. 3, no. 3, pp. 229-233, 2015.

Copyright © 2008-2015. Lecture Notes on Software Engineering. All rights reserved.
E-mail: lnse@ejournal.net