executable declarative business rules and their use in electronic commerce

13
Executable Declarative Business Rules and Their Use in Electronic Commerce G. Antoniou 1 * and M. Arief 2 1 Department of Computer Science, University of Bremen, Germany 2 School of Computing & Information Technology, Griffith University, Australia ABSTRACT Business rules are statements which are used to run the activities of an organization. In the era of electronic commerce it is important for these rules to be represented explicitly, and to be automatically applicable. In this paper we argue that methods from the field of knowledge representation can be used for this purpose. In particular, we propose the use of defeasible reasoning, a simple but efficient reasoning method based on rules and priorities. We motivate the use of defeasible reasoning, give examples, describe two case studies, and outline current and future work in our research. Copyright 2001 John Wiley & Sons, Ltd. RULES AND PRIORITIES IN ELECTRONIC COMMERCE Business rules (Hay and Healy 1997; Ross, 1997; Antoniou and Arief, 2000) are statements that are used by a body or an organization to run their activities. They provide a founda- tion for understanding how a business operates. They are the core of an enterprise; they direct and influence the behaviour of an enterprise. Examples of business rules include seller offer- ings of products and services and authorization policies. Business rules are usually written in a natu- ral language that people can easily understand. The need to formalize business rules is becoming more essential due to the increasing usage of e-commerce. Electronic commerce is faced with all the problems that are known from traditional commerce disciplines, but also with new chal- lenges. Some of the factors that are important for * Correspondence to: G. Antoniou, Department of Computer Science, University of Bremen, P.O. Box 330440, D-28334 Bremen, Germany. E-mail: [email protected] conducting commerce on information highways are: (1) Increased competition that requires frequent changes in corporate strategies and policies to remain competitive. Every enterprise must be prepared to be capable of making fast changes based on the market situation. For example, marketing experts may formulate and regularly update business rules for rewarding customer loyalty. (2) The need to conduct negotiations and make decisions without the involvement of humans on the side of the corporation in business- to-consumer activities. It is unrealistic to expect that knowledgeable staff will always intervene in real time to make decisions at any time a customer may wish to conduct electronic business. And a delayed response may easily lead to loss of that business. Also, automated application of business rules is required in business-to-business activities, e.g. automatic auctions, and negotiations carried out by intelligent software agents. Copyright 2001 John Wiley & Sons, Ltd. International Journal of Intelligent Systems in Accounting, Finance & Management DOI: 10.1002/isaf.206 Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211 – 223 (2001)

Upload: g-antoniou

Post on 06-Aug-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Executable declarative business rules and their use in electronic commerce

Executable DeclarativeBusiness Rules and TheirUse in ElectronicCommerceG. Antoniou1* and M. Arief 2

1 Department of Computer Science, University of Bremen, Germany2 School of Computing & Information Technology, Griffith University, Australia

ABSTRACT Business rules are statements which are used to run the activities of an organization.In the era of electronic commerce it is important for these rules to be representedexplicitly, and to be automatically applicable. In this paper we argue that methodsfrom the field of knowledge representation can be used for this purpose. Inparticular, we propose the use of defeasible reasoning, a simple but efficientreasoning method based on rules and priorities. We motivate the use of defeasiblereasoning, give examples, describe two case studies, and outline current and futurework in our research. Copyright 2001 John Wiley & Sons, Ltd.

RULES AND PRIORITIES IN ELECTRONICCOMMERCE

Business rules (Hay and Healy 1997; Ross, 1997;Antoniou and Arief, 2000) are statements thatare used by a body or an organization torun their activities. They provide a founda-tion for understanding how a business operates.They are the core of an enterprise; they directand influence the behaviour of an enterprise.Examples of business rules include seller offer-ings of products and services and authorizationpolicies.

Business rules are usually written in a natu-ral language that people can easily understand.The need to formalize business rules is becomingmore essential due to the increasing usage ofe-commerce. Electronic commerce is faced withall the problems that are known from traditionalcommerce disciplines, but also with new chal-lenges. Some of the factors that are important for

* Correspondence to: G. Antoniou, Department ofComputer Science, University of Bremen, P.O. Box330440, D-28334 Bremen, Germany. E-mail: [email protected]

conducting commerce on information highwaysare:

(1) Increased competition that requires frequentchanges in corporate strategies and policiesto remain competitive. Every enterprise mustbe prepared to be capable of making fastchanges based on the market situation. Forexample, marketing experts may formulateand regularly update business rules forrewarding customer loyalty.

(2) The need to conduct negotiations and makedecisions without the involvement of humanson the side of the corporation in business-to-consumer activities. It is unrealistic toexpect that knowledgeable staff will alwaysintervene in real time to make decisions atany time a customer may wish to conductelectronic business. And a delayed responsemay easily lead to loss of that business.Also, automated application of business rulesis required in business-to-business activities,e.g. automatic auctions, and negotiationscarried out by intelligent software agents.

Copyright 2001 John Wiley & Sons, Ltd.

International Journal of Intelligent Systems in Accounting, Finance & Management

DOI: 10.1002/isaf.206

Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

Page 2: Executable declarative business rules and their use in electronic commerce

These characteristics of electronic commerceillustrate the need for executable specifications ofbusiness rules. That is, we need to (i) representknowledge formally and build up knowledgerepositories; and (ii) use the formalized knowl-edge automatically in decision processes. Suchspecifications would ideally reflect closely thebusiness rules represented, would be easy tomaintain and modify, would allow for the veri-fication of certain critical properties, and wouldbe sufficiently fast to be used online. Key prop-erties that executable specification languages andsystems should possess include:

(1) Expressive power: the language should be richenough to represent the business rules, andthe main ways in which these rules interactwith one another.

