From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Dale P. Smith" Newsgroups: gmane.lisp.guile.bugs,gmane.lisp.guile.devel Subject: r5rs pitfall test Date: Thu, 13 Feb 2003 15:05:07 -0500 Organization: Altus Technologies Corporation Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: <20030213150507.394a936c.dsmith@altustech.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1045166800 958 80.91.224.249 (13 Feb 2003 20:06:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 13 Feb 2003 20:06:40 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18jPcz-0000Ez-00 for ; Thu, 13 Feb 2003 21:06:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18jPeT-0008Mu-03 for guile-bugs@m.gmane.org; Thu, 13 Feb 2003 15:08:09 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18jPe1-0007VE-00 for bug-guile@gnu.org; Thu, 13 Feb 2003 15:07:41 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18jPds-0007Mk-00 for bug-guile@gnu.org; Thu, 13 Feb 2003 15:07:33 -0500 Original-Received: from borg.altus.cc ([208.40.56.34]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18jPco-0006cd-00; Thu, 13 Feb 2003 15:06:26 -0500 Original-Received: from sparky (dsmith@sparky [192.168.10.14]) by borg.altus.cc (8.10.2/8.10.2) with SMTP id h1DK6Pq15188; Thu, 13 Feb 2003 15:06:25 -0500 Original-To: bug-guile@gnu.org, guile-devel@gnu.org X-Mailer: Sylpheed version 0.8.9claws48 (GTK+ 1.2.10; i386-debian-linux-gnu) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.bugs:671 gmane.lisp.guile.devel:1933 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1933 I saw this on comp.lang.scheme and thought I'd try it out: http://sisc.sourceforge.net/r5rspitresults.html Guile fails tests 1.1 and 2.1 The results (after commenting out 2.1) are: Failure: 1.1, expected '0', got '1'. Passed: 1.2 Passed: 1.3 Passed: 3.1 Passed: 3.2 Passed: 4.1 Passed: 4.2 Passed: 5.1 Passed: 5.2 Passed: 5.3 Passed: 6.1 Passed: 7.1 Passed: 7.2 Passed: 7.3 Passed: 7.4 Map is not call/cc safe, but probably tail recursive and efficient. Including 2.1: Failure: 1.1, expected '0', got '1'. Passed: 1.2 Passed: 1.3 : In expression (0 (syntmp-c-42 1)): : Wrong type to apply: (0 (syntmp-c-42 1)) The code for 1.1 is: ;;Credits to Al Petrofsky (should-be 1.1 0 (let ((cont #f)) (letrec ((x (call-with-current-continuation (lambda (c) (set! cont c) 0))) (y (call-with-current-continuation (lambda (c) (set! cont c) 0)))) (if cont (let ((c cont)) (set! cont #f) (set! x 1) (set! y 1) (c 0)) (+ x y))))) The code for 2.1 is: ;;Credits to ???, (and a wink to Matthias Blume) (should-be 2.1 1 (call/cc (lambda (c) (0 (c 1))))) For 2.1, it appears that apply is checking to see if 0 is a procedure before it evaluates the arguments. I don't understand why 1.1 returns 1. These errors should probably be fixed and added to the regression tests. -Dale -- Dale P. Smith Senior Systems Consultant, | Treasurer, Altus Technologies Corporation | Cleveland Linux Users Group dsmith@altustech.com | http://cleveland.lug.net 440-746-9000 x239 | _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile