Peter,

I see there is some confusion here (also in your blog post at http://woolfel.blogspot.com/2006/11/sumatra-refactoring.html): the execution algorithm of JCHR is a *forward-chaining* LEAPS variant, not a backward-chaining one as you claim.

Maybe the confusion stems from the fact that CHR is originally designed to declare constraint solvers, which clearly requires search (backtracking). Note that this is not the same as backward chaining, but it is related. CHR however is inherently a forward-chaining paradigm. The reason CHR implementations in Prolog -- and in fact also those in other (C)LP languages like HAL, Mercury, ... -- are so well suited for declaring constraint solvers, is the fact that these CHR implementations seemingly integrate with the backward reasoning and backtracking capabilities of their host-language. My CHR implementation, at the moment, does not yet offer search (and is thus not yet particularly suited for constraint solving). There are at least three Java CHR implementations around that do offer search, but these systems are often far too inefficient to be useful. It is still somewhat in the pipeline to extend JCHR with backtracking/search if we find the time (or a master's student to do it for us ;-) ).

As for the reason my stripped HashMap didn't pay of (which it doesn't, I checked it again tonight), I do not know why. I guess JCHR and Drools simply use HashMap's differently.

CHeeRs,
Peter


Peter Lin schreef:

interesting stuff.  leaps backward chaining is powerful.

peter


On 11/6/06, *Peter Van Weert* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    http://www.cs.kuleuven.be/~petervw/JCHR/

    A small performance result you guys can relate to: I think manners128
    runs in .5 second (*). One important contributing factor to this result
    is undoubtedly that JCHR is compiled and executed using a Leaps-like
    algorithm, rather than a RETE-based one, but JCHR is highly optimized in
    several other ways as well.

    CHeeRs,
    Peter



    Footnote:
    (*) negation as absence -- necessary for manners -- is not yet a
    documented feature, but there is a partial implementation, enough to run
    manners

    Peter Lin schreef:
     > what's your rule engine?  i'm curious
     >
     > peter
     >
     > On 11/6/06, *Peter Van Weert* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
     > <mailto:[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>>> wrote:
     >
     >     Yup, I did the same. I stripped HashMap down to its bare
    essence. I
     >     looked at the new JBoss hash-map code and I think the general
    idea is
     >     the same. Didn't give much performance gains though in my
    case (didn't
     >     even include it in my release yet). That's why I thought it
    had to be a
     >     combination of other factors.
     >     Oh well, not to worry, my performance is already more then
    good enough.
     >     Will look for other ways of improving it even more.
     >
     >     Thanks for the replies!
     >
     >     -Peter
     >
     >



    ---------------------------------------------------------------------
    To unsubscribe from this list please visit:

        http://xircles.codehaus.org/manage_email




begin:vcard
fn:Peter Van Weert
n:Van Weert;Peter
org:K.U.Leuven;Computer Science
adr:room 01.08;;Celestijnenlaan 200A;Heverlee;;3001;Belgium
email;internet:[EMAIL PROTECTED]
title:DTAI (Declarative Languages and Artificial Intelligence)
x-mozilla-html:TRUE
url:http://www.cs.kuleuven.be/~petervw/
version:2.1
end:vcard


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to