(2) Naturalness of expression: moreover, the repre-sentations should reflect the business rules ina natural, transparent way. This property iscrucial for the maintainability of e-commercebusiness rules, and for the simplification ofupdate processes.

(3) Declarativity: the language should have clearsemantics, and the meaning allocated tospecifications should correspond to intuitiveideas. This property is crucial for making non-specialists comfortable with the language,and thus for the success of the approach inpractice.

(4) Formality is needed to be able to analysethe behaviour of the business rules, identifyanomalies, run hypothetical cases, etc.

(5) Computational efficiency: reasoning mecha-nisms are needed to run the specificationsin acceptable time.

To fulfill these aims it is natural to look for lan-guages and techniques from artificial intelligence,and in particular from the area of knowledgerepresentation. The most fundamental and well-known knowledge representation language ispredicate logic. It has been extensively studied,has clear semantics, and is supported by auto-mated reasoning techniques. But it falls short asan appropriate basis for our purposes in electroniccommerce on two accounts: its contrapositiveinterpretation of rules, and its inability to reasonwith conflicts.

Given the business rule ‘If a customer is loyalthen grant discount’ and the decision (whichobviously would need to be based on otherbusiness rules) not to grant discount to thecustomer, predicate logic would conclude that thecustomer is not loyal. But this use of the aboverule is unlikely to be intended. This problemmay be overcome by using rule-based declarativelanguages which apply such rules in one directiononly. The second difficulty, though, is moreserious. Suppose that the following rules havebeen formulated and are currently in use by themarketing department.

If x is a loyal customer then grant x a 5%discount.If x is a loyal customer and y another customer,the discount granted to x should be at least ashigh as the discount granted to y.

Now suppose that due to a tough competitiveenvironment senior management decides to granta high discount to all customers for a limited time.

Grant a 6% discount to all customers.

Now obviously there is a conflict between thethree business rules. Its natural representationin predicate logic would ‘collapse’: it wouldsanction any conclusion (including, for example,granting a 100% discount to all customers).

Even though our example scenario is simplistic,we do not believe that it is unlikely to occur. Asmentioned before, e-commerce is characterizedby rapid development and change, so businessrules will need to be updated frequently. More-over, the rules will be formulated by differentdomain experts (e.g. working in different depart-ments of the same corporation, or in differentcorporations that are collaborating in a virtualenterprise). High pace of change and updatesconducted by different persons will inevitablylead to conflicts among business rules.

Finally, often decisions must be made based onminimal customer information. Such decisionsmay be invalidated later if more informationbecomes available. This kind of behaviour iscalled nonmonotonic.

Nonmonotonic reasoning (Marek and Truszcz-ynski, 1993; Antoniou, 1997) comprises knowl-edge representation approaches that deal with

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

212 G. ANTONIOU AND M. ARIEF

Page 3: Executable declarative business rules and their use in electronic commerce

incomplete and conflicting information. This fam-ily also includes rule-based approaches. Webelieve that rule-based nonmonotonic approachesare appropriate for the modelling of businessrules for electronic commerce:

(1) Business rules can be naturally mapped torules (rules in the logical sense).

(2) If two rules that can be applied lead toconflicting conclusions none of them fires.This behaviour is referred to as scepticism.It prevents the inference of contradictoryconclusions, as would happen in predicatelogic-based approaches.

(3) Often the outcome in (2) is unsatisfactory:even though two rules may lead to conflictingconclusions, one rule may be stronger thanthe other. This preference of one rule overanother may be based on implicit principles(such as higher authority, recency, specificity(a rule about the specific case at hand shouldusually be considered stronger than a moregeneral rule covering more cases) etc.) orexplicit preference formulated in the bodyof business rules (for example, a rule may bedeclared to be an exception to another rule).

For these reasons we propose the use of(logical) rules and priorities as the language tomodel and reason with e-commerce businessrules. Rules with priorities is a major family ofnonmonotonic reasoning approaches (Baral andGeefond, 1994; Grosof, 1997). So far, though, mostapproaches fall short on at least one of the fivemain properties we formulated above (expressivepower, naturalness of expression, declarativity,formality, computational efficiency): they have avery high computational complexity and cannotbe implemented efficiently. We believe thatthis has been the real barrier preventing theapplication of these methods in practice.

In our project at Griffith University, funded byan ARC large research grant, we are using defeasi-ble reasoning. The initial approach we adopted wasdefeasible logic (Nute, 1987). Its language consistsof (strict and defeasible) rules and a superiorityrelation on the set of rules (expressing prefer-ence). Defeasible logic is sceptical, and followsappealing principles of reasoning. Moreover, wewere able to prove that its computational com-plexity is linear. Our work has expanded the

logic across various dimensions to a full represen-tation framework, which can be adopted usingvarious parameters (space limitations preventus from discussing these parameters; for spe-cialists, some of the parameters concern teamdefeat, propagation of ambiguity, the principleof the excluded middle, and disjunction). Finallydefeasible logic offers more expressive powercompared to other approaches (e.g. CourteousLogic Programs (Grosof, 1997)), despite its com-putational simplicity.

We have implemented several defeasible rea-soning variants, and prototypes are available onthe Web1. Our preliminary experimental evalua-tion is very promising. Our systems are capableof dealing with 100,000s of rules, where previ-ous systems often could only cope with 100s or1000s (if at all implemented). One may ques-tion whether real world e-commerce applicationsmay be that big. We believe that this may wellbe the case, particularly when business rules areintegrated with corporate databases, customerprofiles from data mining analysis of Web siteprotocols etc.

