Semantic Web Rules

Transcription

Semantic Web Rules
Semantic Web Rules
Open Source und
Standardisierungsaktivitäten
Dr. Adrian Paschke
Director RuleML Inc.
Biotec Center Dresden
[email protected]
Biotec
Dr. Adrian Paschke, 31 Jahre
§ Geboren 1976 in Bühl
§ Aufgewachsen in
München
§ Studiert
§
§
§
§
§ Volkswirtschaft an der
LMU, München
§ Wirtschaftsinformatik
an der FAU Erlangen /
Nürnberg
Doktorarbeit an TUM, München (Dr. rer.
nat.)
Forscher am NRC, Kanada 06/07
Forscher am Biotec Center Dresden
seit Sept. 2007
Direktor RuleML Inc. seit 2007
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Biotec
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
2
RuleML
§ RuleML Incorporation (http://www.ruleml.com)
§ Gegründet in Kanada
§ Dachorganisation der RuleML Initiative
§ Agiert Welt-weit (Standort Kanada, Deutschland, ...)
§ Rule Markup and Modeling Initiative (RuleML)
(www.ruleml.org)
§ Mitglieder von Forschung, Industrie und Regierung
§ Zusammenarbeit mit W3C, OMG, OASIS, EPTS,
DARPA-DAML, XBRL, und vielen anderen
Standardisierungs- und Regierungseinrichtungen
§ Ziel: Förderung moderner und zukünftiger Generationen
von Web-basierter Regeltechnologien
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
3
Biotec Center Dresden
Biotec
§ Biotechnologisches Innovationszentrum Dresden
§ http://www.biotec.tu-dresden.de/
§ Interdisziplinäres Exzellenz-Zentrum der TU Dresden
§ Forschungsgruppen für Genomics, Proteomics, Biophysics, Cellular
machines, Tissue engineering und Bioinformatics
§ 150 Forscher aus über 10 Ländern mit
Hintergrund aus Computer Science,
Engineering, Biology, Medicine, Physics,
Chemistry
§ International Master Programm in Molecular
Bio-engineering
§ Bioinformatik ist Mitglied im TUD International
Competence Centre for Computational Logic
§ 20 Biotec Firmen mit ~200 Mitarbeitern
§ 60.000.000 EUR Center for Regenerative
Therapies Dresden (CRTD).
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
4
Agenda
§ Semanitc Web 2.0 – Eine Einführung
§ Semantic Web Rules
§
§
§
§
§
RuleML
W3C RIF
OMG PRR
OMG SBVR
Prova Open Source
§ Entwicklung Regel-basierter Systeme
§ Die Zukunft des Webs: Web 3.0, Web 4.0, ...
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
5
Semantic Web 2.0
Eine Einführung
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
6
Das heutige World Wide Web 1.0
§ Web Inhalte sind typischerweise für die
Benutzung durch Menschen konzipiert
§ Automatisch generierte Webinhalte aus
z.B. Datenbanken werden ohne Semantik
und ihre ursprüngliche Struktur präsentiert
§ Fehlende Unterstützung für
automatische Bearbeitung durch Tools
§ Hauptsächlich nur Schlüsselwort-basierte
Suchmaschienen
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
7
Probleme der Schlüsselwortbasierten Suche
§ Viele Ergebnisse (high recall), aber niedrige
Genauigkeit (low precision)
§ Oder niedrige bis keine Ergebnisse (low recall)
§ Ergebnisse sind einzelne Web Seiten (URIs)
§ Ergebnisse müssen vom Menschen interpretiert
und kombiniert werden
§ Ergebnisse der Suche sind nicht direkt
verwertbar für Softwarewerkzeuge
§ Semantische Informationen über die Bedeutung von
Webinhalten fehlen
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
8
Semantic Web 2.0 – Eine
Einführung
§ "The Semantic Web is an extension of
the current web in which information is
given well-defined meaning, better
enabling computers and people to
work in cooperation."
Tim Berners-Lee, James Hendler, Ora Lassila, The Semantic Web
§ „Make the Web understandable for
machines“
§ Prinzipien (Semantic Web Stack 2003)
§ Die Entwicklung erfolg in Schichten – jede Schicht baut auf der andern auf
§ Abwärtskompatibilität
§ Nach oben: Teilweises Verstehen
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
9
Der Semantik Web Ansatz
§ Repräsentation von Web Inhalten in einer maschinenverarbeitbaren Form
§ Mittels Auszeichnung durch Metadaten und Ontologien
§ Benutzung von intelligenten
Schlussfolgerungstechniken (Logik und Inferenz) um
Web-Inhalte automatische zu verarbeiten und neues
Wissen zu erschließen
§ Automatische Werkzeuge, z.B. Rule-based Expert
Systems, Web Services, Software Agenten
è Das Semantik Web ist eine Ergänzung des
existierenden WWW
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
10
Überblick Semantik Web Schichten (1)
§ XML-Schicht
§ Syntaktische Basis
§ RDF-Schicht
§ RDF als Datenmodel für Fakten und
Metadaten
§ RDF Schema (RDFS) als einfache
Ontologiesprache
§ Ontologie-Schicht
§ Ausdrucksstarke Ontologiesprachen
§ Aktueller Standard: Web Ontology
Language (OWL)
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
11
Überblick Semantik Web Schichten (2)
§ Logik-Schicht
§ Erweiterung der Ontologiesprachen, z.B.
mit komplexen Regeln
§ Beweis-Schicht (Proof Layer)
§ Beweisgenerierung, -austausch und –
validierung
§ Vertrauens-Schicht (Trust Layer)
§ Digitale Signaturen
§ Vorschläge (recommendations),
Bewertungsagenturen (ratings)
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
12
Semantic Web Architektur (2008)
4. Software Agents and Webbased Services
§
Rule Responder, FIPA,
Semantic Web Services, …
3. Logic and Inference
§
e.g. Logic Programming
Rule/Inference Engines,…
2. Ontologies
§
RDFS, OWL Lite|DL|Full
1. Explicit Meta-data
§
vCard, PICS, Dublin Core,
RDF, IEEE LOM (Learning
Objects Metadata), Micro
Formats, FOAF, SIOC …
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
W3C Semantic Web Stack as of 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
13
1. Explizite Metadaten
§ Metadaten sind Daten über Daten.
§ Metadaten im Web:
§ Maschinell verarbeitbare Information über Information im Web
§ Projekte im Web: PICS, Dublin Core (15 Kernattribute), RDF,
IEEE LOM (Learning Objects Metadata), …
§ Problembereiche:
§ Syntax:
§ In welcher Form werden Metadaten ausgetauscht (Kandidat: XML)
§ Semantik:
§ Welche Metadaten können/dürfen für eine Ressource vergeben werden
(Bestimmung eines Vokabulars, eines Schemas)
§ Assoziationsproblem:
§ Wie werden Metadaten mit Ressourcen verknüpft (wer vergibt
Metadaten, werden Metadaten getrennt verwaltet, etc).
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
14
2. Ontologien
§
§
Eine Ontologie ist eine explizite und formale
Spezifikation einer Konzeptualisierung
Ontologien beschreiben das gemeinsame
Wissen einer Domäne (Semantik):
à Semantische Interoperabilität zwischen (verknüpften)
Vokabularen
§
Typische Komponenten
1.
2.
3.
4.
Klassen (Konzepte) der Domäne
Eigenschaften (Rollen) der Klassen
Einschränkungen (Constraints) der Eigenschaften
Individuen (Ausprägungen) der Klassen à Wissensbasis
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
15
3. Logik und Inferenz
§ Logik ist die Disziplin, die sich mit dem
Prinzipien des Schlussfolgerns beschäftigt
§ Formale Sprachen zur Repräsentation von
Wissen mit klarer Semantik
§ Deklarative Wissensrepräsentation:
Beschreibung dessen was gilt, ohne sich um die
Interpretation und Schlussfolgerungen zu kümmern, d.h. das
wie wird an einen automatischen Interpreter/Reasoner
übergeben
§ Automatische Reasoner, z.B.
Regelmaschinen, können
Schlussfolgerungen von gegebenen Wissen
ableiten (Inferenz)
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
16
4. Softwareagenten und Web
Services
§ Intelligente Softwareagenten arbeiten autonom und
proaktive
§ Sie besitzen eine eigenen Wissensbasis mit Entscheidungslogik
(Regelbasiert, Expertenwissen)
§ Beispiele: Personeller Agent, Suchroboter
§ „Ein Web Service bzw. Webdienst ist eine Software-Anwendung,
die mit einem URI eindeutig identifizierbar ist und deren
Schnittstellen als XML-Artefakte definiert, beschrieben und gefunden
werden können. Ein Web Service unterstützt die direkte Interaktion
mit anderen Softwareagenten unter Verwendung XML-basierter
Nachrichten durch den Austausch über internetbasierte Protokolle.“
(Wikipedia)
§
=> keine klare Trennung zwischen Agent vs. Web
Service; aber Agent > Entscheidungsautonomie
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
17
Semantic Web Tools
Triple Stores
RDFStore, AllegroGraph, Tucana
RDF Gateway, Mulgara, SPASQL
Jena’s SDB, D2R Server, SOR
Virtuoso, Oracle11g
Sesame, OWLIM, Tallis Platform
…
Reasoners / Rule Engines
Prova,
Pellet, RacerPro, KAON2, FaCT++
Ontobroker, Ontotext
SHER, Oracle 11g, AllegroGraph
…
Converters
flickurl, TopBraid Composer
GRDDL, Triplr, jpeg2rdf
…
Search Engines
Falcon, Sindice, Swoogle
…
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Middleware
Rule Responder, IODT, Open Anzo, DartGrid
Ontology Works, Ontoprise
Profium Semantic Information Router
Software AG’s EII
Thetus Publisher, Asio, SDS
…
Semantic Web Browsers
Disco, Tabulator, Zitgist, OpenLink Viewer
…
Development Tools
SemanticWorks, Protégé
Jena, Redland, RDFLib, RAP
Sesame, SWI-Prolog,
Prova Rule Manager
TopBraid Composer
DOME
…
Semantic Wiki systems
Semantic Media Wiki,
Platypus, Visual knowledge
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
18
Anwendungsgebiete
§
§
§
§
§
§
§
§
§
§
§
§
Semantic-enriched Search
Content management
Knowledge management
Business intelligence
Go Pub Med
Collaborative user interfaces Semantic-enriched search engine on top of
pubmed.org
Sensor-based services
-search results are ranked using ontologies
terms are highlighted, usable for further
Linking virtual communities -related
search
Grid infrastructure
Multimedia data management
Semantic Web Services
Rule-based Agents (z.B. Rule Responder)
...
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
19
Beispiel 1: Industrielle RDF Hubs
Customer
Customer
Customer
Management
Item Database
CRM
Warehouse
Order
Management
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Employee
Management
Article
Database
Ø Enterprise Application
Integration
Ø „Semantic“ Web Services
Ø Knowledge Management
Ø Content Classification
in Portals…
CRM
RDF
Hub
Warehouse
Order
Management
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
20
Beispiel 2: Semantic Web Search
Hardware
Ontology
Region
City
Store
Shopping Mall
<a onto=…>
Ontologiebased Search
“Hardware
Store
Dresden”
“yellowPages:Store:Har
dware Region:Dresden”
Many pages
nothing
useful
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Relevant pages
which conform to
the ontology
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
21
Beispiel 3: Semantic IT Services
Application Provider
Utility Service Provider
Consumption-based usage
and accounting
eBanking
Service
(pay-per-use, price discrimination, …)
SLA
Functionality,
Quality of Service, Pricing,
Contract Penalties, ...
Pricing and
Revenue Management
Ressourcen
Service Requests
Rule-based
SLA Management
C1
C2
C3
∀
D1
D2
D3
¬P1 ∧ P2 => P3
P3 ∧ P4 ∧ P5 => P6
IT-Infrastructure
(Storage, CPU,...)
∀
Flexible
IT Infrastructures
and Enterprise
Service Networks
(Grid Computing,
SAN, SOA ...)
Service
Customer/User
Service Using
Application
...
Contract / SLA
Management
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Service Provider
WSDL
SLA
Response Time
Delay / Availability
Resource Utilization
Functionality
Guarantees
Pricing / Penalties
Web Service
Application
Contract / SLA
Management
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
22
Beispiel 4: Life Sciences GeneOntology
§ Proteinsequenzen und –strukturen ausgezeichnet mit der
GeneOntology
§ 19.000 Terme
§ Zellkomponenten
§ Biologische Prozesse
§ Molekulare Funktionen
Parent
Is-a relationship
GO concept
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
23
Semantic Web Rules
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
24
Deklarative Programmierung
mittels Regeltechnologie
Users employ rules to express what they want,
the responsibility to interpret this and to decide
on how to do it is delegated to an interpreter
Represent knowledge in a way that is
understandable by ‘the business’, but also
executable by rule engines, thus bridging the gap
between business and technology
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
25
Logische Regeln im Web
Geschäftsregeln:
''The discount for a customer buying a product is 5.0 percent
if the customer is premium and the product is regular.''
''The discount for a customer buying a product is 7.5 percent
if the customer is premium and the product is luxury.''
Prolog-artige Formalisierung als Horn Klauseln:
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
26
Typen von Web Regeln
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
27
Benutzung von Web Regeln
1. Regeln die den operationellen / Entscheidungsprozess
beeinflussen:
•
•
Derivation rules (deduction rules): Ableitung neuer
Informationen welche im Entscheidungsprozess genutzt werden
Reaction rules welche auf bestimmte Ereignisse reagieren
• Condition-Action rules (production rules)
• Event-Condition-Action (ECA) rules + Varianten (z.B.
ECAP).
• Messaging reaction rules (Nachrichten, Anfragen)
2. Constraints auf Organisations- (oder System-) strukturen,
-Verhalten oder -Informationen:
•
•
•
Structural constraints (Deontische Normen).
State constraints
Process / flow constraints
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
28
Exkurs: Quick Guide to OMG MDA
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
29
Web Regelsprachen
Computational
Independent
Platform
Independent
Platform
Specific
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
SBVR
PRR
RuleML RIF OCL
ILog Blaze Prova XCML
IRL SRL
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
30
Regelaustausch
RuleML
(e.g. OWL, RDFS)
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
31
RuleML
SBVR
PRR
RuleML RIF OCL
ILog Blaze Prova XCML
IRL SRL
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
32
RuleML
§ Rule Markup and Modeling Initiative
(RuleML)
§ http://www.ruleml.org
§ Förderung moderner und zukünftiger
Generationen von Web-basierter
Regeltechnologien
§ Offener de facto Sprachstandard für Web
Regeln
§ Basis für weitere Regelsprachen z.B. OMG
PRR, W3C RIF, W3C SWRL, REWERSE
R2ML, ….
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
33
RuleML ermöglicht ...
modelling
markup
translation
Rule
UML
RDF
interchange in
execution
publication
archiving
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
XML
ASCII
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
34
RuleML Sprachfamilie
RuleML
Derivation
Rules
Reaction
Rules
Integrity
Constraints
Transformation
Rules
RuleML
Translators
Layered Approach
Reaction RuleML
Integrity
RuleML
Derivation RuleML
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
35
RuleML Sprachfamilie – Derivation RuleML
Languages
/ Dialects
Modules
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
36
Schema Modularisierung
§ RuleML ist durch
modulare XSDs
spezifiziert
§ XML Schema + EBNF
Syntax
§ Voll RDF kompatible (~
RDF triple syntax);
§ XML Schema
Modularisierung:
Feinschichtiges und
einheitliches Design
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
37
RuleML 0.91 – Striped Syntax
''The discount for a customer buying a product is 5.0 percent
if the customer is premium and the product is regular.''
<Implies>
Type Tag
<head>
Role Tag
<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>
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Implies
head
Atom
op
Rel
Var
Var
Ind
discount
customer
product
5.0 percent
body
And
Atom
op
Atom
opr
Rel
Var
premium
customer
Rel
Var
regular
product
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
38
Striped Syntax vs. Stripe-skiped
Syntax
<Implies>
<body>
<Atom>
<Rel>spending</Rel>
<Var>customer</Var>
<Ind>min 5000 euro</Ind>
<Ind>previous year</Ind>
</Atom>
</body>
<head>
<Atom>
<Rel>premium</Rel>
<Var>customer</Var>
</Atom>
</head>
</Implies>
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
<Implies>
<Atom>
<Rel>spending</Rel>
<Var>customer</Var>
<Ind>min 5000 euro</Ind>
<Ind>previous year</Ind>
</Atom>
<Atom>
<Rel>premium</Rel>
<Var>customer</Var>
</Atom>
</Implies>
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
39
RuleML 0.91 – Positional
Representation
''The discount for a customer buying a product is 5.0 percent
if the customer is premium and the product is regular.''
<Implies>
Type Tag
<head>
Role Tag
<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>
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Implies
head
Atom
op
Rel
Var
Var
Ind
discount
customer
product
5.0 percent
body
And
Atom
op
Atom
opr
Rel
Var
premium
customer
Rel
Var
regular
product
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
40
Slotted Un-positional Object
Oriented Representation
§ Position independent user-defined role -> filler pairs:
<Implies>
<Atom>
<Rel>spending</Rel>
<slot><Ind>spender</Ind><Var>customer</Var></slot>
<slot><Ind>amount</Ind><Ind>min 5000 euro</Ind></slot>
<slot><Ind>period</Ind><Ind>previous year</Ind></slot>
</Atom>
<Atom>
<Rel>premium</Rel>
<slot><Ind>client</Ind><Var>customer</Var></slot>
</Atom>
</Implies>
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
41
RuleML Sprachfamilie
RuleML
Derivation
Rules
Reaction
Rules
Integrity
Constraints
Transformation
Rules
RuleML
Translators
Layered Approach
Reaction RuleML
Integrity
RuleML
Derivation RuleML
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
42
Reaction RuleML
§
§
Reaction RuleML (http://ibis.in.tum.de/research/ReactionRuleML/)
Quasi-Standard for Reactive Web Rules
§ Production rules, ECA rules and variants such as Trigger (EA), intelligent rule-based
CEP, KR Event/Action Logics, Process Algebras, …
§
Anwendungen z.B. in.:
§
§
§
§
§
§
§
§
§
§
§
§
§
Event Processing Networks (EPN)
Complex Event Processing (CEP) / Event Processing Language (EPL)
Event Driven Architectures (EDAs)
Reactive, rule-based Service-Oriented Architectures (SOAs)
Active Semantic Web Applications
Real-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-Contracts
Supply Chain Event Management
Policies
Web-based Workflow Systems
…
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
43
Anwendungsbereich
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
44
Generelle Konzepte
§ Generelles Regelformat, welches je nach Bedarf spezialisiert werden
kann
§ Drei generelle Ausführungsarten (styles):
§ Active: aktive Abfrage / Erkennung auftretender Ereignisse (events) z.B.
regelmäßige Abfrage eines Dienstes oder Anfrage an
Ergeignisdatenbank
§ Messaging: Warten auf eingehende Ereignissnachrichten und
Aussendung von Aktionsnachrichten
§ Reasoning: logische Event/Action logics, Transaktionslogiken,
Prozesskalküle, z.B. Event Calculus, Temporal Action Logics
§ Vorkommen (appearance):
§ Global: globale Reaktionsregeln
§ Local: lokal definierte (inline) Reaktionsregeln
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
45
Syntax für Reaktionsregeln (Reaction RuleML 0.2)
<Rule style="active" eval="strong">
<on>
<!-- event -->
</on>
<if>
<!-- condition -->
</if>
<do>
<!--
action -->
</do>
<ifPost>
<!-- postcondition -->
</ifPost>
<doAlternative>
<!-- alternative/else action -->
</doAlternative>
</Rule>
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
46
Reaction RuleML – Regeltypen
§ Derivation Rule:
<Rule style="reasoning">
<if>...</if>
<then>...</then>
</Rule>
§ Production Rule:
<Rule style="active">
<if>...</if>
<do>...</do>
</Rule>
§ ECA Rule:
<Rule style="active">
<on>...</on>
<if>...</if>
<do>...</do>
</Rule>
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
47
Nachrichten 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. a FIPA
ACL performative
§ < 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 RuleML query,
answer or rule base
Softwareentwicklung in der industriellen Praxis
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Vorlesung – TUD Vorlesung
SS’08
48
Weitere ausgewählte Eigenschaften
§ Complex Event and Action Algebra
§ Support for different selection and consumption
policies
§ Support for intervals (Time, Event)
§ Support for situations (States, Fluents)
§ Support for external event query languages
§ Support for external vocabularies
§ Support for external action execution / procedural
attachments
§ ...
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
49
W3C RIF
SBVR
PRR
RuleML RIF OCL
ILog Blaze Prova XCML
IRL SRL
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
50
W3C Rule Interchange Format
§ W3C RIF Working Group – seit Dezember 2005
http://www.w3.org/2005/rules/wiki/RIF_Working_Group
§ Ziel: Standardisierung eines Web-basierten Regelaustauschformats
§ Aktuelle Arbeitsentwürfe (Working Drafts):
§ RIF-FLD (Framework of Logic Dialects)
§ Generelles Framework für logische RIF Sprachdialekte
§ RIF-SWC (RDF and OWL Compatibility)
§ Interoperabilität zwischen RIF und Semantic Web Daten- und
Ontologiesprachen (RDF, RDFS, OWL).
§ RIF-DTB (Data Types and Builtins)
§ RIF Datentypen und Built-in Funktionen und Prädikate
§ RIF-BLD (Basic Logic Dialect)
§ Basis-Logik-Dialekt für logische Regeln (definite Horn rules with equality)
§ RIF-PRD (Production Rules Dialect)
§ RIF Produktions Regel Dialekt
§ RIF-UCR (Use Cases and Requirements)
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
51
W3C RIF Basic Logic Dialect
(RIF-BLD)
§ Definite Horn Rules +
§ Equality, Slots, Frames, Internationalized
Resource Identifiers (IRIs), XML Schema Data
Types, ...
§ Syntaxes
§ Normative XML Syntax
§ sehr ähnlich zu RuleML XML Syntax
§ Nicht-normative Präsentationssyntax
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
52
Beispiel RIF-BLD
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
53
RIF Planung bis Mai 2009
Recomendations:
§ RIF Basic Logic Dialect (BLD)
§ RIF Framework for Logic Dialects
§ RIF Datatypes and Built-Ins
§ RIF Production Rule Dialect
§ (if possible) Dialect Interoperation and Extensible Core
Geplante Working Draft:
§ RIF Logic Programming Dialect
§ RIF Full First-Order Logic Dialect
§ RIF Extension for XML Data Sources
§ RIF Reaction Rules Dialect
§ (includes RIF Event Processing Language Dialect)
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
54
OMG PRR
SBVR
PRR
RuleML RIF OCL
ILog Blaze Prova XCML
IRL SRL
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
55
SBVR
Production Rules
Representation
PRR
RuleML
ILog Blaz
IRL
e
SRL
RIF
Prova
OCL
XCML
§ Formales Model zur Anbieter-neutralen Darstellung von
Regelmodellen in UML für Produktionsregeln
§ Konsortium von Entwicklern, Anbietern und Benutzern
§ Anbieter (Fair Isaac, ILOG, LibRT, IBM, Pega, Corticon, TIBCO, …)
§ Akademische Gemeinde (RuleML.org)
§ Verwandte Anbieter (Fujitsu, IBM)
§ PRR zur Zeit "Adopted" als Standard in "Finalization",
§ Beta Status, mit finaler Version 1.0 in 2008
§ OMG MDA PIM Model
§ PRR beta definiert PRR Kern auf Basis von UML MOF
§ Keine explizite Ausdruckssprache
§ (z.B. RuleML Reaction RuleML oder RIF PRD zur Serialisierung)
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
56
PRR ProductionRule Klassen
if [condition] then [action-list]
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
57
OMG SBVR
SBVR
PRR
RuleML RIF OCL
ILog Blaze Prova XCML
IRL SRL
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
58
SBVR
Semantics of Business
Vocabulary and Business Rules
PRR
RuleML
ILog Blaz
IRL
e
SRL
RIF
Prova
OCL
XCML
§ Unterstützung für Rechenunabhängige
Modellierung (computational independent
modeling) von Geschäftsregeln (business rules)
durch Geschäftsleute — natürliche Sprache,
allgemeine Graphiken und Tabellen
§ Seit September 2005 „Finalization“ Status im
OMG Prozess zur Annahme von Standards
§ Final angenommene SBVR 1.0 Spezifikation
(dtc/06-03-01)
§ http://www.omg.org/spec/SBVR/1.0/
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
59
SBVR in MDA
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
60
SBVR Überblick
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
61
SBVR Pakete
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
62
SBVR Metamodel und SBVR
Vokabular
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
63
PROVA
Distributed Semantic Web Rule Engine
http://prova.ws
SBVR
PRR
RuleML RIF OCL
ILog Blaze Prova XCML
IRL SRL
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
64
Was ist Prova?
§
Sourceforge Open-Source Projekt (http://www.prova.ws/) seit 2003
§ Aktivität 86.69% ; Downloads 28,529; 10 new requests per month, 254 registered
users
§ Anwendungsgebiete:
§ Xalia Core for Services - Resource / Service Allocation: Prova used for efficiently
computing global execution plans
http://xdn.xcalia.com/xdn/docs/files/XcaliaCore/4.3.0/documents/html/introduction4.htm
§ W3C Semantic Web Rule Interchange Format:
http://www.w3.org/2005/rules/wg/wiki/List_of_Rule_Systems
§ Rule-based IT Service and Contract Management: RBSLA Projekt
http://ibis.in.tum.de/projects/rbsla/index.php
§ Rule Responder Pragmatic Agent Web
http://ibis.in.tum.de/projects/paw/
§
Distributed Semantic Web Rule Engine and Agent/Service-Oriented Architecture:
“Prova follows the spirit and design of the recent W3C Semantic Web initiative
and combines declarative rules, ontologies and inference with dynamic objectoriented programming and access to external data sources via query language
built-ins.”
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
65
Prova
§ Prinzipien
§ Trennung von Logik (declarative), Datenzugriff
(procedural attachments and query languages) und
Berechnung (inference and external procedural
computation)
§ Verbindet deklarative Programmierung (Regeln)
mit OO-Programmierung (Java) und
Workflowsprachen (z.B., BPEL)
§ Standard ISO Prolog Scripting Syntax +
§ Integration von Java, Semantic Web Sprachen
(RDF,RDFS, OWL, RIF) und Anfragesprachen (z.B.
SPARQL, XPath/XQuery, SQL)
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
66
Prova – Ausgewählte Eigenschaften
§
External Data and Object Integration + Query Built-Ins
§ Java Integration
§ XML Integration
§ SQL Integration
§ RDF Integration
§
External Type Systems: Order-Sorted Polymorphic Typed Logic
§ Java Class Hierarchies
§ Semantic Web Ontologies
§
§
§
§
§
§
§
Input/Output Mode Declarations
Module Import and Integration: Order Modularized Logic Programs
Meta Data Labels and Scopes (constructive views)
Integrity Constraints and Test Cases for Verification and Validation
Backward-reasoning Derivation rules + ECA-style rules
Messaging Reaction Rules and Complex Event Processing
Dynamic Transactional Updates
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
67
Syntax design features of Prova
u
The syntax combines ISO Prolog and Java but the key is simplicity:
% Prolog
% Prova
N2 is N + 1,
N2 = N + 1,
---------------------------------------------------------------// Java
% Prova
List l = new java.util.ArrayList();
L=java.util.ArrayList(),
Low-cost creation of distributed integration and computation workflows.
• Prova separates logic, data, and computation.
• Low-cost integration of rule-base scripted agents inside Java and Web
applications.
• For more information check the User`s Guide in the prova web page.
•
© Dr. Adrian Paschke
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung SS’08
Using colours for language elements
The colours below are used to distinguish the language elements:
% Comments are in green
% Built-in predicates are brown
tokenize_list(Line,"\t",[T|Ts])
% User-defined predicates are blue
member(X,[X|Xs])
% Java calls and constructors are red
Text1=P1.toString()
% Table names are pink
sql_select(DB,cla,px(PXA),pdb_id(PDB))
% Message performatives (speech acts) are navy blue
rcvMsg(Protocol,From,query_ref,[X|Xs]) :© Dr. Adrian Paschke
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung SS’08
Prova Syntax
§
§
§
§
§
§
§
§
§
§
Variables (upper case), Constants (lower case)
Fact: availability(s1,99%).
Rule: qos(S,high):- availability(S,99%).
Query 1: :-solve (not(qos(S,high)).
Query 2: :-eval (not(qos(S,high)).
Derive: , derive([X|Args]), ...
Scoping: scope(p(X),“www.prova.ws“), ...
Memoization: cache(p(X)), ...
Lists: [Head|Tail] = [Head,Arg2,...,ArgN] = Head(Arg2,...,ArgN)
Module Imports:
:- eval(consult("ContractLog/list.prova")).
:- eval(consult("http://rule.org/list.prova")).
§ Meta data annotation:
metadata(label(r1),src("www.prova.ws"),dc_author("AP")) ::
qos(S,medium) :- availability(S,98%).
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
70
Prova Beispiel
Prova extends ISO Prolog syntax:
% Facts
is_a("anticoagulant","molecular_function").
% Clauses (head true if conditions true in the body)
parent(X,Y) :is_a(Y,X).
parent(X,Y) :has_a(X,Y).
% Goals (note there is no head)
:- solve(parent(Parent,"anticoagulant")).
% Print solutions
:- eval(parent(Parent,"anticoagulant")). % Just run exhaustive search
Format of the output for the goal solve above:
Parent="molecular_function"
© Dr. Adrian Paschke
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung SS’08
Pervasive use of the Java type system
Java typed and untyped variables;
u Natural rules for subclasses unification;
u Java variables prefixed by full package
u prefix with java.lang being default;
u
:- solve(member(X,[1,Double.D,"3"])).
:- solve(member(Integer.X,[1,Double.D,"3"])).
% Standard type-less rules for the standard member predicate
member(X,[X|Xs]).
% X is a member of a list if it is the first element
member(X,[_|Xs]) :- % X is a member of a list if it is in the list tail
member(X,Xs).
--------------------------> X=1
> X=java.lang.Double.D
> X=3
> java.lang.Integer.X=1
© Dr. Adrian Paschke
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung SS’08
Description Logic (DL) type system
DL-typed and untyped variables;
u Uses Semantic Web ontologies as type systems
u Uses external DL reasoner (e.g. Pellet) for dynamic type checking
u Syntax: [Variable]:[nameSpace]_[ClassType]
[individualConstant]:[nameSpace]_[ClassType]
u
:- eval(consult('ContractLog/owl.prova')). % needed
% import external type system (T-Box model) and individuals (A-Box)
import(“http://example.org/WineProjectOWL.owl").
% use OWL-DL reasoner; for a list of available predefined reasoners see
OWL2PROVA.java
reasoner ("dl").
% typed rule
serve (X:default_Wine) :- recommended(X:default_Wine).
% ground fact; defines an instance of class
recommended(default_White_Wine:Chardonnay).
% non ground DL facts are interpreted as queries on external ontology
recommended(X:default_White_Wine).
recommended(X:default_Red_Wine).
:-solve(recommended(X:default_Wine)).
Softwareentwicklung in der industriellen Praxis
© :-solve
Dr. Adrian Paschke
Vorlesung – TUD Vorlesung SS’08
(recommended(X:default_White_Wine)).
Java Method Calls
u Constructors, instance and static methods, and public field
access;
u Ability to embed Java calls makes the Prolog-like
programming style more suitable for integration and computation
workflows.
hello(Name):S = java.lang.String(“Hello”).
S.append (Name),
java.lang.System.out.println (S).
© Dr. Adrian Paschke
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung SS’08
Example: Java-based XML Processing
(DOM)
uA
small wrapper for XML DOM in Java is needed because of bugs in
reflection and to improve access to elements.
u Non-deterministic iteration over elements and attributes node
collections with nodes method.
:- eval(test_xml()).
test_xml() :% This extends the standard DOM API: create a Document based on File
name
Document = XML("blast.xml"),
Root = Document.getDocumentElement(),
Elements = Root.getElementsByTagName("Hit"),
% This extends the standard DOM API: enumerate the nodes
Elements.nodes(Element),
SubElements = Element.getElementsByTagName("Hsp"),
SubElements.nodes(SubElement),
ChildNodes = SubElement.getChildNodes(),
ChildNodes.nodes(ChildNode),
ChildNodeName = ChildNode.getNodeName(),
DataName = ChildNode.getFirstChild(),
StringName = DataName.getNodeValue(),
println(["
Child name: ",ChildNodeName]), Softwareentwicklung in der industriellen Praxis
© Dr. Adrian
Paschke
println(["
Child value: ",StringName]).
Vorlesung – TUD Vorlesung SS’08
Exception Handling
u Exception handling that results in a failure and backtracking
u Compensation handling in which the control flow continues
:- eval(raise_test()).
handle_exceptions (Msg) :exception(Ex),
printl([Ex]),
println([Msg]),
fail().%fail
raise_test () :on_exception(java.lang.Exception,
handle_exceptions(" in raise_test()")),
Ex = java.lang.Exception("A Prova exception"),
raise(Ex). % throw exception
© Dr. Adrian Paschke
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung SS’08
Built-Ins
§ Simple artihmetic relations (+ - = ...)
% Prova
N2 = N + 1,
§ Negations (not, neg)
% Default Negation
register(User) :- not(known(User)), ...
§ Fact base updates
% Update global facts
register(User) :- not(known(User)), assert(known(User)).
§ Variable mode tests (free, bound, type)
§ String manipulation predicates
% Concat Strings
concat(["{",In,"}"],Out), % prepend "{" and append "}"
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
77
External Data and Object
Integration
§ File Input / Output
..., fopen(File,Reader), ...
§ XML (DOM)
document(DomTree,DocumentReader) :XML(DocumenReader),
§ SQL
…,sql_select(DB,cla,[pdb_id,“1alx“],[px,Domain]).
§ RDF
...,rdf(http://...,"rdfs",Subject,"rdf_type","gene1_Gene"),
§ XQuery
..., XQuery = ' for $name in
StatisticsURL//Author[0]/@name/text() return $name',
xquery_select(XQuery,name(ExpertName)),
§ SPARQL
...,sparql_select(SparqlQuery,name(Name),class(Class),
definition(Def)),
Softwareentwicklung in der industriellen Praxis
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Vorlesung – TUD Vorlesung
SS’08
78
Beispiele: File I/O und SPARQL
test_fopen() :fopen(File,Reader),
% Non-deterministically enumerate lines in the file
read_enum(Reader,Line),
println([Line]).
% Print one line at a time
exampleSPARQLQuery(URL,Type|X) :QueryString =
' PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?contributor ?url ?type
FROM <http://planetrdf.com/bloggers.rdf>
WHERE {
?contributor foaf:name "Bob DuCharme" .
?contributor foaf:weblog ?url .
?contributor rdf:type ?type . } ',
sparql_select(QueryString,url(URL),type(Type)|X),
println([[url,URL],[type,Type]|X],",").
Softwareentwicklung in der industriellen Praxis
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Vorlesung – TUD Vorlesung
SS’08
79
Beispiel: „Mobile Rule Code“
% 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,query-ref,consult(SB)).
% Service (Contractor)
rcvMsg(XID,esb,Sender,eval,[Predicate|Args]):derive([Predicate|Args]).
Contract Net Protocol
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
80
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 ready
join(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]]
Softwareentwicklung in der industriellen Praxis
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Vorlesung – TUD Vorlesung
SS’08
81
State machines based conversations
0
query_ref( Product )
1
[ product(Product,_) ]
[ !product(Product,_) ]
2(yes)
2(no)
entry/ ^Buyer.agree(Product)
entry/ ^Buyer.inform_result(Product)
entry/ ^Buyer.refuse(Product)
request( Product,Price )
4(refuse)
[ !Price>SellerPrice ]
entry/ ^Buyer.refuse(Product,Price)
3
entry/ ^self.product(Product,SellerPrice)
[ Price>SellerPrice ]
4(agree)
entry/ ^Buyer.agree(Product,Price)
entry/ ^Buyer.inform_done(Product,Price)
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).
© Dr. Adrian Paschke
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung SS’08
Entwicklung Regelbasierter Systeme
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
83
Grundlagen
§ V&V&I Pattern:
Validation: ”Entwickeln wir das richtige Programm?”
Verification: ”Entwickeln wir das Programm richtig?”
Integrity: ”Führen wir das Programm richtig aus?”
§ Fehler und Anomalien
§ Fehler sind Probleme welche direkt die Ausführung von Regeln
beeinflussen, z.B. typographische Fehler, Unvollständigkeit,
Wiedersprüche, …
§ Anomalien sind Symptome von wirklichen Fehlern
§ Taxonomy of Anomalies (Preece and Shinghal)
§ Semantische Überprüfung z.B. Konsistenz, Vollständigkeit
§ Strukturelle Überprüfung, z.B. Redundanz, Relevanz, Erreichbarkeit
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
84
Motivation
§
Software Development Lifecycle (SDLC) für viele Open-Source und kleinere
Projekte ungeeignet
§
§
Kostenintensiv, langsam, schwer zu verwalten und zu ändern, bei ständig
wechselnden Anforderung
Unterschiedliche Anforderungen durch verteilte Web-basierte Systeme oft über
Domänengrenzen hinweg
Vorgeschlagene Lösungen:
1. Agile SE (Extreme Programming + andere)
§
Beschleunigen Entwicklungsprozess und unterstützen Redesign
§
Empirische Beweise, dass XP für kleine und mittlere Projekte besser
geeignet
Layman, L.: “Empirical Investigation of the Impact of Extreme Programming Practices on Software Projects,”
2. Regel-basierte Systeme: Entwicklung von Werkzeugen welche
Geschäftsleute befähigen IT Dienste und Geschäftsprozesse flexibel zu
ändern
§
§
Vermeidung des langsamen SDLC
Neue Welle an kommerziellen Tools (Regel Engines, CEP-Engines, Workflow
Engines).
Könnten 1. + 2. vereint werden ?
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
85
Problem: Komplexität von Regelsprachen
§
Anzahl der Primitiven in Regelsprache
§ z.B. Anzahl der benutzen Konvektive
§
Tiefe des Ableitungsbaums
§ z.B. begrenzt für Logische Programme ohne Funktionssymbole, aber unbegrenzt
wenn Konvektive und Terme verschachtelt sind
§
Restriktionen der Regelsprache
§ z.B. keine Negation im Regelkopf
§
Keine allgemeingültige Sprachelemente und prozedurale Elemente
§ z.B. Prioritäten, Cut, Unterschiedliche Arten von logischen und prozeduralen
Konjunktionen, procedural attachments, …
§
Unterschiedliche Sprachelemente mit ähnlicher Bedeutung
§ schwache und starke Negation
§ OR und XOR
§
Polymorphische Sprachelemente
§ z.B. polymorphic negation, polymorphic order-sorted types
§
Keine Standardinterpretation von bestimmten Sprachelementen
§ z.B. Arten von Modal Logic, Deontische Modalitäten, Negation as Failure
§
Kreuzreferenzen zwischen Regeln
§ z.B. Schleifen im Abhängigkeitsgraph zwischen Prädikatssymbolen
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
86
Lehren aus dem Software Engineering
§
Unterschiedliche SE Ansätze und Methoden
1. „Schwergewichtige“ Ansätze
§ z.B. Wasserfall-Model, V-Model
§ Führen zu hohen Änderungskosten
§ Können dynamische Verhalten nicht überprüfen und Interaktionen zwischen
dynamisch geänderten und ausgetauschten Regelbasen
2. Einfaches strukturelles / Operationales Debugging
§ Führen Programm aus und überwachen Ausführungsablauf (execution trace)
§ Hohe kognitive Belastung und tiefes Verständnis der zugrunde liegenden
Prozesse auf Seiten des Entwicklers nötig
3. Model Checking, Algebraisch, Graph-basiert, Petri-Net-basierte Methoden
§ z.B. Petri-Nets, Process Algebras, ACTL
§ Sehr Rechen-aufwendig
§ Setzen tiefes Verständnis beider Domänen voraus: Regelsprache und
Testsprache / Verifikationsmodelle
§ Oft weitaus komplexer als das Regelprogramm selbst
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
87
XP – Test Driven Development
§ Eingeführt in den späten 90’ern
§ Test-driven Extreme Programming und Agile SE
§ Empirische Beweise, dass XP für kleine und mittlere
Projekte besser geeignet
Layman, L.: “Empirical Investigation of the Impact of Extreme Programming Practices on Software
Projects,”
§ Unterstützung durch Industrie, z.B. IBM
§ Vernachlässigt umfangreiche Analyse und Design ist aber
trotzdem ein formaler Ansatz
§ Beschleunigt Entwicklungsprozess, Unterstützt
“Backtracking” (redesign), Kollaboration von Rollen
(Experten, Systementwickler, …), evolutionärer iterativer
Ansatz, Unterstützt Regelaustausch und dynamisches
Testen
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
88
Test Cases für Regelbasen
§
Regeln beschränken die Menge an möglichen Modellen (possible worlds)
§
§
Test Cases beschränken die möglichen Modelle und entsprechen ungefähr den
beabsichtigten Modellen des Entwicklers
§
§
§
Vordefinierte Anfragen werden benutzt um die Regelbasis zu testen
Äußerst einfach, z.B. keine Variablen, keine Funktionen, keine Negation
Ein Test Case ist definiert als TC := {A, T i}, wobei
§
§
§
§
Aber sind relativ komplex (wie vorher argumentiert)
A ⊆ L assertion base (Eingabe Daten, z.b. Fakten )
Ti ∈ L , i>0, Testanfragen, wobei T i:
1. Eine Testanfrage Q := q(t1, ..tn)?, wobei Q ∈ rule(P)
2. Ein Ergebnis R mit wahr ”true”, falsch ”false” oder ”unknown” Auszeichnung
3. Antwortmenge mit erwarteten Variablenbindungen
?:={{X1/a1 ,X1/a2 ,…,X1 /an},…,{Xm/c1,…,Xm/ck}
T = A ∪ {Q => R :? } oder einfach T = {Q => R :? }
Beispiel:
T1 = {p(X) => true : {X/a, X/b, X/c}, q(Y ) => false}
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
89
Test Cases für Regelbasen
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
90
Test-basierte Entwicklung
1.
Schreibe ausführbare Test Cases zuerst
§
§
§
§
2.
Geringes Vorausdesign aber sich entwickelndes Design. Permanentes Redesign
durch Refactoring
§
§
3.
Optimierung der Regeln ohne Veränderung des Verhaltens
Modifizierung und Anpassung der Test Cases und des Programms in einem iterativen
Prozess entsprechend der sich verändernden Anforderungen und entdeckter Fehler
Kurze Iterationen
n
4.
Tool-Unterstützung für Test, Coverage Measurement, Automated Refactoring,
Dependencies Analysis
Tests sind eine Annährung an die erwarteten Modelle (erwartete Antworten des
Programs)
§
§
5.
In der selben Regelsprache
Black Box Sicht
Abstraktion vom Regelprogramm -> viel Einfacher
Wiederverwendbar für andere Regelprogramme
Die Annährung (test coverage) wird dynamisch gesteigert (adaptive modeling)
Besser geeignet um die Dynamik von offenen Projekten und Web-basierter Anwendungen
zu erfassen als Ansätze mit großem, teuren Vorausdesign
Test Cases werden zusammen mit den Regelprogrammen geschrieben, gepflegt,
verwaltet und ausgetauscht; in der selben deklarativen Regelsprache
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
91
Test-driven Development
Feedback Loop
Requirements
Modeling:
Refactoring:
Update Test Cases
Optimize/Extend
Rules
feedback
Release
Rule Program
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
failure
success
often 80-20 success rate
V&V Testing:
Execute Test Cases
+ Test Coverage
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
92
Beispiel Test Case in Prova
% testcase oid
testcase("./examples/tc1.test").
% assertions via updates adding one rule and two facts
:-solve(add("tc1.test","a(X):-b(X). b(1). b(2).")).
% positive test with success message for JUnit report
testSuccess("test1","succeeded"):testcase(./examples/tc1.test), testQuery(a(1)).
% negative test with failure message for Junit report
testFailure("test1","can not derive a"):not(testSuccess("test1",Message)).
% define the active tests - used by meta program
runTest("./examples/tc1.test"):-testSuccess("test
1",Message).
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
93
Prova - LPCover Werkzeug
§ JUnit Test Reports
§ Test Coverage Measurement
§ Automated Refactoring
§ Basierend auf Smells (structures which need to be
improved), z.B.
§ Redundancy – There are redundant rules or rule fragments
(for instance, shared subsets of prerequisites).
§ Inconsistency – Different, inconsistent results are
supported by the same rule set.
§ Incompleteness – Certain queries can not be answered by
a rule set.
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
94
Test Cases / Test Suites in RuleML
<TestSuite ruleBase="SampleBase.xml">
<Test id="ID001" purpose="...">
<testAssertions><RuleMLFormula>
<ruleml:And>
<ruleml:Atom>
<ruleml:Rel>parent</ruleml:Rel>
<ruleml:Ind>John</ruleml:Ind>
<ruleml:Ind>Mary</ruleml:Ind>
</ruleml:Atom>
</ruleml:And>
</RuleMLFormula></testAssertions>
<TestItem expectedAnswer="yes">
<testQuery><RuleMLFormula>
<ruleml:Atom closure="universal">
<ruleml:Rel>uncle</ruleml:Rel>
<ruleml:Ind>Mary</ruleml:Ind>
<ruleml:Var>Nephew</ruleml:Var>
</ruleml:Atom>
</RuleMLFormula></testQuery>
<expectedResults>
<VariableValuePair>
<ruleml:Var>Nephew</ruleml:Var>
<ruleml:Ind>Tom</ruleml:Ind>
</VariableValuePair>
<VariableValuePair>
<ruleml:Var>Nephew</ruleml:Var>
<ruleml:Ind>Irene</ruleml:Ind>
</VariableValuePair>
</expectedResults>
</TestItem>
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
<InferenceEngineSemantics>minimal</Infere
nceEngineSemantics>
Softwareentwicklung in der industriellen Praxis
</Test></TestSuite>
Vorlesung – TUD Vorlesung
SS’08
95
Regelaustausch: Selbstvalidierende Regelbasen
RIF +
Test Suites
(e.g. OWL, RDFS)
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
96
Entwicklung von Regelbasen
§ Computational Independent Model (CIM)
§ Natürliche Sprache
§ z.B. Controlled English
§ Template-driven, Design Patterns
§ Vordefinierte Templates, Blueprints, Vokabulare,
Design Patterns
§ Visuelle Sprache
§ Graphisch, z.B. UML-basiert
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
97
Attempto Controlled Englisch
Translator
TRANSLATOR
ACE
DRS
GUI
RuleML, …
RuleML
query
(ACE + params)
DRS
Parser
DRS
grammar
DRS,
…
JavaCC
APE
webservice
© Dr. Adrian
Paschke
© by
Adrian Paschke, 2008
http://www.ruleml.org/translator/
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
98
Every honest student who does not procrastinate
receives a good mark and easily passes the course.
(ACE)
…
<Forall>
<Var>A</Var>
[]
<Implies>
[A]
<And>
<Atom><Rel>object</Rel>…<Ind>student</Ind>…</Atom>
object(A, … student, …)
<Atom><Rel>property</Rel>…<Ind>honest</Ind></Atom>
property(A, honest)
<Neg>
NOT
<Exists>
<Var>B</Var>
[B]
<Atom><Rel>predicate</Rel>…<Ind>procrastinate</Ind> …
predicate(B, … procrastinate, A)
</Exists>
</Neg>
</And>
=>
<Exists>
<Var>C</Var><Var>D</Var><Var>E</Var><Var>F</Var>
[C, D, E, F]
<And>
<Atom><Rel>object</Rel>…<Ind>mark</Ind>…</Atom>
object(C, … mark, …)
<Atom><Rel>property</Rel>…<Ind>good</Ind></Atom>
property(C, good)
<Atom><Rel>predicate</Rel>…<Ind>receive</Ind>…</Atom>
predicate(D, … receive, A, C)
<Atom><Rel>predicate</Rel>…<Ind>pass</Ind>…</Atom>
predicate(E, … pass, A, F)
<Atom><Rel>modifier</Rel>…<Ind>easily</Ind></Atom>
modifier(E, manner, … easily)
<Atom><Rel>object</Rel>…<Ind>course</Ind>…</Atom>
object(F, … course, …)
</And>
</Exists>
</Implies>
</Forall>
…
Softwareentwicklung in der industriellen Praxis
© Dr. Adrian
Paschke
Vorlesung – TUD Vorlesung
SS’08
© by Adrian Paschke, 2008
99
(DRS)
(RuleML)
Templates, Patterns, Vocabularies
http://ibis.in.tum.de/projects/rbsla/index.php
Execution Dashboard
•
(Monitoring and Contract
Tracking)
Rule Editor + Manager
•
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
(Contract Mgt. and
Authoring)
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
100
UML-basierte Visualisierung
If a rental car is stored at a branch, is not assigned to a rental and is not scheduled
for service, then the rental car is available at the branch.
REWERSE Strelka -- An URML-Based Visual Rule
Modeling Tool
http://oxygen.informatik.tu-cottbus.de/rewerse-i1/?q=node/10
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
101
Exkurs: Open Source Projektentwicklung
Agiles Manifest – das Wertesystem
§ Individuen und Interaktionen gelten
mehr als Prozesse und Tools
§ Funktionierende Programme gelten
mehr als ausführliche Dokumentation
§ Die stetige Zusammenarbeit steht im
Vordergrung
§ Der Mut und die Offenheit für
Änderungen steht über dem Befolgen
eines festgelegten Plans
http://www.agilemanifesto.org
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
102
Sequentielle vs. überlappende
Entwicklung
Requirements
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Design
Code
Test
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
103
Scrum
SCRUM
§ Einer der „agilen Prozesse“
§ Selbst-Organisierende Teams
§ Produkt schreitet in Serien von monatlichen “Sprints”
fort
§ Anforderungen sind als Listeneinträge im “ProduktBacklog” festgehalten
§ Keine spezifischen Entwicklungsvorgehen
vorgeschrieben
§ Benutzt generative Regeln um ein agiles Umfeld für
die Auslieferung von Produkten zu schaffen
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
104
SCRUM Überblick
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
105
Scrum
Sprints
§ Scrum-Projekte schreiten in Serien von
“Sprints” voran
§ Analog zu XP-Iterationen
§ Angestrebte Dauer ist ein Monat
§ +/- ein oder zwei Wochen
§ Eine konstante Dauer führt zu einem besseren
Rhythmus
§ Das Produkt wird während des Sprints
entworfen, kodiert und getestet
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
106
Blick in die Glaskugel
Web 3.0, Web 4.0, …
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
107
2007 Gartner Vorhersagen
§ During the next 10 years, Web-based technologies
will improve the ability to embed semantic structures
[… it] will occur in multiple evolutionary steps…
§ By 2017, we expect the vision of the Semantic Web
[…] to coalesce […] and the majority of Web pages
are decorated with some form of metadata and
semantic hypertext, e.g., RDFa, microformats with
possible GRDDL, etc.
§ By 2012, 80% of public Web sites will use some level
of semantic hypertext to create SW documents […]
15% of public Web sites will use more extensive
Semantic Web-based ontologies to create semantic
databases.
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
108
2007 Gartner Vorhersagen
Softwareentwicklung in der industriellen Praxis
© Dr. Adrian
Paschke
on:Paschke,
“Finding and
Exploiting Value in Semantic Web Technologies on the Web”, Gartner Research
Report, May
2007Vorlesung
Vorlesung
– TUD
SS’08
© byBased
Adrian
2008
109
Towards an Event Driven Internet of Services
Gartner Symposium Itxpo 2004 Yefim Natis, Cannes, France, 31 October - 4 November 2004
Service-Oriented Architecture: Composite Applications, Web Services and Multichannel Applications
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
110
Exkurs:
Complex Event Processing
Distributed Event-based
Computer networks
Active databases
Rules
Discrete event simulation
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
CEP
Media
Detect
Decide
Respond
Workflows /
Process
Models
Middleware
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
111
Complex Event Processing - Wozu?
passwdchange
new auto pay
logout deposit
account login
withdrawal
transfer
deposit
transfer
enquiry
deposit
activity history
GPS/Galileo
Weather
enquiry
request
incident
withdrawal
Networked Service Supply Chain
account login
Event
EventCloud
Cloud
account balance
enquiry
new auto pay
account login
new auto pay
logout
book
deposit
account login
account login
enquiry
Event
Reservations
new auto pay
account login
logout
activity history
passwdchange
logout
Insurance
Challenge for Complex Event Processing
Travel
Services
Car Rental
Detection, prediction and mastery of complex events and
situations are crucial to the competitiveness of
networked businesses and the efficiency of dynamic
distributed service infrastructures
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Banking
Hotel Reservation
Billing Server
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
112
Complex Event Processing – Was?
n
tio
p
m
su
n
Co
§
Business View
Complex Event Processing Media
§
g
lin
d
n
Ha
4. Event Aggregation
n
atio
g
gre
g
A
t
en
m
ure ng
s
a
i
Me nitor
Mo
Complex Event Processing
(CEP) is a discipline that deals
with event-driven behavior
Selection, aggregation, and
event abstraction for
generating higher level
complex events of interest
3. Event
Selection
Technical View
5. Event
Handling
CEP
Media
2. Event
Definition
6. Event
Consumption
1. Event Production
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
113
CEP Solution Segments – Business Value
RTE
BAM, ITSM
Quick decisions,
and reactions to
threats and
opportunities
according to
events in business
transactions
CEP
Media
Valuable
Information at
the Right Time
to the Right
Recipient
Diagnose and/or
proactively predict
problems based on
symptoms and
resolve them
Detect
Decide
Respond
Information
Dissemination
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Monitor and detect
exceptional IT
service and
business behavior
from occurred
events
Proactive
Diagnostics
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
114
CEP Beispiel
Across the 24 largest airlines more than 5.6
million bags went missing in 2006, this is an
average of 15.7 bags per 1,000 travelers. 15%
of the are never found.
BBC News, April 4, 2007
Orchestrate:
Passenger has been
routed to another
destination – send
the language
Orchestrate:
Bag has reached to
the wrong aircraft
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Notify:
Bag has been
checked but did not
reach the ULD within
20 minutes
Situation Awareness by CEP
Notify:
Bag has been
checked but did not
reach the connecting
flight
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
115
Utility Computing für Business Services
On-Demand Rule-based,
autonomous exec. of SLAs
Pay-per-use
Small
SmallBusiness
Business
Customer
Customer
Service
Service Provider
Provider
(e.g.
(e.g. Portfolio
Portfolio Mgt.)
Mgt.)
Business
Utility
Utility Provider Pricing
Stock purchase transaction price = €5 / € 1000 trans. vol. Base Price = € 10 per month
Stock purchase limit price = € 3 per transaction
Storage Price=2GB average per day
Response time violation price = € 2 per 0,01% deviation Network bandwith price= € 3 per MB/h
Throughput violation price = € 1 per 1% deviation
Internet connectivity price = € 10 per GB vol. per month
Internet connectivity exceeded price = € 1 per 10 MB vol.
Data throughput violation price = € 1 per 0,8% deviation
The IT utility is here
… the business utility
is coming
Custom
Infrastructure
Common
Web-based
Infrastructure
Small Subscription Pricing
Utility
Utility Provider
Provider
Hosting,
Hosting, Bandwidth,
Bandwidth,
Storage,..
Storage,..
Web-based IT
Management
Services
IT
Utility
Web-based IT
Infrastructure
Custom Business
Services
Fixed
Infrastructure
Custom IT
Management
Services
Custom IT
Infrastructure
1990
© Dr. Adrian Paschke
Web-based
Business Service
Solutions
2008
2010
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung SS’08
Neu Rollen in der Business Services Value Chain
The “Builders”
Business Solution Aggregator
Vertical Expertise
Business
Strategy
Solution
Architect
The “Frameworks”
Business
Process
Process
Architect
The “Appliances”
Business
Services
Service
Integrator
The “Foundation”
Infrastructure
Infrastructure
Provider
The “Blue Print”
= New Roles
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Event Modeler
Business Best Practices
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
117
Towards an Ubiquitous Pragmatic Web
Information Connections
Pragmatic Web
Personal Pragmatic
Agent Ecosystems
2010 – 2020
Smart
Business
Markets
Dynamic Enterprise
Service Networks
Web of Things & Social Web 3.0
Mash-ups
Semantic
Desktop
Syntactic Web
Online
Marketplaces /
Auctions
RDF
ASP
SPARQL
Grid
P2P
Groupware
FTP
OWL
Semantic Web 2.0
2000 – 2010
World Wide Web 1.0
Search
Engines
Windows
Monolithic
Systems Era
- 1990
Email
Java
HTML
MacOS
On Demand
Services
Semantic
Blog
WIKIs
Conferencing
Portals
Ontologies
Multi-user
Gaming
Enterprise
Portals
Gopher
SGML
Desktop Computing
PCs
IRC
RFID
Ubiquitous
autonomic
Services and
Things
Flash
VR / VRML-
1990 – 2000
BBS
CEP
AJAX
RuleML
Connects Knowledge
XML
Connects Information
Deskto
p
2006 – 2010
Connects People and Things
SOAP
Javascript
Web Sites
Publish &
Subscribe
Personal
Assistants
AI
RSS ATOM
Knowledge
Bases
Connects Intelligent Agents
Next Generation
Media
Semantic
eMail
Semantic Web
Ubiquitous Pragmatic Web 4.0
File
Servers
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
SQL
Databases
Ubiquitous Next Generation Agents and Social Connections
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
118
Towards a Pragmatic Web
1.
Explicit Meta-data
§
2.
Ontologies
§
3.
RDFS, OWL Lite|DL|Full
Logic and Inference
§
4.
vCard, PICS, Dublin
Core, RDF, IEEE LOM
(Learning Objects
Metadata), Micro
Formats, FOAF, SIOC …
e.g. Logic Programming
Rule/Inference Engines
Software Agents and
Web Services
§
FIPA, Semantic Web
Services, RBSLA, …
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
119
Pragmatic Agent Web
Interaction
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
120
Pragmatic
Agent Web
Rule Responder Project
http://www.responder.ruleml.org/
Use Cases e.g.:
•RBSLA (Rule Based Service Level Agreements)
•DILP (Distributed Inductive Logic Programming) for Mining
Multi-Relation Data
•Pragmatic Agent Web – Virtual Organization
•W3C HCLS RuleResponder - eScience Service
Infrastructure for HCLS
• W3C RIF - Rule Interchange
Finder – Semantic Web (FOAF)
© •Expert
Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
121
Beispiel: Virtuelle Organisation
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
122
Responsibility Assignment Matrix
Role Model and
RAM in OWL
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
123
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
124
Vielen Dank für die Aufmerksamkeit
© Dr. Adrian
© byPaschke
Adrian Paschke, 2008
Softwareentwicklung in der industriellen Praxis
Vorlesung – TUD Vorlesung
SS’08
125