<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 18/04/2011 17:08, Wolfgang Laun wrote:
    <blockquote
      cite="mid:BANLkTinkQaKqNmymbJYTqW6+etui4ywFYA@mail.gmail.com"
      type="cite">This doesn't seem to be quite correct.<br>
      <ul>
        <li>There's a fact "location" and another one "Location" - are
          they the same?</li>
      </ul>
    </blockquote>
    that misses something, it was just a sample of queries. I had a
    location query that maps to the Location fact.<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "query location( String thing, String location ) \n" +<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&nbsp;&nbsp;
    org.drools.integrationtests.BackwardChainingTest.Location( thing :
    thing, location : location ) \n"+<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "end\n" +&nbsp; <br>
    <br>
    That shouldn't be needed after the changes sotty jsut did to allow
    positional of Fact patterns too.<br>
    <blockquote
      cite="mid:BANLkTinkQaKqNmymbJYTqW6+etui4ywFYA@mail.gmail.com"
      type="cite">
      <ul>
        <li>Query "look" is defined; query "look2" is referenced.</li>
      </ul>
    </blockquote>
    I already updated the blog.<br>
    <blockquote
      cite="mid:BANLkTinkQaKqNmymbJYTqW6+etui4ywFYA@mail.gmail.com"
      type="cite">
      <ul>
        <li>How is the fact L/location defined?</li>
      </ul>
    </blockquote>
    There is a single knowlege store, that hasn't changed. it's&nbsp; no
    different to the way that standard querries work.<br>
    <br>
    Mark<br>
    <blockquote
      cite="mid:BANLkTinkQaKqNmymbJYTqW6+etui4ywFYA@mail.gmail.com"
      type="cite">Regards<br>
      Wolfgang<br>
      <br>
      <br>
      <br>
      <br>
      <div class="gmail_quote">On 18 April 2011 16:57, Mark Proctor <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="border-left: 1px solid
          rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
          1ex;">Here is a more friendly example based around "Adventures
          in Proglog"'s<br>
          "Nani Search". This is just a sampling of queries and rules,
          which it<br>
          uses to provide an adventure like game environment. The "?"
          means to<br>
          pull results, rather than the normal reactive nature of
          patterns.<br>
          <a moz-do-not-send="true"
            href="http://www.amzi.com/AdventureInProlog/"
            target="_blank">http://www.amzi.com/AdventureInProlog/</a><br>
          <br>
          query niceFood( String thing, String location )<br>
          &nbsp; &nbsp; location(thing, location) and<br>
          &nbsp; &nbsp; edible(thing)<br>
          end<br>
          <br>
          query connect( String x, String y )<br>
          &nbsp; &nbsp; door(x, y;)<br>
          &nbsp; &nbsp; or<br>
          &nbsp; &nbsp; door(y, x;)<br>
          end<br>
          <br>
          query look(String place, List things, List exits)<br>
          &nbsp; &nbsp; things : List() from accumulate( Location(thing, place;) ,<br>
          <br>
          collectList( thing ) )<br>
          &nbsp; &nbsp; food : List() from accumulate( ?niceFood(thing, place;) ,<br>
          &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
          collectList(<br>
          thing ) )<br>
          &nbsp; &nbsp; exits : List() from accumulate( ?connect(place, exit;) ,<br>
          &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
          &nbsp;collectList(<br>
          [place, exit] ) )<br>
          end<br>
          <br>
          rule reactiveLook when<br>
          &nbsp; &nbsp; Here( place : location)<br>
          &nbsp; &nbsp; ?look2(place, things, exits)<br>
          then &nbsp; &nbsp; &nbsp; System.out.println( " &nbsp;You are in the " + place );<br>
          &nbsp; &nbsp; System.out.println( " &nbsp;You can see " + things );<br>
          &nbsp; &nbsp; System.out.println( " &nbsp; &nbsp; You can eat" + eat );<br>
          &nbsp; &nbsp; System.out.println( " &nbsp; &nbsp; You can go to " + exits );<br>
          end<br>
          <br>
          -----Output----<br>
          &nbsp; You are in the kitchen<br>
          &nbsp; &nbsp; &nbsp;You can see [crackers, broccoli, apple]<br>
          &nbsp; &nbsp; &nbsp;You can eat[crackers, apple]<br>
          &nbsp; &nbsp; &nbsp;You can go to [[kitchen, dining room], [kitchen, cellar]]<br>
          <br>
          _______________________________________________<br>
          rules-dev mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
          <a moz-do-not-send="true"
            href="https://lists.jboss.org/mailman/listinfo/rules-dev"
            target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
        </blockquote>
      </div>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>