[rules-dev] Perhaps an undocumented feature of Backward Chaining?

Mark Proctor mproctor at codehaus.org
Wed Jun 22 13:25:13 EDT 2011


On 22/06/2011 16:39, Wolfgang Laun wrote:
> This is related to the example in 2.1.2.8., Backward Chaining.
>
> Using the same rules and queries given there, the sequence of fact insertions
>
>      insert( new Here( "table" ) );
>      insert( new Edible( "peach" ) );
>      insert( new Location( "peach", "table" ) );
>
> results in nothing being seen and nothing being edible, whereas
>
>      insert( new Edible( "peach" ) );
>      insert( new Location( "peach", "table" ) );
>      insert( new Here( "table" ) );
>
> results in the obvious and expected result.
>
> There is no difference w.r.t. using '?' in front of query names.
Take a look at the tests here, see if you can add the logic that you 
think should works and doesn't and let us know. As far as I know 
insertion order should not matter:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/integrationtests/BackwardChainingTest.java

Mark
> -W
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>




More information about the rules-dev mailing list