Dependent Types for Multi-Rate Flows in Synchronous Programming

Synchronous programming languages emerged in the 1980s as t ools for implementing reactive systems, which interact with events from physical environment s and often must do so under strict timing constraints. In this report, we encode inside ATS various re al-time primitives in an experimental synchronous language called Prelude, where ATS is a statically typed language with an ML-like functional core that supports both dependent types (of DML-styl e) and linear types. We show that the verification requirements imposed on these primitives can b e formally expressed in terms of dependent types in ATS. Moreover, we modify the Prelude compiler t o automatically generate ATS code from Prelude source. This modified compiler allows us to sole ly r ly on typechecking in ATS to discharge proof obligations originating from the need to ty pecheck Prelude code. Whereas ATS is typically used as a general purpose programming language, w e hereby demonstrate that it can also be conveniently used to support some forms of advanced stati c checking in languages equipped with less expressive types.

[1]  Nicolas Halbwachs,et al.  LUSTRE: a declarative language for real-time programming , 1987, POPL '87.

[2]  Patrick Maxim Rondon,et al.  Liquid types , 2008, PLDI '08.

[3]  Hongwei Xi,et al.  Applied Type System: Extended Abstract , 2003, TYPES.

[4]  Stephen A. Edwards,et al.  The synchronous languages 12 years later , 2003, Proc. IEEE.

[5]  Hongwei Xi,et al.  Dependent ML An approach to practical programming with dependent types , 2007, Journal of Functional Programming.

[6]  Albert Benveniste,et al.  programmi language and its , 2001 .

[7]  Frank Pfenning,et al.  Dependent types in practical programming , 1999, POPL '99.

[8]  Edmund M. Clarke,et al.  Statistical Model Checking for Cyber-Physical Systems , 2011, ATVA.

[9]  Kohei Honda,et al.  Types for Dyadic Interaction , 1993, CONCUR.

[10]  Nicolas Halbwachs,et al.  Programming and Verifying Real-Time Systems by Means of the Synchronous Data-Flow Language LUSTRE , 1992, IEEE Trans. Software Eng..

[11]  BerryGérard,et al.  The ESTEREL synchronous programming language , 1992 .

[12]  Sandeep K. Shukla,et al.  Towards refinement types for time-dependent data-flow networks , 2015, 2015 ACM/IEEE International Conference on Formal Methods and Models for Codesign (MEMOCODE).

[13]  P ? ? ? ? ? ? ? % ? ? ? ? , 1991 .

[14]  Gérard Berry,et al.  The Esterel Synchronous Programming Language: Design, Semantics, Implementation , 1992, Sci. Comput. Program..

[15]  Frédéric Boniol,et al.  A Multi-Periodic Synchronous Data-Flow Language , 2008, 2008 11th IEEE High Assurance Systems Engineering Symposium.

[16]  N. Halbwachs,et al.  Programming and verifying real-time systems by means of thesynchronous data-ow language , 2004 .

[17]  David Broman,et al.  Relaxing the synchronous approach for mixed-criticality systems , 2014, 2014 IEEE 19th Real-Time and Embedded Technology and Applications Symposium (RTAS).