SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Introduction to
                                           Functional
                                            Reactive
                                         Programming

                                       Edward Amsden

                                      Introduction

Introduction to Functional Reactive   History of FRP

                                      Classic and
           Programming                Signal-Function
                                      FRP

                                      Implementing FRP

                                      Applications of
           Edward Amsden              FRP

                                      Ongoing Work

                                      Summary

             PL Wonks
         September 28, 2012
Introduction to
Overview                               Functional
                                        Reactive
                                     Programming

                                   Edward Amsden

Introduction                      Introduction

                                  History of FRP
History of FRP                    Classic and
                                  Signal-Function
                                  FRP

Classic and Signal-Function FRP   Implementing FRP

                                  Applications of
                                  FRP
Implementing FRP                  Ongoing Work

                                  Summary
Applications of FRP

Ongoing Work

Summary
Introduction to
                    Functional
                     Reactive
                  Programming

                Edward Amsden

               Introduction

               History of FRP

               Classic and
               Signal-Function
               FRP

Introduction   Implementing FRP

               Applications of
               FRP

               Ongoing Work

               Summary
Introduction to
Motivation                                                     Functional
                                                                Reactive
                                                             Programming

                                                           Edward Amsden

                                                          Introduction

                                                          History of FRP

    Real programs have to deal with the real world.       Classic and
                                                          Signal-Function
                                                          FRP
    The real world is constrained by time.
                                                          Implementing FRP
    The real world produces unpredictable inputs          Applications of
    to your program.                                      FRP

                                                          Ongoing Work
    Usual solution: Callbacks and event loops.
                                                          Summary
    Can we extend the benefits of functional programming
    to handling these characteristics of the world?
Introduction to
Basic Abstractions                                               Functional
                                                                  Reactive
                                                               Programming

                                                             Edward Amsden

                                                            Introduction

                                                            History of FRP
    FRP divides inputs into two basic classes:
                                                            Classic and
         Behaviors or signals: Functions of time.           Signal-Function
                                                            FRP
         Events: Temporal sequences of discrete values.
                                                            Implementing FRP
    An FRP language must include a means of altering or     Applications of
    replacing a program based on event occurrences.         FRP

                                                            Ongoing Work
    This is the basis of FRP’s reactivity.
                                                            Summary
    These abstractions may be reified in an FRP language
    or may form the basis of other abstractions, but they
    must be present.
Introduction to
                      Functional
                       Reactive
                    Programming

                  Edward Amsden

                 Introduction

                 History of FRP

                 Classic and
                 Signal-Function
                 FRP

History of FRP   Implementing FRP

                 Applications of
                 FRP

                 Ongoing Work

                 Summary
Introduction to
People                                                      Functional
                                                             Reactive
                                                          Programming

                                                        Edward Amsden

                                                       Introduction
    Conal Elliott
                                                       History of FRP
         Previously at Microsoft Research.
                                                       Classic and
         Denotational semantics and implementations.   Signal-Function
                                                       FRP
    Paul Hudak
                                                       Implementing FRP
         Yale University.                              Applications of
         Applications of FRP to multimedia.            FRP

         Euterpea.                                     Ongoing Work

         Haskell School of Expression.                 Summary

    Antony Courtney
         Student at Yale, graduated 2004.
         Arrowized FRP.
         Frapp´ (FRP in Java).
              e
Introduction to
People                                                              Functional
                                                                     Reactive
                                                                  Programming

                                                                Edward Amsden

                                                               Introduction

                                                               History of FRP
    Henrik Nilsson                                             Classic and
                                                               Signal-Function
         Previously at Yale University.                        FRP
         Collaborated on FRP with Hudak.                       Implementing FRP
         Now at University of Nottingham.                      Applications of
         Created Yampa, an optimized implementation of AFRP.   FRP

    Neil Sculthorpe                                            Ongoing Work

                                                               Summary
         Student of Nilsson at Nottingham.
         Now at University of Kansas.
         Creator of N-Ary FRP.
