Facilitating Program Comprehension via Generic Components for State Machines

  • Authors:
  • RenT R. Kl Johannes Weidl;Georg Trausmuth, Harald Gall sch

  • Affiliations:
  • -;-

  • Venue:
  • WPC '97 Proceedings of the 5th International Workshop on Program Comprehension (WPC '97)
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

Various applications use state transition mechanisms as a major building block. As an example, finite state machines (FSMs) and their graphical counterpart---state transition diagrams---are heavily used e.g. for the specification of various kinds of protocols such as network protocols (e.g. TCP/IP), protocols for infrared data transmission, etc. Many embedded systems, such as telephone switching systems and television control, are directly based on state machines. Introducing generic components for state machines can raise the source code abstraction level from 'hard-coded' control flow decisions such as 'switch/case' and 'if' to a more flexible implementation model of control flow. This paper shows that it is possible to use statecharts and their advanced mechanisms from specification to implementation of reactive systems. By explicitly modeling states and state transitions the source code is described at a higher abstraction level and thereby top-down program comprehension is facilitated. We define a set of specific design patterns to abstract state machine source code from low-level implementation to a more abstract level. Furthermore, we introduce a certain degree of genericity and thus flexibility without major losses in efficiency during the design and implementation of generic components.