ABSTRACT
Functional Reactive Programming (FRP) is an approach to streaming data with a pure functional semantics as time-indexed values. In previous work, we showed that Linear-time Temporal Logic (LTL) can be used as a type system for discrete-time FRP, and that functional reactive primitives perform two roles: as combinators for building streams of data, and as proof rules for constructive LTL. In this paper, we add a third role, by showing that FRP combinators can be used to define streams of types, and that these functional reactive types can be viewed both as a constructive temporal logic, and as the types for functional reactive programs. As an application of functional reactive types, we show that past-time LTL (pLTL) can be extended with FRP to get a logic pLTL+FRP. This logic is expressed as streams of boolean expressions, and so bounded satisfiability of pLTL can be translated to Satisfiability Modulo Theory (SMT). Thus, pLTL+FRP can be used as a constraint language for problems which mix properties of data with temporal properties.
- The Agda wiki. http://wiki.portal.chalmers.se/agda/.Google Scholar
- N. Alechina, M. Mendler, V. de Paiva, and E. Ritter. Categorical and kripke semantics for constructive S4 modal logic. In Proc. Computer Science Logic, pages 292--307, 2001. Google ScholarDigital Library
- E. Clarke, A. Biere, R. Raimi, and Y. Zhu. Bounded model checking using satisfiability solving. Formal Methods in System Design, 19(1):7--34, 2001. Google ScholarDigital Library
- L. de Moura and N. Bjørner. Z3: An efficient SMT solver. In Proc. Tools and Algorithms for the Construction and Analysis of Systems, pages 337--340, 2008. Google ScholarDigital Library
- L. de Moura and N. Bjørner. Satisfiability modulo theories: introduction and applications. Commun. ACM, 54(9):69--77, 2011. Google ScholarDigital Library
- R. Deline and M. Fähndrich. Typestates for objects. In Proc. European Conf. Object-Oriented Programming, pages 465--490. Springer, 2004.Google ScholarCross Ref
- C. Elliott and P. Hudak. Functional reactive animation. In Proc. Int. Conf. Functional Programming, pages 263--273, 1997. Google ScholarDigital Library
- N. Ghani, P. Hancock, and D. Pattinson. Representations of stream processors using nested fixed points. Logical Methods in Computer Science, 5(3), 2009.Google Scholar
- 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.Google Scholar
- K. Honda. Types for dyadic interaction. In Proc. Int. Conf. Concurrency Theory, number 715 in Lecture Notes in Computer Science, pages 509--523. Springer, 1993. Google ScholarDigital Library
- A. S. A. Jeffrey. LTL types FRP: Linear-time temporal logic propositions as types, proofs as functional reactive programs. In Proc. ACM Workshop Programming Languages meets Program Verification, 2012. Google ScholarDigital Library
- A. S. A. Jeffrey. Functional reactive types. http://ect.bell-labs.com/who/ajeffrey/papers/lics14.tgz, 2013.Google Scholar
- A. S. A. Jeffrey and J. Rathke. The lax braided structure of streaming i/o. In Proc. Conf. Computer Science Logic, 2011.Google Scholar
- W. Jeltsch. Temporal logic with "until", functional reactive programming with processes, and concrete process categories. In Proc. ACM Workshop Programming Languages meets Program Verification, 2013. Google ScholarDigital Library
- W. Jeltsch. An abstract categorical semantics for functional reactive programming with processes. In Proc. ACM Workshop Programming Languages meets Program Verification, 2014. Google ScholarDigital Library
- O. Kiselyov. Streams and iteratees. http://okmij.org/ftp/Streams.html.Google Scholar
- N. Krishnaswami and N. Benton. Ultrametric semantics of reactive programs. In Proc. IEEE Logic in Computer Science, 2011. Google ScholarDigital Library
- C. McBride and R. Paterson. Applicative programming with effects. J. Functional Programming, 18(1):1--13, 2008. Google ScholarDigital Library
- K. L. McMillan. Circular compositional reasoning about liveness. In Proc. IFIP WG 10.5 Correct Hardware Design and Verification Methods, pages 342--345, 1999. Google ScholarDigital Library
- K. S. Namjoshi and R. J. Trefler. On the completeness of compositional reasoning. In Proc. Int. Conf. Computer Aided Verification, pages 139--153, 2000. Google ScholarDigital Library
- A. Pnueli. The temporal logic of programs. In Proc. Symp. Foundations of Computer Science, pages 46--57, 1977. Google ScholarDigital Library
Index Terms
- Functional reactive types
Recommendations
Fair reactive programming
POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesFunctional Reactive Programming (FRP) models reactive systems with events and signals, which have previously been observed to correspond to the "eventually" and "always" modalities of linear temporal logic (LTL). In this paper, we define a constructive ...
LTL types FRP: linear-time temporal logic propositions as types, proofs as functional reactive programs
PLPV '12: Proceedings of the sixth workshop on Programming languages meets program verificationFunctional 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 ...
Fair reactive programming
POPL '14Functional Reactive Programming (FRP) models reactive systems with events and signals, which have previously been observed to correspond to the "eventually" and "always" modalities of linear temporal logic (LTL). In this paper, we define a constructive ...
Comments