Goal-based Composition of Stateful Services for Smart Homes



Similar documents
The Roman Model for Automated Synthesis in Practice: the SM4All Experience

Fabio Patrizi DIS Sapienza - University of Rome

Composability of Infinite-State Activity Automata*

Online and Minimum-Cost Ad Hoc Delegation in e-service Composition

Automatic Service Composition and Collection of Data

Software Model Checking: Theory and Practice

P2P Data Integration and the Semantic Network Marketing System

Data integration and reconciliation in Data Warehousing: Conceptual modeling and reasoning support

T Reactive Systems: Introduction and Finite State Automata

A Framework for the Semantics of Behavioral Contracts

Accessing Data Integration Systems through Conceptual Schemas (extended abstract)

A Constraint Programming Application for Rotating Workforce Scheduling

Today s Agenda. Automata and Logic. Quiz 4 Temporal Logic. Introduction Buchi Automata Linear Time Logic Summary

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Query Reformulation over Ontology-based Peers (Extended Abstract)

A Tool for Generating Partition Schedules of Multiprocessor Systems

Probabilistic Model Checking at Runtime for the Provisioning of Cloud Resources

The Model Checker SPIN

Journal of Mathematics Volume 1, Number 1, Summer 2006 pp

Formal Verification by Model Checking

A Tutorial on Data Integration

EFFICIENT KNOWLEDGE BASE MANAGEMENT IN DCSP

INF5140: Specification and Verification of Parallel Systems

Formal Verification and Linear-time Model Checking

Course Outline Department of Computing Science Faculty of Science. COMP Applied Artificial Intelligence (3,1,0) Fall 2015

OntoPIM: How to Rely on a Personal Ontology for Personal Information Management

logic language, static/dynamic models SAT solvers Verified Software Systems 1 How can we model check of a program or system?

Matching Midlet's Security Claims with a Platform Security Policy using Automata Modulo Theory

Task Management under Change and Uncertainty

Testing LTL Formula Translation into Büchi Automata

ForeverSOA: Towards the Maintenance of Service Oriented Software

Composite Process Oriented Service Discovery in Preserving Business and Timed Relation

Software Modeling and Verification

Runtime Verification - Monitor-oriented Programming - Monitor-based Runtime Reflection

6.080/6.089 GITCS Feb 12, Lecture 3

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, School of Informatics University of Edinburgh als@inf.ed.ac.

Software Engineering using Formal Methods

Tools for Composite Web Services: A Short Overview

Remarks on the GWV Firewall

A Multi-agent System for Knowledge Management based on the Implicit Culture Framework

Fundamentals of Software Engineering

Best Place to Find the Best Jobs Out There

Behavioral Service Substitution: Analysis and Synthesis

Algorithmic Software Verification

Updating Action Domain Descriptions

Automated Composition of Semantic Web Services into Executable Processes

Optimal Planning with ACO

Consistent Answers from Integrated Data Sources

Specification and Analysis of Contracts Lecture 1 Introduction

Automata-Based Verification of Temporal Properties on Running Programs Dimitra Giannakopoulou Klaus Havelund

KEEP THIS COPY FOR REPRODUCTION PURPOSES. I ~~~~~Final Report

Using Patterns and Composite Propositions to Automate the Generation of Complex LTL

Reinforcement Learning of Task Plans for Real Robot Systems

A Principled Approach to Data Integration and Reconciliation in Data Warehousing

Towards a Comprehensive Design-time Compliance Management: A Roadmap

Optimal Scheduling for Dependent Details Processing Using MS Excel Solver

Data Quality in Ontology-Based Data Access: The Case of Consistency

A Mathematical Programming Solution to the Mars Express Memory Dumping Problem

Lecture 2: Universality

Turing Machines: An Introduction

Introduction to Logic in Computer Science: Autumn 2006

MASSIMILIANO DE LEONI

Runtime Verification for Real-Time Automotive Embedded Software

Formal Verification of Software

UPDATES OF LOGIC PROGRAMS

A Case Study of Question Answering in Automatic Tourism Service Packaging

GOAL-BASED INTELLIGENT AGENTS

Context-Bounded Model Checking of LTL Properties for ANSI-C Software. Jeremy Morse, Lucas Cordeiro, Bernd Fischer, Denis Nicole

Layered Approach to Development of OO War Game Models Using DEVS Framework

What to Ask to a Peer: Ontology-based Query Reformulation

Data Management in Peer-to-Peer Data Integration Systems

An Object Oriented Role-based Access Control Model for Secure Domain Environments

A Logic Approach for LTL System Modification

Regular Expressions and Automata using Haskell

On the Modeling and Verification of Security-Aware and Process-Aware Information Systems

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

MetaGame: An Animation Tool for Model-Checking Games

Theorem (informal statement): There are no extendible methods in David Chalmers s sense unless P = NP.

Regular Languages and Finite Automata

INTEROPERABILITY IN DATA WAREHOUSES

A Model-driven Approach to Predictive Non Functional Analysis of Component-based Systems

Policy Analysis for Administrative Role Based Access Control without Separate Administration

MONPOLY: Monitoring Usage-control Policies

A Formal Methodology for Procedural Security Assessment

Combining Software and Hardware Verification Techniques

Rover. ats gotorock getrock gotos. same time compatibility. Rock. withrover 8-39 TIME

A Propositional Dynamic Logic for CCS Programs

introduction to program monitoring

