Skip to content

Commit 6e0966e

Browse files
committed
Remove lower-sound rules, no longer needed
1 parent f613c0a commit 6e0966e

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/core/egg-herbie.rkt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,7 @@
528528
(lambda ()
529529
(define name (sym-append 'lower- impl))
530530
(define-values (vars spec-expr impl-expr) (impl->rule-parts impl))
531-
(list (rule name spec-expr impl-expr '(lowering))
532-
(rule (sym-append 'lower-sound- impl) (add-sound spec-expr) impl-expr '(lowering))))))))
531+
(list (rule name spec-expr impl-expr '(lowering))))))))
533532

534533
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
535534
;; Racket egraph

src/core/rules.rkt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
(provide *rules*
99
*sound-removal-rules*
10-
(struct-out rule)
11-
add-sound)
10+
(struct-out rule))
1211

1312
;; A rule represents "find-and-replacing" `input` by `output`. Both
1413
;; are patterns, meaning that symbols represent pattern variables.
@@ -25,13 +24,6 @@
2524
(define (*rules*)
2625
(filter rule-enabled? *all-rules*))
2726

28-
(define (add-sound expr)
29-
(match expr
30-
[(list (and (or '/ 'pow 'log) op) args ...)
31-
`(,(sym-append "sound-" op) ,@(map add-sound args) ,(gensym))]
32-
[(list op args ...) (cons op (map add-sound expr))]
33-
[_ expr]))
34-
3527
(define-syntax-rule (define-rule rname group input output)
3628
(set! *all-rules* (cons (rule 'rname 'input 'output '(group)) *all-rules*)))
3729

0 commit comments

Comments
 (0)