Giter Site home page Giter Site logo

tomgr / libcspm Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 6.0 2.95 MB

The library FDR3 uses for parsing, type checking and evaluating machine CSP.

Home Page: https://www.cs.ox.ac.uk/projects/fdr/

License: Other

Haskell 97.84% Shell 0.16% Lex 2.00%

libcspm's People

Contributors

sashabu avatar tomgr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar

libcspm's Issues

literate CSPm

Any plans to add support for literate CSPm - so we can embed it in LaTeX docs?
Just like Haskell's lhs but using the \begin{code}...\end{code} form, rather than bird-tracks.
For CSP it could be
\begin{cspm}
. . .
\end{cspm}

Segmentation fault?

Whilst doing the assignment I found an issue with the use of the Set function over large sets. I'm running on OSX (Mavericks). Perhaps the Set function isn't intended to be used in this way?

Not sure whether this is down to libcspm or deeper.

Welcome to FDR 3.0.0 (521b22cd118f0a02ade8a95ac96b294148a7c122)
Type :help for help

Set({1..25})
panic: the program has detected an inconsistent internal state.
This means that there is a bug in libcspm, not a bug in your input script.
Please report this bug using the contact link at https://www.cs.ox.ac.uk/projects/fdr/.
In particular, please include the input script that caused this error and a brief
description of how to reproduce the problem. Please also include the following message:
stack overflow

Unable to run assertions on processes using built-in function RUN

Hi,

I've been trying to get to the bottom of an issue with a CSPM script for quite some time, where FDR just plainly crashes without providing any output. I then moved onto using cspmprofiler instead, cutting the script into simpler processes in the hope of getting something more amenable to analysis. I eventually got to the point where FDR accepts the script, but curiously cspmprofiler doesn't.

While I am currently not entirely sure of the cause for the crash, it looks like there is something missing in libcspm with regards to the built-in function RUN(). For example, I'm unable to run the assertion assert RUN(Events) :[deterministic] using the cspmprofiler binary included with FDR 4.2.0 (running on MacOS). This assertion runs ok in FDR version 4.2.0, though.

Similar assertions with RUN in some process P give similar results. The following is what I get as output when running through cspmprofiler:

Exploring RUN(Events) :[deterministic]
cspmexplorerprof: panic: the program has detected an inconsistent internal state.
    This means that there is a bug in libcspm, not a bug in your input script.

    Please report this bug using the contact link at https://www.cs.ox.ac.uk/projects/fdr/.
    In particular, please include the input script that caused this error and a brief
    description of how to reproduce the problem. Please also include the following message:

        /private/var/folders/85/ngg2dwf14sx4zbpx13_stt1m0000gn/T/tmp2Wjtow/src/dependencies/libcspm/src/CSPM/Evaluator/DeepSeq.hs:(49,5)-(67,47): Non-exhaustive patterns in function rnf

cspmprofiler: /var/folders/qd/_clksmkd2l32mw8g94d4djjr0000gp/T/cspmprofilerXXXXXXXX42476/cspmexplorerprof.cspm: openFile: does not exist (No such file or directory)

Defining my own RUN(E) as RUNME(E) = [] e : E @ e -> RUNME(E) works with cspmprofiler, though.

I shall be experimenting further with the script till I get a reproducible example in both cspmprofiler and FDR.

Thanks

cspmchecker fails on duplicate assertions

It seems that cspmchecker fails when a CSP file contains a duplicate assert check, even though fdr2 allows this. For instance, the following file:

$ cat checker_test.csp
assert STOP [T= STOP
assert STOP [T= STOP

Produces this output:

$ cspmchecker checker_test.csp
Checking checker_test.csp.....cspmchecker: user error (Pattern match failure in do expression at src/CSPM/TypeChecker/Compressor.hs:29:9-14)

This happens in the released version on Hackage, the WebCSPM app, and in the latest HEAD from github.

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.