IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Systems management  >  

CommonRules

A rule-based framework for developing rule-based applications with major emphasis on maximum separation of business logic and data, conflict handling, and interoperability of rules.


Date Posted: July 30, 1999
Overview Requirements DownloadFAQsForum Reviews



1. What is CLP?

CLP stands for "Courteous Logic Programs," an expressive extension of ordinary logic programs (in the sense of declarative knowledge representation, not just Prolog) that enables prioritized conflict handling and thus a more modular, natural style of specification/representation.
Back to top Back to top

2. What is the role of XML and CLP in Agent Communication Languages?

See "An Approach to using XML and a Rule-based Content Language with an Agent Communication Language" (May 28, 1999), by Benjamin N. Grosof and Yannis Labrou, in Proceedings of the IJCAI-99 Workshop on Agent Communication Languages (ACL-99), held in Stockholm, Sweden, August 1, 1999, in conjunction with the IJCAI-99 conference.
Back to top Back to top

3. What is a MUTEX?

Mutexes (mutual exclusion) allow conflict in rule set to be specified not only in terms of classical negation, but more generally as a set of pairwise mutual exclusion constraints. Please refer to CommonRules CLP rule format and the IBM CommonRules Web page for more information.
Back to top Back to top

4. Why do I get a "Class Not Found" error?

This message usually indicates that the class is not in the current directory or in your classpath. Check and verify your CLASSPATH environment variable. Please refer to the installation instructions for more information about setting the CLASSPATH environment variable.
Back to top Back to top

5. What is the "Cyclic Check Fails Exception"?

This message indicates that the input rule set is not predicate-acyclic. When a rule set is passed to the CLP Inference Engine, a Predicate Dependency Graph Analysis is performed to check for potential cyclic dependency loops in the rule set (to prevent recursion).
Back to top Back to top

6. What is the "Variable Binding Check" exception?

This message indicates that one or more rules in the input rule set contain variables in the head of the rule that do not appear in the body of the rule.
Back to top Back to top

7. What is FNEG (Negation As Failure)?

FNEG means negation as failure. FNEG p represents a weaker belief than CNEG p. Intuitively, FNEG p means the holder of the rule/fact does not believe/know that p is false.
Back to top Back to top

8. What is CNEG (Classical Negation)?

CNEG means classical negation. Intuitively, CNEG p means the holder of the rule/fact believes/knows that p is false.
Back to top Back to top

9. What does this version of CommonRules CLP Inference Engine support as built-ins, such as arithmetical operations?

This CommonRules version 1.0 does not support as built-ins arithmetical operations such as less-than-or-equal. It only supports as built-ins equals and notEquals. Basically, these are currently implemented simply as string equality/inequality.
Back to top Back to top

10. Do you have any more hints on using XSB and/or Smodels for inferencing?

To get courteous conflict handling, run the Transformer to create a transformed OLP before doing inferencing with that LP in XSB or Smodels. XSB and Smodels both can nicely handle complex cases of cyclic dependence through rules, and both implement the well-founded semantics for doing so. XSB: Remember and obey the case conventions discussed in Section 8.2 (CLP rule syntax) of the readme file. Avoid hyphens within XSB filenames. Remember that XSB needs ".P" as the file extension. Use the command "xsb -i" to invoke XSB in interactive (command-line) mode. To load an input rule-set file into XSB, enter " [orderingleadtime_transformed] . " where "orderingleadtime_transformed.P" is the filename. If XSB gives a lot of warning messages, don't worry. Then enter a query, such as "orderModificationNotice(X,Y) .". "tnot( p )" in XSB means "FNEG p" in CLPfile syntax, where "p" here is an atom. (Unless "p"'s predicate is a built-in, in which case use "not" instead of "tnot".) Enter a space, then a carriage-return to get the next successful bindings tuple for the query; iterate to get all the bindings tuples until XSB says "no" -- then you know it's given you all of them. If XSB apparently hangs, you may have forgotten the period "." required at the end of each XSB command/query. To exit XSB, enter " halt. " XSB needs range-restrictedness, similar to CLPEngine. Like CommonRules, XSB is perfectly content for a predicate name to be used with two or more different arities and does not issue a warning about that, so beware if you seem to mysteriously be missing conclusions. If dealing with cyclically-dependent rules, beware the following non-intuitive behavior of XSB: When a ground atom p has truth value Undefined in the well-founded semantics, the query "p." returns answer "true" AND query "tnot(p)." returns answer "true". Smodels: Use Version 1 of Smodels (not Version 2). Remember and obey the case conventions discussed in Section 8.2 (CLP rule syntax). We recommend that you select the option ( "-w" command switch) for the well-founded semantics. (For example, from the Smodels package's bin directory:) Use the command " parse < orderingleadtime_transformed.smodels | smodels -w > orderingleadtime_transformed.conclusions " to run Smodels inferencing on file "orderingleadtime_transformed.conclusions" and put out the results of inferencing in file "orderingleadtime_transformed.conclusions". The "positive part" in Smodels' output means the ground atoms that (are inferred to) have truth value "true"; the "negative part" in its output means the ground atoms that fail, that is, that in the well-founded semantics have truth value "false", that is, that are "FNEG" in CLPfile terminology. Ground atoms with Undefined truth value in the well-founded-semantics are neither in the "positive part" nor in the "negative part". It is somewhat hard for a human to read Smodels's output because it does not add a line break after each inferred ground atom. To "query" Smodels, do a string search in the Smodels output file. This is fairly good for finding expected conclusions, but not so good for noticing unexpected conclusions.
Back to top Back to top

11. Why do I see the "n_" prefix during rule tracing and in the transformer output, but not in the conclusions of the CLP Inferencing Engine?

The "n_" represents negation resulting from the ECN (Eliminate Classical Negation) transform that turns "CNEG p" into "n_p", where p is an input-CLP predicate. After doing courteous compilation and the hardest part of its processing, the CLP Inference Engine (near the end of its processing) inverse-transforms the conclusion sets to turn "n_p" back into "CNEG p". For more information, please refer to the paper "Compiling Prioritized Default Rules into Ordinary Logic Programs."
Back to top Back to top

12. Why do I get a "Parser Exception"?

The Parser Exception occurs when the CLP parser encounters syntax errors in the input CLP file or string.
Back to top Back to top

13. What is the history of CommonRules?

CommonRules was formerly called DIPLOMAT and is a follow-up to RAISE and Agent Building Environment implemented in C++. For deeper and broader understanding of CommonRules, please see the IBM Business Rules for E-Commerce Web site. This includes technical overview, talk slides, and technical papers.
Back to top Back to top

14. What will future versions of CommonRules be like?

Future versions of CommonRules will provide a RETE-based rule engine that supplements the current rule engine for certain classes of applications. It also will enable Web communication of executable business rules between enterprises using heterogeneous rule systems, and it will enable incremental specification of executable business rules by non-programmer business domain experts.
Back to top Back to top
Download now Download now

Related technologies

For platform(s):
All Java Platforms, Windows 95, Windows NT, Windows 98

For topics:
interoperability, business logic, semantics


Related resources

Press Articles

 

    About IBM Privacy Contact