Macro stepper: added final definite reference result
svn: r5746 original commit: 3facbd99abbd666d5b4a6c21c421a9aea870dd32
This commit is contained in:
parent
be8ce288fa
commit
63ee789eb9
|
@ -7,7 +7,8 @@
|
||||||
"deriv.ss"
|
"deriv.ss"
|
||||||
"reductions-engine.ss")
|
"reductions-engine.ss")
|
||||||
|
|
||||||
(provide reductions)
|
(provide reductions
|
||||||
|
reductions+definites)
|
||||||
|
|
||||||
;; Setup for reduction-engines
|
;; Setup for reduction-engines
|
||||||
|
|
||||||
|
@ -38,7 +39,14 @@
|
||||||
(current-frontier null))
|
(current-frontier null))
|
||||||
(add-frontier (list (lift/deriv-e1 d)))
|
(add-frontier (list (lift/deriv-e1 d)))
|
||||||
(reductions* d)))
|
(reductions* d)))
|
||||||
|
|
||||||
|
(define (reductions+definites d)
|
||||||
|
(parameterize ((current-definites null)
|
||||||
|
(current-frontier null))
|
||||||
|
(add-frontier (list (lift/deriv-e1 d)))
|
||||||
|
(let ([rs (reductions* d)])
|
||||||
|
(values rs (current-definites)))))
|
||||||
|
|
||||||
(define (reductions* d)
|
(define (reductions* d)
|
||||||
(match d
|
(match d
|
||||||
[(AnyQ prule (e1 e2 rs))
|
[(AnyQ prule (e1 e2 rs))
|
||||||
|
@ -46,7 +54,6 @@
|
||||||
(blaze-frontier e1)]
|
(blaze-frontier e1)]
|
||||||
[_ (void)])
|
[_ (void)])
|
||||||
(match/with-derivation d
|
(match/with-derivation d
|
||||||
|
|
||||||
;; Primitives
|
;; Primitives
|
||||||
[(struct p:variable (e1 e2 rs))
|
[(struct p:variable (e1 e2 rs))
|
||||||
(learn-definites (list e2))
|
(learn-definites (list e2))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user