/iTRSsVisualised

Visualise infinite reductions up to length ω

Primary LanguageHaskellGNU Affero General Public License v3.0AGPL-3.0

Introduction
------------

The code in this directory provides a primitive program for visualization of
infinite reductions of length at most omega and is developed by Jeroen Ketema.

The Haskell code has been tested with version 7.4.1 of the Glasgow Haskell
Compiler (GHC). To obtain GHC, it is best to install the Haskell Platform:

  http://hackage.haskell.org/platform/

Installation
------------

The sources should be put in a subdirectory of the code from:

  https://github.com/jeroenk/iTRSsImplemented.git

Next, the program can be compiled with:

  ./Setup.lhs configure
  ./Setup.lhs build

Depending on the installation location of the dependencies (see below) --user
may have to be passed to configure.

After compilation a copy of the program can be found in the source directory.

Dependencies
------------

The program has a number dependencies (where the version numbers are the
versions tested with):

* plugins 1.5.3.0
* bitmap-opengl 0.0.0.1
* stb-image 0.2.1
* FTGL 1.333

All dependencies can be obtained through Hackage:

  http://hackage.haskell.org/

Usage
-----

To experiment with the program try either

  visualization ExampleReduction

or

  visualization ExampleReduction2

Remark that the colors of nodes are chosen randomly depending of the function
symbol of a node. Moreover, the root node of the contracted redex is always
colored red.

New reductions can be defined by implementing a module that exports a function
"cReduction" of type "DynamicReduction". Note that this currently requires
access to the source code (no package is installed for DynamicReduction).

The program accepts the following keyboard and mouse inputs:

'+'                : zoom in
'-'                : zoom out
right cursor key   : move right
left cursor key    : move left
'r'                : reset the display

left mouse button  : select zoom area
right mouse button : change background color

Possible Extensions
-------------------

* Zooming by means of the mouse scroll wheel (this would require freeglut)
* Dialog for selecting reductions (this would require a substantial rewrite
  using either GTK+ or wxWidgets)
* Support different (or better) color schemes
* The definition of a DSL to ease the specification of reductions