Code Monkey home page Code Monkey logo

libcspm's Introduction

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).

libcspm's People

Contributors

tomgr avatar sashabu avatar

Watchers

James Cloos avatar John Zhang avatar  avatar

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.