Type Inference of Simulink Hierarchical Block Diagrams in Isabelle
This work addresses type checking for embedded system design in Simulink, an industrial standard, but is incremental as it builds on prior compositional analysis frameworks.
The paper tackles the problem of type inference for Simulink hierarchical block diagrams by translating them into Isabelle theories and using Isabelle's type inference mechanism, enabling formal handling of diagrams with typing ambiguities as accepted by Simulink. The method was evaluated on case studies, including an automotive fuel control system benchmark from Toyota.
Simulink is a de-facto industrial standard for the design of embedded systems. In previous work, we developed a compositional analysis framework for Simulink models in Isabelle -- the Refinement Calculus of Reactive Systems (RCRS), which allows checking compatibility and substitutability of components. However, standard type checking was not considered in that work. In this paper we present a method for the type inference of hierarchical block diagrams using the Isabelle theorem prover. A Simulink diagram is translated into an (RCRS) Isabelle theory. Then the Isabelle's powerful type inference mechanism is used to infer the types of the diagram based on the types of the basic blocks. One of the aims is to handle formally as many diagrams as possible. In particular, we want to be able to handle even those diagrams that may have typing ambiguities, provided that they are accepted by Simulink. This method is implemented in our toolset that translates Simulink diagrams into Isabelle theories and simplifies them. We evaluate our technique on several case studies, most notably, an automotive fuel control system benchmark provided by Toyota.