GithubHelp home page GithubHelp logo

keera-studios / haskell-titan Goto Github PK

View Code? Open in Web Editor NEW
22.0 6.0 0.0 592 KB

Testing Infrastructure for Temporal AbstractioNs

Home Page: http://facebook.com/keerastudios

License: GNU General Public License v3.0

Haskell 100.00%
haskell quickcheck testing debugging record-and-replay visual-debugging frp functional-reactive-programming functional-programming

haskell-titan's Introduction

Haskell Titan - Testing Infrastructure for Temporal AbstractioNs

Haskell Titan is a testing and debugging system for reactive, time-varying and interactive software.

It is built on the principles of Functional Reactive Programming, although it's ideas can be applied to other time-based abstractions.

Structure of Haskell Titan

Haskell Titan is composed of two parts: testing facilities and debugging facilities.

The testing facilities allow you to: 1) describe and test temporal unit tests, and 2) test FRP programs using QuickCheck (both using real traces or unit tests)

The debugging facilities allow you to: 1) record and replay FRP programs in a referentially transparent manner and 2) debug programs as you run them.

Part of the testing facilities have been introduced in Yampa's repository directly, and you can find them at:

https://github.com/ivanperez-keera/Yampa

In this repo you will find:

  • An extension of Yampa to run programs recording their input and debugging them.

  • An interactive debugging GUI to connect to a running Yampa program and control it remotely.

Getting started

Debugging

It's easier to get started with an example:

$ git clone https://github.com/keera-studios/haskell-titan
$ cd haskell-titan
$ git clone https://github.com/ivanperez-keera/Yampa
$ cabal sandbox init
$ cabal install Yampa/ -fexpose-core
$ cabal install -fexamples titan-yampa-debugger/
$ cabal install titan-gui/
$ ./.cabal-sandbox/bin/titan-gui &
$ ./.cabal-sandbox/bin/titan-yampa-debugger-example-bouncing-ball

You'll need GTK with glade installed. On Ubuntu you can:

$ apt-get install libglade2-dev

Related Papers

Collaborations

Please, send pull requests and file bugs.

If you are considering to do something similar for a different FRP implementation, please consider adding a new backend for this project so that we can join efforts. That way our efforts will be more likely to help you, and yours will also help us. There's always some extra effort from trying to collaborate with others, but it's totally worth it :)

Copyright

This software is the Copyright of Keera Studios Ltd. It is released under GPL-3 license.

If you find this license too restrictive for the environment where you need to use Haskell Titan or to create an extension, please contact us at [email protected] and provide details about your case. We may be able to grant an exception.

haskell-titan's People

Contributors

chriz-uniba avatar chriz-zeller avatar ivanperez-keera avatar myroslambda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

haskell-titan's Issues

Missing module Extra

As a last-minute change in 72be711, I renamed the module Extra to Data.Extra, changing the cabal file but not the imports.

This introduced a bug that makes the yampa-debugger library fail to compile.

Clean and reorganize modules

The current module organization is making titan difficult to maintain, fix, and extend.

A better module organization would facilitate these tasks, probably spitting modules into smaller modules.

Add link to paper

There is a paper that describes what's going on here. It needs to be linked from the top-level README.

Titan cabal file is missing modules

The version of Titan released on Hackage is missing all modules but the main. This is due to those modules not being listed in other-modules in the cabal file.

The package cannot be installed from hackage right now.

Failure to install with cabal

Titan is not published on Hackage, and that makes it hard to install with cabal.

It would help to be able to install this straight off hackage.

Yampa record is too lazy

Yampa record is too lazy when it saves the file, which makes examples crash on desktop due to the file where the trace is being recorded being open too many times.

Hackage package includes too many modules