Random vs. Structure-Based Testing of Answer-Set Programs: An Experimental Comparison

Deterministic Finite Automata

Offline Synthesis Engine in Practice: Usage Instructions

Towards Automated Conformance Checking of ebbp-st Choreographies and Corresponding WS-BPEL Based Orchestrations

A Slot Representation of the Resource-Centric Models for Scheduling Problems

LOCAL SURFACE PATCH BASED TIME ATTENDANCE SYSTEM USING FACE.

State-Driven Testing of Distributed Systems: Appendix

Optimizing Description Logic Subsumption

Secure Cloud Transactions by Performance, Accuracy, and Precision

An Experiment on the Effect of Design Recording on Impact Analysis

Automatic Composition of Web Services

Automatic Verification of Data-Centric Business Processes

Transcription:

Goal-based Composition of Stateful Services for Smart Homes Giuseppe De Giacomo 1 Claudio Di Ciccio 1 Paolo Felli 1 Yuxiao Hu 2 Massimo Mecella 1 SAPIENZA Università di Roma Via Ariosto 25, Roma, Italy lastname@dis.uniroma1.it http://www.dis.uniroma1.it/ Google Waterloo Toronto, Ontario M5S 3G4, Canada yuxiao@google.com http://www.cs.toronto.edu/ Rome, 14 September 2012 C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 1 / 35

Outline 1 Introduction The Roman Model 2 Framework The dynamic system The goal process 3 Implementation The solver 4 Case study and evaluation Case study Performance evaluation 5 References C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 2 / 35

The Roman Model Outline 1 Introduction The Roman Model 2 Framework The dynamic system The goal process 3 Implementation The solver 4 Case study and evaluation Case study Performance evaluation 5 References C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 3 / 35

The Roman Model The Roman Model 1 Services are software artifacts, that 1 export a description of themselves, 2 are accessible to external clients and 3 communicate through a common interface. The so called Roman Model focuses on the conversational behavior of stateful services The conversational behavior is the collection of its potential evolutions resulting from the interaction with some external systems, such as a client service 1 As referred to by R. Hull at SIGMOD 04 C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 4 / 35

The Roman Model The Roman Model 1 Services are software artifacts, that 1 export a description of themselves, 2 are accessible to external clients and 3 communicate through a common interface. The so called Roman Model focuses on the conversational behavior of stateful services The conversational behavior is the collection of its potential evolutions resulting from the interaction with some external systems, such as a client service It represents stateful service behaviors as Finite State Automata (FSAs), with: a set of states one of which is some of which are initial final connected by transitions, i.e., atomic actions 1 As referred to by R. Hull at SIGMOD 04 C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 4 / 35

The Roman Model The Roman Model 1 Services are software artifacts, that 1 export a description of themselves, 2 are accessible to external clients and 3 communicate through a common interface. The so called Roman Model focuses on the conversational behavior of stateful services The conversational behavior is the collection of its potential evolutions resulting from the interaction with some external systems, such as a client service It represents stateful service behaviors as Finite State Automata (FSAs), with: a set of states one of which is some of which are initial final connected by transitions, i.e., atomic actions 1 As referred to by R. Hull at SIGMOD 04 C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 4 / 35

The Roman Model The Roman Model 1 Services are software artifacts, that 1 export a description of themselves, 2 are accessible to external clients and 3 communicate through a common interface. The so called Roman Model focuses on the conversational behavior of stateful services The conversational behavior is the collection of its potential evolutions resulting from the interaction with some external systems, such as a client service It represents stateful service behaviors as Finite State Automata (FSAs), with: a set of states one of which is some of which are initial final connected by transitions, i.e., atomic actions 1 As referred to by R. Hull at SIGMOD 04 C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 4 / 35

The Roman Model The Roman Model 1 Services are software artifacts, that 1 export a description of themselves, 2 are accessible to external clients and 3 communicate through a common interface. The so called Roman Model focuses on the conversational behavior of stateful services The conversational behavior is the collection of its potential evolutions resulting from the interaction with some external systems, such as a client service It represents stateful service behaviors as Finite State Automata (FSAs), with: a set of states one of which is some of which are initial final connected by transitions, i.e., atomic actions 1 As referred to by R. Hull at SIGMOD 04 C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 4 / 35

The Roman Model The Roman Model 1 Services are software artifacts, that ^ 1 export a description of themselves, 2 are accessible to external clients and 3 communicate through a common interface. The so called Roman Model focuses on the conversational behavior of stateful services The conversational behavior is the collection of its potential evolutions resulting from the interaction with some external systems, such as a client service # T Figure: An air conditioner as a stateful service 1 As referred to by R. Hull at SIGMOD 04 C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 4 / 35

The Roman Model The Roman Model : a running example The initial state # determines the state from which the conversation takes place. The only availableactions are those which label the transitions starting from the current state (here, and ). Say we want to raise up the temperature in the room: the action is performed. In the new state T, we want to raise the temperature up a little more. Maybe it is too much now, and we may want to lower it. After a while, we turn off the air conditioner. We are done. The final state is reached and the conversation can be closed. ^ # T Figure: An air conditioner as a stateful service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 5 / 35

The Roman Model The Roman Model : a running example The initial state # determines the state from which the conversation takes place. The only availableactions are those which label the transitions starting from the current state (here, and ). Say we want to raise up the temperature in the room: the action is performed. In the new state T, we want to raise the temperature up a little more. Maybe it is too much now, and we may want to lower it. After a while, we turn off the air conditioner. We are done. The final state is reached and the conversation can be closed. ^ # T Figure: An air conditioner as a stateful service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 5 / 35

