Code Monkey home page Code Monkey logo

asyncpi's Introduction

👋

asyncpi's People

Contributors

nickng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

vincentjzimmer

asyncpi's Issues

Type Inference fail

The following code results in a stack overflow:

proc, _ := asyncpi.Parse(strings.NewReader("(new a)a<a>"))
fmt.Println(asyncpi.GenerateGo(proc))

Because a type inference tries to infer the type of a by looking into the value being sent by channel a (which is itself), but the result should be a type error because the type system cannot handle recursive definition in this simple implementation.

Cannot parse input, that has output actions which are followed by any other action (e.g. z<a>.c<f> or z<a>.0)

My problem with your tool is, that it cannot parse input, that has output actions which are followed by any other action.

For example, it cannot parse something like this:

z<a>.c<f> | z(c).c<e>.P2 | a<z>.z(b).0

Outputs error:

Parse failed:
1:5 → z<a>.c<f> | z(c).c<e>.P2 | a<z>.z(b).0
          ↑

When I remove c action, parsing fails again here:

z<a> | z(c).c<e>.P2 | a<z>.z(b).0
Parse failed:
1:17 → z<a> | z(c).c<e>.P2 | a<z>.z(b).0
                       ↑

And after removal of P2, I still cannot parse, my pi calcul example contains yet another action after output action:

z<a> | z(c).c<e> | a<z>.z(b).0
Parse failed:
1:17 → z<a> | z(c).c<e> | a<z>.z(b).0
                              ↑

This error makes your tool unusable for me to reduce more complex pi calcul examples, as I showed above.
Hope you can fix it.

Also, just this is not a bug, just a suggestion to add to readme, that you have to type end of input character (ctrl+D on Linux), so it starts to parse input. This was not hard for me to figure out, but it might help some people who don't yet know how to type end of input...

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.