Similar research to our project has been under-taken by Ben Grosof and his group. Their workhas produced important results, among otherson modelling authorization rules, and on theinteroperability with other technologies via XML.The focus of our work is somewhat different, inthat we use richer reasoning methods, and thatwe are more interested in the representation ofknowledge; in particular, we are interested inidentifying limitations of current technology andtools, and the development of enhanced theoriesand tools. These aspects, including limitations,are discussed in this paper.

Of course, expert systems are also based onrules and a conflict-resolution mechanism. Thedifference of a logic-based approach lies in itsformality and declarativity: A formal analysisof the knowledge is straightforward, instead ofbeing difficult (see work on the verification ofexpert systems (O’Leary and Preece, 1998; Plantand Antoniou 1997; Preece and Shinghal, 1994)).And because of clean semantics, changes are less

1 www.cit.gu.edu.au/∼arock/defeasible/Defeasible.cgi, www.cit.gu.edu.au/∼arock/plausible/Plausible.cgi

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

EXECUTABLE DECLARATIVE BUSINESS RULES 213

Page 4: Executable declarative business rules and their use in electronic commerce

ad hoc and error prone, thus maintainability issupported.

This paper is organised as follows. The nextsection describes defeasible logic. The thirdsection presents an overview of areas of actualor potential application of executable businessrules. The fourth and fifth sections describe twocase studies that we have conducted: businessrules related to the introduction of the AustralianGoods and Services Tax, and regulations ofGriffith University. The sixth section describes themain benefits one can expect from a formalizationof business rules. The final section describes somelimitations of defeasible logic, which have led tocurrent and future work.

DEFEASIBLE LOGIC

In this section we present the main ingredientsand ideas of defeasible logic. As a domain ofexplanation we have chosen to use rules whichhelp determine whether an item is subject toGST, the Australian Goods and Services Taxwhich was introduced in July 2000. At that timethis question was a major one, particularly forsmall and medium businesses which didn’t havesophisticated information systems. Our examplesrefer to supporting documentation published bythe Australian Taxation Office.

The Language and its Meaning

Strict RulesStrict rules are rules in the classical sense: inthe event that the valid premises of a rule aregiven, we are allowed to apply the rule and get aconclusion. The characteristic of a strict rule is thatits conclusion is valid whenever its conditions aretrue. It has the following general form:

Conditions → Conclusion

A business rule could be considered as strictrule if it has the above characteristics. The firstrule on GST registration gives requirementswhether an enterprise should register for GSTor not.

You must register if:

• You are an entity carrying on an enterprise,and

• Your annual turnover is at or above theregistration turnover threshold of $50 000, or$100 000 if you are a non-profit organization.

Whatever the other conditions of an enterprise,if the above conditions are satisfied, an enterprisemust register for GST. Formalization:

carryEnterp(X) ∧ turnoverMore50k(X)

→ register(X)

carryEnterp(X) ∧ nonProfitOrg(X)

∧ turnoverMore100k(X) → register(X).

In general we can detect this type of rulefrom the following key terms such as must,should be, must be and their opposite terms.There are also situations where the rulesdon’t possess those special words but intu-itively we understand that it is strict rule, forexample:

Employees and those involved in a hobbycannot register for GST.emp(X) → ¬register(X)

hobby(X) → ¬register(X)

Defeasible RulesA defeasible or refutable rule is a rule that couldbe refuted by contrary evidence. Its conclusion iscancelled by the existence of a strict rule, anotherdefeasible rule or a defeater with an opposingconclusion.

Usually this rule type is indicated by the wordsusually, presumably, or sufficient, or we couldintuitively feel that it is refutable.

It has the following general syntax:

Conditions ⇒ Conclusion

For example:

Packaging is treated in the same way as thecontents. So packaging for GST-free food isalso GST-free. However, packaging that is morethan usual and necessary is not GST-free.

Formalization

R1 : gstfree(X) ∧ packaging(X, Y)

⇒ gstfree(Y)

R2 : ¬gstfree(X) ∧ packaging(X, Y)

⇒ ¬gstfree(Y)

R3 : gstfree(X) ∧ unusualPackaging(X, Y)

⇒ ¬gstfree(Y)

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

214 G. ANTONIOU AND M. ARIEF

Page 5: Executable declarative business rules and their use in electronic commerce

We can see that R3 could override R1because it has more specific information (formore on this point see the section on supe-riority relations below). Another example ofa more specific rule overruling a less specificrule is when a specific food for human con-sumption is GST free, but that food, whenit is consumed in the place where it is sold(such as restaurant), will attract GST. Specifi-cally:

Most food for human consumption is GST-free. Food supplied for consumption on thepremises where it is supplied is not GST-free.foodHum(X) ⇒ gstfree(X)

foodHum(X) ∧ consumedAtPlace(X)

⇒ ¬gstfree(X)

These examples show that often there are defea-sible rules which support contrary conclusions.Defeasible logic is sceptical in that none of theseconclusions are derived (unless the conflict can beresolved using the superiority relation discussedbelow). We will further motivate this scepticalbehaviour below.

DefeatersA defeater is a special kind of rule, where noconclusions can be made if its conditions aretrue. However, this rule will prevent any othervalid conclusion of defeasible rule. A defeatercan be recognized by the word may and it has thefollowing syntax:

Conditions � Conclusion

For example:

If you are not registered you cannot claim inputtax credits, with the result being your businesscosts could be higher than your competitors.

Focusing on business costs, input tax is justone of the factors which will determine businesscosts. There are many other factors those that willascertain its value, such as rent of the premises,business location etc. Although an enterprise hasbeen registered for GST, its business cost couldstill be higher than its competitors’. In contrast anenterprise that has not been registered for GSTbut located in a suburb may have a lower businesscost. So, we can consider this rule as a defeaterthat will restrain the rule with head higherBusCostfrom firing.

