<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Wolfgang,<br>
    <br>
    Jess/clips have never differentiated between binding and constraint.
    has that been a major problem for Jess?<br>
    (cheese name ?cn )<br>
    (person likes ?cn )<br>
    <br>
    In previous DRL we did not allow unification like above. So you were
    forced to separate binding and constraint:<br>
    Cheese( cn : name )<br>
    Person( likes&nbsp; == cn )<br>
    <br>
    In most common cases I think the separation is preferred, users do
    not need to be concerned with the concepts of unification. What I
    have done is to allow unification in the manner than Jess and Clips
    does, this is important for prolog itself because the second pattern
    is not a filter. So == does not make sense, it is a unification.<br>
    <br>
    Mark<br>
    <br>
    <br>
    On 21/04/2011 07:27, Wolfgang Laun wrote:
    <blockquote
      cite="mid:BANLkTi=yJtifRNW51vQd3AB+qpbp8JRGtA@mail.gmail.com"
      type="cite">Designing syntax well is not easy. With extensions,
      one should strive for as much<br>
      conformity with the existing language, while trying to follow
      general principles.<br>
      <br>
      One might have discussed (for instance) the use of field names for
      referencing<br>
      the query relations, taken from their parameter definition. And
      then one could write,<br>
      as usual:<br>
      <br>
      &nbsp;&nbsp;&nbsp; ?editableThings(food: thing, location == loc )<br>
      <br>
      or<br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food: thing, loc: location )<br>
      <br>
      And the in/out is clear to all who know a little legacy DRL.<br>
      <br>
      And the ugly semicolon evaporates.<br>
      <br>
      And the maintainability/readability disadvantage of "positional"
      is gone.<br>
      <br>
      Cheers<br>
      -W<br>
      <br>
      <br>
      On 20 April 2011 22:52, Michael Anstis &lt;<a
        moz-do-not-send="true" href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>&gt;
      wrote:<br>
      &gt;<br>
      &gt; Simple yes, but consistent too should be a factor.<br>
      &gt;<br>
      &gt; Most questions we have to the user mailing list involve
      people writing DRL not using tooling.<br>
      &gt;<br>
      &gt; So DRL, IMO, has to be seen as the "tool" to author rules.
      Drop the proposed colon altogether or make it's use consistent.<br>
      &gt;<br>
      &gt; On 20 April 2011 17:42, Mark Proctor &lt;<a
        moz-do-not-send="true" href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;
      wrote:<br>
      &gt;&gt;<br>
      &gt;&gt; My personally opinion is to keep the language simple and
      instead have the tooling inject what ever is necessary as a
      visulation. Be it different colouring, hover over or graphic
      symbol. It keeps the language simple and actually achieve the
      desired result better.<br>
      &gt;&gt;<br>
      &gt;&gt; Mark<br>
      &gt;&gt; On 20/04/2011 14:00, Leonardo Gomes wrote:<br>
      &gt;&gt;<br>
      &gt;&gt; +1 for Michael's suggestion.<br>
      &gt;&gt;<br>
      &gt;&gt; It's a bit more verbose, but makes things clear.<br>
      &gt;&gt;<br>
      &gt;&gt; The semicolon here:<br>
      &gt;&gt; ?editableThings(food : ?, loc;)<br>
      &gt;&gt;<br>
      &gt;&gt; Is a typo, right? You actually meant:<br>
      &gt;&gt;<br>
      &gt;&gt; ?editableThings(food : ?, loc);<br>
      &gt;&gt;<br>
      &gt;&gt; - Leo.<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; On Wed, Apr 20, 2011 at 11:59 AM, Michael Anstis &lt;<a
        moz-do-not-send="true" href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>&gt;
      wrote:<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; Hmmmmm....<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; Personally, I don't like the use of ":" i isolation
      as it's what we currently use to bind variables and I feel
      "cheese:" as an output definition could just make people question
      whether they've missed something. Perhaps "cheese : ?" would be a
      viable alternative. This would be in keeping with (a) current
      variable declaration, (b) the use of "?" to identify a call to a
      query. Geoffrey's examples would then become:-<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; rule outputinput<br>
      &gt;&gt;&gt; when<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;Here( loc : location)<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food : ?, loc;)<br>
      &gt;&gt;&gt; then<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; System.out.println("Food " + food + " at location
      " + loc);<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Output:<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food crackers at location kitchen<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food apple at location kitchen<br>
      &gt;&gt;&gt; end<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; rule outputOutput<br>
      &gt;&gt;&gt; when<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food : ?, loc : ?;)<br>
      &gt;&gt;&gt; then<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; System.out.println("Food " + food + " at location
      " + loc);<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Output:<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food crackers at location kitchen<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food apple at location kitchen<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food chocolate at location living room<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food chips at location living room<br>
      &gt;&gt;&gt; end<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; rule typo<br>
      &gt;&gt;&gt; when<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;Here( looc : location)<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food : ?, loc : ?;)<br>
      &gt;&gt;&gt; then<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; System.out.println("Food " + food + " at location
      " + loc);<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Output:<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food crackers at location kitchen<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food apple at location kitchen<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food chocolate at location living room<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food chips at location living room<br>
      &gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // looc is just an unused bound variable<br>
      &gt;&gt;&gt; end<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; On 20 April 2011 10:16, Geoffrey De Smet &lt;<a
        moz-do-not-send="true" href="mailto:ge0ffrey.spam@gmail.com">ge0ffrey.spam@gmail.com</a>&gt;
      wrote:<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Mark and I were discussing backwards chaining<br>
      &gt;&gt;&gt;&gt; &nbsp; <a moz-do-not-send="true"
href="http://blog.athico.com/2011/04/backward-chaining-emerges-in-drools.html">http://blog.athico.com/2011/04/backward-chaining-emerges-in-drools.html</a><br>
      &gt;&gt;&gt;&gt; on IRC and we 'd like your opinion on a design
      issue.<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; The example<br>
      &gt;&gt;&gt;&gt; ========<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Let's say you have this data:<br>
      &gt;&gt;&gt;&gt; &nbsp; Location("crackers", "kitchen")<br>
      &gt;&gt;&gt;&gt; &nbsp; Location("apple", "kitchen")<br>
      &gt;&gt;&gt;&gt; &nbsp; Location("chocolate", "living room")<br>
      &gt;&gt;&gt;&gt; &nbsp; Location("chips", "living room")<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Let's say you have this code:<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; query editableThings( String thing, String
      location )<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;Location(thing, location)<br>
      &gt;&gt;&gt;&gt; end<br>
      &gt;&gt;&gt;&gt; And then these 3 rules:<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule outputinput<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;Here( loc : location)<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food, loc;)<br>
      &gt;&gt;&gt;&gt; then<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; System.out.println("Food " + f + " at
      location " + loc);<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Output:<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food crackers at location kitchen<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food apple at location kitchen<br>
      &gt;&gt;&gt;&gt; end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule outputOutput<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food, loc;)<br>
      &gt;&gt;&gt;&gt; then<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; System.out.println("Food " + f + " at
      location " + loc);<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Output:<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food crackers at location kitchen<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food apple at location kitchen<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food chocolate at location living room<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food chips at location living room<br>
      &gt;&gt;&gt;&gt; end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule typo<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;Here( looc : location)<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food, loc;)<br>
      &gt;&gt;&gt;&gt; then<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; System.out.println("Food " + f + " at
      location " + loc);<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Output:<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food crackers at location kitchen<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food apple at location kitchen<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food chocolate at location living room<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; // Food chips at location living room<br>
      &gt;&gt;&gt;&gt; end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; The discussion<br>
      &gt;&gt;&gt;&gt; =========<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Both rules have the same statement:<br>
      &gt;&gt;&gt;&gt; &nbsp; ?editableThings(food, loc;)<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; In the outputInput rule, "loc" is an input
      variable.<br>
      &gt;&gt;&gt;&gt; In the outputOutput rule, "loc" is an output
      variable.<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; I am wondering if we don't need a visual
      demarcation that a variable is an output variable,<br>
      &gt;&gt;&gt;&gt; to make it stand out of an input variable?<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Proposition 1: Suffix output variables with ":"<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule outputinput<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;Here( loc : location)<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food:, loc;)<br>
      &gt;&gt;&gt;&gt; then ... end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule outputOutput<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food:, loc:;)<br>
      &gt;&gt;&gt;&gt; then ... end<br>
      &gt;&gt;&gt;&gt; rule typo<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;Here( looc : location)<br>
      &gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;?editableThings(food:, loc;) // compiler
      error because input variable loc is not declared<br>
      &gt;&gt;&gt;&gt; then ... end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; --<br>
      &gt;&gt;&gt;&gt; With kind regards,<br>
      &gt;&gt;&gt;&gt; Geoffrey De Smet<br>
      &gt;&gt;&gt;&gt; _______________________________________________<br>
      &gt;&gt;&gt;&gt; rules-dev mailing list<br>
      &gt;&gt;&gt;&gt; <a moz-do-not-send="true"
        href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
      &gt;&gt;&gt;&gt; <a moz-do-not-send="true"
        href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; _______________________________________________<br>
      &gt;&gt;&gt; rules-dev mailing list<br>
      &gt;&gt;&gt; <a moz-do-not-send="true"
        href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
      &gt;&gt;&gt; <a moz-do-not-send="true"
        href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;&gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; _______________________________________________<br>
      &gt;&gt; rules-dev mailing list<br>
      &gt;&gt; <a moz-do-not-send="true"
        href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
      &gt;&gt; <a moz-do-not-send="true"
        href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; _______________________________________________<br>
      &gt;&gt; rules-dev mailing list<br>
      &gt;&gt; <a moz-do-not-send="true"
        href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
      &gt;&gt; <a moz-do-not-send="true"
        href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;&gt;<br>
      &gt;<br>
      &gt;<br>
      &gt; _______________________________________________<br>
      &gt; rules-dev mailing list<br>
      &gt; <a moz-do-not-send="true"
        href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
      &gt; <a moz-do-not-send="true"
        href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;<br>
      <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>