Flattening of Modelica State Machines: A Practical Symbolic Representation
Bernhard Thiele, Adrian Pop, Peter Fritzson · Linköping electronic conference proceedings · 2015
Modelica 3.3 introduced dedicated built-in language support for state machines that was inspired by semantics known from Statechart and mode automata formalisms.The specification describes the semantics of these constructs in terms of data-flow equations that allows it to be related to the Modelica DAE representation which is the conceptual intermediate format of Modelica code after instance creation (flattening).However, a complete transformation of state machine constructs into data-flow equations at the stage of flattening requires an early commitment to implementation details that potentially hinders model optimizations at subsequent translation phases.Also, due to the required substantial model transformation the semantic distance between the original source model and the flattened representation is rather large.Hence, this paper proposes a more versatile symbolic representation for flattened state machine constructs that preserves the state machine's composition structure and allows postponing optimizations to subsequent compiler phases.