Suppresses overridden rules in the names reported for a reduction relation
This commit is contained in:
parent
394fab0d86
commit
56a548c517
|
@ -1,4 +1,4 @@
|
|||
#lang scheme/base
|
||||
#lang racket
|
||||
|
||||
(require "matcher.ss")
|
||||
|
||||
|
@ -95,8 +95,9 @@
|
|||
make-procs/check-domain)])
|
||||
(make-reduction-relation lang
|
||||
all-make-procs
|
||||
(remove-duplicates
|
||||
(append rule-names
|
||||
(reduction-relation-rule-names orig-reduction-relation))
|
||||
(reduction-relation-rule-names orig-reduction-relation)))
|
||||
lws ;; only keep new lws for typesetting
|
||||
(map (λ (make-proc) (make-proc lang)) all-make-procs)))]
|
||||
[else
|
||||
|
|
|
@ -1279,10 +1279,21 @@
|
|||
(define r2
|
||||
(extend-reduction-relation r1 l2))
|
||||
|
||||
;; test that the domain is re-interpreted for the extended reduction-relation
|
||||
;; test that the domain is re-interpreted wrt the new language
|
||||
(test (apply-reduction-relation r2 3)
|
||||
'(3)))
|
||||
|
||||
(let ()
|
||||
(define-language L)
|
||||
(define R
|
||||
(reduction-relation L (--> 1 1 "a")))
|
||||
(define S
|
||||
(extend-reduction-relation R L (--> 2 2 "a")))
|
||||
|
||||
;; test that overridden rules do not appear (twice)
|
||||
(test (reduction-relation->rule-names S)
|
||||
'(a)))
|
||||
|
||||
(let ()
|
||||
(define-language l1
|
||||
(D 0 1 2))
|
||||
|
|
Loading…
Reference in New Issue
Block a user