Constraints for Service Contracts Ugo Montanari Università di Pisa, Italy Marzia Buscemi formerly IMT Lucca, Italy Mario Coppo Università di Torino, Italy.

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

Completeness and Expressiveness
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
Process Algebra (2IF45) Recursion in Process Algebra Suzana Andova
Inference of progress properties for (multi party) sessions Mario Coppo (Universita’ di Torino) joint work with Mariangiola Dezani, Nobuko Yoshida Lisbon,
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Propositional Logic Reading: C , C Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
A Semantic Characterization of Unbounded-Nondeterministic Abstract State Machines Andreas Glausch and Wolfgang Reisig 1.
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Hernán Melgratti joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica - Università di Pisa Flat Committed Join in Join.
Chapter 3 Describing Syntax and Semantics Sections 1-3.
Data Flow Analysis Compiler Design Nov. 8, 2005.
Formal Aspects of Computer Science – Week 12 RECAP Lee McCluskey, room 2/07
An algebra of Connectors for modeling CommUnity with Tiles joint work with Roberto Bruni Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan.
ASP vs. Prolog like programming ASP is adequate for: –NP-complete problems –situation where the whole program is relevant for the problem at hands èIf.
Dipartimento di Informatica Università di Pisa Nested Commits for Mobile Calculi: Extending Join Roberto Bruni, Hernán Melgratti and Ugo Montanari.
- r r Saturation-Based Decision Procedures and Complexity Analysis Yevgeny Kazakov R. 615 Applications Add semantic markup to a.
Reactive systems – general
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part A Knowledge Representation and Reasoning.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Semantics. Semantics is a precise definition of the meaning of a syntactically and type-wise correct program. Ideas of meaning: –Operational Semantics.
Chapter 5: Sequences, Mathematical Induction, and Recursion 5.5 Application: Correctness of Algorithms 1 [P]rogramming reliability – must be an activity.
ISBN Chapter 3 Describing Semantics.
A Logic of Partially Satisfied Constraints Nic Wilson Cork Constraint Computation Centre Computer Science, UCC.
Chapter 5 Constraint Satisfaction Problems
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Computer Science CPSC 322 Lecture 22 Logical Consequences, Proof Procedures (Ch 5.2.2)
CS412/413 Introduction to Compilers Radu Rugina Lecture 13 : Static Semantics 18 Feb 02.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
Francesco Tiezzi IMT Advanced Studies Lucca Causal-Consistent Reversibility in a Tuple-Based Distributed Language Joint work with Elena Giachino, Ivan.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
ALLOY: A Formal Methods Tool Glenn Gordon Indiana University of Pennsylvania COSC 481- Formal Methods Dr. W. Oblitey 26 April 2005.
Towards a Semantic Model for Java Wildcards Sophia Drossopoulou Mariangiola Dezani-Ciancaglini Imperial College London Università di Torino Italy Nicholas.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini IX. System Models (III)
Rewriting Nested Graphs, through Term Graphs Roberto Bruni, Andrea Corradini, Fabio Gadducci Alberto Lluch Lafuente and Ugo Montanari Dipartimento di Informatica,
Security analysis of COM with Alloy
Chapter 5 Recursion as a Problem-Solving Technique
CSE-321 Programming Languages Simply Typed -Calculus
CPE555A: Real-Time Embedded Systems
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Process Algebra (2IF45) Expressiveness of BPArec
EA C461 – Artificial Intelligence Logical Agent
Automating Induction for Solving Horn Clauses
Knowledge Representation
PL/SQL Scripting in Oracle:
Service-Oriented Computing: Semantics, Processes, Agents
Logical Agents Chapter 7.
Midterm Review In Text: Chapters 1-3, 5-9, 15.
Final Review In Text: Chapters 1-3, 5-10,
Semantics In Text: Chapter 3.
Problem Solving Skill Area 305.1
MA/CSSE 474 More Math Review Theory of Computation
Distributed Transactions
Service-Oriented Computing: Semantics, Processes, Agents
Constraints and Search
Constraint satisfaction problems
Knowledge Representation I (Propositional Logic)
Midterm Review In Text: Chapters 1-3, 5-9, 15.
Dichotomies in CSP Karl Lieberherr inspired by the paper:
Deniz Beser A Fundamental Tradeoff in Knowledge Representation and Reasoning Hector J. Levesque and Ronald J. Brachman.
Representations & Reasoning Systems (RRS) (2.2)
Constraint satisfaction problems
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

Constraints for Service Contracts Ugo Montanari Università di Pisa, Italy Marzia Buscemi formerly IMT Lucca, Italy Mario Coppo Università di Torino, Italy Mariangiola Dezani Università di Torino, Italy CINA Kick-off Meeting Pisa, February 4-6, 2013

What if the hotel is booked on the wrong date? Example airline date2 client date1date2 flight room date2 date 1 hotel date1date2 2

