User talk:Ma68cs69

Abstract: Functional Reactive Programming FRP is a general framework for programming hybrid system in a high level, declarative manner. The purposes of FRP are its notions of behaviors, while events are time-ordered sequences of discrete time event occurrences. FRP is the essence of Fran, a domain specific language embedded in Haskell for programming reactive animations, but FRP is now also being used vision, robotics and other control systems applications. Herein, I will go over the formal semantic of FRP and how it relates to an implementation based on streams that represent continuous behaviors, as well as the implementation is faithful to the formal, continuous semantics, but only when certain constraints on behaviors are observed. We explore the nature of these constraints, which vary amongst the FRP primitives.

Introduction: In this literature review some ambiguous questions will be explained, such as how one show that a language implementation is correct?. Therefore, I express here with FRP programs are well behaved, and laws that we expect to hold in mathematics are justified, in the limit, when reasoning about FRP primitives, such as integration, to behaviors that are discontinuous. As known the FRP is mathematically very rich, many ill behaved values can be expresses, so FRP doesn't always have a meaningful semantics.

FRP in details: There are two key polymorphic data types in FRP: the behavior and the Events. A value of type Behavior a is a value of type a that varies over continuous time. Constant behaviors include numbers ( such as 1:: Behavior Real), Colors ( such as Red:: behavior Color), and so on. The most basic time, where Time is a synonym for real. More interesting time-varying behavior include animations of type behavior Picture, sonar readings of type Behavior Sonar, velocity vectors of type behavior (Real, Real), and so on. A value of type Event a is a time ordered sequence of event occurrences, each carrying a value of type a. Basic events in clued left button presses and keyboard presses, represented by the values 1bp :: Event and Key :: Event Char, respectively. The declarative reading of 1bp and key is that it is an event sequence containing all of the left button presses ( and key presses), not just one. Behavior and events are both first class values in FRP, and there is a rich set of operators (combinators) that the user can use to compose new behaviors and events from existing ones. An FRP program is just a set of mutually recursive behaviors and events, each of them built up from static (non-time-varying) values and/or other behaviors and events. suppose that we wish to generate a color behavior which starts out as red, and changes to blue when the left mouse button is pressed. In FRP we would write: > color :: Behavior Color > Color = red 'until' (1bp -=>blue) This can be read "behave as red until the left button is pressed. then change to blue." We can then use color to color an animation, as follows: >ball :: Behavior Picture > ball = paint color circ > > circ :: Behavior Region > circ = translate (cos time, sin time) ( circle 1) In this example, circle 1 creates a circle with radius 1, and the translation causes it to revolve about the center of the screen with period 2 Bi second. Thus ball is a revolving circle that changes from red to blue when the left mouse button is pressed.