Tuesday, August 5, 2008

Real Rule of the Week: Defining a Subconcept | RealRules Blogzine

HomeRealRules BlogzineRecognize real rules! * About us * Login * Sponsors: * BTU * REWERSE-I1 * Related Sites * Events * BRCommunity * RuleMLLatest Entries * JBoss Rules Improves its Syntax * Why a rule markup language needs a rich syntax (looking in the RIF Core...) * Which one is the normative RIF Syntax? * First Working Draft of the Rule Interchange Format (RIF) was Published * The OCL Portal * When to Use Rules in Your Application * JBoss ReteOO Algorithm * How JBoss RETE works * Some Facts about the JBoss Rule Engine * [SBVR] Does SBVR help us to design rule-based applications? * What are JBoss Rules? * Real Rule of the Week: Constraining a Concept * [SBVR] What is a business rule? * Why Your Engine Should Support Programmatic Rule Generation * Real Rule of the Week: Using Negation * Where do business rules come from? * Real Rule of the Week: Defining a Subconcept * On the use of Priorities and Control facts in rule-based programming * Informed but not enforced * What are the characteristics of rulesets?Home » Real RulesReal Rule of the Week: Defining a SubconceptIn our first of a series of real rule examples we consider the case where a subconcept is defined by means of a derivation rule with the help of a condition on the properties of the superconcept.vocabularyThe rule states: A woman is a female whose age is greater than 21. The underlying vocabulary of this rule, depicted in the diagram to the left, includes the concepts person, female and woman, where woman is a subconcept of female, which is in turn a subconcept of person, and the person properties name and age.ruleThe defined concept, woman, is in the conclusion of the rule, while the condition consists of two parts: a classification of something as a female and an attached requirement that the age of that female must be greater than 21. This gives us a rule with a classification conclusion for infering that x is a woman, and with a classification condition, requiring that x is a female, and an inequality condition, requiring that the age of x is greater than 21. The rule can be visualized as shown in the diagram to the right. The circle epresents the rule, its label DR stands for derivation rule. Incoming arrows attached to a rule circle represent conditions, and the outgoing arrow represents the conclusion.If you wonder, what kind of visual representation I'm using here, it's the UML-based visual rule language URML developed in the REWERSE research project Rule Modeling and Markup.The UML comes with a formal languge for expressing integrity rules and derivation rules, called OCL. Unfortunately, OCLi supports only derivation rules for defining properties, but not for defining (sub-)classes. We'll use it in some of our next real rule of the week posts.In the predicate logic syntax of the logic programming language Prolog, this rule would be formalized aswoman(X) :- female(X), age(X,Y), Y > 21.It would be nice to collect further formalizations in other rule languages. Can you add your favorite one?‹ Real Rulesupgwagner – Thu, 2006 – 05 – 11 20:31real rule of the weeklogin to post commentsI have used Blaze quite aI have used Blaze quite a bit and my experience is that template development, template management and everything related to templates as such makes the whole rule writing process extremely difficult. Well if there are ways to make rules easier to read (and write) definitely Blaze templates isn't one of them!Anonymous – Thu, 2006 – 06 – 01 21:13login to post commentsBlaze Advisor rule syntaxIn this case we would define this as a pattern something like this: A Woman is any Person having sex="Female" and age greater than 21It's a little easier to read than the Prolog :-)Subsequent rules could have conditions like If thisPerson is a Woman and...James Taylor Check out my Enterprise Decision Management blog at edmblog.fairisaac.comjtaylor – Fri, 2006 – 05 – 12 00:25login to post commentsRE: Blaze Advisor rule syntaxIs the Blaze Advisor rule syntax really easer to read? Of course, your phrase above is easier to read, but that's not the formal syntax, which you would need to compare in order to be fair.Anonymous – Sat, 2006 – 05 – 13 14:50login to post commentsThis is the formal syntax.This is the formal syntax. This is what you write in the IDE if you want to write it directly. You can make it easier to read if you want using templates but this is as formal as it gets.Not all rules languages make it hard to define things.James TaylorCheck out my Enterprise Decision Management blog at edmblog.fairisaac.comjtaylor – Mon, 2006 – 05 – 15 22:25login to post commentsCopyright © Some rights reserved.Browse archives« August 2008 Mo Tu We Th Fr Sa Su 1 2 34 5 6 7 8 9 1011 12 13 14 15 16 1718 19 20 21 22 23 2425 26 27 28 29 30 31Categories * news story * commentary * frequently asked question * real rule of the week * review * rules and... * case exampleSearch this blog:Powered by TechnoratiSynBlog.com - Blog Directoryblog search directoryBlogarama - The Blog DirectorySyndicateSyndicate content
Real Rule of the Week: Defining a Subconcept | RealRules Blogzine
Blogged with the Flock Browser

No comments: