Automated Code Generation for DES Controllers Modeled as Finite State Machines
摘要
Finite State Machines ( \(\textrm{FSMs}\) ) are the foundation to design Discrete Event Systems ( \(\textrm{DESs}\) ). A \(\textrm{FSM}\) that designs a \(\textrm{DES}\) model can be further processed using Supervisory Control Theory ( \(\textrm{SCT}\) ) to synthesize correct-by-construction software. When applied to industrial-scale \(\textrm{DESs}\) , \(\textrm{FSMs}\) face limitations in the design, synthesis, and implementation steps. Supremica is a straightforward tool that facilitates design and synthesis but does not reach the implementation phase. This requires additional tools to convert \(\textrm{FSM}\) models into code. This paper presents the tool DEScMaker, which receives as input an \(\textrm{FSM}\) model outputting from Supremica and converts it into implementable C code. Our approach complements Supremica with code generation and allows taking advantage of its intuitive interface, useful simulator, and safe algorithms while automating a task that, in practice, consists of complex manual programming. An example illustrates the tool and quantifies its advantages.