Introduction to
“Functional Reactive Animation”                           Functional
                                                           Reactive
                                                        Programming

                                                      Edward Amsden

                                                     Introduction

                                                     History of FRP

                                                     Classic and
                                                     Signal-Function
    Conal Elliott and Paul Hudak                     FRP

                                                     Implementing FRP
    The original description of FRP.
                                                     Applications of
    Proposed behaviors and events as abstractions.   FRP

                                                     Ongoing Work
    Evaluated a behavior carrying a picture
                                                     Summary
    to form an animation.
Introduction to
“Genuinely Functional User Interfaces”                              Functional
                                                                     Reactive
                                                                  Programming

                                                                Edward Amsden

                                                               Introduction

                                                               History of FRP
    Antony Courtney and Conal Elliott.                         Classic and
                                                               Signal-Function
    Described a GUI toolkit based on “AFRP,”                   FRP

    FRP formulated as an Arrow.                                Implementing FRP

                                                               Applications of
    Proposed “signal functions” as an FRP abstraction.         FRP

    Signal functions are reactive constructs with events and   Ongoing Work

    signals as inputs and outputs.                             Summary

    Signal functions are programs, and may be replaced
    in response to events.
Introduction to
“Push-pull Functional Reactive Programming”                      Functional
                                                                  Reactive
                                                               Programming

                                                             Edward Amsden

    Conal Elliott                                           Introduction

    Gave denotational semantics for FRP.                    History of FRP

                                                            Classic and
    Used to prove soundness of transformation               Signal-Function
    to a normal form.                                       FRP

                                                            Implementing FRP
    Normal form lifts all reactivity to top level.          Applications of
    Evaluate with concurrent threads:                       FRP

                                                            Ongoing Work
         Block waiting for next event to react to.
                                                            Summary
         Spin evaluating current program with time steps.
    Advantage: no spinning sampling of events.
    Advantage: no sampling latency in reacting to events.
    Disadvantage: not a purely functional implementation.
    Disadvantage: Requires kludge to merge events.
Introduction to
“Dynamic Optimization for Functional Reactive             Functional
                                                           Reactive
Programming using Generalized Algebraic Data            Programming

                                                      Edward Amsden
Types”
                                                     Introduction

                                                     History of FRP

                                                     Classic and
                                                     Signal-Function
                                                     FRP

                                                     Implementing FRP

    Henrik Nilsson                                   Applications of
                                                     FRP

    Dynamically optimizing implementation of AFRP.   Ongoing Work

    Eliminate redundant composition introduced by    Summary

    switching.
Introduction to
“Toward Safe and Efficient Functional Reactive                Functional
                                                             Reactive
Programming”                                              Programming

                                                        Edward Amsden

                                                       Introduction

                                                       History of FRP

                                                       Classic and
                                                       Signal-Function
                                                       FRP
    Neil Sculthorpe
                                                       Implementing FRP
    (PhD Thesis, University of Nottingham)
                                                       Applications of
                                                       FRP
    Embedded AFRP in Agda
                                                       Ongoing Work
    (a dependently-typed total functional language).
                                                       Summary
    Introduced signal vectors as a new abstraction
    to avoid embedding events in signals.
Introduction to
Upcoming: “Push-pull Signal Function                            Functional
                                                                 Reactive
Functional Reactive Programming”                              Programming

                                                            Edward Amsden

                                                           Introduction

                                                           History of FRP

                                                           Classic and
                                                           Signal-Function
                                                           FRP

                                                           Implementing FRP
    Edward Amsden
                                                           Applications of
    (M.S. Thesis, Rochester Institute of Technology)       FRP

    Using signal vectors to permit push-based evaluation   Ongoing Work

                                                           Summary
    of events in a signal-function FRP system.
Introduction to
                                       Functional
                                        Reactive
                                     Programming

                                   Edward Amsden

                                  Introduction

                                  History of FRP

                                  Classic and
                                  Signal-Function
                                  FRP

Classic and Signal-Function FRP   Implementing FRP

                                  Applications of
                                  FRP

                                  Ongoing Work

                                  Summary