Negotiation: the two partners search for an agreement Commit: if an agreement is found Execution: the interaction is carried on according to the agreement In a constraint-based approach: Negotiation: constraint combination (for every pair of partners) Commit: existence of a constraint solution Monitored Execution: via guards (harmful branches are avoided) Negotiate-Commit-Execute 3

Declarative knowledge: knowledge as data, model checking, theorem proving, nondetermism, logic programming with backtracking, constraint logic programming Procedural knowledge: knowledge as programs, program execution, operational semantics, indeterminism Declarative & procedural knowledge: committed choice languages, deep and shallow guards, ask & tell constraint programming Compile time vs. execution time:  Classical: model check, compile, assert using declarative knowledge; execute using procedural knowledge  Autonomic: mix proving properties with procedural execution Declarative vs. Procedural Knowledge 4

Source calculus (Possibly recursive) clients with nested calls Services offering finite interactions Target calculus: source calculus + constraints expressing which communication branches can be taken Compilation: from source to target calculus Client and server commit if the union of their constraints is consistent Results: soundness and completeness Contribution 5

Source Client Processes P :: =0inert process □.Pservice call ■.Pcall end α!.Paction P + P choice rec p.Precursion precursive variables Source Client T = □.P Source Service Processes Q :: = α?.Qaction Q + Q choice ● service end Source Service S = ◊.Q Source calculus: syntax 6

Source calculus: semantics client □. flight!. □. room!. (date1_r!. ■. date1_f!. ■ + date2_r!. ■. date2_f!. ■ ) 7

Source calculus: semantics client □. flight!. □. room!. (date1_r!. ■. date1_f!. ■ + date2_r!. ■. date2_f!. ■ ) airline ◊. flight?. date2_f?. ● 8

Source calculus: semantics client flight!. □. room!. (date1_r!. ■. date1_f!. ■ + date2_r!. ■. date2_f!. ■ ) airline flight?. date2_f?. ● 9

Source calculus: semantics client □. room!.(date1_r!. ■. date1_f!. ■ + date2_r!. ■. date2_f!. ■ ) airline date2_f?. ● 10

Source calculus: semantics client □. room!.(date1_r!. ■. date1_f!. ■ + date2_r!. ■. date2_f!. ■ ) ◊. room?. (date1_r?. ● + date2_r?. ● ) airline hotel date2_f?. ● 11

Source calculus: semantics client room!.(date1_r!. ■. date1_f!. ■ + date2_r!. ■. date2_f!. ■ ) room?. (date1_r?. ● + date2_r?. ● ) airline hotel date2_f?. ● 12

Source calculus: semantics client (date1_r!. ■. date1_f!. ■ + date2_r!. ■. date2_f!. ■ ) (date1_r?. ● + date2_r?. ● ) airline hotel date2_f?. ● 13

Source calculus: semantics client ■. date1_f!. ■ ● airline hotel date2_f?. ● 14

Source calculus: semantics client date1_f!. ■ airline date2_f?. ● 15

Source calculus: semantics client date1_f!. ■ airline date2_f?. ● Deadlock 16

A constraint is a set of ground assignments of all variables to terms of the signature  = { α(), end | α an action } Examples: x=y, x=α(β(y)), x=end. Variables not mentioned are assigned in all possible ways The set of all constraints forms a named constraint semiring with  c  d = c  d  c  d = c  d  0 =   1 = the set of all ground assignments  x.c = { s[h/x] | h a ground term} Constraints 17

Target Client Processes P :: =0inert process □.Pservice call ■.Pcall end α!.Paction check c 1.P 1, check c 2.P 2 choice rec x p.Rrecursion p recursive variables R :: =(X)c|Pconstrained process Target Client T = (X)c | □.P Target Service Processes Q :: = α?.Qaction Q + Q choice ● service end Target Service S = (X)c | ◊.Q Target calculus: syntax 18

Analogous to the source semantics, apart from taking into account constraints. Guards block harmful branches A service call is executed only if client and service constraints guarantee at least a successful interaction Target calculus: semantics 19

Source processes are compiled into target processes. The compilation adds constraints which represent all the possible interactions offered. Stuck interactions are excluded at commit time. Compilation is independent of the set of available services. Compilation 20

Constraints client ( room:date1 AND flight:date1 ) OR ( room:date2 AND flight:date2 ) room:date1 OR room:date2 airline hotel flight:date2 21

Negotiation client ( room:date1 AND flight:date1 ) OR ( room:date2 AND flight:date2 ) room:date1 OR room:date2 airline hotel flight:date2 22

Commit client ( room:date1 AND flight:date1 ) OR ( room:date2 AND flight:date2 ) room:date1 OR room:date2 airline hotel flight:date2 23

Stuck-freedom: Given a target client and a set of target services, if an agreement exists then the computation terminates with no deadlock. Soundness and Completeness: A source client and a set of source services can have a successful interaction iff their compilations in the target calculus can have an agreement. Results 24

Generalising to Soft Constraint Logic Programming Client/service interactions would be given a weight Reduction rules will take into account weights in order to allow only interactions that maximise client’s satisfaction. Future work 25