From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 282B7BB84 for ; Fri, 16 Jan 2009 17:14:45 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am0BANtAcEnRVdsVkWdsb2JhbACTRj4BAQEBCQkMBw+sE4EDjHABAwEDhW8 X-IronPort-AV: E=Sophos;i="4.37,277,1231110000"; d="scan'208";a="21598425" Received: from mail-ew0-f21.google.com ([209.85.219.21]) by mail3-smtp-sop.national.inria.fr with ESMTP; 16 Jan 2009 17:14:44 +0100 Received: by ewy14 with SMTP id 14so1923642ewy.3 for ; Fri, 16 Jan 2009 08:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:to:subject:from:cc :content-type:mime-version:references:content-transfer-encoding :message-id:in-reply-to:user-agent; bh=wpLKAPMKL8Ww4M7pwgaDOnMFPTXU0cq7YGhKhi83wKo=; b=Crxq0hajntq8mgnztrg7Ve/zbAVX2OWNJwG5vYhthkFupxvKF7to7FOK63QQsLltA6 ac0/NEP7OZFhyQH+TQWtm6FJmgEFTkl337m4hjYDm/ZSn1XR5NjVhA1cADop+93Q9OFr 5wYrjlUr5+MdJc09w84wRV7mL8al1xpG7d4aA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:to:subject:from:cc:content-type:mime-version:references :content-transfer-encoding:message-id:in-reply-to:user-agent; b=R9scWhxQ0bbTKqaudWz+aCzSz7R/WP5/3wB8sflpzalaTUsyHK09jJMb0x53wRieQt lvnvRFynd9oiKZ9Cq0QXOzkN2V1j6b/vDlT3Zt+HAQUrqBNh/ul4oJ/yUmEm70KuSq2h 6urjjySiLKv/6GNV53SGJ+FE9+BeGrrbCi4Z8= Received: by 10.210.126.18 with SMTP id y18mr3401526ebc.5.1232122483354; Fri, 16 Jan 2009 08:14:43 -0800 (PST) Received: from tomato.amer.corp.natinst.com (client-76-40.natinst.com [130.164.76.40]) by mx.google.com with ESMTPS id u14sm952588gvf.7.2009.01.16.08.14.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Jan 2009 08:14:42 -0800 (PST) Date: Fri, 16 Jan 2009 10:14:37 -0600 To: "Hugo Ferreira" Subject: Re: [Caml-list] Optimizing symbolic processing code From: "Peter Ilberg" Cc: caml-list@yquem.inria.fr Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <4970488C.9080104@inescporto.pt> <200901161341.53632.jon@ffconsultancy.com> <49709693.50201@inescporto.pt> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <49709693.50201@inescporto.pt> User-Agent: Opera Mail/10.00 (Win32) X-Spam: no; 0.00; inference:01 inference:01 compiler:01 2009:98 warren:98 sourceforge:01 prolog:01 prolog:01 wrote:01 abstract:01 symbolic:01 caml-list:01 implemented:02 algorithms:03 optimizing:03 On Friday 16 January 2009 08:42:52 Hugo Ferreira wrote: > I have implemented a simple Prolog like inference engine > to be used in machine learning algorithms (ILP). My first > basic test shows that inference is dismally slow (compared > to a Prolog compiler). > Consequently I am looking for information on optimizing the code. For implementing a Prolog-like language, you might want to look at this book on the Warren Abstract Machine: http://web.archive.org/web/20030213072337/http://www.vanx.org/archive/wam/wam.html You might also want to look at 'KANREN' and specifically 'miniKANREN': http://kanren.sourceforge.net/ miniKANREN is a simple declarative logic programming system embedded into Scheme. I don't know how efficient the system is, but it might give you further ideas on how to implement such a system. --- Peter