Planning for Web Services Evren Sirin & Bijan Parsia MINDSWAP - - PowerPoint PPT Presentation

planning for web services
SMART_READER_LITE
LIVE PREVIEW

Planning for Web Services Evren Sirin & Bijan Parsia MINDSWAP - - PowerPoint PPT Presentation

mindswap maryland information and network dynamics lab semantic web agents project Planning for Web Services Evren Sirin & Bijan Parsia MINDSWAP Research Group University of Maryland, College Park mindswap maryland information and network


slide-1
SLIDE 1

mindswap

maryland information and network dynamics lab semantic web agents project

Planning for Web Services

Evren Sirin & Bijan Parsia

MINDSWAP Research Group University of Maryland, College Park

slide-2
SLIDE 2

11/22/04 2

mindswap

maryland information and network dynamics lab semantic web agents project

Objective

  • Automated composition of Web Services

– Using OWL-S

  • AI planning has proven useful
  • Identify the challenges of…

– Describing Web Services using ontologies – Using planning for composition – Complexity of reasoning during planning

slide-3
SLIDE 3

11/22/04 3

mindswap

maryland information and network dynamics lab semantic web agents project

How does AI planning work?

slide-4
SLIDE 4

11/22/04 4

mindswap

maryland information and network dynamics lab semantic web agents project

How does AI planning work?

  • State of the world

A B C Initial State

Facts known about the world

slide-5
SLIDE 5

11/22/04 5

mindswap

maryland information and network dynamics lab semantic web agents project

How does AI planning work?

  • State of the world
  • Planning Operators

A B C

Operator1 Pre: A Del: B Add: D

Initial State

Operator2 Pre: A Æ B Del: C Add: B Operator1 Pre: A Æ D Del: B Add: E

Actions that change the state OWL-S AtomicProcess

slide-6
SLIDE 6

11/22/04 6

mindswap

maryland information and network dynamics lab semantic web agents project

How does AI planning work?

  • State of the world
  • Planning Operators

A B C

Operator1 Pre: A Del: B Add: D

Initial State A C D

Operator2 Pre: A Æ B Del: C Add: B

A B

Operator1 Pre: A Æ D Del: B Add: E

Actions that change the state OWL-S AtomicProcess

slide-7
SLIDE 7

11/22/04 7

mindswap

maryland information and network dynamics lab semantic web agents project

How does AI planning work?

  • State of the world
  • Planning Operators
  • Goal formula

A B C

Operator1 Pre: A Del: B Add: D

Initial State A C D

Operator2 Pre: A Æ B Del: C Add: B

A B

Operator1 Pre: A Æ D Del: B Add: E

C G

OWL-S AtomicProcess Logical formula that needs to be true in the final state

slide-8
SLIDE 8

11/22/04 8

mindswap

maryland information and network dynamics lab semantic web agents project

HTN Planning

  • Hierarchical Task Networks
  • Plan with tasks not goals

– Primitive task  Operator  AtomicProcess – Compound task  Method  CompositeProcess

  • Methods decompose a task into subtasks

– Standard operating procedures

  • Find a decomposition that is executable

starting from the initial state

slide-9
SLIDE 9

11/22/04 9

mindswap

maryland information and network dynamics lab semantic web agents project

OWL-S Processes as Planning Operator

  • Map OWL-S descriptions to planning operators

(:atomic-process register-course :inputs (?student – Student ?course - Course) :precondition (and (?course hasPrerequisite ?anotherCourse) (?student passed ?anotherCourse)) :effect (?student registered ?course))

slide-10
SLIDE 10

11/22/04 10

mindswap

maryland information and network dynamics lab semantic web agents project

Classical Planning

  • Planners typically support only fairly

limited reasoning capabilities

– State is a set of ground atoms – Closed world assumption is used – Inferencing limited to Horn clause axioms

  • Not nearly as expressive as OWL

– OWL DL corresponds to a very expressive Description Logic: SHION(D)

slide-11
SLIDE 11

11/22/04 11

mindswap

maryland information and network dynamics lab semantic web agents project

Planning with OWL-S

  • Preconditions and effects expressed in OWL

– Atoms of SWRL (not SWRL rules)

  • World state is represented as an OWL KB
  • Planner interacts with the state through an OWL

reasoner

– Evaluate preconditions

  • Precondition is satisfied iff it is a logical consequence of the

KB

– Apply effects

  • Modify the KB accordingly
slide-12
SLIDE 12

11/22/04 12

mindswap

maryland information and network dynamics lab semantic web agents project

Example Service

  • Schedule a Treatment

– A Person trying to schedule an appointment for a medical Treatment in a hospital with a good Rating – Hospital should be supported by the health Insurance – Person should be available at the appointment time Hospital offers

slide-13
SLIDE 13

11/22/04 13

mindswap

maryland information and network dynamics lab semantic web agents project

Example Description

