<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The Short Circuited OR Considered Harmful</title>
	<atom:link href="http://pathfindersoftware.com/2006/07/the_short_circu/feed/" rel="self" type="application/rss+xml" />
	<link>http://pathfindersoftware.com/2006/07/the_short_circu/</link>
	<description>The Fastest Way to Launch Successful Software</description>
	<lastBuildDate>Thu, 19 Jan 2012 16:36:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Charles Young</title>
		<link>http://pathfindersoftware.com/2006/07/the_short_circu/#comment-5565</link>
		<dc:creator>Charles Young</dc:creator>
		<pubDate>Tue, 08 Aug 2006 14:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/2006/07/the_short_circu/#comment-5565</guid>
		<description>&lt;p&gt;Jess, CLIPS et. al. avoid short-circuiting, and split rules internally into separate rules.  There is a problem, though.   This approach will often result in duplicate productions being placed on the agenda.   This is because a particular set of tuples may match on both sides of the OR - i.e., the same set matches the two internal rules created from that OR.   This logically compromises the basic refraction strategy common to almost all production engines, and is therefore generally unwelcome.  A few engines have built-in de-duplication features within their agendas to get around this problem.   This is a fairly elegant solution.   It avoids short-circuiting, maintains all side-effects, but avoids breaking the engine&#039;s refraction strategy.&lt;/p&gt;

&lt;p&gt;De-duplication on the agenda appears to be fairly rare.  One reason is that engines that consume LISP-like ordered and unordered tuples generally have no very convincing way of determining duplicates.   Typically, there is no strong identity at the tuple level.  One engine I work with which does support de-dupe is only able to do so because it consumes facts as objects rather than relational tuples.   Event when used directly over relational data sets or a database connection, it represents individual data rows using objects.   It (in part) uses OO identity to identify duplicates.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Jess, CLIPS et. al. avoid short-circuiting, and split rules internally into separate rules.  There is a problem, though.   This approach will often result in duplicate productions being placed on the agenda.   This is because a particular set of tuples may match on both sides of the OR &#8211; i.e., the same set matches the two internal rules created from that OR.   This logically compromises the basic refraction strategy common to almost all production engines, and is therefore generally unwelcome.  A few engines have built-in de-duplication features within their agendas to get around this problem.   This is a fairly elegant solution.   It avoids short-circuiting, maintains all side-effects, but avoids breaking the engine&#8217;s refraction strategy.</p>
<p>De-duplication on the agenda appears to be fairly rare.  One reason is that engines that consume LISP-like ordered and unordered tuples generally have no very convincing way of determining duplicates.   Typically, there is no strong identity at the tuple level.  One engine I work with which does support de-dupe is only able to do so because it consumes facts as objects rather than relational tuples.   Event when used directly over relational data sets or a database connection, it represents individual data rows using objects.   It (in part) uses OO identity to identify duplicates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://pathfindersoftware.com/2006/07/the_short_circu/#comment-5564</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 02 Aug 2006 10:24:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/2006/07/the_short_circu/#comment-5564</guid>
		<description>&lt;p&gt;I think there are 2 types of or:&lt;/p&gt;

