File tree Expand file tree Collapse file tree 3 files changed +24
-18
lines changed Expand file tree Collapse file tree 3 files changed +24
-18
lines changed Original file line number Diff line number Diff line change 153153
154154 (cond
155155 [(> (- x.eps y.eps) 100 ) (silence y-ex)]
156- [(> (- y.eps x.eps) 100 ) (silence x-ex)])
156+ [(> (- y.eps x.eps) 100 ) (silence x-ex)]
157+ [else (void)])
157158
158159 (cond
159160 ; Condition number hallucination
198199
199200 (cond
200201 [(> (- x.eps y.eps) 100 ) (silence y-ex)]
201- [(> (- y.eps x.eps) 100 ) (silence x-ex)])
202+ [(> (- y.eps x.eps) 100 ) (silence x-ex)]
203+ [else (void)])
202204
203205 (cond
204206 ; Condition number hallucination:
530532
531533 (define explanations-table
532534 (for/list ([(key val) (in-dict expls->points)]
533- #:unless (zero? (length val) ))
535+ #:unless (empty? val))
534536 (define subexpr (car key))
535537 (define expl (cdr key))
536538 (define err-count (length val))
582584
583585 (define points->expl (make-hash))
584586
585- (for* ([( _ points) (in-dict expls->points)]
587+ (for* ([points (in-dict-values expls->points)]
586588 [pt (in-list points)])
587589 (hash-update! points->expl pt add1 0 ))
588590
Original file line number Diff line number Diff line change 9696 (define reprs (map (batch-reprs global-batch (*context*)) brfs))
9797
9898 (define runner
99- (if (flag-set? 'generate 'egglog )
100- (let-values ([(batch* brfs*) (batch-copy-only global-batch brfs)])
101- (make-egglog-runner batch* brfs* reprs schedule (*context*)))
102- (make-egraph global-batch brfs reprs schedule (*context*))))
99+ (cond
100+ [(flag-set? 'generate 'egglog )
101+ (define-values (batch* brfs*) (batch-copy-only global-batch brfs))
102+ (make-egglog-runner batch* brfs* reprs schedule (*context*))]
103+ [else (make-egraph global-batch brfs reprs schedule (*context*))]))
103104
104105 (define batchrefss
105106 (if (flag-set? 'generate 'egglog )
168169 (define reprs (map (batch-reprs global-batch (*context*)) brfs))
169170
170171 (define runner
171- (if (flag-set? 'generate 'egglog )
172- (let-values ([(batch* brfs*) (batch-copy-only global-batch brfs)])
173- (make-egglog-runner batch* brfs* reprs schedule (*context*)))
174- (make-egraph global-batch brfs reprs schedule (*context*))))
172+ (cond
173+ [(flag-set? 'generate 'egglog )
174+ (define-values (batch* brfs*) (batch-copy-only global-batch brfs))
175+ (make-egglog-runner batch* brfs* reprs schedule (*context*))]
176+ [else (make-egraph global-batch brfs reprs schedule (*context*))]))
175177
176178 (define batchrefss
177179 (if (flag-set? 'generate 'egglog )
Original file line number Diff line number Diff line change 3232 (listof any/c))]))
3333
3434(define (unified-contexts? ctxs)
35- (and ((non-empty-listof context?) ctxs)
36- (let ([ctx0 (car ctxs)])
37- (for/and ([ctx (in-list (cdr ctxs))])
38- (and (equal? (context-vars ctx0) (context-vars ctx))
39- (for/and ([var (in-list (context-vars ctx0))])
40- (equal? (context-lookup ctx0 var) (context-lookup ctx var))))))))
35+ (cond
36+ [((non-empty-listof context?) ctxs)
37+ (define ctx0 (car ctxs))
38+ (for/and ([ctx (in-list (cdr ctxs))])
39+ (and (equal? (context-vars ctx0) (context-vars ctx))
40+ (for/and ([var (in-list (context-vars ctx0))])
41+ (equal? (context-lookup ctx0 var) (context-lookup ctx var)))))]
42+ [else #f ]))
4143
4244(define (expr-size expr)
4345 (if (list? expr)
You can’t perform that action at this time.
0 commit comments