首页> 外文会议>ACM SIGPLAN International Conference on Functional Programming >Safe Functional Reactive Programmingthrough Dependent Types
【24h】

Safe Functional Reactive Programmingthrough Dependent Types

机译:通过依赖类型安全功能反应性编程

获取原文

摘要

Functional Reactive Programming (FRP) is an approach to reactive programming where systems are structured as networks of func-tions 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 lan-guages for similar applications is its support for systems with dy-namic structure and for higher-order reactive constructs.Statically guaranteeing correctness properties of programs is an attractive proposition. This is true in particular for typical applica-tion 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 sys-tem 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, cov-erage, and termination checks, we know the operational semantics is total, which means our type system is safe.
机译:功能反应编程(FRP)是一种反应性编程的方法,其中系统被构造为在信号上运行的功能网络。 FRP基于同步数据流范例,并支持连续时间和离散时间信号(混合系统)。除了类似应用的大多数其他LAN GUIGUS外,FRP还有什么样的FRP是它对具有DY-NAMIC结构的系统和高阶反应构造的支持。静态保证程序的正确性属性是一个有吸引力的主张。这对于诸如嵌入式系统的无功编程的典型应用域来说是真的。为此,许多现有的反应语言具有型系统或其他静态检查,可保证特定于域的属性,例如反馈回路总是形成良好的。然而,与FRP相比,它们的能力有限地支持动态和高阶数据流。因此,确保FRP程序的这种特性的ONU已经到目前为止,正如所建立的静态技术都没有足够的话。在本文中,我们展示了依赖类型允许解决此问题的依赖。我们在依赖性键入的语言agda中展示了FRP的实现,利用了主机语言的类型Sys-Tem来制作FRP的特定于域(依赖的)类型系统。该实现构成了FRP的离散,操作语义,并且通过AGDA类型,COV-erage和终止检查,我们知道操作语义是总计,这意味着我们的类型系统是安全的。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号