¬register(X) → ¬claimInputTax(X)

¬claimInputTax(X) ⇒ higherBusCost(X)

locInTheSuburb(X)�¬higherBusCost(X)

Another example comes from banking: in a casewhere a borrower’s capacity to repay a loanappears doubtful, by default the bank will rejectthe applicant even if other reasons may speak forhim. Note that in this case it is not necessary toestablish that the customer will probably not beable to repay the loan—it is sufficient to havedoubts about their capacity to repay.

FactsWe assume that facts are stored in the enterprises’relational database systems, and can be accessedby the business rules. Generally facts have thefollowing form:

Predicate(parameter)

such as, consumer(jack), gstfree(meat) etc.

Superiority RelationshipSuperiority relationship is a conflict-resolutionmechanism embedded in defeasible logic; it isused to define priorities between defeasible rulesand it has the following form:

R1 > R2

It means that if R1 and R2 both apply thenR1 will override R2. Superiority relationships arepowerful enough to represent the relationshipbetween rules, such as some of the problemswe have identified in Antoniou and Arief (2000),such as rules from a higher level of managementwill defeat one from a lower level, and externalspecificity which we have already mentionedbefore. For example:

Foods for human consumption are GST freeand foods for animals’ consumption are notGST free.Food that falls into any of the followingcategories is not GST-free:

• restaurant, takeaway and prepared food• bakery products• confectionary• savoury snacks• ice cream food• biscuits goods, or beverages

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

EXECUTABLE DECLARATIVE BUSINESS RULES 215

Page 6: Executable declarative business rules and their use in electronic commerce

Live animals are not GST free—however,live crustaceans and molluscs (for example,lobsters, oysters and crabs) will be GST-freewhere they are sold for human consumption.

Formalization:

R1 : foodHum(X) ⇒ gstfree(X)

R2 : liveAn(Y) ⇒ ¬gstfree(X)

R3 : liveCrust(X) → liveAn(X)

R4 : liveCrust(X) ∧ soldHum(X)

⇒ gstfree(X)

R5 : restaurant(X) ⇒ foodHum(X)

R6 : restaurant(X) ⇒ ¬gstfree(X)

Preferences of one rule above the othershave been formalized by giving certain ruleshigher priority than others using superiorityrelationship.

R6 > R1R4 > R2R6 > R4

Other situations where we can apply superi-ority relationship to the rules are (Antoniou andArief, 2000):

• Preference for one rule over another rule.• Rules from higher level of authority.• Posteriority, where rule from more recent date

will overrule one from previous date.

The superiority relation is explicit in that it isseparated from the rules. This is in contrast toapproaches with implicit priority principles, suchas specificity which was discussed above. It isworth noting that the defeasible logic approachis more general in that implicit specificity canbe translated into an explicit superiority relation,while the opposite is not true, in general.

A Note on the Scepticism of Defeasible Logic

In the previous section we pointed out thatdefeasible logic has a sceptical behaviour. Thissceptical characteristic also has been discoveredregularly in business applications. From the pointof view of the agents involved in the decisionprocess, we can define two reasons for scepticism:(i) the decision cannot be taken automaticallybecause higher-level management needs to takethe decision; or (ii) the decision cannot be taken

automatically because it needs to be decided bythe customer itself. This situation is confrontedfrequently when the customer has several choices.

A good example for the first case would be ina car rental agency (Hay and Healy, 1997) whenthere is a shortage of cars for rental. The branchmanager can choose to source additional vehiclesfrom another branch or delay maintenance onvehicles, which are due for service.

If demand cannot be satisfied within a brancha car from another branch may be allocated,if there is a suitable car available and there istime to transfer it to the pick-up branch. A carscheduled for service may be used, providedthat the rental would not take the mileage morethan 10% over the normal mileage for service.

A good example for the second case above isthe rule for GST registration. If the enterprise’sturnover is below a given threshold, the businessmanager may choose to register or not. Byregistering for GST, the enterprise is eligible toclaim input tax. However, the consequence of thisis that it should be registered for at least one year.It is therefore the question whether the benefit ofclaiming the input tax by registering is desirable.However, if the manager feels that completing theGST form is too complicated and time consuming,or that the input tax reimbursement will not betoo significant, he may decide against it.

EXAMPLES OF DECLARATIVE BUSINESSRULE APPLICATIONS

In this section we wish to provide a feeling ofthe variety of applications of declarative businessrules in the setting of electronic commerce. Theapplication areas and idea we mention are by nomeans meant to be exhaustive, instead they areindicative.

Pricing Policies

A variety of decisions need to be made in thearea of pricing: discounts may be granted toindividuals based on their purchasing historyor their membership of certain groups (AAAmember, member of the Social Democratic Partyof Germany etc.), or based on the behaviour

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

216 G. ANTONIOU AND M. ARIEF

Page 7: Executable declarative business rules and their use in electronic commerce

of competitors. Typical business rules for thiskind of applications are the following discountingrules (borrowed from Grosof et al., 1999):

R1: 5% discount if buyer has a history of loyalspending at the store.R2: 10% discount if buyer has history of bigspending at the store.R3: 5% if buyer has a store charge card.R4: 10% if buyer has store’s Platinum card.R5: No discount if buyer has late-paymenthistory.

To resolve these conflicts we need to specifywhich rule should take precedence in case morethan one applies, leading to a different discount.For example:

R2 should take precede over all other rules.R5 should overrule R1, R3 and R4.R4 should overrule R1 and R3.

An example of another business rules sometimesfound is the following:

• Our store will match any genuine offer by anyof our competitors.

Obviously this rule should have higher prioritythan any other pricing rules. Offers of competitorsmight be checked automatically by an agent whodetermines the price at the competitor’s Web site.

