Javascript must be enabled to continue!
Safe functional reactive programming through dependent types
View through CrossRef
Functional Reactive Programming (FRP) is an approach to reactive programming where systems are structured as networks of functions operating on signals. FRP is based on the synchronous data-flow paradigm and supports both continuous-time and discrete-time signals (hybrid systems). What sets FRP apart from most other languages for similar applications is its support for systems with dynamic structure and for higher-order reactive constructs.
Statically guaranteeing correctness properties of programs is an attractive proposition. This is true in particular for typical application domains for reactive programming such as embedded systems. To that end, many existing reactive languages have type systems or other static checks that guarantee domain-specific properties, such as feedback loops always being well-formed. However, they are limited in their capabilities to support dynamism and higher-order data-flow compared with FRP. Thus, the onus of ensuring such properties of FRP programs has so far been on the programmer as established static techniques do not suffice.
In this paper, we show how dependent types allow this concern to be addressed. We present an implementation of FRP embedded in the dependently-typed language Agda, leveraging the type system of the host language to craft a domain-specific (dependent) type system for FRP. The implementation constitutes a discrete, operational semantics of FRP, and as it passes the Agda type, coverage, and termination checks, we know the operational semantics is total, which means our type system is safe.
Title: Safe functional reactive programming through dependent types
Description:
Functional Reactive Programming (FRP) is an approach to reactive programming where systems are structured as networks of functions operating on signals.
FRP is based on the synchronous data-flow paradigm and supports both continuous-time and discrete-time signals (hybrid systems).
What sets FRP apart from most other languages for similar applications is its support for systems with dynamic structure and for higher-order reactive constructs.
Statically guaranteeing correctness properties of programs is an attractive proposition.
This is true in particular for typical application domains for reactive programming such as embedded systems.
To that end, many existing reactive languages have type systems or other static checks that guarantee domain-specific properties, such as feedback loops always being well-formed.
However, they are limited in their capabilities to support dynamism and higher-order data-flow compared with FRP.
Thus, the onus of ensuring such properties of FRP programs has so far been on the programmer as established static techniques do not suffice.
In this paper, we show how dependent types allow this concern to be addressed.
We present an implementation of FRP embedded in the dependently-typed language Agda, leveraging the type system of the host language to craft a domain-specific (dependent) type system for FRP.
The implementation constitutes a discrete, operational semantics of FRP, and as it passes the Agda type, coverage, and termination checks, we know the operational semantics is total, which means our type system is safe.
Related Results
WEB PROGRAMMING
WEB PROGRAMMING
"Web Programming" is a comprehensive book that provides a detailed overview of various aspects of web programming. The book is co-authored by Dr. Chitra Ravi and Dr. Mohan Kumar S,...
Interdisciplinary perspective on architectural programming: current status and future directions
Interdisciplinary perspective on architectural programming: current status and future directions
PurposeArchitectural programming, as a critical phase in construction projects, has been widely recognized for its importance and advantages throughout the construction process. Wi...
Basic and Advance: Phython Programming
Basic and Advance: Phython Programming
"This book will introduce you to the python programming language. It's aimed at beginning programmers, but even if you have written programs before and just want to add python to y...
Safe Set Maneuverability, Restoration, and Protection for Aircraft
Safe Set Maneuverability, Restoration, and Protection for Aircraft
The safe set is the largest controlled invariant set within a prescribed region of the state space. Safe set theory has the potential to be a basis for the design of an envelope pr...
Cloud Gaming Approach To Learn Programming Concepts
Cloud Gaming Approach To Learn Programming Concepts
Computer science and programming subjects can be overwhelming for new students, presenting them with significant challenges. As programming is considered one of the most important ...
Cloud Gaming Approach To Learn Programming Concepts
Cloud Gaming Approach To Learn Programming Concepts
Computer science and programming subjects can be overwhelming for new students, presenting them with significant challenges. As programming is considered one of the most important ...
The Librarian's Introduction to Programming Languages
The Librarian's Introduction to Programming Languages
The Librarian’s Introduction to Programming Languages presents case studies and practical applications for using the top programming languages in library and information settings. ...
Satisfaction in Counseling Alumni and Students
Satisfaction in Counseling Alumni and Students
The purpose of this study was to investigate satisfaction in counseling majors. The four independent variables investigated were gender, program status, employment status, and age....


