[rules-users] RE: rules-users Digest, Vol 29, Issue 45

Tom.E.Murphy at wellsfargo.com Tom.E.Murphy at wellsfargo.com
Fri Apr 17 17:36:36 EDT 2009


Paul -
Drools does not appear to have done well on those benchmarks, but the paper does not seem to mention which version of Drools was used. Did I miss that? Do you know which version it was?

Tom Murphy
Business Process Consultant
Wells Fargo HCFG - CORE Deal Decisioning Platform
800 S. Jordan Creek Parkway | West Des Moines, IA 50266
MAC: X2301-01B
Office: 515 324 4853 | Mobile: 941 320 8014
This message may contain confidential and/or privileged information.  If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein.  If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.  Thank you for your cooperation.

-----Original Message-----
From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of rules-users-request at lists.jboss.org
Sent: Friday, April 17, 2009 4:14 PM
To: rules-users at lists.jboss.org
Subject: rules-users Digest, Vol 29, Issue 45

Send rules-users mailing list submissions to
	rules-users at lists.jboss.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
	rules-users-request at lists.jboss.org

You can reach the person managing the list at
	rules-users-owner at lists.jboss.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."


Today's Topics:

   1. Re: Comparison info with other engines (Paul Fodor)
   2. RE: Comparison info with other engines (Ingold, Jonathan)
   3. Re: Negation semantics in Drools (Paul Fodor)


----------------------------------------------------------------------

Message: 1
Date: Fri, 17 Apr 2009 16:25:43 -0400
From: Paul Fodor <paul.i.fodor at gmail.com>
Subject: Re: [rules-users] Comparison info with other engines
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<7641b8a40904171325u26d00b89h8ac857ee4d093416 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

2009/4/17 Lindy hagan <lindyhagan at gmail.com>

> I'm wondering if anybody has comparison info with other engines. I just
> started to evaluate the products
> not sure which factors to consider. But I have these requirements:
>

It has to be a production rule system or any rule system (logic programming,
deductive databases, triples rule engines)? Check the benchmarks at:
http://rulebench.projects.semwebcentral.org
The benchmarks may have features which you might not need, and not all the
tested systems are free. Its main goal was to compare technologies, but it
might help you decide what system you want.
Regards,
Paul Fodor


> Must Be
> 1)Free or inexpensive product.
> 2)Rules change frequently, level of effort should be minimum.
> 3)Multiple join condition (A rule is determined ranging from 1 to 10 data
> fields.)
> 4)Should support approximately 75 rules.
>
> Better if we have.
> 1)Change Rules dynamically if possible.
> 2)Ease of use for Business users and developers.
> 3)Rule versioning.
>
> Will be happy if any one can send me rule comparison document or suggest me
> which tools can i use to evaluate.
>
> Thanks,
> Lindy
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090417/71cb02fb/attachment-0001.html

------------------------------

Message: 2
Date: Fri, 17 Apr 2009 16:44:03 -0400
From: "Ingold, Jonathan" <jonathan.ingold at jackson.com>
Subject: RE: [rules-users] Comparison info with other engines
To: "Rules Users List" <rules-users at lists.jboss.org>
Message-ID:
	<CCA474835B7BF64BB1CCE365D614A614064F6C at MAILWP10A.jacksonnational.com>
Content-Type: text/plain; charset="us-ascii"

The Guvnor feature of Drools makes things easier for Business users and
is great for version control!
 

| Jonathan Ingold |  jonathan.ingold at jackson.com  | PH: & FAX:
517-367-3827 | Business Rules Developer | Jackson National Life
Insurance |  http://www.jackson.com <http://www.jackson.com/>   | Please
note that all Jackson e-mail addresses have changed from @jnli.com to
@jackson.com.

 

________________________________

From: Lindy hagan [mailto:lindyhagan at gmail.com] 
Sent: Friday, April 17, 2009 2:28 PM
To: rules-users at lists.jboss.org
Subject: [rules-users] Comparison info with other engines


I'm wondering if anybody has comparison info with other engines. I just
started to evaluate the products
not sure which factors to consider. But I have these requirements:

Must Be
1)Free or inexpensive product.
2)Rules change frequently, level of effort should be minimum.
3)Multiple join condition (A rule is determined ranging from 1 to 10
data fields.)
4)Should support approximately 75 rules.

Better if we have.
1)Change Rules dynamically if possible.
2)Ease of use for Business users and developers.
3)Rule versioning.

