[racket] racklog bug?

From: Niitsuma Hirotaka (hirotaka.niitsuma at gmail.com)
Date: Thu Oct 6 03:57:51 EDT 2011

plz note to case
(%which (X Y T)	(%derive-type (list '+ X Y ) T )); => ((X . z) (Y . y)
(T . pls)) ;;why ? bug?
----------------------------------
#lang scheme
(require racklog)


(define %derive-type
  (%let ( X Y T)
	(%rel ( ) [( (list '+ X Y  ) 'pls) ]
)))

(%which (T)	(%derive-type '(+ z y ) T )) ;=> ((T . pls))
(%which (X Y T)	(%derive-type (list '+ X Y ) T )); => ((X . z) (Y . y)
(T . pls)) ;;why ? bug?


(define %derive-type2

   (%rel (X Y T )	[( (list '+ X Y  ) 'pls) ]
))

(%which (T)	(%derive-type2 '(+ z y ) T ));=> ((T . pls))
(%which (X Y T)	(%derive-type2 (list '+ X Y ) T ));=>((X . _) (Y . _)
(T . pls)) ;; its OK


Posted on the users mailing list.