As a side remark we note that an interestingsituation will occur in an automated decisionenvironment if two competitors offer to beateach other’s price by, say, 5%. This scenariodemonstrated the need of rigorous, advancedtools that will analyse the effect of such policiesin a dynamic environment involving intelligentsoftware agents. But this discussion goes beyondthe scope of this paper.

Recommender Systems

Examples of this kind of applications includerecommendations to buy certain products (suchas books or CDs) based on previous buyingpatterns; and the recommendation of buyingcertain products or services, based on user input(preferences, personal circumstances etc.).

As an example, a system might provide advicewhether to take a variable interest or fixed interestloan based on rules like the following:

R1: If the borrower has regular income thentheir repayments usually remain the same.R2: If the borrower works part time, wishesto make lump sum repayments at any time orwishes to make repayments more frequentlythen usually variable repayments should bepossible.R3: Usually borrowers with variable repaymentshould select variable rate.R4: If the economic indicators suggest thatinterest rates will go up, fixed rate loans arepreferable.

Priority information might include R3 > R4.

Eligibility Tests

This type of applications is relevant for insurancecompanies and government. Based on case dataan automated decision is made regarding certainentitlements. See, for example, Sergot et al., (1986)and Morgenstern and Singh (1997).

Similar applications can test the eligibility toapply for certain services, for example a bankloan or a credit card.

Opt-in Marketing

A key marketing challenge in e-commerce ishow companies can broaden their customer basewhile not alienating their potential customersby intruding their privacy. Opt-in marketingis a favourite answer: customers opt in forcertain services and information by activelynominating their interests and providing relevantinformation.

From the organisation’s point of view the keyissue is to advertise to persons who are most likelyto consume the advertised item. A promisingapproach is to define, declaratively, rules thatdecide which ads to forward to which customers.These business rules are driven by user profilesbased on user input: regulations (smoking isprohibited on some place, parenting guidancefor children), job, hobbies, interests, address, dateof birth, living habits, on-line shopping behaviouretc.

A special case of this business model is the ideaof surfing for money, according to which users arepaid for surfing the World Wide Web, in exchange

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

EXECUTABLE DECLARATIVE BUSINESS RULES 217

Page 8: Executable declarative business rules and their use in electronic commerce

for providing information about themselves andallowing a permanent advertisement bar beplaced under their Web viewer. This idea extendsnaturally to other domains, e.g. the offering of freephone calls in exchange for the caller listening tocertain ads before each phone call.

Security and Authorization Policies

Security of transactions, and more generallyinformation on the Web, is a critical factor forthe success of electronic commerce. Customerconcerns regarding security and privacy areperhaps the biggest obstacle electronic commerceis faced with. Mature security and authorizationpolicies would be a great advance of the stateof the art. Work in this direction includesauthorization policies with delegation (Li et al.,1999) and the implementation of security policieson a smart card (Gore and Nguyen, 2000).

CASE STUDY 1: THE AUSTRALIAN GOODSAND SERVICES TAX

As a first case study we have formalized businessrules related to the introduction of the AustralianGoods and Services Tax (GST). Here we discussbriefly one case.

The subject of the case is the Ritesh meat supplychain. In this supply chain, some parts are GST-free and the other parts are not. The aim is todecide whether something is GST-free or not.This chain is as follows, and has been taken fromThe Australian Taxation office (2000) with somemodifications:

Ritesh carries on a business as a primaryproducer. He supplies live cattle to an abattoir.The abattoir supplies its meat products to asupermarket chain. The abattoir also supplieswaste products to a fertilizer manufacturer.The supermarket sells meat products to Indiand Julie. Indi runs a restaurant called Indi’sSteakhouse. Julie buys the meat for her dinner.Julie also buys crabs for her dinner. Indi’sSteakhouse supplies the steak in its meals toits customers.

Which part of this supply chain is GST inputtaxed and which one is not? To fulfill the

requirement, we extend the formalization intotwo parameters. The rules which are relevant forthis case are the following (most of them havealready been discussed):

R1 : foodHum(X, Y) → food(X, Y)

R2 : foodHum(X, Y) ⇒ gstfree(X, Y)

R3 : liveAn(X, Y) → ¬food(X, Y)

R4 : food(X, Y) ⇒ ¬gstfree(X, Y)

R5 : liveCrust(X, Y) → liveAn(X, Y)

R6 : liveCrust(X, Y), soldHum(X, Y)

⇒ gstfree(X, Y)

R7 : restaurant(X, Y) ⇒ foodHum(X, Y)

R8 : restaurant(X, Y) ⇒ ¬gstfree(X, Y)

The superiority relation is

R6 > R4R8 > R2R2 > R4

and the facts are:

liveAn(abattoir, cattle)foodHum(supermarket, meat)¬food(fertiliserMan, wasteProd)

foodHum(indie, meat)foodHum(julie, meat)soldHum(julie, crabs)liveCrust(julie, crabs)restaurant(customer, meals)

Results:

(1) Live cattle is not food for GST purpose, thusit will activate R3.

(2) Meat products are food for human consump-tion and do not belong to categories of notGST free food. They will activate only R2.

(3) Waste products are used as fertilizer, thusnot for human consumption, from R3 we willget the conclusion that food not for humanconsumption is not GST-free.

(4) Meat sold to Indi and Julie are both for humanconsumption, thus GST-free.

(5) Crab is a live animal, but it is sold forhuman consumption. According to R6 and thesuperiority relationship R6 > R4, it is GST-free.

(6) Restaurants provide food for human con-sumption, thus the food is not subject to GST(R2). However, R8 tells us that food suppliedfor consumption on the premises where they

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

218 G. ANTONIOU AND M. ARIEF