Will be happy if any one can send me rule comparison document or suggest
me which tools can i use to evaluate.

Thanks,
Lindy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090417/fed0daac/attachment-0001.html

------------------------------

Message: 3
Date: Fri, 17 Apr 2009 17:13:43 -0400
From: Paul Fodor <paul.i.fodor at gmail.com>
Subject: Re: [rules-users] Negation semantics in Drools
To: Rules Users List <rules-users at lists.jboss.org>
Message-ID:
	<7641b8a40904171413t61221150qa067a1429576e321 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Edson,

The "insertLogical" doesn't work for non-stratified programs.
For instance, in the win-nowin example, if there is a move(1,2) and
a move(2,1), the order in which the two facts are inserted determines the
final model (please see hte tests below).

In logic programming, this example has two stable models: {win(1)} and
{win(2)}, or a well-founded model {} (win(1) and win(2) are both undefined).

Regards,
Paul.
*

package
* tests;

*

import
* tests.Test.Win;*

import
* tests.Test.Move;

*

rule
* "direct"

*when*

m : Move(x : first, y : second)

*not* Win(first == y)

*then*

*insertLogical*(*new* Win(m.getFirst()));*

end
*

move

1

2

move

2

1

Test:

reading rulefile: win.drl ...

reading datafile: win_upper3_drools.drools ...

loading cputime: 0.016

loading walltime: 0.016

calculating ...

computing cputime: 0.0

computing walltime: 0.0040

Derived facts in memory:move(1, 2).

win(2).

move(2, 1).

3

move

2

1

move

1

2

Test:

reading rulefile: win.drl ...

reading datafile: win_upper4_drools.drools ...

loading cputime: 0.016

loading walltime: 0.016

calculating ...

computing cputime: 0.0

computing walltime: 0.0040

Derived facts in memory:move(2, 1).

win(1).

move(1, 2).

3

