Skip to content

Commit d3eb3d4

Browse files
committed
Rename the unsound flag in egglog to unsound?
1 parent 1deb9e1 commit d3eb3d4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/core/egglog-herbie.rkt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,15 @@
353353

354354
(egglog-program-add! `(ruleset lifting) curr-program)
355355

356-
;;; Adding function unsound before rules
356+
;;; Adding function unsound? before rules
357357

358-
;; unsound functions
359-
(egglog-program-add! `(function unsound () bool :merge (or old new)) curr-program)
358+
;; unsound detection function
359+
(egglog-program-add! `(function unsound? () bool :merge (or old new)) curr-program)
360360
(egglog-program-add! `(ruleset unsound-rule) curr-program)
361-
(egglog-program-add! `(set (unsound) false) curr-program)
361+
(egglog-program-add! `(set (unsound?) false) curr-program)
362362

363363
(egglog-program-add!
364-
`(rule ((= (Num c1) (Num c2)) (!= c1 c2)) ((set (unsound) true)) :ruleset unsound-rule)
364+
`(rule ((= (Num c1) (Num c2)) (!= c1 c2)) ((set (unsound?) true)) :ruleset unsound-rule)
365365
curr-program)
366366

367367
(for ([curr-expr const-fold])
@@ -825,8 +825,8 @@
825825
;; 1. Run (PUSH) to the save the above state of the egraph
826826
;; 2. Repeat rules based on their ruleset tag once
827827
;; 3. Run the unsound-rule function ruleset once
828-
;; 4. Extract the (unsound) function that returns a bool
829-
;; 5. If (unsound) function returns "true", we have unsoundless, so go to Step 10 for ROLLBACK
828+
;; 4. Extract the (unsound?) function that returns a bool
829+
;; 5. If (unsound?) function returns "true", we have unsoundless, so go to Step 10 for ROLLBACK
830830
;; 6. Run (print-size) to get nodes of the form "node_name : num_nodes" for all nodes in egraph
831831
;; 7. If the total number of nodes is more than node-limit, do NOT ROLLBACK and go to Step 11
832832
;; 8. Repeat rules based on the const-fold tag once and repeat Steps 3-7
@@ -853,7 +853,7 @@
853853
`(run-schedule (repeat 1 ,tag))
854854
'(print-size)
855855
'(run unsound-rule 1)
856-
'(extract (unsound))))
856+
'(extract (unsound?))))
857857

858858
;; Get egglog output
859859
(define-values (math-unsound? math-node-limit? math-total-nodes)
@@ -913,7 +913,7 @@
913913
`(run-schedule (repeat 1 const-fold))
914914
'(print-size)
915915
'(run unsound-rule 1)
916-
'(extract (unsound))))
916+
'(extract (unsound?))))
917917

918918
(define-values (const-unsound? const-node-limit? const-total-nodes)
919919
(get-egglog-output const-schedule

0 commit comments

Comments
 (0)