libcspm: A library providing a parser, type checker and evaluator for CSPM.

[ bsd3, concurrency, library ] [ Propose Tags ] [ Report a vulnerability ]

This library provides a parser, type checker and evaluator for machine CSP. The parser is designed to be compatible with FDR2 and, in particular, deals with the ambiguity between greater than and end of sequence in the same way (as far as possible, see CSPM.Parser for more information). The typechecker is as liberal as it is possible to make a typechecker without making typechecking undecidable. Documentation on the type system is forthcoming. The evaluator is relatively experimental, but should be able to evaluate any CSPM expression that FDR2 can. The output of this phase (if a process is evaluated) is a tree of CSP (note not CSPM) operator applications which should be suitable for input into a refinement checker, or other process algebraic tool.

The main module of interest will be the CSPM module. This packages up most of the functionality of the library in an easy to use, relatively high level format. See CSPM for an example of how to use this module.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.1.1, 0.1.2, 0.2.0, 0.2.1, 1.0.0
Change log CHANGELOG.txt
Dependencies array (>=0.3), base (>=4 && <5), bytestring (>=0.9), containers (>=0.5), deepseq (>=1.3 && <1.4), directory (>=1.0), filepath (>=1.2), graph-wrapper (>=0.2), hashable (>=1.1 && <1.2), hashtables (>=1.0), mtl (>=2.0), pretty (>=1.1), text (>=0.11 && <0.12), value-supply (>=0.6) [details]
License BSD-3-Clause
Copyright (c) 2011 Thomas Gibson-Robinson
Author Thomas Gibson-Robinson <thomas.gibsonrobinson@gmail.com>
Maintainer Thomas Gibson-Robinson <thomas.gibsonrobinson@gmail.com>
Category Concurrency
Home page https://github.com/tomgr/libcspm
Bug tracker https://github.com/tomgr/libcspm/issues
Source repo head: git clone https://github.com/tomgr/libcspm
this: git clone https://github.com/tomgr/libcspm(tag release-1.0.0)
Uploaded by ThomasGibsonRobinson at 2013-10-11T09:14:14Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 4725 total (23 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]

Readme for libcspm-1.0.0

[back to package description]

libcspm

This library provides a FDR-compliant parser, type checker and (experimental) evaluator for machine CSP files.

There is also a program, cspmchecker, that makes use of this library to provide command line type checking.

Build Status

Installation

The simplest method is to install via Hackage. cabal install cspmchecker will install cspmchecker and its dependencies.

Otherwise, if you obtain a source distribution then the following commands will install libcspm.

cabal configure
cabal build
cabal install

To install cspmchecker, firstly install libcspm as above, then change directory to cspmchecker and run the following commands.

cabal configure
cabal build
cabal install

This should make cspmchecker available from your command line shell (if not check that the location cabal installs binaries to is on your $PATH).

Usage of cspmchecker

From a command line shell simply do cspmchecker file.csp to type check the files. Any error messages will be printed out. For example:

$ cspmchecker ucsexamples/chapter04/abp.csp 
Checking ucsexamples/chapter04/abp.csp.....
ucsexamples/chapter04/abp.csp:80:36-39:
    Couldn't match expected type Int.Int with actual type Int
    In the expression: bit
    In the expression: ack == bit
    In the expression: (ack == bit)

Documentation of the type system is forthcoming.

Usage of libcspm

See http://hackage.haskell.org/package/libcspm for documentation.

Testing

To test libcspm run the following commands.

cabal configure --enable-tests
cabal build
cabal test

Bug Reports

Please files bug reports at https://github.com/tomgr/libcspm/issues. Please provide a minimal example script that exhibits the error (if possible).