2009/4/17 Edson Tirelli <tirelli at post.com>
>
>
>    I did not had time to analyze what jess is doing, but note that what is
important is the final answer. In your example, with Move(1,2) and
Move(2,3), the final answer must be Win(2), right? And that is what Drools
will answer, does not matter the order in which the data is entered into the
engine.
>
>    BUT, *very important*: the following construct in backward chaining:
>
> win(X):- move(X,Y), not(win(Y)).
>
>     Is better represented in forward chaining using *logicalInsert*
instead of a regular *insert*:
>
> rule "direct" % Drools
>
>     when
>         m : Move(x : first, y : second)
>         not Win(first == y)
>     then
>         logicalInsert(new Win(m.getFirst()));
> end
>
>     Since in your backward chaining rule, only one win() predicate
instantiation will remain true.
>
>     So, even with differences in the reasoning algorithm, the answer is
correct.
>
>     Please explain further if I am missing anything.
>
>     Edson
>
>
> 2009/4/17 Paul Fodor <paul.i.fodor at gmail.com>
>>
>> Hi Edson, Greg,
>> I don't think the rule is written wrong. This is how the win-nowin
program is written in logic programming: X wins if there is a move from X to
some Y and Y doesn't win:
>>
>> win(X):- move(X,Y), not(win(Y)).
>>
>> rule "direct" % Drools
>>
>>     when
>>         m : Move(x : first, y : second)
>>         not Win(first == y)
>>     then
>>  insert(new Win(m.getFirst()));
>> end
>>
>> I think that it's interesting that, in Jess (another production rule
system), the stratified model is always computed right, no matter what was
the order of the facts in the database. If you want to take a look, please
see the equivalent program in Jess for win-nowin that I attached. Just run
it with:
>> jess test.clp
>>
>> win_upper1_jess.jess
>>
>> (move (cur 1) (next 2))
>> (move (cur 1) (next 3))
>> (move (cur 2) (next 4))
>> (move (cur 2) (next 5))
>> ...
>>
>> win_upper2_jess.jess
>>
>> (move (cur 2) (next 4))
>> (move (cur 2) (next 5))
>> (move (cur 1) (next 2))
>> (move (cur 1) (next 3))
>> ...
>>
>> test.clp:
>>
>> (deftemplate move (slot cur) (slot next))
>> (deftemplate win (slot val))
>>
>> (defrule find_win
>>      (move (cur ?cur) (next ?next))
>>      (not (win (val ?next)))
>>      =>
>>      (assert (win (val ?cur)))
>> )
>>
>> (defquery query-win
>>       (win (val ?val))
>> )
>> (open "win_result.txt" output a)
>> (printout output  ./win_upper1_jess.jess crlf)
>> (reset)
>> (load-facts "./win_upper1_jess.jess")
>> (bind ?tmx (call java.lang.management.ManagementFactory getThreadMXBean))
>> (deffunction cputime () (return (* (?tmx getCurrentThreadCpuTime) 1E-9)))
>> (bind ?starttime_wall (time))
>> (bind ?starttime_cpu (cputime))
>> (run)
>> (bind ?query_result (run-query* query-win))
>> (bind ?count 0)
>> (while (?query_result next)
>>     (++ ?count)
>> )
>> (printout output "solutions: " ?count crlf)
>> (bind ?endtime_cpu (cputime))
>> (bind ?endtime_wall (time))
>> (bind ?walltime (- ?endtime_wall ?starttime_wall))
>> (bind ?cputime (- ?endtime_cpu ?starttime_cpu))
>> (printout output "computing cputime: " ?cputime crlf)
>> (printout output "computing walltime: " ?walltime crlf)
>> (close output)
>>
>> Regards,
>> Paul Fodor.
>>
>> 2009/4/16 Edson Tirelli <tirelli at post.com>
>>>
>>>    Ha, thanks a lot Greg. I need new glasses... he is actually comparing
with the parameter "second", but when creating the win fact, using the
parameter "first".
>>>
>>> not Win(first == m.second)
>>>   insert(new Win(m.first));
>>>
>>>    Yes, in this case the engine is working exactly as it should.
>>>
>>>    Anyway, I added the (fixed) test case to the codebase, just in case.
:)
>>>
>>>    Thanks,
>>>        Edson
>>>
>>> 2009/4/16 Greg Barton <greg_barton at yahoo.com>
>>>>
>>>> You don't have to worry.  The engine is acting as it should.
>>>>
>>>> The rule Paul had was this, a bit simplified for clarity:
>>>>
>>>> rule "direct"
>>>> when
>>>>    m : Move()
>>>>    not Win(first == m.second)
>>>> then
>>>>        insert(new Win(m.first));
>>>> end
>>>>
>>>> If the insertion order is [Move(1,2), Move(2,3)] then the rule matches
first on Move(2,3) and Win(2) is inserted.  No other rule fires because now
Move(1,2) and Win(2) match up, removing the instantiation with Move(1,2)
from the agenda.
>>>>
>>>> If the insertion order is [Move(2,3), Move(1,2)] then the order is
this:
>>>>
>>>> matched Move(1,2) insert Win(1)
>>>> matched Move(2,3) insert Win(2)
>>>>
>>>> The insertion of Win(1) in the first firing does NOT prevent the
instantiation with Move(2,3) from then firing.
>>>>
>>>> So it's all good. :)  Sample code and output attached.
>>>>
>>>> --- On Thu, 4/16/09, Greg Barton <greg_barton at yahoo.com> wrote:
>>>>
>>>> > From: Greg Barton <greg_barton at yahoo.com>
>>>> > Subject: Re: [rules-users] Negation semantics in Drools
>>>> > To: "Rules Users List" <rules-users at lists.jboss.org>
>>>> > Date: Thursday, April 16, 2009, 8:50 PM
>>>> > It is on the latest snapshot release,
>>>> > 5.0.0.20090417.005612-483
>>>> >
>>>> > --- On Thu, 4/16/09, Edson Tirelli <tirelli at post.com>
>>>> > wrote:
>>>> >
>>>> > >     We need to investigate if that is still happening
>>>> > in
>>>> > > latest trunk.
>>>> >
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > rules-users mailing list
>>>> > rules-users at lists.jboss.org
>>>> > https://lists.jboss.org/mailman/listinfo/rules-users
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> rules-users mailing list
>>>> rules-users at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>
>>>
>>>
>>>
>>> --
>>>  Edson Tirelli
>>>  JBoss Drools Core Development
>>>  JBoss, a division of Red Hat @ www.jboss.com
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
>
> --
>  Edson Tirelli
>  JBoss Drools Core Development
>  JBoss, a division of Red Hat @ www.jboss.com
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090417/8e648ff0/attachment.html

------------------------------

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


End of rules-users Digest, Vol 29, Issue 45
*******************************************




More information about the rules-users mailing list