diff --git a/README.md b/README.md index 06c2a5494..67bab4d5f 100644 --- a/README.md +++ b/README.md @@ -14,41 +14,52 @@ Contrary to traditional normalization in λ-calculus, we aim at rewriting rules help reduce certain metrics of expressions. In particular, we are interested in reducing attribute access (`t.a`) that amounts to _dynamic dispatch_. -## Usage +## Install -Clone this repo. +You can install the `normalizer-phi` executable globally via [stack](https://docs.haskellstack.org/en/stable). +Then, the `normalize-phi` executable will be available on `PATH`. + +### Install from the repository ```sh -git clone https://github.com/objectionary/normalizer.git +git clone https://github.com/objectionary/normalizer cd normalizer +export LANG=C.UTF-8 +stack install normalize-phi +normalize-phi --help +``` + +### Install from Hackage + +```sh +stack update +export LANG=C.UTF-8 +stack install --resolver lts-22.11 eo-phi-normalizer-0.1.0 ``` -### Install +### Uninstall -You can install the `normalizer-phi` executable globally via [stack](https://docs.haskellstack.org/en/stable/README/). -Then, the `normalize-phi` executable will be available on `PATH` and in `~/.local/bin/` on `Linux` and `macOS`. +Learn where `stack` installs programs. ```sh -# Commands -stack install -normalize-phi --help +stack path --programs ``` -Alternatively, run the executable via `stack` without global installation (see the following sections). +Learn how to uninstall a program. -### CLI +```sh +stack uninstall +``` -The `eo-phi-normalizer` package provides an executable `normalize-phi` that has a CLI. +## Use -Run the executable via `stack run`. +Learn about `normalize-phi` options. ```sh -# Commands -stack run normalize-phi -- --help -# Or -stack run -- --help +normalize-phi --help +``` -# Output: +```console Normalizer Usage: normalize-phi [-c|--chain] [--rules-yaml STRING] [-o|--output STRING] @@ -61,12 +72,13 @@ Available options: -o,--output STRING Output file path (defaults to stdout) ``` -#### expression +### Sample program -Save an expression into a file `test.phi` that will be used in subsequent commands. +Save a $\varphi$-calculus program to a file. +This program will be used in subsequent commands. ```sh -cat > test.phi < program.phi < test.phi <