skip to main content
research-article

A Synchronous Look at the Simulink Standard Library

Authors Info & Claims
Published:27 September 2017Publication History
Skip Abstract Section

Abstract

Hybrid systems modelers like Simulink come with a rich collection of discrete-time and continuous-time blocks. Most blocks are not defined in terms of more elementary ones—and some cannot be—but are instead written in imperative code and explained informally in a reference manual. This raises the question of defining a minimal set of orthogonal programming constructs such that most blocks can be programmed directly and thereby given a specification that is mathematically precise, and whose compiled version performs comparably to handwritten code.

In this paper, we show that a fairly large set of blocks of a standard library like the one provided by Simulink can be programmed in a precise, purely functional language using stream equations, hierarchical automata, Ordinary Differential Equations (ODEs), and deterministic synchronous parallel composition. Some blocks cannot be expressed in our setting as they mix discrete-time and continuous-time signals in unprincipled ways that are statically forbidden by the type checker.

The experiment is conducted in Zélus, a synchronous language that conservatively extends Lustre with ODEs to program systems that mix discrete-time and continuous-time signals.

References

  1. Rajeev Alur. 2011. Formal Verification of Hybrid Systems. In Proceedings of the 9th ACM International Conference on Embedded Software (EMSOFT). ACM, Taipei, Taiwan, 273--278. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Karl J. Åström and Richard M. Murray. 2008. Feedback Systems: An Introduction for Scientists and Engineers. Princeton University Press, NJ, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Albert Benveniste, Timothy Bourke, Benoit Caillaud, Bruno Pagano, and Marc Pouzet. 2014. A Type-based Analysis of Causality Loops in Hybrid Systems Modelers. In Proceedings of the 17th International Conference on Hybrid Systems: Computation and Control (HSCC). ACM, Berlin, Germany, 71--82. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Albert Benveniste, Timothy Bourke, Benoit Caillaud, and Marc Pouzet. 2011. A Hybrid Synchronous Language with Hierarchical Automata: Static Typing and Translation to Synchronous Code. In Proceedings of the 9th ACM International Conference on Embedded Software (EMSOFT). ACM, Taipei, Taiwan, 137--147. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Albert Benveniste, Timothy Bourke, Benoit Caillaud, and Marc Pouzet. 2011. Divide and recycle: types and compilation for a hybrid synchronous language. In Proceedings of the ACM SIGPLAN/SIGBED Conference on Languages, Compilers, Tools and Theory for Embedded Systems (LCTES). ACM, Chicago, USA, 61--70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Albert Benveniste, Timothy Bourke, Benoit Caillaud, and Marc Pouzet. 2012. Non-Standard Semantics of Hybrid Systems Modelers. Journal of Computer and System Sciences (JCSS) 78, 3 (May 2012), 877--910. Special issue in honor of Amir Pnueli. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Albert Benveniste, Paul Caspi, Stephen A. Edwards, Nicolas Halbwachs, Paul Le Guernic, and Robert de Simone. 2003. The synchronous languages 12 years later. Proc. IEEE 91, 1 (Jan. 2003), 64--83.Google ScholarGoogle ScholarCross RefCross Ref
  8. Gérard Berry. 1989. Real time programming: Special purpose or general purpose languages. Information Processing 89 (1989), 11--17.Google ScholarGoogle Scholar
  9. Olivier Bouissou and Alexandre Chapoutot. 2012. An operational semantics for Simulink’s simulation engine. In Proceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, Tools and Theory for Embedded Systems (LCTES). ACM, Beijing, China, 129--138. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Timothy Bourke, Jean-Louis Colaço, Bruno Pagano, Cédric Pasteur, and Marc Pouzet. 2015. A Synchronous-based Code Generator For Explicit Hybrid Systems Languages. In Proceedings of the 24th International Conference on Compiler Construction (CC) (Lecture Notes in Computer Science). Springer, London, UK, 69--88.Google ScholarGoogle ScholarCross RefCross Ref
  11. Timothy Bourke and Marc Pouzet. 2013. Zélus, a Synchronous Language with ODEs. In Proceedings of the 16th International Conference on Hybrid Systems: Computation and Control (HSCC). ACM, Philadelphia, USA, 113--118. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Luca Carloni, Maria D. Di Benedetto, Alessandro Pinto, and Alberto Sangiovanni-Vincentelli. 2004. Modeling Techniques, Programming Languages, Design Toolsets and Interchange Formats for Hybrid Systems. Technical Report. IST-2001-38314 WPHS, Columbus Project.Google ScholarGoogle Scholar
  13. Jean-Louis Colaço and Marc Pouzet. 2004. Type-based Initialization Analysis of a Synchronous Data-flow Language. International Journal on Software Tools for Technology Transfer (STTT) 6, 3 (August 2004), 245--255.Google ScholarGoogle ScholarCross RefCross Ref
  14. M. Dowell and P. Jarratt. 1972. A modified regula falsi method for computing the root of an equation. BIT Numerical Mathematics 11, 2 (June 1972), 168--174.Google ScholarGoogle Scholar
  15. Esterel Technologies SAS 2016. Gateway Guidelines for Simulink. Esterel Technologies SAS.Google ScholarGoogle Scholar
  16. John T. Feo, David C. Cann, and Rodney R. Oldehoeft. 1990. A report on the Sisal language project. J. Parallel and Distrib. Comput. 10 (1990), 349--366. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Léonard Gérard, Adrien Guatto, Cédric Pasteur, and Marc Pouzet. 2012. A Modular Memory Optimization for Synchronous Data-Flow Languages. Application to Arrays in a Lustre Compiler. In Proceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers and Tools for Embedded Systems (LCTES). ACM, Beijing, 51--60. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Nicolas Halbwachs, Paul Caspi, Pascal Raymond, and Daniel Pilaud. 1991. The Synchronous Dataflow Programming Language Lustre. Proc. IEEE 79, 9 (September 1991), 1305--1320.Google ScholarGoogle ScholarCross RefCross Ref
  19. Grégoire Hamon. 2005. A denotational semantics for Stateflow. In Proceedings of the 5th ACM International Conference on Embedded Software (EMSOFT). ACM, Jersey City, NJ, USA, 164--172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Gregoire Hamon and John Rushby. 2004. An Operational Semantics for Stateflow. In Proceedings of the 7th International Conference on Fundamental Approaches to Software Engineering (FASE) (Lecture Notes in Computer Science), Vol. 2984. Springer, Barcelona, Spain, 229--243.Google ScholarGoogle ScholarCross RefCross Ref
  21. Alan C. Hindmarsh and Radu Serban. 2016. User Documentation for cvode v2.9.0 (v2.9.0 ed.). Lawrence Livermore National Laboratory, Livermore, CA, USA.Google ScholarGoogle Scholar
  22. Edward A. Lee and Haiyang Zheng. 2005. Operational Semantics of Hybrid Systems. In Proceedings of the 8th International Conference on Hybrid Systems: Computation and Control (HSCC) (Lecture Notes in Computer Science), Vol. 3414. Springer, Zurich, Switzerland, 25--53. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Oded Maler, Zouar Manna, and Amir Pnueli. 1992. From Timed to Hybrid Systems. In Proceedings of the REX Workshop Real-Time: Theory in Practice (Lecture Notes in Computer Science), Vol. 600. Springer, Mook, The Netherlands, 447--484. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Lionel Morel. 2007. Array Iterators in Lustre: From a Language Extension to Its Exploitation in Validation. EURASIP Journal on Embedded Systems 2007, 1 (2007), article 059130.Google ScholarGoogle ScholarCross RefCross Ref
  25. Jean-Michel Muller, Nicolas Brisebarre, Florent de Dinechin, Claude-Pierre Jeannerod, Vincent Lefèvre, Guillaume Melquiond, Nathalie Revol, Damien Stehlé, and Serge Torres. 2010. Handbook of Floating-Point Arithmetic. Birkhäuser, Basel, Switzerland. Google ScholarGoogle Scholar
  26. B. C. Pierce. 2002. Types and Programming Languages. MIT Press, Cambridge, MA, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Kohei Suenaga, Hiroyoshi Sekine, and Ichiro Hasuo. 2013. Hyperstream Processing Systems: Nonstandard Modeling of Continuous-time Signals. In Proceedings of the 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM, New York, NY, USA, 417--430. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Stavros Tripakis, Christos Sofronis, Paul Caspi, and Adrian Curic. 2005. Translating Discrete-Time Simulink to Lustre. ACM Transactions on Embedded Computing Systems 4 (2005), 779--818. Issue 4. Special Issue on Embedded Software. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Stavros Tripakis, Christos Stergiou, Chris Shaver, and Edward A. Lee. 2013. A modular formal semantics for Ptolemy. Mathematical Structures in Computer Science 23, 4 (008 2013), 834--881.Google ScholarGoogle Scholar

Index Terms

  1. A Synchronous Look at the Simulink Standard Library

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM Transactions on Embedded Computing Systems
            ACM Transactions on Embedded Computing Systems  Volume 16, Issue 5s
            Special Issue ESWEEK 2017, CASES 2017, CODES + ISSS 2017 and EMSOFT 2017
            October 2017
            1448 pages
            ISSN:1539-9087
            EISSN:1558-3465
            DOI:10.1145/3145508
            Issue’s Table of Contents

            Copyright © 2017 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 27 September 2017
            • Revised: 1 June 2017
            • Accepted: 1 June 2017
            • Received: 1 April 2017
            Published in tecs Volume 16, Issue 5s

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader