Jump to content

Control logic

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ixfd64 (talk | contribs) at 20:34, 11 May 2022 (FfD notice). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Control logic is a key part of a software program that controls the operations of the program. The control logic responds to commands from the user, and it also acts on its own to perform automated tasks that have been structured into the program.[1]

File:Stopwatch chart.png
Model of a simple stopwatch[2]

An editor has nominated the above file for discussion of its purpose and/or potential deletion. You are welcome to participate in the discussion and help reach a consensus.

Control logic can be modeled using a state diagram,[3] which is a form of hierarchical state machine. These state diagrams can also be combined with flow charts to provide a set of computational semantics for describing complex control logic.[4] This mix of state diagrams and flow charts is illustrated in the figure on the right, which shows the control logic for a simple stopwatch. The control logic takes in commands from the user, as represented by the event named “START”, but also has automatic recurring sample time events, as represented by the event named “TIC”.

References

  1. ^ Smith, S.E. "What Is Control Logic?".
  2. ^ Hamon, G.; Rushby, J. (2004). "An Operational Semantics for Stateflow". Fundamental Approaches to Software Engineering (FASE). Lecture Notes in Computer Science. 2984. Barcelona, Spain: Springer-Verlag: 229–243. doi:10.1007/978-3-540-24721-0_17. ISBN 978-3-540-21305-5.
  3. ^ Tiwari, A. (2002). "Formal Semantics and Analysis Methods for Simulink Stateflow Models" (PDF).
  4. ^ Hamon, G. (2005). A Denotational Semantics for Stateflow. International Conference on Embedded Software. Jersey City, NJ: ACM. pp. 164–172. CiteSeerX 10.1.1.89.8817.