Page 9: Executable declarative business rules and their use in electronic commerce

are supplied (such as a restaurant) is not GST-free. The second rule contains more specificinformation and will override the first one.

CASE STUDY 2: GRIFFITH UNIVERSITYREGULATIONS

Example 1: Academic misconduct

A typical rule found in university regulations isthe following, taken from the Griffith Universitypolicy on academic misconduct:

Where a student has been found guilty of aca-demic misconduct on more than one occasionand has previously been penalized as set outin 3.1 - 3.3 above, the penalty shall normally beexclusion from the course, unless in the opin-ion of the relevant Assessment Board there aremitigating circumstances.

This is a typical rule with exceptions. In the frame-work we are proposing, we would represent thisrule as follows:

R1 : guilty, repeat, previouslyPenalised⇒ excludeR2 : mitigatingCircumstances ⇒ ¬excludeR2 > R1

Notice that the predicate mitigatingCircum-stances will only be established if the AssessmentBoard decides so. Then a fact would be addedto this particular case, and the decision would benot to exclude. This example illustrates the rep-resentation of exceptions in defeasible logic: Boththe general rule and the exception are formal-ized as defeasible rules. The exception is strongerthan the general rule (in case the exception ruleis applicable, of course).

Example 2: Guidelines on fees

The second example is more substantial. It com-prises part of the Griffith University guidelineson fees.

1.1 The University may not charge tuition fees forAustralian students in undergraduate awardcourses.

1.2 The University may charge fees for postgrad-uate courses.

1.3 Overseas students are generally fee payingbut there are some exceptions. There is mini-mum fee level set by the Government for feesfor overseas students (FPOS). There are spe-cial arrangements for international exchangestudents. Refer to the GU International Centerfor advice on these issues.

1.7 All students are liable for HECS (HigherEducation Contribution Scheme) with veryfew exceptions. Students who do not payHECS include:– FPOS students– fee paying postgraduate students– non-award students– students with an APA (Australian post-

graduate award)– students wholly sponsored by an

employer.

Here is the representation of this information indefeasible logic:

r1.1 : student(X), australian(X),undergrad(X) ⇒ ¬fee(X)

r1.2 : student(X), postgrad(X) ⇒ fee(X)

r1.3a : student(X), overseas(X) ⇒ fee(X)

r1.3b : student(X), overseas(X)

⇒ payFPOS(X)

r1.3c : student(X), overseas(X), exchange(X)

⇒ ¬payFPOS(X)

r1.7a : student(X) ⇒ HECS(X)

r1.7b : student(X), payFPOS(X)

⇒ ¬HECS(X)

r1.7c : student(X), postgrad(X), fee(X)

⇒ ¬HECS(X)

r1.7d : student(X), nonAward(X)

⇒ ¬HECS(X)

r1.7e : student(X), APA(X) ⇒ ¬HECS(X)

r1.7f : student(X), fullySponsored(X)

⇒ ¬HECS(X)

r1.3c > r1.3b

r1.7b > r1.7a

r1.7c > r1.7a

r1.7d > r1.7a

r1.7e > r1.7a

r1.7f > r1.7a

Example 3: Exam Timetabling Policy

1.0 For subjects in which a final examina-tion accounts for a major portion of the

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

EXECUTABLE DECLARATIVE BUSINESS RULES 219

Page 10: Executable declarative business rules and their use in electronic commerce

student’s assessment, a one-week revisionperiod should be established between theend of formal content presentation and thecommencement of examinations.

2.0 Week 15 should be established as the exam-ination revision week, with the examinationperiod extending from the Saturday of Week15 through Weeks 16 and 17 as required.

3.0 Courses which assess predominantly by con-tinuous assessment will not be required tocomply with the semester structure of 2.0.For these courses, the teaching period mayextend past Week 14. These courses will beidentified via the existing course approvalprocess.

4.0 Where a Faculty wishes to ensure a satis-factory examination schedule by schedulinga course’s examination towards the end ofWeek 15, this may be done, provided thatformal content presentation ceases one weekbefore the first exam.

It is clear that again we are faced with thephenomenon of rules with exceptions, which maybe expressed using defeasible rules and priorities.

This example highlights one sort of anomalylikely to be uncovered by a formal analysis ofregulations, namely redundancy. For subjects inwhich a final examination accounts for a majorportion of assessment, 4.0 is subsumed by 1.0.Also 4.0 essentially extends 1.0 to new cases(subjects where a final exam is a minor assessmentitem). Thus items 1.0 and 4.0 can (and should) bereasonably combined to one item.

We will refer to this example later on when weraise the question of which features are needed forthe analysis of regulations, beyond the featuresalready available in defeasible logic.

Remark: Explicit Priority Information

As we saw above, defeasible logic makes use ofan explicit superiority relation. This may seemquestionable, since it places the burden on theuser to provide the priority information. Ourresponse to this criticism is as follows:

(1) Indeed it is possible in defeasible logic toextract superiority relations from a set of rulesbased on specificity; see Billington et al., (1990)and Nute (1994).

(2) Implicit priority criteria such as specificityare not always capable of capturing all theprioritization information.

(3) Regulations often include policies of prioriti-zation, which then is naturally represented inan explicit way. The following two examplesto illustrate this point.

Example 4: Credit Transfer Policy

1.1. . . The policy applies to all courseworkaward courses of the University; however, theaward of credit in honours and masters courseswill be restricted by specific policy applyingto these courses (refer to Requirements andAdministration of Honours Courses, and MastersDegree by Coursework Rules).

From this regulation it is clear that while therules in the Credit Transfer Policy may apply topostgraduate courses, they may be overruled bythose in the other documents referred to, whichshould thus be given higher priority.

