This command line tool helps you deal with π-calculus expressions, usually produced by the EO compiler.
First, install it (you should install Stack first):
stack update
stack install eo-phi-normalizer
Then, normalize a simple π-expression:
$ cat > foo.phi
{β¦ m β¦ β¦ x β¦ β¦ Ο β¦ β
β§.Ο.k, k β¦ β¦ Ξ β€ 42- β§ β§.x β§}
$ eo-phi-normalizer rewrite --chain --tex foo.phi
The output will contain a ready-to-use LaTeX document, where all rewritting steps are explained.
More detailed documentation is here.
By default, the rules of normalization of π-calculus are used. They are
defined in the rules.yaml file. You can use your own rules, with the
help of our custom YAML format, for example in forty-three.yml
:
title: "forty-three"
rules:
- name: forty-three
description: 'change 33 double to 42 double'
pattern: |
Ξ¦.org.eolang.bytes ( Ξ±0 β¦ β¦ Ξ β€ 40-40-80-00-00-00-00-00 β§ )
result: |
Ξ¦.org.eolang.bytes ( Ξ±0 β¦ β¦ Ξ β€ 40-45-00-00-00-00-00-00 β§ )
tests: [ ]
Then, use this file:
eo-phi-normalizer rewrite --rules=forty-three.yml foo.phi