Unfortunately, some of the modules included in the repository (which are now in the cabal file, since #27) are not actually being used by titan, and this is preventing it from installing.

Publish Version 1.0

Publish version 1.0 of titan, titan-yampa-recorder and titan-yampa-debugger

Installation of titan-gui fails

Due to an error in keera-hails-reactive-gtk-0.3 installing of titan-gui fails.

haskell-titan$ cabal install titan-gui/
Resolving dependencies...
Notice: installing into a sandbox located at
/home/luthien/studiosus/git/haskell-titan/.cabal-sandbox
Downloading keera-callbacks-0.1...
Downloading keera-hails-mvc-controller-0.0.3.3...
Configuring StateVar-1.1.1.1...
Configuring old-locale-1.0.0.7...
Configuring primitive-0.6.4.0...
Configuring text-1.2.3.1...
Downloading keera-hails-mvc-view-0.0.3.3...
Building StateVar-1.1.1.1...
Building old-locale-1.0.0.7...
Building primitive-0.6.4.0...
Building text-1.2.3.1...
Downloading utf8-string-1.0.1.1...
Installed StateVar-1.1.1.1
Configuring keera-callbacks-0.1...
Building keera-callbacks-0.1...
Installed old-locale-1.0.0.7
Configuring keera-hails-mvc-view-0.0.3.3...
Building keera-hails-mvc-view-0.0.3.3...
Configuring utf8-string-1.0.1.1...
Installed keera-callbacks-0.1
Configuring keera-hails-mvc-controller-0.0.3.3...
Installed keera-hails-mvc-view-0.0.3.3
Building utf8-string-1.0.1.1...
Building keera-hails-mvc-controller-0.0.3.3...
Configuring contravariant-1.5...
Installed keera-hails-mvc-controller-0.0.3.3
Building contravariant-1.5...
Installed utf8-string-1.0.1.1
Configuring hslogger-1.2.12...
Building hslogger-1.2.12...
Installed contravariant-1.5
Downloading keera-hails-reactivevalues-0.2.2.2...
Configuring keera-hails-reactivevalues-0.2.2.2...
Building keera-hails-reactivevalues-0.2.2.2...
Installed keera-hails-reactivevalues-0.2.2.2
Downloading keera-hails-reactive-polling-0.0.3.3...
Installed hslogger-1.2.12
Configuring keera-hails-reactive-polling-0.0.3.3...
Building keera-hails-reactive-polling-0.0.3.3...
Installed primitive-0.6.4.0
Configuring vector-0.12.0.1...
Installed keera-hails-reactive-polling-0.0.3.3
Building vector-0.12.0.1...
Installed text-1.2.3.1
Configuring hashable-1.2.7.0...
Configuring parsec-3.1.13.0...
Building hashable-1.2.7.0...
Building parsec-3.1.13.0...
Installed hashable-1.2.7.0
Installed parsec-3.1.13.0
Configuring network-uri-2.6.1.0...
Building network-uri-2.6.1.0...
Installed network-uri-2.6.1.0
Downloading HTTP-4000.3.12...
Configuring HTTP-4000.3.12...
Building HTTP-4000.3.12...
Installed HTTP-4000.3.12
Installed vector-0.12.0.1
Downloading hashtables-1.2.3.1...
Configuring hashtables-1.2.3.1...
Building hashtables-1.2.3.1...
Installed hashtables-1.2.3.1
Downloading gtk2hs-buildtools-0.13.4.0...
Configuring gtk2hs-buildtools-0.13.4.0...
Building gtk2hs-buildtools-0.13.4.0...
Installed gtk2hs-buildtools-0.13.4.0
Downloading cairo-0.13.5.0...
Downloading glib-0.13.6.0...
Configuring glib-0.13.6.0...
Configuring cairo-0.13.5.0...
Building glib-0.13.6.0...
Building cairo-0.13.5.0...
Installed glib-0.13.6.0
Downloading MissingK-0.0.1...
Downloading gio-0.13.5.0...
Configuring MissingK-0.0.1...
Building MissingK-0.0.1...
Configuring gio-0.13.5.0...
Installed cairo-0.13.5.0
Downloading pango-0.13.5.0...
Configuring pango-0.13.5.0...
Installed MissingK-0.0.1
Downloading keera-hails-mvc-model-protectedmodel-0.0.3.5...
Configuring keera-hails-mvc-model-protectedmodel-0.0.3.5...
Building keera-hails-mvc-model-protectedmodel-0.0.3.5...
Building gio-0.13.5.0...
Building pango-0.13.5.0...
Installed keera-hails-mvc-model-protectedmodel-0.0.3.5
Installed pango-0.13.5.0
Installed gio-0.13.5.0
Downloading gtk-0.15.0...
Configuring gtk-0.15.0...
Building gtk-0.15.0...
Installed gtk-0.15.0
Downloading gtk-helpers-0.0.9.1...
Configuring gtk-helpers-0.0.9.1...
Building gtk-helpers-0.0.9.1...
Installed gtk-helpers-0.0.9.1
Downloading keera-hails-mvc-view-gtk-0.0.3.3...
Downloading keera-hails-reactive-gtk-0.3...
Configuring keera-hails-mvc-view-gtk-0.0.3.3...
Configuring keera-hails-reactive-gtk-0.3...
Building keera-hails-reactive-gtk-0.3...
Building keera-hails-mvc-view-gtk-0.0.3.3...
Installed keera-hails-mvc-view-gtk-0.0.3.3
Downloading keera-hails-mvc-environment-gtk-0.0.3.3...
Configuring keera-hails-mvc-environment-gtk-0.0.3.3...
Failed to install keera-hails-reactive-gtk-0.3
Build log ( /home/luthien/studiosus/git/haskell-titan/.cabal-sandbox/logs/keera-hails-reactive-gtk-0.3.log ):
cabal: Entering directory '/tmp/cabal-tmp-32001/keera-hails-reactive-gtk-0.3'
Configuring keera-hails-reactive-gtk-0.3...
Building keera-hails-reactive-gtk-0.3...
Preprocessing library keera-hails-reactive-gtk-0.3...
[ 1 of 19] Compiling Graphics.UI.Gtk.Reactive.Property ( src/Graphics/UI/Gtk/Reactive/Property.hs, dist/dist-sandbox-1b52ba1b/build/Graphics/UI/Gtk/Reactive/Property.o )

src/Graphics/UI/Gtk/Reactive/Property.hs:49:1: warning: [-Wredundant-constraints]
    • Redundant constraint: Monad m
    • In the type signature for:
           reactiveSignalM :: (Monad m, MonadIO m) =>
                              self -> a -> Signal self (m a) -> ReactiveFieldRead IO ()

src/Graphics/UI/Gtk/Reactive/Property.hs:125:21: warning: [-Wname-shadowing]
    This binding for ‘set’ shadows the existing binding
      imported from ‘Graphics.UI.Gtk’ at src/Graphics/UI/Gtk/Reactive/Property.hs:7:1-22
      (and originally defined in ‘System.Glib.Attributes’)

src/Graphics/UI/Gtk/Reactive/Property.hs:125:25: warning: [-Wname-shadowing]
    This binding for ‘get’ shadows the existing binding
      imported from ‘Graphics.UI.Gtk’ at src/Graphics/UI/Gtk/Reactive/Property.hs:7:1-22
      (and originally defined in ‘System.Glib.Attributes’)
[ 2 of 19] Compiling Graphics.UI.Gtk.Reactive.Gtk2 ( src/Graphics/UI/Gtk/Reactive/Gtk2.hs, dist/dist-sandbox-1b52ba1b/build/Graphics/UI/Gtk/Reactive/Gtk2.o )

src/Graphics/UI/Gtk/Reactive/Gtk2.hs:8067:30: error:
    • Couldn't match type ‘model’ with ‘Maybe model0’
      ‘model’ is a rigid type variable bound by
        the type signature for:
          treeViewSetModelReactive :: forall self model.
                                      (TreeViewClass self, TreeModelClass model) =>
                                      self -> ReactiveFieldWrite IO model
        at src/Graphics/UI/Gtk/Reactive/Gtk2.hs:8066:29
      Expected type: ReactiveFieldWrite IO model
        Actual type: ReactiveFieldWrite IO (Maybe model0)
    • In the expression: wrapMW (treeViewSetModel w)
      In an equation for ‘treeViewSetModelReactive’:
          treeViewSetModelReactive w = wrapMW (treeViewSetModel w)
    • Relevant bindings include
        treeViewSetModelReactive :: self -> ReactiveFieldWrite IO model
          (bound at src/Graphics/UI/Gtk/Reactive/Gtk2.hs:8067:1)
cabal: Leaving directory '/tmp/cabal-tmp-32001/keera-hails-reactive-gtk-0.3'
Building keera-hails-mvc-environment-gtk-0.0.3.3...
Installed keera-hails-mvc-environment-gtk-0.0.3.3
Downloading keera-hails-mvc-solutions-gtk-0.0.3.4...
Configuring keera-hails-mvc-solutions-gtk-0.0.3.4...
Building keera-hails-mvc-solutions-gtk-0.0.3.4...
Installed keera-hails-mvc-solutions-gtk-0.0.3.4
cabal: Error: some packages failed to install:
keera-hails-reactive-gtk-0.3 failed during the building phase. The exception
was:
ExitFailure 1
titan-gui-0.0.1.0 depends on keera-hails-reactive-gtk-0.3 which failed to
install.

File name overlap hlint.hs/HLint.hs

The files in this repo contain an hlint.hs and an HLint.hs under tests/.

The difference between uppercase and lowercase names is frequent on linux, but not on mac or windows. This would make it very hard to use these projects on those architectures, and would confuse cabal and git.

These files should be named differently.

Remove Gtk stream widget library

The titan-gui package publishes a gtk stream library. This is going to confuse users, since the documentation produced won't match the module list on hackage, and they are not going to look for a testing package for a GTK widget.

This library should be removed and the package should contain the executable only. The example can still be compiled by passing -isrc/ as an argument to ghc.

Support bearriver

The latest release of bearriver includes enough of Yampa to make titan work.

It should be possible to give users a compilation flag to pick which library to use.

Failure to install due to modules not available on Mac

I'm trying to use this on Mac and it's failing because it's importing modules only available on Windows:

[25 of 35] Compiling Paths            ( src/Paths.hs, dist/dist-sandbox-eaed1e6b/build/titan-gui/titan-gui-tmp/Paths.o )

src/Paths.hs:8:1: error:
    Could not find module ‘System.Win32.Types’
    Perhaps you meant
      System.GIO.Types (needs flag -package-key gio-0.13.6.0)
      System.Glib.Types (from glib-0.13.7.0)
      System.Posix.Types (from base-4.12.0.0)
    Use -v to see a list of the files searched for.
  |
8 | import System.Win32.Types
  | ^^^^^^^^^^^^^^^^^^^^^^^^^

src/Paths.hs:9:1: error:
    Could not find module ‘System.Win32.Registry’
    Use -v to see a list of the files searched for.
  |
9 | import System.Win32.Registry
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Paths.hs:16:1: error:
    Could not load module ‘Control.Exception.Extra’
    It is a member of the hidden package ‘MissingK-0.0.1’.
    Perhaps you need to add ‘MissingK’ to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
   |
16 | import Control.Exception.Extra (anyway)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Review licenses and copyright notices

Everything produced at/for/by Keera has copyright Keera Studios. All software, talks, pages, papers, public or private, released or under development, need to have clear copyright and usage licenses.

Doc: Core module

Currently, the core module is a bit messy.

To facilitate contribution from external people, it would be great to clean this module a bit and document it.

Compilation in Mac

This currently requires gtk, which is harder to compile on Mac.

Perhaps it could also work with WX?

Rename package to match hackage package

We already have a haskell package with the name titan, but none of the packages in the repo match that name.

I propose renaming titan-gui to titan and make all other packages follow the same naming scheme as now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.