Example 5: Timetabling Policy

Here is another example of explicit priorityinformation. The timetabling policy of GriffithUniversity states that in resolving clashes oftimetable, the following principles shall be used:

– Larger classes have precedence over smallerclasses;

– First-year subjects have precedence over lateryear subjects;

– Classes which occupy large blocks of time haveprecedence over classes which occupy smallblocks of time

BENEFITS OF THE FORMALIZATION OFBUSINESS RULES

There are various advantages that flow outof the formalization of business rules usingdeclarative, executable languages. In the fol-lowing we distinguish between drafting busi-ness rules, and executing and understandingregulations.

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

220 G. ANTONIOU AND M. ARIEF

Page 11: Executable declarative business rules and their use in electronic commerce

Regarding the execution and understanding ofbusiness rules, formal systems have the followingadvantages.

(1) Execution: It is possible to run a specificcase with the given business rules to geta correct answer. This is the most obviousbenefit, where business rules are used tomake decisions automatically. We expectautomatic execution to be widely used ine-commerce. This paper has mainly focusedon this advantage, but others are listed below.

(2) Explanation: When an answer is given, thereis also a reasoning chain explaining thisresponse. This can be most useful in helpdesks etc. Benefits include higher user satis-faction, and increased faith in the system.

Being a logical approach, defeasible logic pro-vides this kind of support. Drafting business rulescan be supported in the following ways:

(3) Anomaly detection: Formal methods can beused to detect anomalies such as incon-sistency, incompleteness and circularity. Indefeasible logic, such anomalies are detectedeither by static analysis, or by the perfor-mance of the proof theory, for example,by the proof of some facts regarding non-derivability (for technical details see (Anto-niou et al., 1998)).

(4) Hypothetical reasoning: It is possible to investi-gate the effects of changes to business rules.This is possible since a defeasible knowledgebase is an executable specification.

(5) Debugging: In many cases we know what theanswer to a specific query should be, yetthe business rules in their current form leadto a different answer. Debugging suggestschanges to the regulations which will have asan effect the desirable outcome. In defeasiblelogic, debugging can be carried out alongthe lines of ‘declarative debugging’ (Naish,1997).

IS DEFEASIBLE LOGIC SUFFICIENT?

In the following be discuss briefly some featuresthat appear to be useful or necessary for theanalysis of regulations, and which go beyonddefeasible logic.

(1) Hierarchies of business rules and regulationsOften business rules and regulations are orga-nized in a hierarchical fashion. For exampleon top of the Griffith University regulationsthere exist public service regulations which,if a conflict should arise, are stronger thanuniversity regulations. Another example isfound in Example 4 of Case Study 2.Defeasible logic supports this structure throu-gh its superiority relation: It is straightfor-ward to encode the information that rules ina particular regulation are stronger than rulesin another regulation. On the other hand, itcan be argued that the encoded regulationsshould reflect the structure of the regulationsfor maintainability purposes: for example, itshould be possible to add a rule in a sub-regulation without having to check it againstall other rules.The idea of using rules in an inheritance net-work system has recently been propagated byresearchers at the IBM T.J. Watson ResearchCenter (Morgenstern and Singh, 1997).

(2) Meta-reasoningThe previous item suggests the use of meta-knowledge: every rule in part A should begiven higher priority than rules in part B.Example 5 in Case Study 2 shows anothercase where meta-reasoning is required. Theconflict resolution rules are actually meta-rules, in the sense that they apply to pairsof object level rules.

(3) Arithmetic capabilitiesIn Example 3 of Case Study 2 there isinformation which requires simple arithmeticoperations. For example we need to knowthat week 14 comes immediately after week13, that if an exam takes place in week 16 andthe last lecture was held in week 14 then thereis at least one week of revision period etc.

(4) Ontological knowledgeTypically business rules and regulations arenot given in an empty environment; insteadthey make use of terminology and conceptswhich are relevant to the organization and/orthe aspect they seek to formalize. Thus, to beable to capture the meaning of business rules,one needs to encode not only the rules them-selves, but also the underlying ontologicalknowledge. This knowledge usually includes

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

EXECUTABLE DECLARATIVE BUSINESS RULES 221

Page 12: Executable declarative business rules and their use in electronic commerce

the terminology used, its basic structure, andintegrity constraints that need to be satisfied.For example, in Example 3 of Case Study 2concepts such as weeks, teaching period andexamination period are used. One implicitassumption is that teaching takes place Mon-day to Friday only. Otherwise item 2.0 mightlead to a conflict with item 1.0: If the exami-nation period starts the Saturday of week 15and teaching extended until, say, Sunday ofweek 14, then the requirement of at least one-week revision period stated in 1.0 would notbe observed.Another interesting aspect of Example 3 isthe use of the terms ‘subject’ (in 1.0) and‘course’ (in 2.0–4.0) to represent the sameconcept. One needs to know that GriffithUniversity has changed its terminology tofully appreciate this observation: the oldterms ‘course’ and ‘degree’ were replacedby the new terms ‘subject’ and ‘course’(!!)respectively. Thus the problem is not thattwo terms are used interchangeably to referto the same concept, but rather that the use of‘course’ contradicts the current terminology(ontology) of the university. An explicitrepresentation of this ontology would enablethe detection of this error (for example, theontology could include a statement that acourse does not have an exam).Of course it can be argued that ontologicalknowledge can be coded directly in defeasiblelogic, using strict rules. But the point is thatontological knowledge should be maintainedseparate from the knowledge representing theexecutable business rules themselves.

CURRENT AND FUTURE WORK

