|
2 | 2 |
|
3 | 3 | Herbie synthesizes floating-point programs from real-number programs, |
4 | 4 | automatically handling simple numerical instabilities. |
| 5 | +Visit [our website](https://herbie.uwplse.org) for tutorials, |
| 6 | +documentation, and an online demo. |
5 | 7 |
|
6 | 8 | Current Status |
7 | 9 | -------------- |
8 | 10 |
|
9 | 11 | [](https://travis-ci.org/uwplse/herbie) |
10 | 12 |
|
11 | | -Herbie can improve the accuracy of many real-world programs, |
12 | | -and is used by scientists in many disciplines. |
13 | | -It has lead to two patches |
14 | | -(for complex [square roots](https://github.com/josdejong/mathjs/pull/208) |
15 | | -and [trigonometric functions](https://github.com/josdejong/mathjs/pull/247)), |
| 13 | +Herbie can improve the accuracy of many real-world programs, and is |
| 14 | +used by scientists in many disciplines. It has lead to two patches |
| 15 | +(for |
| 16 | +complex [square roots](https://github.com/josdejong/mathjs/pull/208) |
| 17 | +and |
| 18 | +[trigonometric functions](https://github.com/josdejong/mathjs/pull/247)), |
16 | 19 | in [math.js](http://mathjs.org/) an open-source mathematics library. |
| 20 | +Herbie has semi-regular releases twice a year, maintains backwards |
| 21 | +compatibility, and uses standardized formats. |
17 | 22 |
|
18 | 23 | Helping Out |
19 | 24 | ----------- |
20 | 25 |
|
21 | | -Herbie is organized on |
22 | | -[Github](https://github.com/uwplse/herbie) and |
23 | | -[Trello](https://trello.com/b/lh7b33Dr/herbie). |
24 | | -We also have a |
| 26 | +Herbie development is organized on our |
25 | 27 | [mailing list](https://mailman.cs.washington.edu/mailman/listinfo/herbie) |
26 | | -where we discuss Herbie's development and announce major improvements. |
27 | | -Our test results are on |
28 | | -[uwplse.org](http://herbie.uwplse.org/reports/). |
| 28 | +where we discuss work in progress and announce major improvements. |
| 29 | +[Email us ](mailto:[email protected]) to get involved! |
29 | 30 |
|
30 | | -Email [Zach Tatlock ](mailto:[email protected]) to get involved. |
31 | | -He’ll set you up with access to these tools. |
| 31 | +We use [Github](https://github.com/uwplse/herbie) |
| 32 | +and [Trello](https://trello.com/b/lh7b33Dr/herbie) to organize some |
| 33 | +development goals Our test results |
| 34 | +are [archived](http://herbie.uwplse.org/reports/). |
32 | 35 |
|
33 | 36 | Installing |
34 | 37 | ---------- |
35 | 38 |
|
36 | | -Herbie requires Racket 6.3 or later, and works best on Linux. |
| 39 | +For full details on installing Herbie, please see the |
| 40 | +[tutorial](http://herbie.uwplse.org/doc/latest/installing-herbie.html). |
37 | 41 |
|
38 | | -No installation is needed; just download the source code and you're |
39 | | -ready to go. |
| 42 | +Herbie requires Racket 6.3 or later, and supports Linux and OS X. |
| 43 | +Install it with: |
40 | 44 |
|
41 | | -Upgrading |
42 | | ---------- |
| 45 | + raco pkg install herbie |
43 | 46 |
|
44 | | -Herbie 1.0 differs from previous versions by having a new input |
45 | | -format. Herbie now uses the FPCore standard for floating point tools. |
46 | | -To convert existing files to the new format, use: |
47 | | - |
48 | | - racket infra/convert.rkt [file].rkt > [file].fpcore |
| 47 | +This will install a `herbie` binary to somewhere in your home |
| 48 | +directory. You can also run `src/herbie.rkt` directly instead of using |
| 49 | +the `herbie` command, for example if you'd like to download the source |
| 50 | +directly instead of through the package manager. |
49 | 51 |
|
50 | 52 | Running Herbie |
51 | 53 | -------------- |
52 | 54 |
|
53 | | -For details on how to run Herbie, please see the |
54 | | -[tutorial](http://herbie.uwplse.org/doc/latest/using-herbie.html). |
| 55 | +For full details on running Herbie, please see the |
| 56 | +[tutorial](http://herbie.uwplse.org/doc/latest/using-web.html). |
55 | 57 |
|
56 | | -The format of input files is a Scheme-based language; |
57 | | -you can find several examples in `bench/`. |
58 | | -For example, consider this simple cancellation test |
| 58 | +Herbie's input is a Scheme-based language called [FPCore](http://fpbench.org/spec/fpcore-1.0.html); |
| 59 | +you can several examples in `bench/`. |
| 60 | +For example, consider this simple expression: |
59 | 61 |
|
60 | 62 | (FPCore (x) |
61 | 63 | (- (+ 1 x) x)) |
62 | 64 |
|
63 | | -Run Herbie from the top-level directory of the repo: |
| 65 | +Run Herbie from the top-level directory of the repo, and enter the |
| 66 | +cancellation test: |
64 | 67 |
|
65 | | - $ racket src/herbie.rkt |
| 68 | + $ herbie shell |
66 | 69 | Seed: #(1046809171 2544984934 1871826185 4237421819 4093186437 162666889) |
| 70 | + herbie> (FPCore (x) (- (+ 1 x) x)) |
| 71 | + (FPCore (x) 1) |
67 | 72 |
|
68 | | -You can now enter the cancellation test: |
69 | | - |
70 | | - $ racket src/herbie.rkt |
71 | | - Seed: #(1046809171 2544984934 1871826185 4237421819 4093186437 162666889) |
72 | | - (FPCore (x) |
73 | | - (- (+ 1 x) x)) |
74 | | - [ 1673.401ms] (29→ 0) Cancel like terms |
75 | | - (λ (x) 1) |
76 | | - |
77 | | -The final is Herbie's improved, more-accurate expression, in this case |
| 73 | +The output is Herbie's improved, more-accurate expression, in this case |
78 | 74 | the constant `1`. |
79 | 75 |
|
80 | | -You can also save expressions to a file and run them with |
81 | | - |
82 | | - racket src/herbie.rkt [file] |
| 76 | +Besides the `shell`, Herbie also has a `web` interface, and can run on |
| 77 | +files of FPCore expressions with the `improve` and `report` commands. |
| 78 | +Consult the |
| 79 | +[documentation](http://herbie.uwplse.org/doc/latest/options.html). |
| 80 | +for more. |
83 | 81 |
|
84 | 82 | Running Tests |
85 | 83 | ------------- |
86 | 84 |
|
87 | | -Herbie draws its test suite from open source projects, examples emailed |
88 | | -to the developers, and from numerical analysis textbooks. Whenever |
89 | | -possible, we try to *extract all possible tests* from a source, to |
90 | | -avoid biasing our selection of tests. To run the tests, go to the |
91 | | -project root and run |
| 85 | +Herbie contains unit tests to test basic functionality, though |
| 86 | +coverage is far from complete. You can run the test suite with: |
92 | 87 |
|
93 | | - racket infra/travis.rkt [file] |
| 88 | + raco test src/ |
94 | 89 |
|
95 | | -Herbie's main tests are integration tests that test Herbie end-to-end. |
96 | | -They are the benchmarks that ship in the `bench/` directory. |
| 90 | +Herbie also contains a large integration suite from open source |
| 91 | +projects, examples emailed to the developers, and from numerical |
| 92 | +analysis textbooks. This suite is found in `bench/`. The full test can |
| 93 | +be run with |
97 | 94 |
|
98 | | -We often test Herbie on basic but representative examples with: |
| 95 | + herbie report bench/ |
99 | 96 |
|
100 | | - racket infra/travis.rkt bench/hamming/ |
| 97 | +This full test can take several hours to run. We often test Herbie on |
| 98 | +basic but representative examples with: |
101 | 99 |
|
102 | | -This takes approximately 15 minutes. |
103 | | -To run all of the default benchmarks, use: |
| 100 | + herbie report bench/hamming/ |
104 | 101 |
|
105 | | - racket infra/travis.rkt bench/ |
106 | | - |
107 | | -This can take a few hours or more. |
| 102 | +This takes approximately 15 minutes. |
108 | 103 |
|
109 | 104 | Test results are collected on |
110 | | -[uwplse.org](http://herbie.uwplse.org/reports/). |
111 | | -If you have an account on this server, you can publish your test |
112 | | -report with |
| 105 | +[uwplse.org](http://herbie.uwplse.org/reports/). If you have an |
| 106 | +account on this server, you can publish your test results with |
113 | 107 |
|
114 | 108 | make publish |
0 commit comments