Skip to content

Commit a065483

Browse files
committed
label dump-egglog outputs
1 parent 235c62d commit a065483

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
@@ -103,7 +103,7 @@
103103

104104
(define batchrefss
105105
(if (flag-set? 'generate 'egglog)
106-
(run-egglog-multi-extractor runner global-batch)
106+
(run-egglog-multi-extractor runner global-batch 'taylor)
107107
(egraph-best runner global-batch)))
108108

109109
; apply changelists
@@ -175,7 +175,7 @@
175175

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

181181
; apply changelists

0 commit comments

Comments
 (0)