ICPW2007.Paschke
-
Upload
pragmaticweb -
Category
Technology
-
view
5.022 -
download
0
Transcript of ICPW2007.Paschke
![Page 1: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/1.jpg)
Rule Responder – RuleML-based Agents forDistributed Collaboration on the Pragmatic Web
22/23rd October 2007
A. Paschke1, H. Boley, A. Kozlenkov, B. Craig1 Bioinformatics, BIOTEC Center, Technical University Dresden
Int. Conference on the Pragmatic Web, Tilburg, Netherlands, 2007
Towards a Pragmatic Agent WebRule Responder
Reaction RuleML – Rule Interchange FormatEnterprise Service Bus – Communication MiddlewareRule Engines – Execution Environments
Rule Responder Use CasesSummary
![Page 2: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/2.jpg)
2 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Semantic Web Stack
Main Principles (Semantic Web Stack 2003)Development in layersDownwards compatibleUpwards: Partial understanding
![Page 3: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/3.jpg)
3 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
The Future of the Semantic Web?
T. Berners-Lee. Web for real people,http://www.w3.org/2005/talks/0511-keynote-tbl, 2005.
I., Horrocks: Semantic web architecture : Stack or two towers?, Dagstuhl Castle ,Germany, 2005.
Semantic Web addresses syntax and semantics of representation languages for meta data vocabularies and semantic domain descriptions
An explicit pragmatic layer addressing use of semantic resources within a pragmatic context is missing
![Page 4: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/4.jpg)
4 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Towards a Pragmatic Web
1. Explicit Meta-datavCard, PICS, Dublin Core, RDF, IEEE LOM (Learning Objects Metadata), Micro Formats, FOAF, SIOC …
2. OntologiesRDFS, OWL Lite|DL|Full
3. Logic and Inferencee.g. Logic Programming Rule/Inference Engines
4. Software Agents and Web Services
FIPA, Semantic Web Services, RBSLA, …
![Page 5: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/5.jpg)
5 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Pragmatic Agent Web - Example with Two Kinds of Collaborative Agents
Interaction
![Page 6: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/6.jpg)
6 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Pragmatic Web
Semiotics, the study of sign processes, includes the study of how meaning isconstructed and understood.
„Pragmatics, a basic field of linguistics today, originally had its roots in Morris's idea of a division of signs concerned with "the relations of signs to their interpreters" or users. “
Eugen Halton, http://www.nd.edu/~ehalton/Morrisbio.htm, 1992
Pragmatic WebUtilize the heterogenous Semantic Web resources, meta data and meaningrepresentations with intelligent agents and web-based services with theability to understand the others intended meaning (pragmaticcompetence)Collaborate in a communicative conversation-based process where content and context is interchanged in terms of messages (relation of signs) between senders and receivers (interpreters/users).Pragmatic layer/wrapper around semantic/content e.g. by KQML / ACL like speech-act primitives (e.g. assert(content), retract(content), query(kb))Model, negotiate and control shared and invividual meanings
requires learning and knowledge adaption / updates
![Page 7: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/7.jpg)
7 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
PragmaticAgent Web
Rule Responder Project:http://www. responder.ruleml.org/
![Page 8: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/8.jpg)
8 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Benefits of Rule-Based Decision and Reaction Logic
1. Compact declarative representation of rulesClear semanticsGlobal rules which might apply in several contexts (reusability)Separation of contract rules from the application codeExtensibility of the rule base (without changing the interpreter)
2. Efficient, generic interpreters (rule engines) for automated rule chaining and execution of reaction rules
3. Automated conflict detection of rule conflictsTraceable and verifiable resultsIntegrity constraints are possibleAutomated conflict resolution by rule prioritization
Rules play an important role to automatically and contextually transform data, derive new conclusions and decisions from existing knowledge and behaviourally act according to changed conditions or occurred events
![Page 9: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/9.jpg)
9 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Rule Responder Architecture
1. Computational independent model (CIM) with rules, processes, conversational flows (e.g. in a natural or visual language)
2. Platform independent model (PIM) which represents the rules, events and ontologies in a common (standardized) interchange format (e.g. a markup language)
3. Platform specific model (PSM) which encodes the rule statements in the language of a specific execution environment (e.g. a rule engine / inference service or compiled code)
![Page 10: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/10.jpg)
10 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
RuleML / Reaction RuleMLPlatform Independent
Rule Interchange Format
http://ruleML.orghttp://ibis.in.tum.de/research/ReactionRuleML/
![Page 11: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/11.jpg)
11 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
RuleML as Common Rule Interchange Format
Rule Markup and Modeling Initiative (RuleML) (www.ruleml.org)Standardization effort for a rule markup and modelling language, tools and applications
RuleML is the de facto open language standard for rule interchange/ rule markup on the Web
Reaction RuleML (http://ibis.in.tum.de/research/ReactionRuleML/)Language family for reaction rules and complex event messaging / processing
RuleML
Derivation Rules
Reaction Rules
Integrity Constraints
Transformation Rules
Derivation RuleML
Integrity RuleML
Reaction RuleML
RuleMLTranslatorsHomogeneous Approach
![Page 12: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/12.jpg)
12 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
RuleML Enables ...
Rule
modellingmarkup
translationinterchange
executionpublicationarchiving
in
UMLRDF
XMLASCII
![Page 13: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/13.jpg)
13 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
RuleML Language Family – Derivation RuleML
![Page 14: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/14.jpg)
14 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Schema Modularization
XML Schema + EBNF Syntax
Full RDF compatibility via type and role tags (akin to triple syntax);
XML Schema Modularization: Layered and uniform design
The layers are organized around increasing expressiveness levelsBenefits:
- easier to learn the language and to understand their relationships
- facilitates reusability and complex language assemblies from modules
- provides certain guidance to vendors who might be interested only in a particular subset of the features
- easier to maintain, manage and extend in a distributed environment
![Page 15: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/15.jpg)
15 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
RuleML as Rule Interchange Format
''The discount for a customer buying a product is 5.0 percent ifthe customer is premium and the product is regular.''<Implies><head><Atom>
<op><Rel>discount</Rel></op><Var>customer</Var><Var>product</Var><Ind>5.0 percent</Ind>
</Atom></head><body><And><Atom><op><Rel>premium</Rel></op><Var>customer</Var>
</Atom><Atom><op><Rel>regular</Rel></op><Var>product</Var>
</Atom></And>
</body></Implies>
Implieshead
Atomop Rel discount
Var customerVar productInd 5.0 percent
bodyAnd
Atomop Rel premium
Var customer
Atomopr Rel regular
Var product
![Page 16: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/16.jpg)
16 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Scope of Reaction RuleML
![Page 17: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/17.jpg)
17 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Reaction RuleML is intended for …
Enable interoperation between various domains of reaction rules,event/action definition and processing such as:
Event Processing NetworksComplex Event Processing (CPE)Event Driven Architectures (EDAs)Reactive, rule-based Service-Oriented Architectures (SOAs)Active Semantic Web ApplicationsReal-Time Enterprise (RTE)Business Activity Management (BAM)Business Performance Management (BPM) Service Level Management (SLM) with active monitoring and enforcing of Service Level Agreements (SLAs) or e-ContractsSupply Chain Event ManagementPolicies…
![Page 18: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/18.jpg)
18 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
General Concepts
General (reaction) rule form that can be specialized as needed
Three general execution styles:Active: 'actively' polls/detects occurred events in global ECA style, e.g. by a ping on a service/system or a query on an internal or external event databaseMessaging: Waits for incoming complex event messageReasoning: KR event/action logic reasoning and transitions (as e.g. in Event Calculus, Situation Calculus, TAL formalizations)
AppearanceGlobal: ‘globally’ defined reaction ruleLocal: ‘locally’ defined (inline) reaction rule nested in an outer rule
![Page 19: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/19.jpg)
19 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
General Syntax for Reaction Rules (Reaction RuleML 0.2)
<Rule style="active" evaluation="strong">
<label> <!-- metadata --> </label>
<scope> <!-- scope --> </scope>
<qualification> <!-- qualifications --> </qualification>
<oid> <!-- object identifier --> </oid>
<on> <!-- event --> </on>
<if> <!-- condition --> </if>
<then> <!-- conclusion --> </then>
<do> <!-- action --> </do>
<after> <!-- postcondition --> </after>
<else> <!-- else conclusion --> </else>
<elseDo> <!-- else/alternative action --> </elseDo>
<elseAfter> <!-- else postcondition --> </elseAfter>
</Rule>
![Page 20: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/20.jpg)
20 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Messages in Reaction RuleML
<Message mode="outbound" directive="ACL:inform"><oid> <!-- conversation ID--> </oid><protocol> <!-- transport protocol --> </protocol><sender> <!-- sender agent/service --> </sender><content> <!-- message payload --> </content>
</Message>
@mode = inbound|outbound – attribute defining the type of a message@directive – attribute defining the pragmatic context of the message, e.g. oneor more FIPA ACL performatives, KQML, OWL-QL, Standard Deontic Logicnorms, …< oid > – the conversation id used to distinguish multiple conversations and conversation states< protocol > – a transport protocol such as HTTP, JMS, SOAP, Jade, Enterprise Service Bus (ESB) ...< sender >< receiver > – the sender/receiver agent/service of the message< content > – message payload transporting a RuleML / Reaction RuleMLquery, answer or rule base
![Page 21: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/21.jpg)
21 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Complex Event Processing (1)
Event DefinitionDefinition of event pattern by event algebra
Event SelectionDefines selection function to select one event from several occurred events (stored in an event instance sequence) of a particular type, e.g. “first”, “last”Crucial for the outcome of a reaction rule, since the events may contain different (context) information, e.g. different message payloads or sensing information
Event ConsumptionDefines which events are consumed after the detection of a complex eventAn event may contribute to the detection of several complex events, if it is not consumedDistinction in event messaging between “multiple receive” and “single receive”Events which can no longer contribute, e.g. are outdated, should be removed
Separation of this phases is crucial for the outcome of a reaction rule base in the context of complex events
Declarative configuration of different selection and consumption policies
![Page 22: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/22.jpg)
22 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Complex Event Algebra
Complex Event Algebra Operators:Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic
andComplex Event Message Patterns
Semantics:Interval-based KR Event Calculus semantics (model-theory + proof theory) based on time intervals modeled as fluents
Example: B;(A;C) (Sequence)
T1 T2 T3 T4
B A C
(A;C)
![Page 23: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/23.jpg)
23 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Example: Request / Query
...<Message mode="outbound" directive="ACL:query-ref">
<oid> <Ind>RuleML-2007</Ind> </oid><protocol> <Ind>esb</Ind> </protocol><sender> <Ind>User</Ind> </sender><content>
<Atom><Rel>getContact</Rel><Ind>Website</Ind><Var>Contact</Var>
</Atom></content>
</Message>...
Message is local to the conversation state (oid) and pragmatic context (directive)
FIPA ACL directive
![Page 24: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/24.jpg)
24 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Example: Response / Answer
<Message …>...
<content><Atom>
<Rel>getContact</Rel><Ind>Website</Ind><Expr>
<Fun>person</Fun><Ind>Adrian</Ind><Ind>Program Co-Chair RuleML-2007</Ind><Ind>Technical University Munich</Ind><Ind>[email protected]</Ind><Ind>+49 89 289 17504</Ind>
</Expr></Atom>
</content>...</Message>
![Page 25: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/25.jpg)
25 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Enterprise Service BusCommunication Middleware
+Service Object Broker
![Page 26: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/26.jpg)
26 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Mule Enterprise Service Bus
Mule ESB Open Source
Message Platform and distributed Object Broker
Staged Event DrivenArchitecture (SEDA)
> 30 Protocols (JMS, HTTP, SOAP …)
Synchronous and AsynchronousCommunication
Complex Message-drivenEvent Processing (CEP)
![Page 27: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/27.jpg)
27 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Mule Enterprise Service Bus
![Page 28: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/28.jpg)
28 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Platform Specific Execution Environments
Rule Engines / Inference Services
![Page 29: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/29.jpg)
29 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Prova – A Semantic Web Rule Engine
Open-Source Project hosted at Sourceforge (http://www.prova.ws/)
Distributed Semantic Web Rule Engine and Agent/Service Oriented Architecture written in Java focusing among other application domains on bioinformatics applications
Principles: Separation of logic (declarative), data access (procedural attachments and query languages), and computation (inference and external procedural computation)
Combines the benefits of declarative (rule-based), Semantic Web meta data and ontology, procedural/object oriented (e.g., Java), and workflow languages (e.g., BPEL)
Standard ISO Prolog scripting syntax + extended logic programming semantics + tight integration of Java and “webized” Semantic Web languages as type systems (vocabularies)
“Distributed Modular Meta-Data Annotated Labeled Order-Sorted Typed Extended Logic Programs”
![Page 30: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/30.jpg)
30 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Prova – Selected Expressive Features
External Data and Object Integration + Query Built-InsJava IntegrationXML IntegrationSQL IntegrationRDF Integration
External Type Systems: Order-Sorted Polymorphic Typed LogicJava Class HierarchiesSemantic Web Ontologies
Input/Output Mode DeclarationsModule Import and Integration: Order Modularized Logic ProgramsMeta Data Labels and Scopes (constructive views)Integrity Constraints and Test Cases for Verification and ValidationBackward-reasoning Derivation rules + ECA-style rulesMessaging Reaction RulesDynamic Transactional Updates
![Page 31: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/31.jpg)
31 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Prova Agent Architecture
Prova-AA offersmessage-oriented context-dependend reaction rules;message sending and receiving for local and remote communication actions;uniform handling of communication protocols (JMS, JADE, plus any of the
more than 30 protocol supported by the Enterprise Service Bus).message payload as complex terms containing typed or untyped Java
variables and serializable Java objects;state machine, Petri nets, or pi-calculus based conversation protocols;context-dependent inline reactions for asynchronous message exchange;ability to distribute mobile rulebases to remote agents;Communicator class for simplified embedding of Prova agents in Java and
Web applications;Prova Universal Message Object gateway for reactive agents on ESB. Multi-threaded Swing programming with Prova Java calls and reaction rules.
![Page 32: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/32.jpg)
32 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Messaging Reaction Rules
Send a message
sendMsg(XID,Protocol,Agent,Performative,[Predicate|Args]|Context)
Receive a message
rcvMsg(XID,Protocol,Agent,Performative,[Predicate|Args]|Context)
Receive multiple messages
rcvMult(XID,Protocol,Agent,Performative,[Predicate|Args]|Context)
Description:XID is the conversation identifierProtocol: transport protocol e.g. self, jade, jms, esbAgent: denotes the target or sender of the messagePerformative: pragmatic context, e.g. FIPA ACL[Predicate|Args] or Predicate(Arg1,..,Argn): Message payload
![Page 33: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/33.jpg)
33 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Example: "Request – Response" Flow with Delegation
% receive query and delegate it to another agentrcvMsg(CID,esb, Requester, acl_query-ref, Query) :-
... (other goals) ...sendMsg(Sub-CID,esb,Agent,acl_query-ref, Query),rcvMsg(Sub-CID,esb,Agent,acl_inform-ref, Answer),... (other goals)...sendMsg(CID,esb,Agent,acl_inform-ref,Answer).
% answers query "Agent"rcvMsg(XID, esb, From, Performative, [X|Args]):-derive([X|Args]),sendMsg(XID,esb,From, answer, [X|Args]).
![Page 34: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/34.jpg)
34 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Complex Event Messaging and Processing
process_join() :-iam(Me),init_join(XID,join_1,[c(_),b(_)]),fork_a_b(Me,XID).
fork_a_b(Me,XID) :-rcvMsg(XID,self,Me,reply,a(1)),fork_c_d(Me,XID).
fork_a_b(Me,XID) :-rcvMsg(XID,self,Me,reply,b(1)),join(Me,XID,join_1,b(1)).
fork_c_d(Me,XID) :-rcvMsg(XID,self,Me,reply,c(1)),% Tell the join join_1 that a new pattern is readyjoin(Me,XID,join_1,c(1)).
% The following rule is invoked by join once all the inputs are assembled.join_1(Me,XID,Inputs) :-
println(["Joined for XID=",XID," with inputs: ",Inputs]).
% Prints% Joined for XID=agent@hostname001 with inputs [[b,1],[c,1]]
- Semantics a la Petri nets and pi-calculus- Workflow patterns
![Page 35: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/35.jpg)
35 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
State machines based conversations0 1query_ref( Product )
2(no)
entry/ ^Buyer.refuse(Product)
2(yes)
entry/ ^Buyer.agree(Product)entry/ ^Buyer.inform_result(Product)
3
entry/ ^self.product(Product,SellerPrice)
request( Product,Price )
4(agree)
entry/ ^Buyer.agree(Product,Price)entry/ ^Buyer.inform_done(Product,Price)
4(refuse)
entry/ ^Buyer.refuse(Product,Price)
[ Price>SellerPrice ]
[ !Price>SellerPrice ]
[ product(Product,_) ][ !product(Product,_) ]
directbuy_seller_1(XID,Protocol,From,Product) :-product(Product|_),!,sendMsg(XID,Protocol,From,agree,Product,seller),sendMsg(XID,Protocol,From,inform_result,Product,seller),directbuy_seller_2(yes,XID,Protocol,From,Product).
directbuy_seller_1(XID,Protocol,From,Product) :-sendMsg(XID,Protocol,From,refuse,Product,seller),directbuy_seller_2(no,XID,Protocol,From,Product).
directbuy_seller_2(yes,XID,Protocol,From,Product) :-!,rcvMsg(XID,Protocol,From,request,[Product,Price],buyer),product(Product,SellerPrice),directbuy_seller_3(XID,Protocol,From,Product,Price,SellerPrice).
directbuy_seller_2(no,XID,Protocol,From,Product).
![Page 36: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/36.jpg)
36 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Other Rule Engines: OO jDREW
OO jDREW is used for personal agents inRule Responder
Two modes of Rule Execution:Bottom-up (forward reasoning)Top-down (backward reasoning)
Rule Responder primarily uses top-down
Supports rules in the following formats:POSL (Positional Slotted presentation syntax)RuleML (XML syntax, can be generated from POSL)
![Page 37: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/37.jpg)
37 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Rule Responder
Use Cases
![Page 38: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/38.jpg)
38 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Expert Finding (1)
![Page 39: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/39.jpg)
39 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Expert Finding (2)
Expert
![Page 40: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/40.jpg)
40 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Job/Task Scheduling
% Manager
upload_mobile_code(Remote,File) :Writer = java.io.StringWriter(), % Opening a file fopen(File,Reader),copy(Reader,Writer),Text = Writer.toString(),SB = StringBuffer(Text),sendMsg(XID,esb,Remote,eval,consult(SB)).
% Service (Contractor)
rcvMsg(XID,esb,Sender,eval,[Predicate|Args]):-derive([Predicate|Args]).
Contract Net Protocol
![Page 41: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/41.jpg)
41 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Interactive Inductive LogicProgramming with Conversations
![Page 42: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/42.jpg)
42 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Symposium Organization (Virtual Organization)
![Page 43: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/43.jpg)
43 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
![Page 44: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/44.jpg)
44 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Virtual Organization (3) Request / Response Conversation
![Page 45: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/45.jpg)
45 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Example: Request Registration Fee (1)
Query from External Agent (e.g. Web form)
<RuleML ...> <Message mode="outbound" directive="query">
... <content>
<Atom> <Rel>computeFee</Rel> <Ind>Adrian Paschke</Ind> <Var>Fee</Var>
</Atom> </content>
</Message> </RuleML>
Delegation Logic of Organizational Agent (Prova)
fee(Phase,Fee):-% look-up responsible agentassigned(Agent,ruleml2007_Submission,ruleml2007_responsible), % query permission from responsible agent sendMsg(XID,esb,Agent, "query", fee(Phase,Fee)), % receive answers multiple times rcvMult(XID,esb,Agent,"answer", fee(Phase,Fee)).
![Page 46: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/46.jpg)
46 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Example: Request Registration Fee (2)Rule of Personal Program Chair Agent: (Prova)
computeFee(Participant,Fee,T):-holdsAt(open(RegistrationPhase),T), fee(RegistrationPhase,BasicFee),sendMsg(XID,esb,ruleml2007_PublicityChair,query, registrationDiscount(Participant,BasicFee,1,Discount,Cost)),rcvMsg(XID,esb,ruleml2007_PublicityChair, answer,registrationDiscount(Participant,BasicFee,1,Discount,Cost)),Fee = Cost - (Cost * Discount).
fee(earlyRegistration,currency_Dollar:500).fee(regularRegistration,currency_Dollar:600).
Rule of Publicity Chair Agent: (OO jDrew)
%This rule is used to calculate the discount of registration if % the organization is a collaboration partner. registrationDiscount(?Organization:collaborationPartner,?RegistrationCost:real,?NumberOfRegistrations:integer,?IndividualDiscountCost:real,?TotalCost:real) :-multiply(?IndividualDiscountCost:real, ?RegistrationCost:real,0.9:real), multiply(?TotalCost:real, ?NumberOfRegistrations:integer,?IndividualDiscountCost:real).
![Page 47: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/47.jpg)
47 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Virtual Organization (4) Meeting Scheduling
![Page 48: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/48.jpg)
48 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Virtual Organization (5) Review Allocation
![Page 49: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/49.jpg)
49 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Virtual Organization (6) Registration Process
![Page 50: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/50.jpg)
50 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Use Case: Rule Based Service Level Agreement Project (1)
http://ibis.in.tum.de/projects/rbsla/
![Page 51: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/51.jpg)
51 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Rule Based Service Level Agreement Project (2)
1. Service Dashboard
• (Monitoring and Contract Tracking)
2. RBSLA Editor / ContractManager
• (Contract Mgt. and Authoring)
![Page 52: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/52.jpg)
52 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Conclusion: Rule-Responder A RuleML-based Pragmatic Agent Web (1)
Develops an effective methodology and an efficient infrastructure to interchange and reuse knowledge on the Web (ontologies and rules) and communicate contextual actions
Adds a pragmatic rule-based layer (Pragmatic Web),defines the rules for using information resources and ontologies to support human agents in their decisions and react partially self-autonomously by means of automated agents or services
Blends and tightly combines the ideas of multi-agent systems, distributed rule management systems, and service oriented and event driven architecturesAddresses real-world software engineering needs for a highly distributed, open, interoperable, efficient and scalable Semantic Web service and agent infrastructure
Design Science Research Approach
![Page 53: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/53.jpg)
53 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Conclusion: Rule-Responder A RuleML-based Pragmatic Agent Web (1)
Demonstrates the interoperation of various distributed platform-specific rule execution environments based on Reaction RuleML as a platform-independent rule interchange format interchanged over an enterprise service bus as transport middlewareApplies rule-based technologies to the management of virtual organizations and collaborative teamsApplies negotiation and distributed coordination mechanisms of rule-based complex event processing and rule-based workflow like reaction rule patternsDemonstrates the integration and interoperation of rule standards (RuleML), Object-Oriented programming (Java) and Semantic Web (RDF, RDFS, OWL) and metadata standards (e.g. iCal, vCard, FOAF)
![Page 54: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/54.jpg)
54 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Applications and Next Steps
Applications of the Pragmatic Agent Web and the Rule Responder middleware in different projects
Rule Responder: http://responder.ruleml.org/Reaction RuleML: http://ibis.in.tum.de/research/ReactionRuleML/Prova Agent Architecture: http://www.prova.ws/Prova Workflow Patterns: http://www.prova.ws/csp/?q=taxonomy/term/11Rule Based Service Level Agreements: http://ibis.in.tum.de/projects/rbsla/
Next stepsIntegration of further rule engines into the middleware (Rule Responder project)Extending the Pragmatic Foundations of Rule ResponderSyntactical standardization issues (Reaction RuleML, Rule Interchange Format)Running projects:
FungalWeb project with Rule Responder agents to answer queries on chemical compunds(Chebi), enzymes (Mesh, EC classificaiton), species; Chebi and enzyme classification (EC)DILP (Distributed Inductive Logic Programming) for Mining Multi-Relation Data in Bioinformatics DoReMoPat: Domain-specific Reference Models for Complex Event PatternsRule Responder Expert Finder
![Page 55: ICPW2007.Paschke](https://reader034.fdocuments.in/reader034/viewer/2022042814/5550f57bb4c90501448b46e9/html5/thumbnails/55.jpg)
55 2nd International Conference on the Pragmatic Web Rule Responder © Adrian Paschke 2007
Rule Responder: A RuleML-based Pragmatic Agent Web
http://responder.ruleml.org
Sourceforge SVN:
https://mandarax.svn.sourceforge.net/svnroot/mandarax.
Sub-project "pragmatic-agent-web"