&lt;p&gt;Foo(a equals b) or Foo(a equals c)&lt;/p&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;p&gt;Foo(a equals b &#124; c)&lt;/p&gt;

&lt;p&gt;(excuse my pidgeon Jrules).&lt;/p&gt;

&lt;p&gt;In the former, 2 rules are &quot;generated&quot;, in the latter, it may be a short circuit.&lt;/p&gt;

&lt;p&gt;But I don&#039;t know from recent experience (no longer use Jrules), perhaps they have optimised it to make OR conditional elements short circuiting (I was thinking of it at one point, as it does confuse people).&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I think there are 2 types of or:</p>
<p>Foo(a equals b) or Foo(a equals c)</p>
<p>and</p>
<p>Foo(a equals b | c)</p>
<p>(excuse my pidgeon Jrules).</p>
<p>In the former, 2 rules are &#8220;generated&#8221;, in the latter, it may be a short circuit.</p>
<p>But I don&#8217;t know from recent experience (no longer use Jrules), perhaps they have optimised it to make OR conditional elements short circuiting (I was thinking of it at one point, as it does confuse people).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dietrich Kappe</title>
		<link>http://pathfindersoftware.com/2006/07/the_short_circu/#comment-5563</link>
		<dc:creator>Dietrich Kappe</dc:creator>
		<pubDate>Fri, 28 Jul 2006 21:11:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/2006/07/the_short_circu/#comment-5563</guid>
		<description>&lt;p&gt;JRules? I remember running into the short-circuited OR problem with JRules not too long ago and again in their .NET version. I can go back and confirm on the .NET version. Can someone test on a recent version of JRules?&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>JRules? I remember running into the short-circuited OR problem with JRules not too long ago and again in their .NET version. I can go back and confirm on the .NET version. Can someone test on a recent version of JRules?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Lin</title>
		<link>http://pathfindersoftware.com/2006/07/the_short_circu/#comment-5562</link>
		<dc:creator>Peter Lin</dc:creator>
		<pubDate>Fri, 28 Jul 2006 14:40:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/2006/07/the_short_circu/#comment-5562</guid>
		<description>&lt;p&gt;Just to add a bit more information to the discussion. I&#039;ve seen procedural rule engines which have the OR short circuit issue. To the best of my knowledge, CLIPS generates 2 rules for an OR disjunction. The same for JESS and Drools3. On the benefits of using rule generation, I like using rule generation because it makes testing and validation easier. If users are constrained to specific set of patterns, the ruleset validation can be more focused, which should make it easier. Within those patterns, an user can write all the rules they need, not all the rules they &quot;want&quot;. There are many rules an user might &quot;want&quot; to write, but many of them may be garbage or poorly organized.&lt;/p&gt;

&lt;p&gt;In my bias thinking, part of the job of the IDE is to help users write good rules by providing good guidelines. If a rule IDE uses a DSL based on the terms of that given domain, an user might not even realize all the rules they need to write are covered by a dozen templates.&lt;/p&gt;

&lt;p&gt;peter&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Just to add a bit more information to the discussion. I&#8217;ve seen procedural rule engines which have the OR short circuit issue. To the best of my knowledge, CLIPS generates 2 rules for an OR disjunction. The same for JESS and Drools3. On the benefits of using rule generation, I like using rule generation because it makes testing and validation easier. If users are constrained to specific set of patterns, the ruleset validation can be more focused, which should make it easier. Within those patterns, an user can write all the rules they need, not all the rules they &#8220;want&#8221;. There are many rules an user might &#8220;want&#8221; to write, but many of them may be garbage or poorly organized.</p>
<p>In my bias thinking, part of the job of the IDE is to help users write good rules by providing good guidelines. If a rule IDE uses a DSL based on the terms of that given domain, an user might not even realize all the rules they need to write are covered by a dozen templates.</p>
<p>peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Neale</title>
		<link>http://pathfindersoftware.com/2006/07/the_short_circu/#comment-5561</link>
		<dc:creator>Michael Neale</dc:creator>
		<pubDate>Fri, 28 Jul 2006 14:15:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/2006/07/the_short_circu/#comment-5561</guid>
		<description>&lt;p&gt;Engines like Jess, CLIPS, even JRules and Drools all have their OR conditional element as non shortcircuiting (both sides of the or are actually effectively split into 2 rules - so both consequences could fire). I always thought it was a side effect, but you have provided the best non-short circuiting explanation I have yet seen, thanks !&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Engines like Jess, CLIPS, even JRules and Drools all have their OR conditional element as non shortcircuiting (both sides of the or are actually effectively split into 2 rules &#8211; so both consequences could fire). I always thought it was a side effect, but you have provided the best non-short circuiting explanation I have yet seen, thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Chermside</title>
		<link>http://pathfindersoftware.com/2006/07/the_short_circu/#comment-5560</link>
		<dc:creator>Michael Chermside</dc:creator>
		<pubDate>Thu, 27 Jul 2006 13:40:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/2006/07/the_short_circu/#comment-5560</guid>
		<description>&lt;p&gt;A more elegent solution would be for the engine that builds your justification to be driven by the actual data your BRE is working from. These rules contain &quot;or&quot; clauses, and it&#039;s perfectly appropriate for the BRE to follow only one branch of the &quot;or&quot; (to short-circuit). But it is NOT appropriate for the justification engine to do so, and it need not.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>A more elegent solution would be for the engine that builds your justification to be driven by the actual data your BRE is working from. These rules contain &#8220;or&#8221; clauses, and it&#8217;s perfectly appropriate for the BRE to follow only one branch of the &#8220;or&#8221; (to short-circuit). But it is NOT appropriate for the justification engine to do so, and it need not.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (User agent is rejected)
Page Caching using memcached (User agent is rejected)

Served from: pathfindersoftware.com @ 2012-02-09 22:47:03 -->