Introduction to
Families of FRP Systems        Functional
                                Reactive
                             Programming

                           Edward Amsden

                          Introduction
    Classic FRP           History of FRP
        Fran              Classic and
        Reactive          Signal-Function
                          FRP
        reactive-banana
                          Implementing FRP
        elm
                          Applications of
        Frapp´e           FRP

    Signal-Function FRP   Ongoing Work

        Fruit             Summary

        AFRP
        Yampa
        N-Ary FRP
        time-flies
Introduction to
Classic FRP                                                        Functional
                                                                    Reactive
                                                                 Programming

                                                               Edward Amsden

                                                              Introduction

                                                              History of FRP

                                                              Classic and
    Events and behaviors are first-class abstractions.         Signal-Function
                                                              FRP

    Primitive events and behaviors must be provided by the    Implementing FRP

    system.                                                   Applications of
                                                              FRP
    Programs are constructed by composing events and          Ongoing Work
    behaviors and by lifting functions and values to simple   Summary

    behaviors.
Introduction to
Signal-Function FRP                                                Functional
                                                                    Reactive
                                                                 Programming

                                                               Edward Amsden

                                                              Introduction

                                                              History of FRP

                                                              Classic and
                                                              Signal-Function
    Signal functions are first-class abstractions.             FRP

                                                              Implementing FRP
    An evaluation interface provides inputs to the system
                                                              Applications of
    without discrimination as to their origin.                FRP

    Programs are constructed by lifting functions to simple   Ongoing Work

                                                              Summary
    signal functions and by composing signal functions.
Introduction to
                        Functional
                         Reactive
                      Programming

                    Edward Amsden

                   Introduction

                   History of FRP

                   Classic and
                   Signal-Function
                   FRP

Implementing FRP   Implementing FRP

                   Applications of
                   FRP

                   Ongoing Work

                   Summary
Introduction to
Classic FRP                                                          Functional
                                                                      Reactive
                                                                   Programming

                                                                 Edward Amsden

                                                                Introduction

    Signals are implemented as functions from time to a         History of FRP

                                                                Classic and
    sample value and a new behavior.                            Signal-Function
                                                                FRP
    This permits a behavior to throw away history and
                                                                Implementing FRP
    avoid time-space leaks.                                     Applications of
                                                                FRP
    Events are represented as lazy lists of time-value pairs.
                                                                Ongoing Work
    Some implementations use more complex                       Summary
    representations of improving lists.
    Either way, must have a representation of “No
    occurrence yet.”
Introduction to
Signal-Function FRP                                             Functional
                                                                 Reactive
                                                              Programming

                                                            Edward Amsden

                                                           Introduction

                                                           History of FRP

                                                           Classic and
    Signal functions are represented as one or more        Signal-Function
                                                           FRP
    continuations.                                         Implementing FRP

    Continuations take signal sample update or event       Applications of
                                                           FRP
    occurrence.
                                                           Ongoing Work
    Continuations produce output updates/occurrences and   Summary
    replacement signal function.
Introduction to
                           Functional
                            Reactive
                         Programming

                       Edward Amsden

                      Introduction

                      History of FRP

                      Classic and
                      Signal-Function
                      FRP

Applications of FRP   Implementing FRP

                      Applications of
                      FRP

                      Ongoing Work

                      Summary
Introduction to
Animations and Games                  Functional
                                       Reactive
                                    Programming

                                  Edward Amsden

                                 Introduction

                                 History of FRP

                                 Classic and
                                 Signal-Function
                                 FRP
    Bouncing Balls etc. (Fran)   Implementing FRP

    Space Invaders (Yampa)       Applications of
                                 FRP

    Frag (Yampa)                 Ongoing Work

                                 Summary
Introduction to
Audio                 Functional
                       Reactive
                    Programming

                  Edward Amsden

                 Introduction

                 History of FRP

                 Classic and
                 Signal-Function
                 FRP

                 Implementing FRP

    YampaSynth   Applications of
                 FRP

                 Ongoing Work

                 Summary