The Roman Model The Roman Model : a running example The initial state # determines the state from which the conversation takes place. The only availableactions are those which label the transitions starting from the current state (here, and ). Say we want to raise up the temperature in the room: the action is performed. In the new state T, we want to raise the temperature up a little more. Maybe it is too much now, and we may want to lower it. After a while, we turn off the air conditioner. We are done. The final state is reached and the conversation can be closed. ^ # T Figure: An air conditioner as a stateful service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 5 / 35

The Roman Model The Roman Model : a running example The initial state # determines the state from which the conversation takes place. The only availableactions are those which label the transitions starting from the current state (here, and ). Say we want to raise up the temperature in the room: the action is performed. In the new state T, we want to raise the temperature up a little more. Maybe it is too much now, and we may want to lower it. After a while, we turn off the air conditioner. We are done. The final state is reached and the conversation can be closed. ^ # T Figure: An air conditioner as a stateful service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 5 / 35

The Roman Model The Roman Model : a running example The initial state # determines the state from which the conversation takes place. The only availableactions are those which label the transitions starting from the current state (here, and ). Say we want to raise up the temperature in the room: the action is performed. In the new state T, we want to raise the temperature up a little more. Maybe it is too much now, and we may want to lower it. After a while, we turn off the air conditioner. We are done. The final state is reached and the conversation can be closed. ^ # T Figure: An air conditioner as a stateful service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 5 / 35

The Roman Model The Roman Model : a running example The initial state # determines the state from which the conversation takes place. The only availableactions are those which label the transitions starting from the current state (here, and ). Say we want to raise up the temperature in the room: the action is performed. In the new state T, we want to raise the temperature up a little more. Maybe it is too much now, and we may want to lower it. After a while, we turn off the air conditioner. We are done. The final state is reached and the conversation can be closed. ^ # T Figure: An air conditioner as a stateful service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 5 / 35

Outline 1 Introduction The Roman Model 2 Framework The dynamic system The goal process 3 Implementation The solver 4 Case study and evaluation Case study Performance evaluation 5 References C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 6 / 35

Automated service composition is the problem of automatically combining a set of available services, so to synthesize a more complex service, according to a desired specification. The desired specification had to be expressed in terms of another deterministic FSA, named target service. The output was a orchestrator generator, i.e., a generator of all of the possible orchestrations of the available services, able to enact the desired behavior specification. It has been the basis from which we started our research work (see [BCDG + 03, Pat09]). C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 7 / 35

Automated service composition is the problem of automatically combining a set of available services, so to synthesize a more complex service, according to a desired specification. The desired specification had to be expressed in terms of another deterministic FSA, named target service. The output was a orchestrator generator, i.e., a generator of all of the possible orchestrations of the available services, able to enact the desired behavior specification. It has been the basis from which we started our research work (see [BCDG + 03, Pat09]). C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 7 / 35

Automated service composition is the problem of automatically combining a set of available services, so to synthesize a more complex service, according to a desired specification. The desired specification had to be expressed in terms of another deterministic FSA, named target service. The output was a orchestrator generator, i.e., a generator of all of the possible orchestrations of the available services, able to enact the desired behavior specification. It has been the basis from which we started our research work (see [BCDG + 03, Pat09]). C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 7 / 35

An example t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 8 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # N t 1 T dodrain t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # N t 1 T dodrain t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # N t 1 T dodrain t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # N t 1 T dodrain t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

An example of orchestration t 0 ^ # T dodrain N t 1 t 2 t 3 (a) Air conditioner service (b) Bathroom management service (c) Target service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 9 / 35

