Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

(define default-flags
#hash([precision . ()]
[setup . (search)]
[setup . (search preprocess)]
[localize . ()]
[generate . (rr taylor proofs evaluate)]
[reduce . (regimes binary-search branch-expressions)]
Expand Down
8 changes: 6 additions & 2 deletions src/core/mainloop.rkt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#lang racket

(require "../utils/alternative.rkt"
(require "../config.rkt"
"../utils/alternative.rkt"
"../utils/common.rkt"
"../utils/timeline.rkt"
"../syntax/platform.rkt"
Expand Down Expand Up @@ -45,7 +46,10 @@

(define (run-improve! initial specification context pcontext)
(timeline-event! 'preprocess)
(define preprocessing (find-preprocessing specification context))
(define preprocessing
(if (flag-set? 'setup 'preprocess)
(find-preprocessing specification context)
'()))
(timeline-push! 'symmetry (map ~a preprocessing))
(define pcontext* (preprocess-pcontext context pcontext preprocessing))
(*pcontext* pcontext*)
Expand Down
8 changes: 8 additions & 0 deletions www/doc/2.3/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@ <h2>Search options</h2>
points</a>" error more often. Instead of turning this option off,
try adjusting the <kbd>--num-analysis</kbd> flag.</dd>

<dt><code>setup:preprocess</code></dt>
<dd>This option, on by default, uses identities of the input
expression (like even or symmetric expressions) to perform
rewriting more effectively. If turned off, Herbie will skip
preprocessing and work directly with the original expression. This
can be faster but may produce less accurate results for
expressions with exploitable symmetries.</dd>

<dt><code>generate:rr</code></dt>
<dd>This option, on by default, uses algebraic rewriting to
generate candidate programs. This is Herbie's primary method of
Expand Down