#lang racket

(require redex)
(require (for-syntax syntax/parse))

(define-syntax (r-r/tick stx)
  (syntax-parse stx
    [(_ PL #:domain x ((~literal -->) lhs rhs) ...)
     #'(let ((clock 0))
         (reduction-relation
          PL
          #:domain x
          (--> lhs rhs (where _ ,(set! clock (+ 1 clock))))
          ...))]))

; -----------------------------------------------------------------------------
        
(define-language X
  (e ::= a b c))

(define go
  (r-r/tick
   X
   #:domain e
   (--> a b)
   (--> b c)
   (--> c a)))

(traces go (term a))

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to