This software consists of two executables: the Scenario Parser and the Scenario Reasoner.
The Reasoner is a fully stateless application: it does not save any state between requests. To avoid the (significant) overhead of parsing a UUDSL scenario upon each incoming request, the Reasoner operates on a binary representation of a scenario instead of its XML representation. This binary representation is application-specific and may change between releases. The Parser can be used to generate a binary representation of a scenario, after which the Reasoner can be used to navigate it.
For client-side use: any modern operating system.
For server-side use: a server stack that is capable of executing CGI executables.
For development: the Glasgow Haskell Compiler, version 7.10. We recommend the use of the Haskell Platform 7.10.3, available for Windows, Linux, and Mac OS X.
Ubuntu 16.04 has a
haskell-platformpackage. Although its version is 2014.2.0.0.debian2 (or similar), installing this package does install the right version of GHC and the related libraries.
After installing the prerequisites and cloning this repository, execute the following commands:
cabal sandbox init cabal install --dependencies-only cabal configure
After these commands, the build environment is set up. You can build the application using
cabal build. The build products will be placed in
Setting up the directory structure
It is recommended to set up the following directory structure (all of the items mentioned should become directories). If you have cloned this repository, create the structure in a location outside the repository. If you want to use the Scenario Reasoner in a server-side setup, make sure this location is under your web root and your web server knows how to execute CGI executables.
<root of the deployment structure> cgi/ bins/
Installing the executables
If you are using prebuilt executables, place them in the
If you are building the executables yourself, symlink or copy them to the
cgi directory as shown in the following subsections. If you decide to copy the executables, make sure you don't forget to repeat that process after rebuilding.
<deployment root>/cgi/ScenarioParser.exe -> <repository working directory>/dist/build/ScenarioParser/ScenarioParser.exe <deployment root>/cgi/ScenarioReasoner.cgi -> <repository working directory>/dist/build/ScenarioReasoner.cgi/ScenarioReasoner.cgi.exe
Note that under Windows, the executables will be named
ScenarioReasoner.cgi.exe. This is by design; if you copy them, rename only
ScenarioReasoner.cgi.exe to remove the trailing
.exe. Although symlinking is possible using recent versions of Windows, we have noticed certain Apache binaries cannot execute the symlinked files as CGI applications.
Other operating systems
<deployment root>/cgi/ScenarioParser -> <repository working directory>/dist/build/ScenarioParser/ScenarioParser <deployment root>/cgi/ScenarioReasoner.cgi -> <repository working directory>/dist/build/ScenarioReasoner.cgi/ScenarioReasoner.cgi
- For client-side use: please see the Client-side Reasoner Demo.
- For server-side use: send HTTP requests targeting the CGI executable on the server.
- For development: we recommend the Client-side Reasoner Demo.