-
-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
If, in the premise of a modeless judgment rule, there is a recursive call to the modeless judgment where a metafunction is used, the judgment fails to hold on valid derivations. This does not seem to be the case for judgments with modes.
Below is a small test case demonstrating the issue.
#lang racket
(require redex)
(define-language testL
(e ::= a (box e)))
(define-metafunction testL
unbox : e -> e
[(unbox (box e)) e])
(define-judgment-form testL
#:contract (test1 e e)
#:mode (test1 I I)
[---------- "r1"
(test1 e e)]
[(where (box _) e_1)
(test1 (unbox e_1) e_2)
--------------- "r2"
(test1 e_1 e_2)])
(test-judgment-holds (test1 (box a) a)) ;; should be #t
;(build-derivations (test1 (box a) a))
;; should output (derivation '(test1 (box a) a) "r2" (list (derivation '(test1 a a) "r1" '())))
(define-judgment-form testL
#:contract (test2 e e)
[---------- "r1"
(test2 e e)]
[(where (box _) e_1)
(test2 (unbox e_1) e_2)
--------------- "r2"
(test2 e_1 e_2)])
(test-judgment-holds test2 (derivation '(test2 (box a) a) "r2" (list (derivation '(test2 a a) "r1" '())))) ;; should be #t, is #f
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels