Skip to content

Commit 5cd0f16

Browse files
authored
Merge pull request #1410 from herbie-fp/egglog-dump
label dump-egglog outputs
2 parents 8d12a79 + a065483 commit 5cd0f16

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/core/egglog-herbie.rkt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
(egglog-runner batch brfs reprs schedule ctx))
9494

9595
;; Runs egglog using an egglog runner by extracting multiple variants
96-
(define (run-egglog-multi-extractor runner output-batch) ; multi expression extraction
96+
(define (run-egglog-multi-extractor runner output-batch [label #f]) ; multi expression extraction
9797
(define insert-batch (egglog-runner-batch runner))
9898
(define insert-brfs (egglog-runner-brfs runner))
9999
(define curr-program (make-egglog-program))
@@ -107,8 +107,9 @@
107107
(make-directory dump-dir))
108108
(define name
109109
(for/first ([i (in-naturals)]
110-
#:unless (file-exists? (build-path dump-dir (format "~a.egg" i))))
111-
(build-path dump-dir (format "~a.egg" i))))
110+
#:unless
111+
(file-exists? (build-path dump-dir (format "~a~a.egg" (if label label "") i))))
112+
(build-path dump-dir (format "~a~a.egg" (if label label "") i))))
112113

113114
(open-output-file name #:exists 'replace)]
114115

src/core/patch.rkt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105

106106
(define batchrefss
107107
(if (flag-set? 'generate 'egglog)
108-
(run-egglog-multi-extractor runner global-batch)
108+
(run-egglog-multi-extractor runner global-batch 'taylor)
109109
(egraph-best runner global-batch)))
110110

111111
; apply changelists
@@ -178,7 +178,7 @@
178178

179179
(define batchrefss
180180
(if (flag-set? 'generate 'egglog)
181-
(run-egglog-multi-extractor runner global-batch)
181+
(run-egglog-multi-extractor runner global-batch 'rewrite)
182182
(egraph-variations runner global-batch)))
183183

184184
; apply changelists

0 commit comments

Comments
 (0)