|
3 | 3 |
|
4 | 4 | Herbie automatically improves the error of floating point expressions. |
5 | 5 | Visit [our website](https://herbie.uwplse.org) for tutorials, |
6 | | -documentation, and an online demo. Herbie has semi-regular releases |
7 | | -once a year, maintains backwards compatibility, and uses standardized |
8 | | -formats. |
| 6 | +documentation, and an online demo. Herbie is a joint project of the |
| 7 | +Universities of [Washington](https://uwplse.org) and |
| 8 | +[Utah](https://cpu.cs.utah.edu). |
9 | 9 |
|
10 | 10 | ## Installing |
11 | 11 |
|
12 | | -For full details on installing Herbie, please see the |
13 | | -[documentation](https://herbie.uwplse.org/doc/latest/installing.html). |
14 | | - |
15 | | -### Installing from Source |
16 | | - |
17 | | -Installing from source requires Racket 8.0 or later, |
18 | | - Rust 1.60.0 or later, and supports Windows, macOS, and Linux |
19 | | - for various architectures. |
20 | | - |
21 | | -Install Racket from [here](https://download.racket-lang.org/). We recommend |
22 | | -the official Racket installer over Snap. If your configuration depends on Racket |
23 | | -being installed via Snap, you will need to ensure that Herbie and all packages are |
24 | | -located in your home directory or another allow-listed directory. |
25 | | -Install Rust from [here](https://www.rust-lang.org/tools/install). |
26 | | -In this directory, build Herbie with: |
| 12 | +We recommend installing Herbie from the Racket Package Archive. To do |
| 13 | +so, [install Racket](https://download.racket-lang.org/) and then run: |
27 | 14 |
|
28 | | - make install |
29 | | - |
30 | | -You can then run `racket -l herbie` to run Herbie, or run |
31 | | -`src/main.rkt` directly. |
| 15 | + raco pkg install --auto herbie |
32 | 16 |
|
33 | | -### Installing from the Racket package index |
| 17 | +You can then run `racket -l herbie` to run Herbie. Herbie supports |
| 18 | +Windows, Linux, and macOS on both x86 and AArch64. For full |
| 19 | +instructions, see the |
| 20 | +[documentation](https://herbie.uwplse.org/doc/latest/installing.html). |
34 | 21 |
|
35 | | -Use this method for installing Herbie if Rust is not on your system. |
36 | | -Installing via the Racket package index requires Racket 8.0 or later |
37 | | - and supports Windows, macOS, and Linux on x86-64 architectures. |
| 22 | +## Installing from Source |
38 | 23 |
|
39 | | -Install Racket from [here](https://download.racket-lang.org/). |
40 | | -Install Herbie with: |
| 24 | +You can install Herbie from source if you want to participate in |
| 25 | +Herbie development. This requires |
| 26 | +[Racket](https://download.racket-lang.org/) (8.0 or later) and |
| 27 | +[Rust](https://www.rust-lang.org/tools/install) (1.60.0 or later). |
| 28 | +On Linux, avoid the Snap installer for Racket. Then, download the |
| 29 | +this repository and run: |
41 | 30 |
|
42 | | - raco pkg install --auto herbie |
| 31 | + make install |
43 | 32 |
|
44 | 33 | You can then run `racket -l herbie` to run Herbie, or run |
45 | 34 | `src/main.rkt` directly. |
46 | 35 |
|
47 | 36 | ## Running Herbie |
48 | 37 |
|
49 | | -For full details on running Herbie, please see the |
50 | | -[tutorial](https://herbie.uwplse.org/doc/latest/using-web.html). |
| 38 | +You can run Herbie's web interface with: |
51 | 39 |
|
52 | | -Herbie's input format is the Scheme-like |
53 | | -[FPCore](https://fpbench.org/spec/fpcore-1.2.html); |
54 | | -for example `(1 + x) - x` is written |
| 40 | + $ racket -l herbie web |
55 | 41 |
|
56 | | - (FPCore (x) (- (+ 1 x) x)) |
| 42 | +For more information on running Herbie, please see the |
| 43 | +[tutorial](https://herbie.uwplse.org/doc/latest/using-web.html). |
57 | 44 |
|
58 | | -You can see more examples in `bench/`. To use Herbie, run `herbie |
59 | | -shell` and enter an FPCore expression: |
| 45 | +You can also use Herbie from the command line: |
60 | 46 |
|
61 | | - $ herbie shell |
| 47 | + $ racket -l herbie shell |
62 | 48 | Herbie 1.3 with seed 1866513483 |
63 | 49 | Find help on https://herbie.uwplse.org/, exit with Ctrl-D |
64 | 50 | herbie> (FPCore (x) (- (+ 1 x) x)) |
65 | | - (FPCore (x) ... 1) |
66 | | - |
67 | | -In this case Herbie's improved, more-accurate expression is the |
68 | | -constant `1`. |
69 | | - |
70 | | -Besides `shell`, Herbie also has a `web` interface, and can be run in |
71 | | -batch mode on files with the `improve` and `report` commands. Consult |
72 | | -the [documentation](https://herbie.uwplse.org/doc/latest/options.html). |
73 | | -for more. |
74 | | - |
75 | | -## Helping Out |
76 | | - |
77 | | -Herbie is developed as a joint project of the Universities of |
78 | | -[Washington](https://uwplse.org) and [Utah](https://cpu.cs.utah.edu). |
79 | | -We use [Github](https://github.com/herbie-fp/herbie) and |
80 | | -[Trello](https://trello.com/b/lh7b33Dr/herbie) to organize development |
81 | | -goals. |
82 | | - |
83 | | -## Running Tests |
84 | | - |
85 | | -Herbie has unit tests for basic functionality, though coverage is far |
86 | | -from complete. You can run the test suite by downloading the source |
87 | | -code, changing to the source code directory, and running: |
88 | | - |
89 | | - make install |
90 | | - raco test src/ |
91 | | - |
92 | | -Herbie also contains a large benchmark suite drawn from open source |
93 | | -projects, examples from users, and numerical analysis textbooks. This |
94 | | -suite is found in `bench/`. The full test can be run with |
95 | | - |
96 | | - herbie report bench/ report/ |
97 | | - |
98 | | -You may see warnings; these are expected. The output is HTML files in |
99 | | -`report/`. This full test can take a few hours to run. We often test |
100 | | -Herbie on basic but representative examples with: |
101 | | - |
102 | | - herbie report bench/hamming/ graphs/ |
| 51 | + (FPCore (x) |
| 52 | + ... |
| 53 | + 1) |
103 | 54 |
|
104 | | -This takes approximately 10 minutes. |
| 55 | +Here the input is the program `(1 + x) - x` and the output is `1`. The |
| 56 | +input format is [FPCore](https://fpbench.org/spec/fpcore-1.2.html); |
| 57 | +you can see more examples in `bench/`. |
105 | 58 |
|
106 | | -Historic and nightly test results are collected on |
107 | | -[nightly](https://nightly.cs.washington.edu/reports/herbie/). |
| 59 | +Besides `shell`, Herbie has batch the `improve` and `report` commands. |
| 60 | +The [documentation](https://herbie.uwplse.org/doc/latest/options.html) |
| 61 | +has more details. |
0 commit comments