Introduction to
Robotics        Functional
                 Reactive
              Programming

            Edward Amsden

           Introduction

           History of FRP

           Classic and
           Signal-Function
           FRP

           Implementing FRP

    FRob   Applications of
           FRP

           Ongoing Work

           Summary
Introduction to
                    Functional
                     Reactive
                  Programming

                Edward Amsden

               Introduction

               History of FRP

               Classic and
               Signal-Function
               FRP

Ongoing Work   Implementing FRP

               Applications of
               FRP

               Ongoing Work

               Summary
Introduction to
Semantics                                                          Functional
                                                                    Reactive
                                                                 Programming

                                                               Edward Amsden

                                                              Introduction

                                                              History of FRP

                                                              Classic and
                                                              Signal-Function
    Denotational semantics given for Classic FRP. (Elliott)   FRP

                                                              Implementing FRP
    Little work on formal semantics of signal-function FRP.
                                                              Applications of
    Courtney and Elliott give informal semantics.             FRP

                                                              Ongoing Work
    Category-theoretic semantics for signal-function FRP?
                                                              Summary
    How does composition with switch work?
Introduction to
Performance                                                   Functional
                                                               Reactive
                                                            Programming

                                                          Edward Amsden

                                                         Introduction

                                                         History of FRP

                                                         Classic and
    Push-based event handling should yield performance   Signal-Function
                                                         FRP
    increase.                                            Implementing FRP
    Dynamic optimizations (Yampa).                       Applications of
                                                         FRP
    Static optimizations (Causal Commutative Arrows).    Ongoing Work

    Staged code generation?                              Summary

    Parallelism?
Introduction to
               Functional
                Reactive
             Programming

           Edward Amsden

          Introduction

          History of FRP

          Classic and
          Signal-Function
          FRP

Summary   Implementing FRP

          Applications of
          FRP

          Ongoing Work

          Summary
Introduction to
Summary                                               Functional
                                                       Reactive
                                                    Programming

                                                  Edward Amsden

                                                 Introduction

                                                 History of FRP

                                                 Classic and
                                                 Signal-Function
                                                 FRP
   Motivation: Reacting to real world
                                                 Implementing FRP
   Abstractions: Behaviors/signals and events.   Applications of
                                                 FRP
   Implementation: Continuations.
                                                 Ongoing Work
   Applications: Anything reactive.              Summary
Introduction to
                  Functional
                   Reactive
                Programming

              Edward Amsden

             Introduction

             History of FRP

             Classic and
             Signal-Function
             FRP

Questions?   Implementing FRP

             Applications of
             FRP

             Ongoing Work

             Summary

Mais conteúdo relacionado

Destaque

Reactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-JavaReactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-JavaKasun Indrasiri
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examplesPeter Lawrey
 
CompletableFuture
CompletableFutureCompletableFuture
CompletableFuturekoji lin
 
Asynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/SpringAsynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/SpringNaresh Chintalcheru
 
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsGo Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsJonas Bonér
 
Functional Reactive Programming in Javascript
Functional Reactive Programming in JavascriptFunctional Reactive Programming in Javascript
Functional Reactive Programming in JavascriptBrian Lonsdorf
 
A Pragmatic View of Reactive
A Pragmatic View of ReactiveA Pragmatic View of Reactive
A Pragmatic View of ReactiveLutz Hühnken
 
Go Reactive: Event-Driven, Scalable, Resilient & Responsive Systems
Go Reactive: Event-Driven, Scalable, Resilient & Responsive SystemsGo Reactive: Event-Driven, Scalable, Resilient & Responsive Systems
Go Reactive: Event-Driven, Scalable, Resilient & Responsive SystemsJonas Bonér
 
Reactive design: languages, and paradigms
Reactive design: languages, and paradigmsReactive design: languages, and paradigms
Reactive design: languages, and paradigmsDean Wampler
 
API Asynchrones en Java 8
API Asynchrones en Java 8API Asynchrones en Java 8
API Asynchrones en Java 8José Paumard
 
Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)Jonas Bonér
 
