SyncCharts in C: a proposal for light-weight, deterministic concurrency

  • Authors:
  • Reinhard von Hanxleden

  • Affiliations:
  • Christian-Albrechts-Universität zu Kiel, Kiel, Germany

  • Venue:
  • EMSOFT '09 Proceedings of the seventh ACM international conference on Embedded software
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

SyncCharts in C (SC) extends C with control flow operators for deterministic, light-weight concurrency and preemption. SC is based on SyncCharts, a synchronous variant of Statecharts with a sound formal basis. SC implements concurrency via a simulation of multi-threading, inspired by reactive processing. This approach permits very fast context switches and allows to express SC operators with regular, sequential C code. Thus a concurrent SC program requires neither a special compiler nor OS support for concurrency. A reference implementation of SC, based on C macros, is available as open source code. SC can be used in a number of scenarios: 1) as a regular programming language, requiring just a C compiler; 2) as an intermediate target language for synthesizing graphical SyncChart models into executable code, in a traceable manner; 3) as instruction set architecture for programming precision timed (PRET) or reactive architectures, abstracting functionality from physical timing; or 4) as a virtual machine instruction set, with a very dense encoding.