{"id":520,"date":"2013-06-22T18:59:27","date_gmt":"2013-06-22T23:59:27","guid":{"rendered":"http:\/\/haleyai.com\/wordpress\/?p=520"},"modified":"2018-07-14T17:19:33","modified_gmt":"2018-07-14T22:19:33","slug":"confessions-of-a-production-rule-vendor-part-1","status":"publish","type":"post","link":"http:\/\/haleyai.com\/wordpress\/2013\/06\/22\/confessions-of-a-production-rule-vendor-part-1\/","title":{"rendered":"Confessions of a production rule vendor (part 1)"},"content":{"rendered":"<p>If you are using one of the more popular rules engines, chances are you can blame me.\u00a0 I popularized the technology of forward-chaining production rules based on the Rete Algorithm.\u00a0 Others have certainly contributed; <a href=\"http:\/\/haleyai.com\/wordpress\/2008\/02\/20\/haley-art-syntax-lives-on-in-open-source-java-rules\/\">my path<\/a> is the one that led to open-source implementations and many commercial products, including those of IBM, Oracle, SAP, TIBCO, Red Hat, and too many others to mention (e.g., see <a href=\"http:\/\/haleyai.com\/wordpress\/2008\/02\/20\/haley-art-syntax-lives-on-in-open-source-java-rules\/\">this<\/a>).<\/p>\n<p>Today, I want to make clear that the future prospects for production rule technology are diminishing.\u00a0 My objective here is to explain why most rule-based technologies are no good and why some are much better.\u00a0 Although production rule technology is much better than most rule-based technologies, I hope to also make clear that in the age of IBM&#8217;s Watson, Google&#8217;s Brain, and the semantic web, production rule technology is inadequate.<\/p>\n<h3>They are not created equal.<\/h3>\n<p>Rules have become so pervasive in the software business that vendors of all types of software say they have them.\u00a0 Consider, for example, that even Microsoft Outlook has rules!<\/p>\n<p><!--more-->Unfortunately, people generally don&#8217;t appreciate the differences between different types of rules.\u00a0 This makes it an uphill battle for someone delivering more value than another who has the most rudimentary functionality.\u00a0 IBM&#8217;s Operational Decision Manager (formerly Ilog JRules) and Fair Isaac&#8217;s Blaze Advisor are excellent business rules management systems (BRMS) based on production rule technology.\u00a0 And yet, their sales reps have to deal repeatedly with prospective clients who think products from Microsoft or Progress are effective competitors.<\/p>\n<p>Since the nineties, most of the rule-based capabilities added to software of all types is nothing more than glorified if-then-else statements found in every major programming language.\u00a0 Even some self-described rule-based technology vendors offer little more from a technology perspective.\u00a0 For example, Bosch Innovation&#8217;s <a href=\"http:\/\/www.bosch-si.com\/technology\/business-rules-management-brm\/brm-komponents\/visual-rules-modeler.html\">Visual Modeler<\/a> looks like a visual programming language in which you draw if-then-else statements.\u00a0 Now visual programming may be a nice and useful capability, but the benefits of artificial intelligence technology hardly accrue from dressing up a procedural\u00a0 language!<\/p>\n<h3>Bells and Whistles<\/h3>\n<p>There have been some nifty innovations in user interfaces to make coding business logic easier.\u00a0 The most significant has been the development of less technical rule languages that look something like English.\u00a0 My former company led that charge but the products from IBM, Fair Isaac, and Oracle are very nice even if they still require an analyst to translate from English into a structured syntax or controlled natural language.<\/p>\n<p>Another significant metaphor was championed by Corticon, now owned by Progress.\u00a0 Their tabular metaphor cannot handle many of the rules that come up in practice, but for those willing to limit their focus and functionality to what does fit in the metaphor, it is very nice in several regards.\u00a0 So nice, in fact, that rather than sell against it, all the vendors, including my former company, introduced their own tabular metaphors.<\/p>\n<p>The march from technical rule syntax to increasingly natural language business rules increased the market for production rule technology dramatically beginning with Haley Systems&#8217; Authority circa 2000.\u00a0 The tabular metaphor was a flash in the pan by comparison.\u00a0 Neither advanced the underlying technology, however.\u00a0 In fact, as mentioned above, the tabular metaphor reduced its expressiveness and power.\u00a0 Nonetheless, the tabular metaphor allowed some people to begin using business rules technology who might not otherwise have adopted it as quickly.<\/p>\n<h3>Basic questions&#8230;<\/h3>\n<p>How many people understand that IBM, Fair Isaac, and Oracle are essentially equivalent in their rule technology?\u00a0 How many people understand that each of these is vastly superior in capability to Microsoft, Progress or Visual Rules?<\/p>\n<p>Even more importantly, how many people understand how weak each of IBM, Fair Isaac, Oracle, SAP, TIBCO, and Red Hat are in their ability to perform logical deduction?\u00a0\u00a0 And how many understand the ramifications of weak deductive capabilities?<\/p>\n<h3>Who needs deduction?<\/h3>\n<p>One of my early frustrations with production rule technology was its inability to perform deduction.\u00a0 A simple example may help you see this:<\/p>\n<ul>\n<li>A person&#8217;s parent&#8217;s sibling&#8217;s child is his or her cousin.<\/li>\n<li>A person&#8217;s parent&#8217;s other child is his or her sibling.<\/li>\n<\/ul>\n<p>In production rule technology you have to write each rule as an if-then.\u00a0 The Rete Algorithm efficiently computes when the then part of each rule is satisfied.\u00a0 This is the algorithm almost every vendor uses (e.g., IBM, Fair Isaac, Oracle, SAP, TIBCO, Red Hat, CLIPS, and JESS engines).\u00a0 In today&#8217;s market, avendor who does not use the core concepts of\u00a0 the Rete Algorithm is a weak competitor.\u00a0 <em>(That about to change, though.)<\/em><\/p>\n<p>So, in any of these tools, you have to write the rules like this:<\/p>\n<ul>\n<li>if a person has a parent that has a sibling that has a child then the child is a cousin of the person<\/li>\n<li>if a person has a parent that has a child that is different than the person then the child is a sibling of the person<\/li>\n<\/ul>\n<p>The problem with production rule technology is that it will land up <a href=\"http:\/\/www.semantic-web-journal.net\/content\/hybrid-reasoning-owl-rl\">materializing <\/a>every cousin relationship, which is geometric in the number of people!\u00a0 (It will also land up materializing every sibling relationship.)\u00a0 And the problem is actually twice as bad, since cousin and sibling are <a href=\"http:\/\/www.w3.org\/TR\/owl-ref\/#SymmetricProperty-def\">symmetric <\/a>relationships!<\/p>\n<p>Any logic programming system handles this problem easily.\u00a0 For example,<span style=\"text-decoration: underline;\"> Prolog will deduce only the cousin facts that are needed!<\/span> (There is too much more here to cover, but consider whether your system could answer whether the parents of\u00a0 a person with a cousin were only children.\u00a0 Watson might.\u00a0 Our new stuff does.)<\/p>\n<p>I solved this problem a long time ago by implementing <a href=\"http:\/\/haleyai.com\/wordpress\/2008\/03\/11\/goals-and-backward-chaining-using-the-rete-algorithm\/\">opportunistic backward chaining<\/a> for the Rete Algorithm, but none of IBM, Fair Isaac, TIBCO, etc. have similar functionality!<\/p>\n<p>Actually, to say I solved it is to go too far.\u00a0 Logic programming systems perform more complete <a href=\"http:\/\/en.wikipedia.org\/wiki\/Unification_%28computer_science%29#Unification_in_logic_programming\">deduction <\/a>because they use <a href=\"http:\/\/en.wikipedia.org\/wiki\/Unification_%28computer_science%29#Unification_in_logic_programming\">unification<\/a>.\u00a0 I used subsumption for practical reasons (e.g., optimization).<\/p>\n<p>Looking for a link back into my blog to support these points, I just found this unpublished draft from October, 2011:<\/p>\n<blockquote><p>Working in the shadow (or on the shoulders) of Allen Newell at CMU, we focused on <a title=\"The Knowledge Level\" href=\"http:\/\/www.aaai.org\/ojs\/index.php\/aimagazine\/article\/view\/99\">the knowledge level<\/a>.\u00a0  Unfortunately, technology got in the way.\u00a0 In those days, we were using  OPS5, a data-driven production system, much like the business rules  engines of today (most of which are based on derivatives of the Rete  Algorithm first introduced in OPS5).\u00a0 Such languages are incapable of  expressing knowledge as truth in even some of the most trivial cases.\u00a0  From a logical perspective, a production rule is a fairly pathetic  thing.\u00a0 Even the simplest of <a href=\"http:\/\/dtai.cs.kuleuven.be\/projects\/ALP\/\">logic programs<\/a> can represent truths and perform many deductions that cannot be captured even in many production rules.<\/p><\/blockquote>\n<p>For example, the if-then statements above are awkward derivatives of the prior statements of truth, aren&#8217;t they?\u00a0 More importantly, the behavior of the algorithms that implement production rule systems don&#8217;t treat the first and second pair of sentences as equivalent!  It&#8217;s worth pondering that.<\/p>\n<p><span style=\"text-decoration: underline;\">Run-time behavior in production rule systems is not logical!<\/span><\/p>\n<h3>So, why don&#8217;t BRMS use Prolog?<\/h3>\n<p>Now we&#8217;re getting somewhere.\u00a0 Well, I can tell you why I eschewed Prolog in the eighties&#8230;<\/p>\n<ol>\n<li>Performance of the Rete Algorithm is asymptotically independent of the number of rules (i.e., it scales well).<\/li>\n<li>The order of production rules has no effect on the nominal behavior or performance of the Rete Algorithm.\n<ul>\n<li>If rule order matters (as it does in any <a href=\"http:\/\/haleyai.com\/wordpress\/2013\/06\/22\/answers-to-common-questions-about-ai\/\">flow-chart-equivalent metaphor<\/a>) the cost of adding rules increases as the number of rules increase (i.e., it scales poorly).<\/li>\n<\/ul>\n<\/li>\n<li>The Rete Algorithm is perfectly comfortable with interpreting unknown as false.\n<ul>\n<li>For example, interpreting the lack of a record in a SQL database as indicating that something is not the case.<\/li>\n<li>This is called &#8220;negation under the closed-world assumption&#8221;, which is critical in practice and big trouble for Prolog.<\/li>\n<\/ul>\n<\/li>\n<li>Prolog can runaway in recursive sub-goaling until it &#8220;runs of the end of the stack&#8221; or until it exhausts physical memory with sub-goals or irrelevant answers.\n<ul>\n<li>This makes Prolog exceeding difficult to use and probably explains more than any other single reason why it is not more popular.<\/li>\n<\/ul>\n<\/li>\n<li>Prolog cannot deal with negation under the closed-world assumption logically.\n<ol>\n<li>Using Prolog&#8217;s cut operator is hardly a band-aid; it\u00a0 makes program behavior rely on the order or rules (i.e., it scales poorly; see above).<\/li>\n<li>Where negation matters (e.g., when using an SQL database), Prolog is more of a procedural language rather than a knowledge representation and reasoning system.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h3>So if Prolog doesn&#8217;t work, what will?<\/h3>\n<p>Things have changed.<\/p>\n<ul>\n<li>In the eighties, nineties, and until recently, there was no semantic web and there was little interest in question answering outside of Project Halo until Watson.<\/li>\n<li>More recently, there have been significant advances in logic programming that resolve each of the deficiencies mentioned above.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.google.com\/search?q=IBM+watson+prolog\">Try googling &#8220;IBM Watson Prolog&#8221;<\/a>!<\/p>\n<p><!--more--><em>[The following will be redrafted as part 2 is completed.]<\/em><\/p>\n<p>But even though things have changed, people in the know knew that business rule systems are logically weak.\u00a0 For example, OMG&#8217;s production rule representation (PRR) has gained no traction because it&#8217;s just plain boring.\u00a0 In W3C&#8217;s efforts to standardize rules for the semantic web, the business rule vendors carved off a production rule dialect of the rule interchange format (RIF-PRD) that they could handle while everyone working on the actual semantic web and with reasoning technology was consumed with a basic logic dialect (RIF-BLD) that would overcome the weaknesses of the earlier semantic web rule language (SWRL) and provide more logical functionality than can be expressed directly in the web ontology language (OWL).<\/p>\n<p>Bottom line here: those in the know know that production rules are pathetic things, logically speaking.<\/p>\n<h3>But how does all the noise from the semantic web relate to business logic in enterprises!?<\/h3>\n<p>For now, I&#8217;ll give you a symptom that is most troubling for practitioners and vendors in the industry&#8230;<\/p>\n<p>Why have standards failed repeatedly in the business industry?\u00a0 Why don&#8217;t any business rules vendors support OMG&#8217;s SBVR or RIF-BLD?<\/p>\n<p>The answer, quite simply, is that <strong>they can&#8217;t!<\/strong> And now it matters.<\/p>\n<h3>To be continued&#8230;<\/h3>\n<p>E.g., more on first-order logic (including SBVR and Common Logic) and concerning the well-founded semantics (WFS), tabling Prolog (SLG resolution), defeasiblity, non-monotonicity, and transforming first-order logic into defeasible non-monotonic logic programmings based on the WFS and using SLG (ie., Vulcan&#8217;s SILK and Coherent)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are using one of the more popular rules engines, chances are you can blame me.\u00a0 I popularized the technology of forward-chaining production rules based on the Rete Algorithm.\u00a0 Others have certainly contributed; my path is the one that led to open-source implementations and many commercial products, including those of IBM, Oracle, SAP, TIBCO, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/haleyai.com\/wordpress\/2013\/06\/22\/confessions-of-a-production-rule-vendor-part-1\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Confessions of a production rule vendor (part 1)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,21,22],"tags":[65,83,109,547,567,181,558,425,424,562,443,564,238,566,251,557,556,565,560,294,561,563,559],"class_list":["post-520","post","type-post","status-publish","format-standard","hentry","category-formal-logic","category-rules-engines","category-semantic-web","tag-brms","tag-clips","tag-drools","tag-ibm-watson","tag-ilog-jrules","tag-jess","tag-omg-prr","tag-oracle-business-rules","tag-oracle-policy-automation","tag-owl-rl","tag-production-rules","tag-progress-corticon","tag-prolog","tag-red-hat-jboss-business-rules","tag-rete-algorithm","tag-rif-bld","tag-rif-prd","tag-sap-netweaver-brm","tag-slg-resolution","tag-tibco-business-events","tag-unification-vs-subsumption","tag-vulcan-silk","tag-well-founded-semantics"],"_links":{"self":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/comments?post=520"}],"version-history":[{"count":32,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/520\/revisions"}],"predecessor-version":[{"id":1515,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/520\/revisions\/1515"}],"wp:attachment":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/media?parent=520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/categories?post=520"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/tags?post=520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}