titan-debug-yampa-1.0.1: Testing Infrastructure for Temporal AbstractioNs - Interactive Yampa debugging layer.

Safe HaskellNone
LanguageHaskell2010

FRP.Titan.Debug.Yampa

Contents

Description

Replacement of Yampa's reactimate function with more fine-tuned control and debugging capabilities.

See FRP.Titan.Debug.CommTCP for a communication bridge using TCP sockets.

Synopsis

Debugging

reactimateControl Source #

Arguments

:: (Read p, Show p, Show a, Read a, Show b, Read b, Pred p a b) 
=> ExternalBridge

Debug: Communication bridge for the interactive GUI

-> Preferences

Debug: Debugging preferences

-> [Command p]

Debug: List of commands (exposed only to facilitate fixing the type of predicates p)

-> IO a

FRP: Initial sensing action

-> (Bool -> IO (DTime, Maybe a))

FRP: Continued sensing action

-> (Bool -> b -> IO Bool)

FRP: Rendering/consumption action

-> SF a b

FRP: Signal Function that defines the program

-> IO () 

Start a Yampa program with interactive debugging enabled.

Communication bridge

data ExternalBridge Source #

Configuration layer to communicate the FRP app and the debugging GUI.

Constructors

ExternalBridge 

Fields

Debugging preferences

data Preferences Source #

Debugging preferences.

Constructors

Preferences 

Fields

  • dumpInput :: Bool

    Dump inputs to local log at every cycle (on simulation machine)

defaultPreferences :: Preferences Source #

Default simulation preferences that do not dump the input to the log every cycle.

Debugging commands

data Command p Source #

An interactive, debugging command.

Instances
Eq p => Eq (Command p) Source # 
Instance details

Defined in FRP.Titan.Debug.Command

Methods

(==) :: Command p -> Command p -> Bool #

(/=) :: Command p -> Command p -> Bool #

Read p => Read (Command p) Source # 
Instance details

Defined in FRP.Titan.Debug.Command

Show p => Show (Command p) Source # 
Instance details

Defined in FRP.Titan.Debug.Command

Methods

showsPrec :: Int -> Command p -> ShowS #

show :: Command p -> String #

showList :: [Command p] -> ShowS #

Debugging predicates

class Read p => Pred p i o | p -> i, p -> o where Source #

A notion of temporal point-wise (time-wise) predicate to be tested during a simulation point. It needs to be something we can read from the GUI bridge so that we can interactively read commands from the user and test them.

Methods

evalPred :: p -> Maybe Double -> i -> o -> Bool Source #

Evaluate a predicate for a given input sample and a given output.