Functional Reactive Programming with RxJS
Functional Reactive Programming with RxJSFunctional Reactive Programming with RxJS
Functional Reactive Programming with RxJSstefanmayer13
 
React + Redux Introduction
React + Redux IntroductionReact + Redux Introduction
React + Redux IntroductionNikolaus Graf
 
Ardi jurnal ic
Ardi jurnal icArdi jurnal ic
Ardi jurnal icArdi Novra
 
BACTERIAL INFECTION AND IMMUNE SYSTEM RESPONSE
BACTERIAL INFECTION AND IMMUNE SYSTEM RESPONSEBACTERIAL INFECTION AND IMMUNE SYSTEM RESPONSE
BACTERIAL INFECTION AND IMMUNE SYSTEM RESPONSEDiana Agudelo
 

Destaque (20)

Reactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-JavaReactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-Java
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
 
RPG Combat Kata
RPG Combat KataRPG Combat Kata
RPG Combat Kata
 
CompletableFuture
CompletableFutureCompletableFuture
CompletableFuture
 
Asynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/SpringAsynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/Spring
 
Perspectives Volume 4
Perspectives Volume 4Perspectives Volume 4
Perspectives Volume 4
 
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsGo Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
 
Java 8 Streams
Java 8 StreamsJava 8 Streams
Java 8 Streams
 
Functional Reactive Programming in Javascript
Functional Reactive Programming in JavascriptFunctional Reactive Programming in Javascript
Functional Reactive Programming in Javascript
 
A Pragmatic View of Reactive
A Pragmatic View of ReactiveA Pragmatic View of Reactive
A Pragmatic View of Reactive
 
Go Reactive: Event-Driven, Scalable, Resilient & Responsive Systems
Go Reactive: Event-Driven, Scalable, Resilient & Responsive SystemsGo Reactive: Event-Driven, Scalable, Resilient & Responsive Systems
Go Reactive: Event-Driven, Scalable, Resilient & Responsive Systems
 
Reactive design: languages, and paradigms
Reactive design: languages, and paradigmsReactive design: languages, and paradigms
Reactive design: languages, and paradigms
 
API Asynchrones en Java 8
API Asynchrones en Java 8API Asynchrones en Java 8
API Asynchrones en Java 8
 
Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)
 
Introducing Akka
Introducing AkkaIntroducing Akka
Introducing Akka
 
Functional Reactive Programming with RxJS
Functional Reactive Programming with RxJSFunctional Reactive Programming with RxJS
Functional Reactive Programming with RxJS
 
React + Redux Introduction
React + Redux IntroductionReact + Redux Introduction
React + Redux Introduction
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
 
Ardi jurnal ic
Ardi jurnal icArdi jurnal ic
Ardi jurnal ic
 
BACTERIAL INFECTION AND IMMUNE SYSTEM RESPONSE
BACTERIAL INFECTION AND IMMUNE SYSTEM RESPONSEBACTERIAL INFECTION AND IMMUNE SYSTEM RESPONSE
BACTERIAL INFECTION AND IMMUNE SYSTEM RESPONSE
 

