skip to main content
10.1145/2562059.2562125acmconferencesArticle/Chapter ViewAbstractPublication PagescpsweekConference Proceedingsconference-collections
research-article

A type-based analysis of causality loops in hybrid systems modelers

Published:15 April 2014Publication History

ABSTRACT

Explicit hybrid systems modelers like Simulink/Stateflow allow for programming both discrete- and continuous-time behaviors with complex interactions between them. A key issue in their compilation is the static detection of algebraic or causality loops. Such loops can cause simulations to deadlock and prevent the generation of statically scheduled code.

This paper addresses this issue for a hybrid modeling language that combines synchronous data-flow equations with Ordinary Differential Equations (ODEs). We introduce the operator last(x) for the left-limit of a signal x. This operator is used to break causality loops and permits a uniform treatment of discrete and continuous state variables. The semantics relies on non-standard analysis, defining an execution as a sequence of infinitesimally small steps. A signal is deemed causally correct when it can be computed sequentially and only changes infinitesimally outside of announced discrete events like zero-crossings. The causality analysis takes the form of a type system that expresses dependences between signals. In well-typed programs, signals are provably continuous during integration provided that imported external functions are also continuous.

The effectiveness of this system is illustrated with several examples written in Zélus, a Lustre-like synchronous language extended with hierarchical automata and ODEs.

References

  1. T. Amagbegnon, L. Besnard, and P. Le Guernic. Implementation of the data-flow synchronous language Signal. In Programming Languages Design and Implementation (PLDI), pages 163--173. ACM, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. K. Bauer and K. Schneider. From synchronous programs to symbolic representations of hybrid systems. In HSCC, pages 41--50, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Benveniste, T. Bourke, B. Caillaud, and M. Pouzet. Divide and recycle: types and compilation for a hybrid synchronous language. In LCTES, Chicago, USA, Apr. 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. Benveniste, T. Bourke, B. Caillaud, and M. Pouzet. Non-Standard Semantics of Hybrid Systems Modelers. Journal of Computer and System Sciences (JCSS), 78(3):877--910, May 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. G. Berry. The constructive semantics of pure Esterel. 1999.Google ScholarGoogle Scholar
  6. T. Bourke and M. Pouzet. Zélus, a Synchronous Language with ODEs. In HSCC, Philadelphia, USA, April 8-11 2013. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. Carloni, R. Passerone, A. Pinto, and A. Sangiovanni-Vincentelli. Languages and tools for hybrid systems design. Foundations & Trends in Electronic Design Automation, vol. 1, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G. Dahlquist and Å. Björck. Numerical Methods in Scientific Computing: Volume 1. SIAM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. B. Denckla and P. Mosterman. Stream- and state-based semantics of hierarchy in block diagrams. In 17th IFAC World Congress, pages 7955--7960, South Korea, 2008.Google ScholarGoogle ScholarCross RefCross Ref
  10. J. Eker, J. W. Janneck, E. A. Lee, J. Liu, X. Liu, J. Ludvig, S. Neuendorffer, S. Sachs, and Y. Xiong. Taming heterogeneity - the Ptolemy approach. Proc. IEEE, 91(1):127--144, Jan. 2003.Google ScholarGoogle Scholar
  11. L. Gérard, A. Guatto, C. Pasteur, and M. Pouzet. A Modular Memory Optimization for Synchronous Data-Flow Languages. Application to Arrays in a Lustre Compiler. In LCTES, Beijing, June 12--13 2012.Google ScholarGoogle Scholar
  12. N. Halbwachs, P. Caspi, P. Raymond, and D. Pilaud. The synchronous dataflow programming language lustre. Proceedings of the IEEE, 79(9):1305--1320, September 1991.Google ScholarGoogle ScholarCross RefCross Ref
  13. N. Halbwachs, P. Raymond, and C. Ratel. Generating efficient code from data-flow programs. In PLILP, LNCS, Passau (Germany), August 1991.Google ScholarGoogle Scholar
  14. G. Kahn. The semantics of a simple language for parallel programming. In IFIP 74 Congress. North Holland, Amsterdam, 1974.Google ScholarGoogle Scholar
  15. E. A. Lee and H. Zheng. Operational semantics of hybrid systems. In HSCC, Zurich, Switzerland, Mar. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. E. A. Lee and H. Zheng. Leveraging synchronous language principles for heterogeneous modeling and design of embedded systems. In EMSOFT, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. T. Lindstrom. An invitation to non standard analysis. In N. Cutland, editor, Nonstandard analysis and its applications. Cambridge Univ. Press, 1988.Google ScholarGoogle Scholar
  18. O. Maler, Z. Manna, and A. Pnueli. From Timed to Hybrid Systems. In Real-Time: Theory in Practice, volume 600 of LNCS, pages 447--484. Springer, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. The Mathworks, Natick, MA, U.S.A. Simulink 7 - Reference, 7.6 edition, Sept. 2010.Google ScholarGoogle Scholar
  20. The Mathworks, Natick, MA, U.S.A. Simulink 7 - User's Guide, 7.5 edition, Mar. 2010.Google ScholarGoogle Scholar
  21. B. C. Pierce. Types and Programming Languages. MIT Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Pouzet. Lucid Synchrone, version 3. Tutorial and reference manual. Université Paris-Sud, LRI, Apr. 2006.Google ScholarGoogle Scholar
  23. M. Pouzet and P. Raymond. Modular Static Scheduling of Synchronous Data-flow Networks: An efficient symbolic representation. In EMSOFT, Grenoble, France, Oct. 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A type-based analysis of causality loops in hybrid systems modelers

    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
    • Published in

      cover image ACM Conferences
      HSCC '14: Proceedings of the 17th international conference on Hybrid systems: computation and control
      April 2014
      328 pages
      ISBN:9781450327329
      DOI:10.1145/2562059

      Copyright © 2014 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 the author(s) 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: 15 April 2014

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      HSCC '14 Paper Acceptance Rate29of69submissions,42%Overall Acceptance Rate153of373submissions,41%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader