Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2103776.2103783acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

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

Published: 24 January 2012 Publication History

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.

References

[1]
S. Abramsky, R. Jagadeesan, and P. Malacaria. Full abstraction for PCF. Inf. and Computation, 163: 409--470, 1996.
[2]
S. Abramsky, R. Blute, and P. Panangaden. Nuclear and trace ideals in tensored *-categories. J. Pure and Applied Algebra, 143: 3--47, 1999.
[3]
N. Benton and M. Hyland. Traced premonoidal categories. J. Theoretical Informatics and Applications, 37: 273--299, 2003.
[4]
M. Carlsson and T. Hallgren. Fudgets: Purely Functional Processes with applications to Graphical User Interfaces. PhD thesis, Chalmers University of Technology, 1998.
[5]
A. Courtney and C. Elliott. Genuinely functional user interfaces. In Proc. Haskell Workshop, 2001.
[6]
A. Edalat and P. J. Potts. A new representation for exact real numbers. In Proc. Math. Foundations of Progamming Semantics, pages 119--132, 1997.
[7]
C. Elliott. Functional implementations of continuous modeled animation. In Proc. PLILP/ALP, 1998.
[8]
C. Elliott. Push-pull functional reactive programming. In Proc. Haskell Symp., 2009.
[9]
C. Elliott and P. Hudak. Functional reactive animation. In Proc. Int. Conf. Functional Programming, pages 263--273, 1997.
[10]
N. Ghani, P. Hancock, and D. Pattinson. Representations of stream processors using nested fixed points. Logical Methods in Computer Science, 5 (3), 2009.
[11]
E. Haghverdi and P. J. Scott. Towards a typed geometry of interaction. In Proc. Computer Science Logic, pages 216--231, 2005.
[12]
D. Harel, D. C. Kozen, and R. Parikh. Process logic: Expressiveness, decidability, completeness. In Proc. IEEE Symp. Foundations of Computer Science, pages 129--142, 1980.
[13]
M. Hennessy and G. D. Plotkin. Full abstraction for a simple programming language. In Proc. Math. Foundations of Computer Science, number 74 in Lecture Notes in Computer Science, pages 108--120. Springer, 1979.
[14]
P. Hudak, A. Courtney, H. Nilsson, and J. Peterson. Arrows, robots, and functional reactive programming. In Summer School on Advanced Functional Programming, volume 2638 of phLecture Notes in Computer Science, pages 159--187. Springer, 2003.
[15]
J. Hughes. Generalising monads to arrows. Science of Computer Programming, 37: 67--111, 2000.
[16]
J. M. E. Hyland and C.-H. Ong. On full abstraction for PCF. Inf. and Computation, 163: 285--408, 2000.
[17]
A. S. A. Jeffrey and J. Rathke. The lax braided structure of streaming i/o. In Proc. Conf. Computer Science Logic, 2011.
[18]
W. Jeltsch. Signals, not generators! In Proc. Symp. Trends in Functional Programming, pages 283--297, 2009.
[19]
W. Jeltsch. Programming in linear temporal logic. http://cs.ioc.ee/ tarmo/tsem10/jeltsch-slides.pdf, 2011.
[20]
K. Kojima and A. Igarashi. Constructive linear-time temporal logic: Proof systems and Kripke semantics. Inf. and Computation, to appear.
[21]
N. Krishnaswami and N. Benton. Ultrametric semantics of reactive programs. In Proc. IEEE Logic in Computer Science, 2011.
[22]
Z. Manna and A. Pnueli. Completing the temporal picture. Theoretical Computer Sci., 83: 91--130, 1991.
[23]
K. L. McMillan. Circular compositional reasoning about liveness. In Proc. IFIP WG 10.5 Correct Hardware Design and Verification Methods, pages 342--345, 1999.
[24]
R. Milner. Communication and Concurrency. Prentice-Hall, 1989.
[25]
K. S. Namjoshi and R. J. Trefler. On the competeness of compositional reasoning. In Proc. Int. Conf. Computer Aided Verification, pages 139--153, 2000.
[26]
R. Paterson. A new notation for arrows. In Proc. ACM Int. Conf. Functional Programming, pages 229--240, 2001.
[27]
A. Pnueli. The temporal logic of programs. In Proc. Symp. Foundations of Computer Science, pages 46--57, 1977.
[28]
A. J. Power and H. Thielecke. Closed Freyd- and kappa-categories. In Proc. Int. Colloq. Automata, Languages and Programming, pages 625--634. Springer, 1999.
[29]
J. Power and E. Robinson. Premonoidal categories and notions of computation. Math. Structures in Comp. Sci., 7: 453--468, 1997.
[30]
G. M. Reed and A. W. Roscoe. A timed model for communicating sequential processes. Theoretical Computer Sci., 58: 249--261, 1988.
[31]
R. Rosner and A. Pnueli. A choppy logic. In Proc. IEEE Symp. Logic in Computer Science, pages 306--313, 1986.
[32]
N. Sculthorpe and H. Nilsson. Safe functional reactive programming through dependent types. In Proce. ACM Int. Conf. Functional Programming, pages 23--34, 2009.
[33]
P. Selinger. A survey of graphical languages for monoidal categories. In B. Coecke, editor, New Structures for Physics, volume 813 of phLecture Notes in Physics, chapter 4, pages 289--356. Springer, 2011.
[34]
Yale Haskell Group. Yampa library for programming hybrid systems. http://www.haskell.org/haskellwiki/Yampa.

