use case: composition owl-s applied to the berardi-hull problem
TRANSCRIPT
![Page 1: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/1.jpg)
Use Case: Composition
OWL-S applied to the
Berardi-Hull
problem
![Page 2: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/2.jpg)
Component Web Services
• op1: book the plane ticket
• op2: register for event
• op3: book a hotel room
Problem: Compose in ways corresponding to needs of tourist, researcher, managerVariations: One-shot vs. reusable composition
![Page 3: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/3.jpg)
Representing service
define atomic process take_it_and_leaveInputs: …Outputs: {okay - Boolean,
carrier_there, carrier_back - Airline, fnum_there - Flight_num, occ_going - Flight_occ, fnum_back - Flight_num, occ_returning - Flight_occ}
Results: -- continued below --
![Page 4: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/4.jpg)
Results:Bundling Conditions, Outputs, & Effects
results: when (fl_there fl_back - Flight) (tightly_scheduled(fl_there, fl_back)) & available(fl_there, 1) & available(fl_back, 1)) -> (exists (fl_there fl_back - Flight) tightly_scheduled(fl_there, fl_back) & air_reserved(cust, fl_there) & air_reserved(cust, fl_back)) output: {okay = true, carrier_there = fl_there.carrier, carrier_back = fl_back.carrier, fnum_there = fl_there.num, fnum_back = fl_back.num, occ_going = fl_there.occ_desig, occ_back = fl_back.occ_desig}
Condition
Effect
Output
![Page 5: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/5.jpg)
Failure Case
when () (not (exists (fl_there fl_back - Flight)
tightly_scheduled(fl_there, fl_back))))
output: {okay = false}
![Page 6: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/6.jpg)
Auxiliary Definitiontightly_scheduled(fl_there, fl_back) iff (flight_departs_from(fl_there, departure_place) & flight_lands_at(fl_there, arrive_place) & flight_departs_from(fl_there, arrive_place) & flight_lands_at(fl_there, departure_place) & flight_depart_time(fl_there) = max_over((λ (fl1) flight_departs_from(fl1, departure_place) & flight_lands_at(fl1, arrive_place) & flight_depart_time(fl1) =< date_leave), flight_depart_time) & flight_depart_time(fl_back) = min_over((λ (fl1) flight_departs_from(fl1, departure_place) & flight_lands_at(fl1, arrive_place) & flight_arrive_time(fl1) >= date_back), flight_depart_time))
![Page 7: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/7.jpg)
Hoteldefine atomic process book_hotelInputs: {name_hotel – String,
place_hotel – Location, date_leave, date_back – Date}Outputs: {okay - Boolean}Results: when (h - Hotel) name(h) = name_hotel & located(h, place_hotel) & (forall (d – Date) on_or_before(date_leave, d) & before(d, date_back) -> hotel_available(h, d)) -> hotel_reserved(cust, h, convex_hull(date_leave, day_before(date_back))) outputs: {okay = true}
+ failure case {okay = false}
![Page 8: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/8.jpg)
Goals: Touristreserved(emh, Pamplona_Run_04)& exists (date - Time_interval) beg(date) = day(start(Pamplona_Run_04)) - 1 day & end(date) = day(start(Pamplona_Run_04)) + 1 day & exists(h - Hotel) dist(h, Pamplona) =< 5 km & cost_per_night(h) =< 100 Euro & reserved(emh, Pamplona_Run_04) & hotel_reserved(emh, h, date) & exists(af - Air_flight) ...
![Page 9: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/9.jpg)
Goals: Manager let e = pi_meeting(miracle_intelligence, qtr(2004,1)) registered(rr, e) & let ps = set_of_all ((\\ (p) presentation(p) & at_conf(p, e) & given_by(rr))) ch = set_of_all ((\\ (m) small_group_discussion(m) & participant(m, rr) & participant(m, Program-mgr (miracle_intelligence)))) --CONTINUED--
![Page 10: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/10.jpg)
Goals: Manager (cont.) exists (intvl - Time_interval) beg(intvl) = min(min_over (ps, (λ(p) beg(scheduled_time(p)))), min_over (ch, (λ (m) beg(scheduled_time(m)))) & end(intvl) = max(max_over (ps, (\\ (p) beg(scheduled_time(p)))), max_over (ch, (\\ (m) beg(scheduled_time(m))))
![Page 11: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/11.jpg)
Goals: Manager (cont.)& exists (af_there af_back - Air_flight) & ... & af_there = time (arg_max (λ (f) before(arrival_time(f), beg(intvl))) (λ (f) beg(intvl) - arrival_time(f))) & af_back = ... & exists (h - Hotel) for_all (beg_date end_date - Day) beg_date = … & end_date = … -> hotel_reserved (rr, h, convex_hull(beg_date, end_date)))
![Page 12: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/12.jpg)
Okay, this looks hopelessly hairy…
but most of it is pure computation(maxes, mins, etc.)
![Page 13: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/13.jpg)
Planning Paradigm
• Take goal of user agent and match it against effects of services.
• Preconditions become new goals; the planner must find services and inputs that achieve all the outstanding goals.
• Composition is automatic
![Page 14: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/14.jpg)
Tourist CaseGoal is is Hotel ?h & dist(?h, Pamplona) =< 5 km & cost_per_night(?h) =< 100 Euro & reserved(emh, Pamplona_Run_04) & hotel_reserved(emh, ?h, date) & is Air_flight ?af & beg(?date) = day(start(Pamplona_Run_04)) - 1 day & end(?date) = day(start(Pamplona_Run_04)) + 1 day & ...
Matcheseffectof book_hotel
Added to Conditions ofbook_hotel
![Page 15: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/15.jpg)
Where Did the Composition Happen?
Multiple actions get instantiated, involving multiple web services.
The order may be unimportant, or the Berardi-Hull argument may play a role (not clear).
![Page 16: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/16.jpg)
Why Book Flights Ahead of Time?
Because you can?
Better question: Why sometimes delay booking (e.g, use PriceLine?)
First, we have to make explicit the time-dependence of prices.
Second, we have to allow for optimization of objective functions.
![Page 17: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/17.jpg)
Planning wrt Existing Composite Process
Suppose an omnibus travel-agent process advertises its process model:define composite process S4tP() participants: {customer} // Plus the service itself, of course inputs: {…} outputs: {…} { accept(open_session); send to customer (confirm_session); run_all {parallel { ---ticket process--- || { iterate { ---event-booking process— } } || ---hotel process--- }} stop_after accept from customer (close_session)}}
![Page 18: Use Case: Composition OWL-S applied to the Berardi-Hull problem](https://reader036.vdocument.in/reader036/viewer/2022081209/55144eed550346494e8b5029/html5/thumbnails/18.jpg)
Approach: Decompose composite into individual control flows.
Introduce state where needed. Example: open_session puts us in “session open” state.
Each thread through the process becomes a series of actions to plan with.