Try π-calculus online: click here.
Try out these live examples:
This is an experimental interpreter for a variant of π-calculus. Right now we implement it as a term rewriting system with the following features (see formal rules):
-
We support this syntax
- Objects:
[x -> ^0.y, y -> [z -> ?]]
(here?
stands for free attribute markerΓΈ
) - Attributes:
[y -> ^0.x].y.z
- Single named application:
[x -> ?, @ -> ^0.x](x -> ^0.y)
(@
stand for π attribute)
- Objects:
-
By default, the interpreter will try to immediately parse and dataize an expression written in the editor.
-
If dataization fails, it will nevertheless show original term and its weak head normal form (after last reduction step).
-
At the moment, infinite recursion can hang the page and editor, β simply reload the page!
-
Clone this repository
git clone --recurse-submodules -j8 https://github.com/br4ch1st0chr0n3/try-phi cd try-phi
-
Install Node.js
-
Install codemirror dependencies
npm --prefix codemirror i
-
Install nix
-
Install VS Code
-
Open it in
try-phi
foldercode .
-
Open terminal in VS Code (
Ctrl+
`) -
Install stack
-
Build project. Also, use this command to rebuild the project
sh build.sh
-
Install
Haskell
extension. It will enable linter and documentation on hover- "Multi cradle ..." error troubleshooting
-
Open
app/Main.hs
and hover onto a function and check if docs appear -
Open
index.html
in browser, e.g.:firefox index.html
- In case nothing changes, clear browser cache
-
Optionally, the extension
stylish-hindent
for formatting the code -
If typechecking doesn't work, reload VS Code
-
You can see Haskell code's output at
localhost:8080/
afterstack run