Cited By

View all
  • (2024)Stream TypesProceedings of the ACM on Programming Languages10.1145/36564348:PLDI(1412-1436)Online publication date: 20-Jun-2024
  • (2024)Reactamole: functional reactive molecular programmingNatural Computing10.1007/s11047-024-09982-523:3(477-495)Online publication date: 19-Apr-2024
  • (2023)Thorium: A Language for Bounded Verification of Dynamic Reactive ObjectsProceedings of the 10th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems10.1145/3623506.3623574(1-13)Online publication date: 19-Oct-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLPV '12: Proceedings of the sixth workshop on Programming languages meets program verification
January 2012
90 pages
ISBN:9781450311250
DOI:10.1145/2103776
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 ACM 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]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 24 January 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. dependent types
  2. functional reactive programming
  3. linear-time temporal logic

Qualifiers

  • Research-article

Conference

POPL '12
Sponsor:

Acceptance Rates

Overall Acceptance Rate 18 of 25 submissions, 72%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)47
  • Downloads (Last 6 weeks)5
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Stream TypesProceedings of the ACM on Programming Languages10.1145/36564348:PLDI(1412-1436)Online publication date: 20-Jun-2024
  • (2024)Reactamole: functional reactive molecular programmingNatural Computing10.1007/s11047-024-09982-523:3(477-495)Online publication date: 19-Apr-2024
  • (2023)Thorium: A Language for Bounded Verification of Dynamic Reactive ObjectsProceedings of the 10th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems10.1145/3623506.3623574(1-13)Online publication date: 19-Oct-2023
  • (2023)Asynchronous Modal FRPProceedings of the ACM on Programming Languages10.1145/36078477:ICFP(476-510)Online publication date: 31-Aug-2023
  • (2023)Specification and Verification of a Linear-Time Temporal Logic for Graph TransformationGraph Transformation10.1007/978-3-031-36709-0_2(22-42)Online publication date: 12-Jul-2023
  • (2022)Quickstrom: property-based acceptance testing with LTL specificationsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523728(1025-1038)Online publication date: 9-Jun-2022
  • (2022)Modal FRP for all: Functional reactive programming without space leaks in HaskellJournal of Functional Programming10.1017/S095679682200013232Online publication date: 26-Dec-2022
  • (2021)Transfinite step-indexing for terminationProceedings of the ACM on Programming Languages10.1145/34342945:POPL(1-29)Online publication date: 4-Jan-2021
  • (2021)Diamonds are not forever: liveness in reactive programming with guarded recursionProceedings of the ACM on Programming Languages10.1145/34342835:POPL(1-28)Online publication date: 4-Jan-2021
  • (2021)Temporal Refinements for Guarded Recursive TypesProgramming Languages and Systems10.1007/978-3-030-72019-3_20(548-578)Online publication date: 23-Mar-2021
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media