From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.devel Subject: Re: Adding Identities to Peval Date: Thu, 16 Feb 2012 07:00:50 +0100 Organization: Organization?!? Message-ID: <87ty2rb9m5.fsf@fencepost.gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1329372075 13433 80.91.229.3 (16 Feb 2012 06:01:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 16 Feb 2012 06:01:15 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Feb 16 07:01:13 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RxuP2-0007vK-VG for guile-devel@m.gmane.org; Thu, 16 Feb 2012 07:01:13 +0100 Original-Received: from localhost ([::1]:58627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxuP2-0004o9-Hb for guile-devel@m.gmane.org; Thu, 16 Feb 2012 01:01:12 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:39725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxuOz-0004kM-Bc for guile-devel@gnu.org; Thu, 16 Feb 2012 01:01:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxuOx-0008Hy-7x for guile-devel@gnu.org; Thu, 16 Feb 2012 01:01:08 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:46232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxuOw-0008Hg-KF for guile-devel@gnu.org; Thu, 16 Feb 2012 01:01:06 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RxuOu-0007pJ-95 for guile-devel@gnu.org; Thu, 16 Feb 2012 07:01:04 +0100 Original-Received: from p57b9e808.dip.t-dialin.net ([87.185.232.8]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Feb 2012 07:01:04 +0100 Original-Received: from dak by p57b9e808.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Feb 2012 07:01:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p57b9e808.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:bAQaJWfH3lYAYiUCMm6pKKDnWRM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13866 Archived-At: Noah Lavine writes: > Hello, > > I've been working on a patch to add a new sort of optimization to > peval, and I think it's almost ready. It's based on some of the ideas > in "Environment Analysis of Higher-Order Languages". > > The goal is to recognize when two quantities are equal even when we > don't know what they are. My working example has been this expression: > > (let* ((x (random)) > (y x)) > (eq? x y)) > > The patch attached to this message lets peval optimize that to > > (begin (random) #t) I have a hard time imagining this optimization to be useful for any code occuring in practice. Can you suggest an example that would make more sense than demonstrating that the optimization works? Is this supposed to help with automatically generated code like macros? -- David Kastrup