LTL types FRP: linear-time temporal logic propositions as types, proofs as functional reactive programs

A. Jeffrey
{"title":"LTL types FRP: linear-time temporal logic propositions as types, proofs as functional reactive programs","authors":"A. Jeffrey","doi":"10.1145/2103776.2103783","DOIUrl":null,"url":null,"abstract":"Functional Reactive Programming (FRP) is a form of reactive programming whose model is pure functions over signals. FRP is often expressed in terms of arrows with loops, which is the type class for a Freyd category (that is a premonoidal category with a cartesian centre) equipped with a premonoidal trace. This type system suffices to define the dataflow structure of a reactive program, but does not express its temporal properties. In this paper, we show that Linear-time Temporal Logic (LTL) is a natural extension of the type system for FRP, which constrains the temporal behaviour of reactive programs. We show that a constructive LTL can be defined in a dependently typed functional language, and that reactive programs form proofs of constructive LTL properties. In particular, implication in LTL gives rise to stateless functions on streams, and the \"constrains\" modality gives rise to causal functions. We show that reactive programs form a partially traced monoidal category, and hence can be given as a form of arrows with loops, where the type system enforces that only decoupled functions can be looped.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"26 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-01-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"64","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Programming Languages meets Program Verification","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2103776.2103783","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 64

Abstract

Functional Reactive Programming (FRP) is a form of reactive programming whose model is pure functions over signals. FRP is often expressed in terms of arrows with loops, which is the type class for a Freyd category (that is a premonoidal category with a cartesian centre) equipped with a premonoidal trace. This type system suffices to define the dataflow structure of a reactive program, but does not express its temporal properties. In this paper, we show that Linear-time Temporal Logic (LTL) is a natural extension of the type system for FRP, which constrains the temporal behaviour of reactive programs. We show that a constructive LTL can be defined in a dependently typed functional language, and that reactive programs form proofs of constructive LTL properties. In particular, implication in LTL gives rise to stateless functions on streams, and the "constrains" modality gives rise to causal functions. We show that reactive programs form a partially traced monoidal category, and hence can be given as a form of arrows with loops, where the type system enforces that only decoupled functions can be looped.
LTL类型FRP:作为类型的线性时间时间逻辑命题,作为功能反应程序的证明
函数式响应式编程(FRP)是响应式编程的一种形式,其模型是基于信号的纯函数。FRP通常用带环的箭头表示,这是带有前一元轨迹的弗洛伊德类别(即具有笛卡尔中心的前一元类别)的类型类别。这种类型系统足以定义响应式程序的数据流结构,但不表达其时间属性。在本文中,我们证明了线性时间时间逻辑(LTL)是FRP类型系统的自然扩展,它限制了反应性程序的时间行为。我们证明了建设性LTL可以用依赖类型的函数式语言定义,并且反应程序形成了建设性LTL属性的证明。特别是,LTL中的隐含会产生流上的无状态函数,而“约束”模式会产生因果函数。我们展示了反应性程序形成了部分跟踪的一元范畴,因此可以给出带有循环的箭头形式,其中类型系统强制只有解耦的函数可以循环。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信