Problems solved The problem of the automated service composition has been solved in many variants, along almost 10 years of research ([CGL + 08]): 1 services with deterministic observable behaviors [BCDG + 03, BCDG + 05b, BCDGP08]; 2 services with deterministic observable behaviors in the presence of failure [SPDG08]; 3 services with non-deterministic observable behaviors [BCGM05]; 4 services with partially observable non-deterministic behaviors [GMP09]; 5 services with non-deterministic behaviors, acting over data [BCDG + 05a, DGP09]... The results have been successfully applied in the context of smart home automation systems, for the SM4All European FP7 Project (http://www.sm4all-project.eu/, see [DCI11, DCMC + 11, CDCF + 11, DMDCMP10] ) C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 10 / 35

Problems solved The problem of the automated service composition has been solved in many variants, along almost 10 years of research ([CGL + 08]): 1 services with deterministic observable behaviors [BCDG + 03, BCDG + 05b, BCDGP08]; 2 services with deterministic observable behaviors in the presence of failure [SPDG08]; 3 services with non-deterministic observable behaviors [BCGM05]; 4 services with partially observable non-deterministic behaviors [GMP09]; 5 services with non-deterministic behaviors, acting over data [BCDG + 05a, DGP09]... The results have been successfully applied in the context of smart home automation systems, for the SM4All European FP7 Project (http://www.sm4all-project.eu/, see [DCI11, DCMC + 11, CDCF + 11, DMDCMP10] ) C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 10 / 35

Problems solved The problem of the automated service composition has been solved in many variants, along almost 10 years of research ([CGL + 08]): 1 services with deterministic observable behaviors [BCDG + 03, BCDG + 05b, BCDGP08]; 2 services with deterministic observable behaviors in the presence of failure [SPDG08]; 3 services with non-deterministic observable behaviors [BCGM05]; 4 services with partially observable non-deterministic behaviors [GMP09]; 5 services with non-deterministic behaviors, acting over data [BCDG + 05a, DGP09]... The results have been successfully applied in the context of smart home automation systems, for the SM4All European FP7 Project (http://www.sm4all-project.eu/, see [DCI11, DCMC + 11, CDCF + 11, DMDCMP10] ) (a) SM4All demo video excerpt (b) The SM4All development and management team C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 10 / 35

Drawbacks Drawing routines, where actions must respect the conversational behaviors of services, is not that intuitive for an unexperienced user. Users tend to express directives in terms of goals. The constraint of starting from initial states to necessarily end up in final states is not flexible enough for long/continuous conversations, as in the usual domestic life, either with or without domotic devices. Sometimes you consider your goal reached even though you did not turn off the air conditioner. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 11 / 35

The new challenge of goal processes The new challenge (last chapter of the story): given 1 a shared domain (i.e., data abstracting the environment that the services act in), 2 non-deterministic services whose actions can affect the domain, 3 a user-defined automaton whose states represent choice points and whose transitions specify the goals to fulfill step by step (named goal process), based on the notion of planning programs ([DGPS10, DMDCMP10]) automatically realize the goal process. PS And make it suitable for a smart home environment. The paper we are presenting faces and solves these issues. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 12 / 35

The new challenge of goal processes The new challenge (last chapter of the story): given 1 a shared domain (i.e., data abstracting the environment that the services act in), 2 non-deterministic services whose actions can affect the domain, 3 a user-defined automaton whose states represent choice points and whose transitions specify the goals to fulfill step by step (named goal process), based on the notion of planning programs ([DGPS10, DMDCMP10]) automatically realize the goal process. PS And make it suitable for a smart home environment. The paper we are presenting faces and solves these issues. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 12 / 35

The new challenge of goal processes The new challenge (last chapter of the story): given 1 a shared domain (i.e., data abstracting the environment that the services act in), 2 non-deterministic services whose actions can affect the domain, 3 a user-defined automaton whose states represent choice points and whose transitions specify the goals to fulfill step by step (named goal process), based on the notion of planning programs ([DGPS10, DMDCMP10]) automatically realize the goal process. PS And make it suitable for a smart home environment. The paper we are presenting faces and solves these issues. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 12 / 35

The new challenge of goal processes The new challenge (last chapter of the story): given 1 a shared domain (i.e., data abstracting the environment that the services act in), 2 non-deterministic services whose actions can affect the domain, 3 a user-defined automaton whose states represent choice points and whose transitions specify the goals to fulfill step by step (named goal process), based on the notion of planning programs ([DGPS10, DMDCMP10]) automatically realize the goal process. PS And make it suitable for a smart home environment. The paper we are presenting faces and solves these issues. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 12 / 35

The new challenge of goal processes The new challenge (last chapter of the story): given 1 a shared domain (i.e., data abstracting the environment that the services act in), 2 non-deterministic services whose actions can affect the domain, 3 a user-defined automaton whose states represent choice points and whose transitions specify the goals to fulfill step by step (named goal process), based on the notion of planning programs ([DGPS10, DMDCMP10]) automatically realize the goal process. PS And make it suitable for a smart home environment. The paper we are presenting faces and solves these issues. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 12 / 35

The new challenge of goal processes The new challenge (last chapter of the story): given 1 a shared domain (i.e., data abstracting the environment that the services act in), 2 non-deterministic services whose actions can affect the domain, 3 a user-defined automaton whose states represent choice points and whose transitions specify the goals to fulfill step by step (named goal process), based on the notion of planning programs ([DGPS10, DMDCMP10]) automatically realize the goal process. PS And make it suitable for a smart home environment. The paper we are presenting faces and solves these issues. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 12 / 35

The new challenge of goal processes The new challenge (last chapter of the story): given 1 a shared domain (i.e., data abstracting the environment that the services act in), 2 non-deterministic services whose actions can affect the domain, 3 a user-defined automaton whose states represent choice points and whose transitions specify the goals to fulfill step by step (named goal process), based on the notion of planning programs ([DGPS10, DMDCMP10]) automatically realize the goal process. PS And make it suitable for a smart home environment. The paper we are presenting faces and solves these issues. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 12 / 35

The dynamic system Outline 1 Introduction The Roman Model 2 Framework The dynamic system The goal process 3 Implementation The solver 4 Case study and evaluation Case study Performance evaluation 5 References C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 13 / 35

The dynamic system The dynamic domain Definition (Dynamic domain) Formally, a dynamic domain is a tuple D = P,A,D 0,ρ, where: P = {p 1,...,p n } is a finite set of domain propositions. D 2 P is a state; A = {a 1,...,a r } is the finite set of domain actions; D 0 2 P is the initial state; ρ 2 P A 2 P is the transition relation. Intuitively A dynamic domain provides a symbolic abstraction of the world that the user acts in. It models an environment whose states are described by the set P of boolean propositions, holding all relevant information about the current situation. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 14 / 35

The dynamic system The services Definition (Service) Given a dynamic domain D, a service over D is a tuple B = B,O,b 0,σ, where: B is the finite set of service states; O is the finite set of service actions over the domain, i.e., O A /0; b 0 B is the service initial state; σ B O B is the service transition relation. Intuitively The idea is that, at each moment, a service offers a set of possible actions, and the user can interact with the domain D by means of available services only. Both the service and the domain evolve synchronously according to their respective transition relations. We do not consider final states anymore, as behaviors are supposed to represent long-term continuous interactions with the house (from the user viewpoint). C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 15 / 35

The dynamic system Example revisited: the services ^ # T dodrain N (a) Air conditioner service (b) Bathroom management service C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 16 / 35

The dynamic system The dynamic system The dynamic system Given a dynamic domain D and a fixed set of available services {B 1,...,B n } over it, we define a dynamic system to be the resulting global system, seen as a whole: it is an abstract structure used to capture the interaction of available services with the environment. Each action a s.t. a / O A is called local action An action a O is said to be executable iff 1 it is available in the current service state of the service b, i.e. b a b in B for some state b B 2 it is either a local action (a O A), or allowed in the current domain state D (i.e., there exists a domain state D such that D a D ) C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 17 / 35

The dynamic system Example revisited: the domain A (simplified) smart home domain Dynamic domain transition relation (semi-formal): { D D D = (bathtemp = COLD) and D = (bathtemp = MILD) iff D = (bathtemp = MILD) and D = (bathtemp = HOT) { D D D = (bathtemp = MILD) and D = (bathtemp = COLD) iff D = (bathtemp = HOT) and D = (bathtemp = MILD) { D D D = (bathtub = EMPTY) and D = (bathtub = HALF hotwtrrsv = ) iff D = (bathtub = HALF) and D = (bathtub = FILLED hotwtrrsv = ) D dodrain D iff D = (bathtub = FILLED bathtub = HALF) and D = (bathtub = EMPTY) D D iff D = (hotwtrrsv = ) and D = (hotwtrrsv = ) Initial state for the domain: {bathtemp = COLD, bathtub = EMPTY, hotwtrrsv = } Intuitively You can not drain an empty tub, neither raise the temperature up again when it is already hot (easy). When you pour hot water in the tub, the hot water reserves finish: to store some hot water again, use the boiler (slightly more tricky). C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 18 / 35

The goal process Outline 1 Introduction The Roman Model 2 Framework The dynamic system The goal process 3 Implementation The solver 4 Case study and evaluation Case study Performance evaluation 5 References C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 19 / 35

The goal process The goal-based target process Definition (Target process) A target process for a dynamic domain D as a tuple T = T,G,t 0,δ, where: T = { t 0,...,t q } is the finite set of process states; G is a finite set of goals of the form achieve φ while maintaining ψ, denoted by pairs g = ψ,φ, where ψ and φ are propositional formulae over P; t 0 T is the process initial state; δ T G T is the transition relation. Intuitively The goal-based target process represents the situations that the user may want to keep on selecting among, at any point in time (achievement). During the execution of the whole sequence of actions needed to achieve that goal, some conditions must be respected (maintenance). C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 20 / 35

The goal process An example ψ 1 φ 1 (bathtemp = HOT) ψ 2 (hotwtrrsv = ) φ 3 (bathtub = FILLED) t 0 t 1 t 2 ψ 2 (bathtemp = HOT bathtemp = WARM) φ 2 (bathtub = EMPTY) C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 21 / 35

The goal process An example ψ 1 φ 1 (bathtemp = HOT) ψ 2 (hotwtrrsv = ) φ 3 (bathtub = FILLED) t 0 t 1 t 2 ψ 2 (bathtemp = HOT bathtemp = WARM) φ 2 (bathtub = EMPTY) Easier and more compact The cognitive effort of specifying the right sequence of actions to invoke is not demanded to the user anymore: compare it with the target automaton at slide 21 - which did not even drain the water out of the tub! C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 21 / 35

The goal process An example ψ 1 φ 1 (bathtemp = HOT) ψ 2 (hotwtrrsv = ) φ 3 (bathtub = FILLED) t 0 t 1 t 2 ψ 2 (bathtemp = HOT bathtemp = WARM) φ 2 (bathtub = EMPTY) t 0 t 1 t 2 t 3 C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 21 / 35

The goal process An example ψ 1 φ 1 (bathtemp = HOT) ψ 2 (hotwtrrsv = ) φ 3 (bathtub = FILLED) t 0 t 1 t 2 ψ 2 (bathtemp = HOT bathtemp = WARM) φ 2 (bathtub = EMPTY) Plans, not invocations Transitions from a goal process state to the following are realized by conditional plans, and not by single invocations of actions. E.g., to pass from t 0 to t 1 at the starting point, you have to invoke twice on the air conditioner and on the boiler (why? ). C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 21 / 35

The goal process Realization Intuitively (see the paper for formal definitions and statements), a target process is realized when 1 a finite sequence of executable actions (conditional plan) is available for the goal couple g = φ,ψ, chosen from initial state t 0 and 2 a new conditional plan is available for the new selected goal, and so on. Then, all possible choices available in the target process must be guaranteed. The problem Given a dynamic domain D, available services B 1,...,B n, and a target process T, build, if it exists, a realization of T in the dynamic system S corresponding to D and B 1,...,B n. The solution is based on the notion of PLAN-simulation relation (see the paper for further information). Theorem Building a realization of a target process T in a dynamic system S is an EXPTIME-complete problem. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 22 / 35

The goal process Realization Intuitively (see the paper for formal definitions and statements), a target process is realized when 1 a finite sequence of executable actions (conditional plan) is available for the goal couple g = φ,ψ, chosen from initial state t 0 and 2 a new conditional plan is available for the new selected goal, and so on. Then, all possible choices available in the target process must be guaranteed. The problem Given a dynamic domain D, available services B 1,...,B n, and a target process T, build, if it exists, a realization of T in the dynamic system S corresponding to D and B 1,...,B n. The solution is based on the notion of PLAN-simulation relation (see the paper for further information). Theorem Building a realization of a target process T in a dynamic system S is an EXPTIME-complete problem. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 22 / 35

The goal process Realization Intuitively (see the paper for formal definitions and statements), a target process is realized when 1 a finite sequence of executable actions (conditional plan) is available for the goal couple g = φ,ψ, chosen from initial state t 0 and 2 a new conditional plan is available for the new selected goal, and so on. Then, all possible choices available in the target process must be guaranteed. The problem Given a dynamic domain D, available services B 1,...,B n, and a target process T, build, if it exists, a realization of T in the dynamic system S corresponding to D and B 1,...,B n. The solution is based on the notion of PLAN-simulation relation (see the paper for further information). Theorem Building a realization of a target process T in a dynamic system S is an EXPTIME-complete problem. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 22 / 35

The goal process Realization Intuitively (see the paper for formal definitions and statements), a target process is realized when 1 a finite sequence of executable actions (conditional plan) is available for the goal couple g = φ,ψ, chosen from initial state t 0 and 2 a new conditional plan is available for the new selected goal, and so on. Then, all possible choices available in the target process must be guaranteed. The problem Given a dynamic domain D, available services B 1,...,B n, and a target process T, build, if it exists, a realization of T in the dynamic system S corresponding to D and B 1,...,B n. The solution is based on the notion of PLAN-simulation relation (see the paper for further information). Theorem Building a realization of a target process T in a dynamic system S is an EXPTIME-complete problem. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 22 / 35

The solver Outline 1 Introduction The Roman Model 2 Framework The dynamic system The goal process 3 Implementation The solver 4 Case study and evaluation Case study Performance evaluation 5 References C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 23 / 35

The solver Realization Theorem Building a realization of a target process T in a dynamic system S is an EXPTIME-complete problem. EXPTIME-complete! An efficient implementation of the solver is needed! [DGPS10, DGFPS10] reduce the composition problem to LTL synthesis by model checking. Viable in practice only if large computational resources are available! On typical hardware for the smart home applications, only simple examples can be solved with that approach (see later). We solved it by a direct (AND-OR) search in the space of execution traces of incremental partial policies guided by heuristics. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 24 / 35

The solver Realization Theorem Building a realization of a target process T in a dynamic system S is an EXPTIME-complete problem. EXPTIME-complete! An efficient implementation of the solver is needed! [DGPS10, DGFPS10] reduce the composition problem to LTL synthesis by model checking. Viable in practice only if large computational resources are available! On typical hardware for the smart home applications, only simple examples can be solved with that approach (see later). We solved it by a direct (AND-OR) search in the space of execution traces of incremental partial policies guided by heuristics. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 24 / 35

The solver Realization Theorem Building a realization of a target process T in a dynamic system S is an EXPTIME-complete problem. EXPTIME-complete! An efficient implementation of the solver is needed! [DGPS10, DGFPS10] reduce the composition problem to LTL synthesis by model checking. Viable in practice only if large computational resources are available! On typical hardware for the smart home applications, only simple examples can be solved with that approach (see later). We solved it by a direct (AND-OR) search in the space of execution traces of incremental partial policies guided by heuristics. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 24 / 35

The solver Implementation (sketch) Briefly, the algorithm works as follows. At each step, starting with an empty policy: 1 keep the partial policy; 2 simulate the execution; mind the non-determinism of actions (AND steps) and the possible choices for next goal requests (OR steps)! 3 try all of the actions you can, from the current system state; until either here the heuristics enter in action! 1 a valid policy is found, or 2 no extension is a valid solution. In case, the backtrack is caused by deadloops or violation of maintenance goals We adopted the delete-relaxation heuristics for sorting the list of next actions to choose among. The number of actions in the relaxed plan is the heuristic estimation for the cost of achieving the goal from the current state. The solver is encoded in Prolog. Problem specifications are Prolog source files as well. You can download and run the implementation: http://www.dis.uniroma1.it/~cdc/pubs/coopis2012-code_tests.zip C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 25 / 35

The solver Implementation (sketch) Briefly, the algorithm works as follows. At each step, starting with an empty policy: 1 keep the partial policy; 2 simulate the execution; mind the non-determinism of actions (AND steps) and the possible choices for next goal requests (OR steps)! 3 try all of the actions you can, from the current system state; until either here the heuristics enter in action! 1 a valid policy is found, or 2 no extension is a valid solution. In case, the backtrack is caused by deadloops or violation of maintenance goals We adopted the delete-relaxation heuristics for sorting the list of next actions to choose among. The number of actions in the relaxed plan is the heuristic estimation for the cost of achieving the goal from the current state. The solver is encoded in Prolog. Problem specifications are Prolog source files as well. You can download and run the implementation: http://www.dis.uniroma1.it/~cdc/pubs/coopis2012-code_tests.zip C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 25 / 35

Case study Outline 1 Introduction The Roman Model 2 Framework The dynamic system The goal process 3 Implementation The solver 4 Case study and evaluation Case study Performance evaluation 5 References C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 26 / 35

Case study The complete sample target process ψ1 (varlightsbedroom = off) (varpositionowner = bedroom) (vardoor3 = closed) (vardoor4 = closed) (varbed = down) φ1 (varbreakfastready = true) (varalarmset = false) cook t1 ψ2 (varguestdisturbed = false) φ2 (varpositionowner = livingroom) (varownerpicked = false) ψ2 (vartv = on) φ3 (varbathtub = filled) (vardoor2 = closed) (varlightsbathroom = on) (varownerpicked = false) (varpositionowner = bathroom) (varbathroomtemperature = warm) sleep t0 ψ2 WC t3 ψ2 φ3 TV t2 φ3 ψ0 true φ0 (varbed = down) (varalarmset = true) (varownerpicked = false) (varbathtub = empty) (varlightstoilet = on) (varlightsbedroom = off) (varlightsbathroom = off) (varlightskitchen = off) (varlightslivingroom = off) (varpositionowner = bedroom) eat t4 (vardoor2 = closed) (vardoor3 = closed) (vardoor4 = closed) (vardoor5 = closed) (vardoor6 = closed) (vardoor7 = closed) (varpositionnurse = toilet) (vartv = off) (varbathroomtemperature = cold) ψ4 φ4 ψ4 (varguestdisturbed = false) (varbathroomtemperature = warm) φ4 (varbreakfastready = true) (varpositionowner = kitchen) (varlightskitchen = on) (varownerpicked = false) C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 27 / 35

Case study The sub-targets used for comparative evaluations ψ 1 φ 1 t1 ψ 1 φ 1 t1 ψ2 φ 3 ψ 1 ψ 2 φ 1 t1 φ 2 t0 ψ 0 φ 0 t0 t3 t0 t2 ψ 0 φ 0 ψ 0 φ 0 t4 ψ 4 φ 4 (a) T 1 (b) T 2 (c) T 3 ψ 1 φ 1 t0 ψ 0 φ 0 t1 ψ 2 φ 3 t4 ψ 2 φ 3 t3 ψ 4 φ 4 ψ 1 φ 1 t0 ψ 0 φ 0 t1 ψ 2 φ 3 t4 ψ 2 φ 3 t3 ψ 2 φ 2 ψ 4 φ 4 ψ 4 φ 4 t2 ψ 1 φ 1 t0 ψ 0 φ 0 t1 ψ 2 φ 3 t4 ψ 2 φ 3 t3 ψ 4 φ 4 ψ 2 φ 2 ψ 2 φ 3 ψ 4 φ 4 t2 (d) T 4 (e) T 5 (f) T Figure: Comparative evaluation target processes C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 28 / 35

Performance evaluation Outline 1 Introduction The Roman Model 2 Framework The dynamic system The goal process 3 Implementation The solver 4 Case study and evaluation Case study Performance evaluation 5 References C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 29 / 35

Performance evaluation Summary of the results of performance tests Trans. s Time [sec] Std. Dev. Coeff. of Var. [ ] Mean (M ) min (m) Max (M) (σ) (σ/m ) T 1 2 1.166 1.15 1.19 0.011 9.219 T 2 3 60.688 60.54 60.82 0.094 1.545 T 3 4 30.448 30.39 30.61 0.088 2.896 T 4 5 83.497 83.26 83.88 0.195 2.331 T 5 7 180.894 180.29 182.05 0.523 2.889 T 8 238.841 238.38 239.19 0.291 1.219 Testing environment We run the solver 10 times per case in a SWI-Prolog 5.10.2 environment, on top of an Intel Core Duo 1.66 GHz (2 GB DDR2 RAM, Ubuntu 10.04) laptop. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 30 / 35

Performance evaluation Summary of the results of performance tests Trans. s Time [sec] Std. Dev. Coeff. of Var. [ ] Mean (M ) min (m) Max (M) (σ) (σ/m ) T 1 2 1.166 1.15 1.19 0.011 9.219 T 2 3 60.688 60.54 60.82 0.094 1.545 T 3 4 30.448 30.39 30.61 0.088 2.896 T 4 5 83.497 83.26 83.88 0.195 2.331 T 5 7 180.894 180.29 182.05 0.523 2.889 T 8 238.841 238.38 239.19 0.291 1.219 Testing environment We run the solver 10 times per case in a SWI-Prolog 5.10.2 environment, on top of an Intel Core Duo 1.66 GHz (2 GB DDR2 RAM, Ubuntu 10.04) laptop. About the efficiency We tried the implementation described in [DGFPS10], on a similar machine. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 30 / 35

Performance evaluation Summary of the results of performance tests Trans. s Time [sec] Std. Dev. Coeff. of Var. [ ] Mean (M ) min (m) Max (M) (σ) (σ/m ) T 1 2 1.166 1.15 1.19 0.011 9.219 T 2 3 60.688 60.54 60.82 0.094 1.545 T 3 4 30.448 30.39 30.61 0.088 2.896 T 4 5 83.497 83.26 83.88 0.195 2.331 T 5 7 180.894 180.29 182.05 0.523 2.889 T 8 238.841 238.38 239.19 0.291 1.219 Testing environment We run the solver 10 times per case in a SWI-Prolog 5.10.2 environment, on top of an Intel Core Duo 1.66 GHz (2 GB DDR2 RAM, Ubuntu 10.04) laptop. About the efficiency We tried the implementation described in [DGFPS10], on a similar machine. We had to turn it off after more than two days running... C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 30 / 35

Performance evaluation Analisys of the results of performances tests (a) Performances (b) Coefficient of variation C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 31 / 35

Bibliography I [BCDG + 03] [BCDG + 05a] [BCDG + 05b] [BCDGP08] Daniela Berardi, Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, and Massimo Mecella, Automatic composition of e-services that export their behavior, ICSOC (Maria E. Orlowska, Sanjiva Weerawarana, Mike P. Papazoglou, and Jian Yang, eds.), Lecture Notes in Computer Science, vol. 2910, Springer, 2003, pp. 43 58. Daniela Berardi, Diego Calvanese, Giuseppe De Giacomo, Richard Hull, and Massimo Mecella, Automatic composition of transition-based semantic web services with messaging, VLDB (Klemens Böhm, Christian S. Jensen, Laura M. Haas, Martin L. Kersten, Per-Åke Larson, and Beng Chin Ooi, eds.), ACM, 2005, pp. 613 624. Daniela Berardi, Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, and Massimo Mecella, Automatic service composition based on behavioral descriptions, International Journal on Cooperative Information Systems (IJCIS) 14 (2005), no. 4, 333 376. Daniela Berardi, Fahima Cheikh, Giuseppe De Giacomo, and Fabio Patrizi, Automatic service composition via simulation, International Journal of Foundations of Computer Science 19 (2008), no. 2, 429 451. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 32 / 35

Bibliography II [BCGM05] [CDCF + 11] [CGL + 08] [DCI11] Daniela Berardi, Diego Calvanese, Giuseppe De Giacomo, and Massimo Mecella, Composition of services with nondeterministic observable behavior, ICSOC (Boualem Benatallah, Fabio Casati, and Paolo Traverso, eds.), Lecture Notes in Computer Science, vol. 3826, Springer, 2005, pp. 520 526. Tiziana Catarci, Claudio Di Ciccio, Vincenzo Forte, Ettore Iacomussi, Massimo Mecella, Giuseppe Santucci, and Giuseppe Tino, Service composition and advanced user interfaces in the home of tomorrow: the SM4All approach, Ambi-Sys (Silvia Gabrielli, Dirk Elias, and Kanav Kahol, eds.), Lecture Notes of the Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering, vol. 70, March 2011, pp. 12 19. Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, Massimo Mecella, and Fabio Patrizi, Automatic service composition and synthesis: the roman model, IEEE Data Eng. Bull. 31 (2008), no. 3, 18 22. Claudio Di Ciccio and Ettore Iacomussi, The Roman Model for automated synthesis in practice: the SM4All experience, July 2011. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 33 / 35

Bibliography III [DCMC + 11] [DGFPS10] [DGP09] [DGPS10] Claudio Di Ciccio, Massimo Mecella, Mario Caruso, Vincenzo Forte, Ettore Iacomussi, Katharina Rasch, Leonardo Querzoni, Giuseppe Santucci, and Giuseppe Tino, The homes of tomorrow: Service composition and advanced user interfaces, ICST Transasctions on Ambient Systems 11 (2011), no. 10-12, e2, To appear in ICST Transactions on Ambient Systems 2011. Giuseppe De Giacomo, Paolo Felli, Fabio Patrizi, and Sebastian Sardiña, Two-player game structures for generalized planning and agent composition, AAAI (Maria Fox and David Poole, eds.), AAAI Press, 2010. Giuseppe De Giacomo and Fabio Patrizi, Composition of services that share an infinite-state blackboard (extended abstract), IIWEB 09 (Biplav Srivastava, Ullas Nambiar, and Craig Knoblock, eds.), July 2009. Giuseppe De Giacomo, Fabio Patrizi, and Sebastian Sardiña, Agent programming via planning programs, Proc. of 9th Int. Conf. on Autonomous Agents and Multiagent Systems (AAMAS 2010), May 2010. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 34 / 35

Bibliography IV [DMDCMP10] R. De Masellis, C. Di Ciccio, M. Mecella, and F. Patrizi, Smart home planning programs, Proceedings of the 2010 7th International Conference on Service Systems and Service Management (ICSSSM 10), Japan Advanced Institute of Science and Technology, Japan, IEEE, 2010, pp. 377 382. [GMP09] [Pat09] [SPDG08] Giuseppe De Giacomo, Riccardo De Masellis, and Fabio Patrizi, Composition of partially observable services exporting their behaviour, ICAPS (Alfonso Gerevini, Adele E. Howe, Amedeo Cesta, and Ioannis Refanidis, eds.), AAAI, 2009. Fabio Patrizi, Simulation-based techniques for automated service composition, Ph.D. thesis, Department of Computer Science and Systems "Antonio Ruberti", SAPIENZA - Università di Roma, Rome, Italy, 2009. Sebastian Sardiña, Fabio Patrizi, and Giuseppe De Giacomo, Behavior composition in the presence of failure, KR (Gerhard Brewka and Jérôme Lang, eds.), AAAI Press, 2008, pp. 640 650. C. Di Ciccio (SAPIENZA Università di Roma) Goal-based Composition of Stateful Services... CoopIS 2012 (Rome, 2012/09/14) 35 / 35