(:composite-process ScheduleTreatment :inputs (?Person ?Treatment ?Rating) :precondition (and (?Person health:hasInsurance ?Insurance)

(?Insurance insurance:supports ?Hospital) (?Hospital medical:offers ?Treatment) (?Hospital zagat:hasRating ?Rating))

{ perform GetAvailableTimes(?Hospital); perform MakeTheAppointment(?Hospital ?ApptTime); perform UpdatePersonalCalendar(?ApptTime) }

slide-14
SLIDE 14

11/22/04 14

mindswap

maryland information and network dynamics lab semantic web agents project

Example Query

SELECT ?Hospital WHERE

(?Person health:hasInsurance ?Insurance), (?Insurance insurance:supports ?Hospital), (?Hospital medical:offers ?Treatment), (?Hospital zagat:hasRating ?Rating)

USING health FOR <http://.../health-ont> …

slide-15
SLIDE 15

11/22/04 15

mindswap

maryland information and network dynamics lab semantic web agents project

Distinguished Variables in Queries

  • Initial KB: {Parent = 9hasChild.>,

John:Parent}

  • Query: SELECT ?x

WHERE (?x hasChild ?y) Answer: {?x  John}

  • Query: SELECT ?x, ?y

WHERE (?x hasChild ?y) Answer: ;

slide-16
SLIDE 16

11/22/04 16

mindswap

maryland information and network dynamics lab semantic web agents project

Expressive Preconditions

  • Negated expressions

– (not (?x rdf:type Registered)) – (?x rdf:type :Registered)

  • Universally quantified variables

– Requires closed world interpretation

  • Disjunctive conditions

– Disjunctive queries

  • Numerical comparison/computation

– Built-in functions of SWRL

slide-17
SLIDE 17

11/22/04 17

mindswap

maryland information and network dynamics lab semantic web agents project

Applying Effects

  • Each service may have +/- effects
  • Simulate the action by applying the effects

to the current state

  • Operational meaning

– Add positive effects to KB – Remove negative effects from KB

  • Logical meaning

– New state entails the positive effects – New state does not entail the negative effects

slide-18
SLIDE 18

11/22/04 18

mindswap

maryland information and network dynamics lab semantic web agents project

Positive Effects

  • Add the statements to KB

– This may cause inconsistency

(:atomic-process make-me-the-president :inputs (?p - Person ?cc - CreditCard) :precondition (?cc hasAvailableLimit $10,000) :effect (?p presidentOf USA))

  • Incorrect description? Incompatible

services?

slide-19
SLIDE 19

11/22/04 19

mindswap

maryland information and network dynamics lab semantic web agents project

Negative Effects

  • Deleting cannot cause inconsistency
  • Deleting one assertion may not be enough

– Same fact inferred from other facts

  • Example Service

– Unregister ?person – Delete (?person memberOf W3C)

  • Other assertions

– SubProperty: (X boardMemberOf W3C) – InverseProperty: (W3C hasMember X) – Class Restricions: (X rdf:type W3CMember)

slide-20
SLIDE 20

11/22/04 20

mindswap

maryland information and network dynamics lab semantic web agents project

Implementation

  • Investigate the efficiency of the system
  • Use OWL DL Reasoner Pellet

– Based on tableaux algorithms for very expressive DLs – Supports conjunctive queries

  • Integrate with SHOP2 planner

– Efficient HTN planner – Tests done with Java version JSHOP

slide-21
SLIDE 21

11/22/04 21

mindswap

maryland information and network dynamics lab semantic web agents project

Query Answering

  • Reduced to KB consistency test
  • Not efficient for finding variable bindings

– Multiple consistency tests for each possible variable binding

  • Relatively less studied in DLs
slide-22
SLIDE 22

11/22/04 22

mindswap

maryland information and network dynamics lab semantic web agents project

Rolling Up

  • Roll up the query into one concept

description

  • The query

(?c rdf:type Computer), (?c manufacturedBy IBM), (?c hasCPU ?cpu), (?cpu cpuType Pentium)

  • The concept

Computer  manufacturedBy.{IBM}  hasCPU.cpuType.{Pentium})).

slide-23
SLIDE 23

11/22/04 23

mindswap

maryland information and network dynamics lab semantic web agents project

Retrieving Variable Bindings

  • For each combination of variable bindings

– Substitute variables with named individuals – Roll up the query – Test if the query with no variables is entailed

  • Simple Optimization

– Roll up the query for each variable separately – Retrieve likely candidates for the variable – Try only the likely candidates

slide-24
SLIDE 24

11/22/04 24

mindswap

maryland information and network dynamics lab semantic web agents project

Variable Dependencies

  • Not all likely candidates are relevant

– Binding value for a variable depends on the binding of another variable

  • Generate likely candidates iteratively

– Avoid expensive consistency checks – Find failing bindings early

slide-25
SLIDE 25

11/22/04 25

mindswap

maryland information and network dynamics lab semantic web agents project

Comparison of Algorithms

slide-26
SLIDE 26

11/22/04 26

mindswap

maryland information and network dynamics lab semantic web agents project

Comparison with SHOP2

slide-27
SLIDE 27

11/22/04 27

mindswap

maryland information and network dynamics lab semantic web agents project

Conclusions

  • Investigate planning with Semantic Web

Services

– Modeling issues

  • Precondition and effect descriptions

– Efficiency issues

  • Extra complexity
  • Future Work

– Focus on real-world Web Service domains – Different query optimization techniques