1 / 26

Rules in SW

Rules in SW. Semantic Web - Spring 2008 Computer Engineering Department Sharif University of Technology. Outline. Introduction to the rules and their usage in Web RuleML SWRL. Introduction.

jerry
Download Presentation

Rules in SW

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Rules in SW Semantic Web - Spring 2008 Computer Engineering Department Sharif University of Technology

  2. Outline • Introduction to the rules and their usage in Web • RuleML • SWRL

  3. Introduction • Rules as an important aspect of Internet e-business: rule-based business policies & business processes, for B2B & B2C. • represent seller’s offerings of products & services, capabilities, bids; map offerings from multiple suppliers to common catalog. • represent buyer’s requests, interests, bids; → matchmaking. • represent sales help, customer help, procurement, authorization/trust, brokering, workflow. • high level of conceptual abstraction; easier for non-programmers to understand, specify, dynamically modify & merge. • executable but can treat as data, separate from code • potentially ubiquitous; already wide: e.g., SQL views, queries. • Rules in communicating applications, e.g., embedded intelligent agents.

  4. Introduction (cont.) • Rules are being used for many interconnected purposes, capturing regularities in application domains such as the following: • Engineering: Diagnosis rules • Commerce: Business rules (including XML versions such as the Business Rules Markup Language (BRML) of IBM's Business Rules for Electronic Commerce project) • Law: Legal reasoning (Robert Kowalski and Marek Sergot have been formalizing legal rules in an Imperial College group) • Internet: Access authentication (Tim Berners-Lee proposed registration engines that use authentication rules such as the following: Any person who was some time in the last 2 months an employee of an organization which was some time in the last 2 months a W3C member may register.)

  5. Expert Systems… • Are a branch of artificial intelligence. • Simulate human reasoning in some domain. • “Reason” by heuristic or approximate methods. • Explain and justify solutions in user-friendly terms.

  6. Types Of Expert Systems • Neural Networks • Blackboard Systems • Belief (Bayesian) Networks • Case-Based Reasoning • Rule-Based Systems

  7. Rule-Based Expert Systems • Originated from AI research in the 70s and 80s. • Problem data stored as facts. • “Reason” using IF…THEN…ELSE rules. • Can “reason” deductively (forward-chaining) or inductively (backward-chaining).

  8. When to Use Rule-Based Systems • Problem Domain = narrow, well-understood domain theory • Knowledge Representation = facts and rules • Output = recommendation • Explanation = rule firing trace • Learning Ability = generally no (but…)

  9. Inference Process • Rules and facts compared using pattern matcher. • Matched rules activated into a conflict set. • Conflict set resolved into agenda (process called conflict resolution). • Rule engine fires on agenda. • Engine cycles until all rules are satisfied.

  10. Rules in SW

  11. Example rules • The discount for a customer is 5.0 percent if the customer is premium and the product is regular • A customer is premium if their spending has been min 5000 euro in the previous year • Those who are members of CE can access CE portal

  12. RuleML • Rather than reinventing rule principles and markups in each community, the idea of RuleML is to 'package' the rule aspect of any domains • make it available as an (XML) namespace, .../RuleML, • can be mixed with a namespace for natural-language (XHTML) texts • and possible domain-specific namespaces (much like MathML is mixed into such domain texts).

  13. RuleML initiatives • Dozens of institutions (~35), researchers; esp. in US, EU • Mission: Enable semantic exchange of rules/facts between most commercially important rule systems • Standards specification: 1st version 2001; basic now fairly stable • A number of tools (~12 engines, translators, editors), demo applications • Successful Workshop on Rules at ISWC was mostly about RuleML / LP • Has now a “home” (www.ruleml.org) • Initial Core: Horn Logic Programs KR …Webized (in markup)… and with expressive extensions

  14. Type of rules possible in RuleML • Derivation rules • Deriving new facts • Maybe evaluated bottom-up as in deductive databases • Top-down as in Logic Programming • Example: dynamic inclusion of derived facts in a html response • Reaction rules • Also called ECA (Event-Condition-Action) or Triggers • Example: Specification of behavior in response to browser events

  15. RuleML top-level hierarchy • Integrity constraints are considered as "denials" or special reaction rules whose only possible kind of action is to signal inconsistency when certain conditions are fulfilled. • Derivation rules are considered as special reaction rules whose action happens to only add or 'assert' a conclusion when certain conditions (premises) are fulfilled. • Facts are considered as special derivation rules that happen to have an empty (hence, 'true') conjunction of premises.

  16. RuleML toturial • Peter Miller's spending has been min 5000 euro in the previous year. • <Atom> <Rel>spending</Rel> <Ind>Peter Miller</Ind> <Ind>min 5000 euro</Ind> <Ind>previous year</Ind> </Atom> • This is a fact

  17. RuleML toturial (cont.) • "spending" is marked up as the relation name (table name) for the fact. • "Peter Miller", "min 5000 euro", and "previous year" are marked up as individual constants that are the three arguments (table columns) of the relation. • The entire relation application constitutes an atomic formula, marked up by <Atom> ... </Atom>.

  18. Representing as tree

  19. An example rule • A customer is premium if their spending has been min 5000 euro in the previous year <Implies> <head> <Atom> <Rel>premium</Rel> <Var>customer</Var> </Atom> </head> <body> <Atom> <Rel>spending</Rel> <Var>customer</Var> <Ind>min 5000 euro</Ind> <Ind>previous year</Ind> </Atom> </body> </Implies>

  20. In tree form

  21. What is SWRL? • SWRL is an acronym for Semantic Web Rule Language. • SWRL is intended to be the rule language of the Semantic Web. • SWRL includes a high-level abstract syntax for Horn-like rules. • All rules are expressed in terms of OWL concepts (classes, properties, individuals).

  22. SWRL Characteristics • W3C Submission in 2004: http://www.w3.org/Submission/SWRL/ • Based on OWL-DL • Has a formal semantics • Rules saved as part of ontology • Increasing tool support: Bossam, R2ML, Hoolet, Pellet, KAON2, RacerPro, SWRLTab • Can work with reasoners

  23. OWL extension for rules (SWRL) • A recommendation to extend OWL to create a Rule language

  24. SWRLTab • A Protégé-OWL development environment for working with SWRL rules • Supports editing and execution of rules • Extension mechanisms to work with third-party rule engines • Mechanisms for users to define built-in method libraries • Supports querying of ontologies

  25. References • RuleML.org • http://www.semanticweb.org/SWWS/program/full/paper20.pdf • http://www.cs.man.ac.uk/~horrocks/DAML/Rules/ • http://www.cs.unb.ca/~boley/ruleml/ruleml-rgs.pdf • http://www.w3.org/Submission/SWRL/

  26. The End

More Related