@@ -18,12 +18,11 @@ <h1>Using Herbie from the Browser</h1>
1818 make them more accurate. The expressions could come from
1919 anywhere—your source code, mathematical papers, or even the output
2020 of < a href ="../1.0/using-herbgrind.html "> Herbgrind</ a > , our tool for
21- finding inaccurate expressions in binaries. This tutorial runs
22- Herbie on the benchmark programs that Herbie ships with.
21+ finding inaccurate expressions in binaries.
2322 </ p >
2423
2524 < p > Herbie can be used from < a href ="using-cli.html "> the
26- command-line</ a > and from the browser. This page covers
25+ command-line</ a > or from the browser. This page covers
2726 using Herbie from the browser.</ p >
2827
2928
@@ -35,32 +34,31 @@ <h2 id="interactive">The Herbie web shell</h2>
3534 shell:
3635 </ p >
3736
38- < pre > herbie web</ pre >
37+ < pre class =" shell " > herbie web</ pre >
3938
40- < p >
41- After a few seconds, the web shell will rev up and direct your
42- browser to the main web shell page:
43- </ p >
39+ < p > After a few seconds, the web shell will rev up and direct your
40+ browser to Herbie:</ p >
4441
45- < pre > < strong > $</ strong > herbie web
42+ < pre class ="shell "> herbie web
43+ Herbie 1.3 with seed 841489305
44+ Find help on https://herbie.uwplse.org/, exit with Ctrl-C
4645Your Web application is running at http://localhost:8000/.
4746Stop this program at any time to terminate the Web Server.</ pre >
4847
4948 < figure >
5049 < img width ="100% " src ="web-main.png " />
51- < figcaption > The input page for the web shell.</ figcaption >
50+ < figcaption > The Herbie web shell.</ figcaption >
5251 </ figure >
5352
5453 < p >
55- As in the screenshot, you can type expressions, in standard
56- mathematical syntax (parsed
54+ You can type expressions in standard mathematical syntax (parsed
5755 by < a href ="http://mathjs.org "> Math.js</ a > ), and
5856 hit < kbd > Enter</ kbd > to have Herbie attempt to improve them.
5957 </ p >
6058
6159 < figure >
6260 < img width ="100% " src ="web-progress.png " />
63- < figcaption > Herbie improvement in progress .</ figcaption >
61+ < figcaption > Herbie shows improvement logs as it works .</ figcaption >
6462 </ figure >
6563
6664 < p >
@@ -78,14 +76,13 @@ <h2 id="interactive">The Herbie web shell</h2>
7876 < h2 id ="batch "> Batch report generation</ h2 >
7977
8078 < p > A < a href ="report.html "> report</ a > can also be generated directly
81- from a file of input expressions:</ p >
79+ from a file of < a href =" input.html " > input expressions</ a > :</ p >
8280
8381 < pre > < strong > $</ strong > herbie report input.fpcore output/
84- Starting Herbie on 3 problems...
85- Seed: 921081490
86- 1/3 [ 7108.190ms] (39→ 0) Expanding a square
87- 2/3 [ 1894.348ms] ( 0→ 0) Commute and associate
88- 3/3 [ 873.3889ms] (29→ 0) Cancel like terms</ pre >
82+ Starting Herbie on 3 problems (seed: 1201949741)...
83+ 1/3 [ 22.014s] 39→ 0 Expanding a square
84+ 2/3 [ 8.616s] 0→ 0 Commute and associate
85+ 3/3 [ 1.715s] 29→ 0 Cancel like terms</ pre >
8986
9087 < p >
9188 This command asks Herbie to generate a report from the input
@@ -95,7 +92,7 @@ <h2 id="batch">Batch report generation</h2>
9592 </ p >
9693
9794 < p >
98- Once generated, open the < code > output/report .html</ code > page
95+ Once generated, open the < code > output/results .html</ code > page
9996 in your favorite browser (but see < a href ="faq.html "> the FAQ</ a >
10097 if you're using Chrome). From that page, you can click on the rows
10198 in the table at the bottom to see the report for that expression.
@@ -104,37 +101,8 @@ <h2 id="batch">Batch report generation</h2>
104101 < p > Batch report generation is the most informative way to run Herbie
105102 on a large collection of inputs. Like the web shell, it can be
106103 customized through < a href ="options.html "> command-line options</ a > ,
107- including running Herbie in multiple threads at once.</ p >
108-
109-
110- < h2 > Input expressions</ h2 >
104+ including parallelizing Herbie with multiple threads.</ p >
111105
112- < p > An example input file can be found in < code > bench/tutorial.fpcore</ code > :</ p >
113-
114- < pre > (FPCore (x)
115- :name "Cancel like terms"
116- (- (+ 1 x) x))
117-
118- (FPCore (x)
119- :name "Expanding a square"
120- (- (* (+ x 1) (+ x 1)) 1))
121-
122- (FPCore (x y z)
123- :name "Commute and associate"
124- (- (+ (+ x y) z) (+ x (+ y z))))</ pre >
125-
126- < p > This code defines three floating point expressions that we want
127- to run Herbie on:</ p >
128-
129- < ul >
130- < li > < code > (1 + x) - x</ code > , titled “Cancel like terms”</ li >
131- < li > < code > (x + 1)² - 1</ code > , titled “Expanding a square”</ li >
132- < li > < code > ((x + y) + z) - (x + (y + z))</ code > , titled “Commute
133- and associate”</ li >
134- </ ul >
135-
136- < p > You can check out our < a href ="input.html "> input format
137- documentation</ a > for more about the Herbie input format. </ p >
138106
139107</ body >
140108</ html >
0 commit comments