Introduction to Functional Reactive Programming

  • 1. Introduction to Functional Reactive Programming Edward Amsden Introduction Introduction to Functional Reactive History of FRP Classic and Programming Signal-Function FRP Implementing FRP Applications of Edward Amsden FRP Ongoing Work Summary PL Wonks September 28, 2012
  • 2. Introduction to Overview Functional Reactive Programming Edward Amsden Introduction Introduction History of FRP History of FRP Classic and Signal-Function FRP Classic and Signal-Function FRP Implementing FRP Applications of FRP Implementing FRP Ongoing Work Summary Applications of FRP Ongoing Work Summary
  • 3. Introduction to Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Introduction Implementing FRP Applications of FRP Ongoing Work Summary
  • 4. Introduction to Motivation Functional Reactive Programming Edward Amsden Introduction History of FRP Real programs have to deal with the real world. Classic and Signal-Function FRP The real world is constrained by time. Implementing FRP The real world produces unpredictable inputs Applications of to your program. FRP Ongoing Work Usual solution: Callbacks and event loops. Summary Can we extend the benefits of functional programming to handling these characteristics of the world?
  • 5. Introduction to Basic Abstractions Functional Reactive Programming Edward Amsden Introduction History of FRP FRP divides inputs into two basic classes: Classic and Behaviors or signals: Functions of time. Signal-Function FRP Events: Temporal sequences of discrete values. Implementing FRP An FRP language must include a means of altering or Applications of replacing a program based on event occurrences. FRP Ongoing Work This is the basis of FRP’s reactivity. Summary These abstractions may be reified in an FRP language or may form the basis of other abstractions, but they must be present.
  • 6. Introduction to Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP History of FRP Implementing FRP Applications of FRP Ongoing Work Summary
  • 7. Introduction to People Functional Reactive Programming Edward Amsden Introduction Conal Elliott History of FRP Previously at Microsoft Research. Classic and Denotational semantics and implementations. Signal-Function FRP Paul Hudak Implementing FRP Yale University. Applications of Applications of FRP to multimedia. FRP Euterpea. Ongoing Work Haskell School of Expression. Summary Antony Courtney Student at Yale, graduated 2004. Arrowized FRP. Frapp´ (FRP in Java). e
  • 8. Introduction to People Functional Reactive Programming Edward Amsden Introduction History of FRP Henrik Nilsson Classic and Signal-Function Previously at Yale University. FRP Collaborated on FRP with Hudak. Implementing FRP Now at University of Nottingham. Applications of Created Yampa, an optimized implementation of AFRP. FRP Neil Sculthorpe Ongoing Work Summary Student of Nilsson at Nottingham. Now at University of Kansas. Creator of N-Ary FRP.
  • 9. Introduction to “Functional Reactive Animation” Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function Conal Elliott and Paul Hudak FRP Implementing FRP The original description of FRP. Applications of Proposed behaviors and events as abstractions. FRP Ongoing Work Evaluated a behavior carrying a picture Summary to form an animation.
  • 10. Introduction to “Genuinely Functional User Interfaces” Functional Reactive Programming Edward Amsden Introduction History of FRP Antony Courtney and Conal Elliott. Classic and Signal-Function Described a GUI toolkit based on “AFRP,” FRP FRP formulated as an Arrow. Implementing FRP Applications of Proposed “signal functions” as an FRP abstraction. FRP Signal functions are reactive constructs with events and Ongoing Work signals as inputs and outputs. Summary Signal functions are programs, and may be replaced in response to events.
  • 11. Introduction to “Push-pull Functional Reactive Programming” Functional Reactive Programming Edward Amsden Conal Elliott Introduction Gave denotational semantics for FRP. History of FRP Classic and Used to prove soundness of transformation Signal-Function to a normal form. FRP Implementing FRP Normal form lifts all reactivity to top level. Applications of Evaluate with concurrent threads: FRP Ongoing Work Block waiting for next event to react to. Summary Spin evaluating current program with time steps. Advantage: no spinning sampling of events. Advantage: no sampling latency in reacting to events. Disadvantage: not a purely functional implementation. Disadvantage: Requires kludge to merge events.
  • 12. Introduction to “Dynamic Optimization for Functional Reactive Functional Reactive Programming using Generalized Algebraic Data Programming Edward Amsden Types” Introduction History of FRP Classic and Signal-Function FRP Implementing FRP Henrik Nilsson Applications of FRP Dynamically optimizing implementation of AFRP. Ongoing Work Eliminate redundant composition introduced by Summary switching.
  • 13. Introduction to “Toward Safe and Efficient Functional Reactive Functional Reactive Programming” Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Neil Sculthorpe Implementing FRP (PhD Thesis, University of Nottingham) Applications of FRP Embedded AFRP in Agda Ongoing Work (a dependently-typed total functional language). Summary Introduced signal vectors as a new abstraction to avoid embedding events in signals.
  • 14. Introduction to Upcoming: “Push-pull Signal Function Functional Reactive Functional Reactive Programming” Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Implementing FRP Edward Amsden Applications of (M.S. Thesis, Rochester Institute of Technology) FRP Using signal vectors to permit push-based evaluation Ongoing Work Summary of events in a signal-function FRP system.
  • 15. Introduction to Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Classic and Signal-Function FRP Implementing FRP Applications of FRP Ongoing Work Summary
  • 16. Introduction to Families of FRP Systems Functional Reactive Programming Edward Amsden Introduction Classic FRP History of FRP Fran Classic and Reactive Signal-Function FRP reactive-banana Implementing FRP elm Applications of Frapp´e FRP Signal-Function FRP Ongoing Work Fruit Summary AFRP Yampa N-Ary FRP time-flies
  • 17. Introduction to Classic FRP Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Events and behaviors are first-class abstractions. Signal-Function FRP Primitive events and behaviors must be provided by the Implementing FRP system. Applications of FRP Programs are constructed by composing events and Ongoing Work behaviors and by lifting functions and values to simple Summary behaviors.
  • 18. Introduction to Signal-Function FRP Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function Signal functions are first-class abstractions. FRP Implementing FRP An evaluation interface provides inputs to the system Applications of without discrimination as to their origin. FRP Programs are constructed by lifting functions to simple Ongoing Work Summary signal functions and by composing signal functions.
  • 19. Introduction to Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Implementing FRP Implementing FRP Applications of FRP Ongoing Work Summary
  • 20. Introduction to Classic FRP Functional Reactive Programming Edward Amsden Introduction Signals are implemented as functions from time to a History of FRP Classic and sample value and a new behavior. Signal-Function FRP This permits a behavior to throw away history and Implementing FRP avoid time-space leaks. Applications of FRP Events are represented as lazy lists of time-value pairs. Ongoing Work Some implementations use more complex Summary representations of improving lists. Either way, must have a representation of “No occurrence yet.”
  • 21. Introduction to Signal-Function FRP Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal functions are represented as one or more Signal-Function FRP continuations. Implementing FRP Continuations take signal sample update or event Applications of FRP occurrence. Ongoing Work Continuations produce output updates/occurrences and Summary replacement signal function.
  • 22. Introduction to Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Applications of FRP Implementing FRP Applications of FRP Ongoing Work Summary
  • 23. Introduction to Animations and Games Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Bouncing Balls etc. (Fran) Implementing FRP Space Invaders (Yampa) Applications of FRP Frag (Yampa) Ongoing Work Summary
  • 24. Introduction to Audio Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Implementing FRP YampaSynth Applications of FRP Ongoing Work Summary
  • 25. Introduction to Robotics Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Implementing FRP FRob Applications of FRP Ongoing Work Summary
  • 26. Introduction to Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Ongoing Work Implementing FRP Applications of FRP Ongoing Work Summary
  • 27. Introduction to Semantics Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function Denotational semantics given for Classic FRP. (Elliott) FRP Implementing FRP Little work on formal semantics of signal-function FRP. Applications of Courtney and Elliott give informal semantics. FRP Ongoing Work Category-theoretic semantics for signal-function FRP? Summary How does composition with switch work?
  • 28. Introduction to Performance Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Push-based event handling should yield performance Signal-Function FRP increase. Implementing FRP Dynamic optimizations (Yampa). Applications of FRP Static optimizations (Causal Commutative Arrows). Ongoing Work Staged code generation? Summary Parallelism?
  • 29. Introduction to Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Summary Implementing FRP Applications of FRP Ongoing Work Summary
  • 30. Introduction to Summary Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Motivation: Reacting to real world Implementing FRP Abstractions: Behaviors/signals and events. Applications of FRP Implementation: Continuations. Ongoing Work Applications: Anything reactive. Summary
  • 31. Introduction to Functional Reactive Programming Edward Amsden Introduction History of FRP Classic and Signal-Function FRP Questions? Implementing FRP Applications of FRP Ongoing Work Summary