👋
nickng / asyncpi Goto Github PK
View Code? Open in Web Editor NEWAn implementation of asynchronous π-calculus in Go
License: Apache License 2.0
An implementation of asynchronous π-calculus in Go
License: Apache License 2.0
👋
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.
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...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.