We argued that executable specifications ofbusiness rules will be an important technologicalsupport for electronic commerce. We discussedthe requirements that arise from the specificnature of business rules for electronic commerce,and studied the suitability or otherwise of variousapproaches. We concluded that nonmonotonicsystems with rules and priorities are a promisingsolution to the requirements, and outlined ourfavorite approach, defeasible reasoning, and its

advantages. One of the main advantages is theexistence of powerful implementations. We gavemany examples and outlined some case studies.

We have also discussed weaknesses we haveidentified, weaknesses that have led to currentwork on improving the underlying knowledgerepresentation formalisms. This work will leadto richer tools. Our ultimate goal is to build arich tool for maintaining business rules in anefficient logical language, and for their automaticexecution.

In collaboration with colleagues from theSchool of Marketing we are exploring concreteapplications of defeasible reasoning in Internetmarketing (Forrest, 1998). We are also workingwith other colleagues on the application ofdeclarative business rules as a basis for electronicmarketplaces (Governatori et al., 2000).

References

Antoniou G. 1997. Nonmonotonic Reasoning. MIT Press:Cambridge, MA.

Antoniou G, Billington D, Maher MJ. 1998. Normalforms for defeasible logic. In Proc. 1998 JointInternational Conference and Symposium on LogicProgramming. MIT Press: Cambridge, MA; 160–174.

Antoniou G, Billington D, Maher MJ. 1999. On theanalysis of regulations using defeasible rules. InProc. 32nd Hawaii International Conference on SystemsSciences.

Antoniou G, Arief M. 2000. Modelling business rulesusing defeasible logic. Proceedings of InformationResources Management Association InternationalConference, Anchorage Alaska.

Australian Taxation Office. 2000. Guide to GST.Baral C, Gelfond M. 1994. Logic programming

and knowledge representation. Journal of LogicProgramming 19(20): 73–148.

Billington D, de Coster K, Nute D. 1990. A modulartranslation from defeasible nets to defeasible logic.Journal of Experimental and Theoretical ArtificialIntelligence 2: 151–177.

Dhar V, Stein R. 1997. Seven Methods for TransformingCorporate Data into Business Intelligence. Prentice Hall:Englewood Cliffo, NJ.

Forrest E. 1998. Internet Marketing Research: Resourcesand Techniques. McGraw-Hill: New York.

Gore R, Nguyen JD. 2000. CardKt: Automated multi-modal deduction on Java cards for multi-applicationsecurity. In Proceedings Java Card Workshop, Cannes,September.

Governatori G, ter Hofstede A, Oaks P. 2000.Defeasible logic for automated negotiation. Proc.Collecter’2000.

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

222 G. ANTONIOU AND M. ARIEF

Page 13: Executable declarative business rules and their use in electronic commerce

Grosof B. 1997. Prioritized conflict handling for logicprograms. In Proc. International Logic ProgrammingSymposium, MIT Press: Cambridge, MA; 197–211.

Grosof B, Lambrou Y, Chan H. 1999. A declarativeapproach to business rules in contracts: courteouslogic programs in XML. In Proc. 1st ACM Conferenceon Electronic Commerce, ACM.

Hay D, Healy KA. 1997. GUIDE - Business Rules Project,Final Report rev. 1.2.

Kalakota R, Whinston AB. 1996. Frontiers of ElectronicCommerce. Addison-Wesley: Reading MA.

Li N, Feigenbaum J, Grosof B. 1999. A logic-basedknowledge representation for authorization withdelegation (extended abstract). In Proceedingsof the 12th IEEE Computer Security FoundationsWorkshop (CSFW-99). Mordano, Italy, 28–30,June.

Marek V, Truszczynski M. 1993. Nonmonotonic Reaso-ning. Springer: Berlin.

Morgenstern L, Singh M. 1997. An expert system usingnonmonotonic techniques for benefits inquiry inthe insurance industry. In Proc. IJCAI-97. MorganKaufmann: San Mateo, CA.

Naish L. 1997. A declarative debugging scheme. Journalof Functional and Logic Programming 3.

Nute D. 1987. Defeasible reasoning. In Proc. 20th HawaiiInternational Conference on Systems Sciences. IEEEPress: New York; 470–477.

Nute D. 1994. Defeasible logic. In Handbook of Logic inArtificial Intelligence and Logic Programming (Vol. 3),Gabbay DM, Hogger CJ, Robinson JA (eds). OxfordUniversity Press: New York; 353–395.

O’Leary D, Preece A. 1998. Verification & Validation ofKnowledge-Based Systems: Papers from the 1998 AAAIWorkshop. AAAI Press: New York.

Ong KL, Lee RM. 1993. A Formal Model for MaintainingConsistency of Evolving Bureaucratic Policies: ALogical and Abductive Approach, EURIDIS ResearchMonograph.

Plant R, Antoniou G. 1997. Verification & Validation ofKnowledge-Based Systems: Papers from the 1997 AAAIWorkshop. AAAI Press: New York.

Prakken H. 1997. Logical Tools for Modeling LegalArgument: A Study of Defeasible Reasoning in Law.Kluwer Academic: Amsterdam.

Preece AD, Shinghal R. 1994. Foundation andapplication of knowledge base verification.International Journal of Intelligent Systems 9: 683–701.

Ross R. The Business Rule Book: Classifying, Defining andModeling Rules, 2nd edn. Business Rule Solutions,Inc.: New York.

Sergot MJ, Sadri F, Kowalski RA, Kriwaczek B,Hammond P, Cory HT. 1986. The British NationalityAct as a logic program. Communications of the ACM29(5): 370–386.

Copyright 2001 John Wiley & Sons, Ltd. Int. J. Intell. Sys. Acc. Fin. Mgmt. 10, 211–223 (2001)

EXECUTABLE DECLARATIVE BUSINESS RULES 223