On Negotiation as Concurrency Primitive. Javier Esparza, Techn. Univ. München (D) Jörg Desel, FernUniversität in Hagen (D)

Similar documents
Faster and More Focused Control-Flow Analysis for Business Process Models through SESE Decomposition

Process Mining Using BPMN: Relating Event Logs and Process Models

Complexity Results for 1-safe Nets

Structural Detection of Deadlocks in Business Process Models

System modeling. Budapest University of Technology and Economics Department of Measurement and Information Systems

From Workflow Design Patterns to Logical Specifications

Scheduling Shop Scheduling. Tim Nieberg

Automata on Infinite Words and Trees

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Testing LTL Formula Translation into Büchi Automata

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

T Reactive Systems: Introduction and Finite State Automata

1 Definition of a Turing machine

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new GAP (2) Graph Accessibility Problem (GAP) (1)

A Static Analysis Technique for Graph Transformation Systems

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research

Introduction to Logic in Computer Science: Autumn 2006

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

Simulation-Based Security with Inexhaustible Interactive Turing Machines

Lecture 17 : Equivalence and Order Relations DRAFT

Compiler Construction

Lecture 1: Course overview, circuits, and formulas

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

Automata and Formal Languages

The Analysis Method about Change Domain of Business Process Model Based on the Behavior Profile of Petri Net

Business Process Quality Metrics: Log-based Complexity of Workflow Patterns

Representing Reversible Cellular Automata with Reversible Block Cellular Automata

Quantum and Non-deterministic computers facing NP-completeness

ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear:

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Omega Automata: Minimization and Learning 1

The Butterfly, Cube-Connected-Cycles and Benes Networks

Reducing Clocks in Timed Automata while Preserving Bisimulation

Preventing Denial of Service Attacks in a Calculus of Mobile Resources

Lights and Darks of the Star-Free Star

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

On strong fairness in UNITY

A PRACTICAL APPROACH FOR A WORKFLOW MANAGEMENT SYSTEM

Business Process Model and Soundness

CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015

Hint 1. Answer (b) first. Make the set as simple as possible and try to generalize the phenomena it exhibits. [Caution: the next hint is an answer to

How To Find An Optimal Search Protocol For An Oblivious Cell

Combining Software and Hardware Verification Techniques

Challenges in Business Process Management: Verification of business processes using Petri nets

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

EFFECTIVE CONSTRUCTIVE MODELS OF IMPLICIT SELECTION IN BUSINESS PROCESSES. Nataliya Golyan, Vera Golyan, Olga Kalynychenko

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 4 Nancy Lynch

Repair Checking in Inconsistent Databases: Algorithms and Complexity

Architecture of Information Systems

Introduction to Finite Fields (cont.)

Software Modeling and Verification

Policy Analysis for Administrative Role Based Access Control

Class notes Program Analysis course given by Prof. Mooly Sagiv Computer Science Department, Tel Aviv University second lecture 8/3/2007

How To Solve The Stable Roommates Problem

Finite Automata and Regular Languages

Temporal Logics. Computation Tree Logic

Mathematical Induction. Lecture 10-11

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Coverability for Parallel Programs

Change Propagation in Process Models using Behavioural Profiles

Business Process Modeling

Non-deterministic Semantics and the Undecidability of Boolean BI

Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Monitoring Metric First-order Temporal Properties

Automata and Computability. Solutions to Exercises

SMock A Test Platform for the Evaluation of Monitoring Tools

Games Manipulators Play

10CS35: Data Structures Using C

Policy Analysis for Administrative Role Based Access Control without Separate Administration

C H A P T E R Regular Expressions regular expression

1 Approximating Set Cover

Modelling Workflow with Petri Nets. CA4 BPM PetriNets

Regular Languages and Finite Automata

Similarity and Diagonalization. Similar Matrices

Chapter 2 Introduction to Business Processes, BPM, and BPM Systems

Analysis of Binary Search algorithm and Selection Sort algorithm

6.852: Distributed Algorithms Fall, Class 2

Nondeterministic polynomial time factoring in the tile assembly model

Fixed-Point Logics and Computation

Translating Data Flow to Synchronous Block Diagrams

POLYNOMIAL RINGS AND UNIQUE FACTORIZATION DOMAINS

The Application of Petri Nets to Workflow Management

facultad de informática universidad politécnica de madrid

FACTORING POLYNOMIALS IN THE RING OF FORMAL POWER SERIES OVER Z

Static Analysis. Find the Bug! : Analysis of Software Artifacts. Jonathan Aldrich. disable interrupts. ERROR: returning with interrupts disabled

How To Understand A Self-Adapting Recovery Net (Sarn)

A Propositional Dynamic Logic for CCS Programs

Exponential time algorithms for graph coloring

Diagnosing workflow processes using Woflan

Shortcut sets for plane Euclidean networks (Extended abstract) 1

A Petri Net Model for Hardware/Software Codesign

Computing Degree of Parallelism for BPMN Processes

Stationary random graphs on Z with prescribed iid degrees and finite mean connections

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

BRIDGING THE GAP BETWEEN BUSINESS MODELS AND WORKFLOW SPECIFICATIONS

Section 4.2: The Division Algorithm and Greatest Common Divisors

Obstruction-free Authorization Enforcement: Aligning Security and Business Objectives

Transcription:

On Negotiation as Concurrency Primitive Javier Esparza, Techn. Univ. München (D) Jörg Desel, FernUniversität in Hagen (D) 1

On Negotiation as Concurrency Primitive I: arbitrary / weakly deterministic /deterministic cyclic / acyclic Negotiations [CONCUR 2013] Javier Esparza, Techn. Univ. München (D) Jörg Desel, FernUniversität in Hagen (D) 2

On Negotiation as Concurrency Primitive II: arbitrary / weakly deterministic /deterministic cyclic / acyclic Negotiations [FOSSACS 2014] Javier Esparza, Techn. Univ. München (D) Jörg Desel, FernUniversität in Hagen (D) 3

Negotiation Programs [unpublished] Javier Esparza, Techn. Univ. München (D) Jörg Desel, FernUniversität in Hagen (D) 4

(Multiparty) negotiation 5

Negotiation as concurrency primitive Concurrency theory point of view: Negotiation = synchronized choice CSP: ap 1 + bp 2 a, b (aq 1 + bq 2 ) Petri nets: Negotiations: a net-like concurrency model with negotiation as primitive. 6 a b

The Father-Daughter-Mother Negotiation Agents Initial states Father 11:00 pm Daughter Daughter 2:00 am Mother 10:00 pm 7

The Father-Daughter-Mother Negotiation 8

The Father-Daughter-Mother Negotiation Atomic negotiations (atoms) 9

The Father-Daughter-Mother Negotiation Initial atom Final atom 10

An atomic negotiation Outcomes: yes, no, ask_mum Parties: subset of agents State transformers (one per outcome): T am tf, td = (tf, td) T y tf, td = {(t, t) tf t td} (sometimes we identify a and T a ) 11

Semantics 11:00 2:00 10:00 11:00 2:00 10:00 12:00 12:00 10:00 12:00 12:00 12:00 12

Semantics 11:00 2:00 10:00 11:00 2:00 10:00 11:00 2:00 10:00 11:00 Angry! Angry! Beer! Angry! Angry! 13

The Ping-Pong Negotiation

Negotiations as Parallel Computation Model. An Example: Sorting four integers 5 2 7 1 Four agents. Internal states: integers. Transformer of internal atom: swap integers if not in ascending order. T x, y = if y < x then y, x else (x, y)

Analysis of the sorting negotiation n 1 n 2 n 3 n 4 n 1 n 2 n 3 n 4 Sorting negotiation correct if sound, and summary consists of all pairs n 1, n 2, n 3, n 4, n 1, n 2, n 3, n 4 s. t. n 1 n 2 n 3 n 4 is a permutation of n 1 n 2 n 3 n 4 and n 1 n 2 n 3 n 4 16

Negotiations as Parallel Computation Model. Parallel Bubblesort 5 2 7 1 3 Five agents. Internal states: integers. Transformer of internal binary atom: swap integers if not in ascending order. T x, y = if y < x then y, x else (x, y) 17

Negotiations as Parallel Computation Model. Parallel Bubblesort 5 2 7 1 3 Five agents. Internal states: integers. Transformer of internal binary atom: swap integers if not in ascending order. T x, y = if y < x then y, x else (x, y) 1 2 3 5 7 18

Counting pairs of consecutive numbers 53 2 4 0 Sort three integers and count the number of consecutive pairs Three agents communicate with a fourth Counter agent Is it correct...? 2 43 54 12

Negotiations and Petri nets Negotiations have the same expressive power as (coloured) 1-safe Petri nets. However, negotiations can be exponentially more succint. 20

Negotiations 1-safe Petri nets

Negotiations 1-safe Petri nets [D, n DM ] [M, n DM, n f ] Meaning of a token in [D, n DM ]: agent D is currently ready to engage in the atom n DM (and no others) Meaning of a token in [M, n DM, n f ]: agent M is currently ready to engage in the atoms n DM and n f (and no others) DM takes place with outcome yes, after which D and M are only ready to engage in n f

Negotiations 1-safe Petri nets Places of the form [agent, set of atoms] number of places potentially exponential

Analysis problems: Soundness Deadlock!

Analysis problems: Soundness Large step: sequence of occurrences of atoms starting with the initial atom and ending with the final atom. A negotiation is sound if 1. Every execution can be extended to a large step. 2. No useless atoms: every atom occurs in some large step. (cf. van der Aalst s workflow nets) In particular: soundness deadlock-freedom 25

Analysis problems: Summarization Each large step induces a relation between initial and final global states The summary of a negotiation is the union of these relations (i.e., the whole input-output relation). The summarization problem consists of, given a sound negotiation, computing its summary. 26

Analysis problems: Summarization n 1 n 2 n 3 n 4 n 1 n 2 n 3 n 4 Sorting negotiation correct if sound, and summary consists of all pairs n 1, n 2, n 3, n 4, n 1, n 2, n 3, n 4 such that n 1 n 2 n 3 n 4 is permutation of n 1 n 2 n 3 n 4 and n 1 n 2 n 3 n 4

Computing summaries A simple algorithm to compute a summary: Compute the LTS of the negotiation Apply reduction rules a: α b: β e: ε b: β a: α c: γ a: α b: β a: α b: β d: α β e: α γ c: αβ c: α β Iteration Shortcut Merge 28

Reduction rules for negotiations Aim: find reduction rules acting directly on negotiation diagrams (instead of their transition systems). Rules must: preserve soundness: sound after iff sound before preserve the summary: summary after equal to summary before We look for local rules: application conditions and changes involve only a local neighbourhood of the application point.

Rule 1: Merge a: α, b: β a, b a, b a, b a: α b: β c: α β c c c c: α β 30

Rule 1: Merge a, b a, b a, b a, b a b a b a b a b

Rule 2: iteration b: β a: α c: γ a b c a b c a b c a: α b: β c: γ d: α β e: α γ d e d e d e d: α β e: α γ 32

Rule 3: shortcut a a a Unsound b b b a b b a b a Sound

Rule 3: shortcut a b a a b a b 1. Orange Unsound atom enables white atom unconditionally a b a a b a b Sound

Rule 3: shortcut a b a a b a b 1. Orange atom enables white atom unconditionally. 2. No forks from orange to white. 3. One more technical condition (see paper). a b a a b a b

Rule 4: useless arc a a Agent 1 Agent 2 a a

Completeness and polynomiality A set of rules is complete for a class if it reduces all negotiations in the class to atomic negotiations. A complete set of rules is polynomial if every sound negotiation with k atoms is reduced to an atom by p(k) rule applications, for some polynomial p. Theorem [CONCUR 13]: deciding if a giving pair of global states belongs to the summary of a given negotiation is PSPACE-complete, even for every simple transformers. Polynomiality and completeness results very unlikely for arbitrary negotiations. 37

Deterministic agents and negotiations An agent is deterministic if it is never ready to engage in more than one atom ( no forks ). A negotiation is deterministic if every agent is deterministic. non-deterministic 38

Deterministic agents and negotiations An agent is deterministic if it is never ready to engage in more than one atom ( no forks ). A negotiation is deterministic if every agent is deterministic. deterministic

Deterministic agents and negotiations An agent is deterministic if it is never ready to engage in more than one atom ( no forks ). A negotiation is deterministic if every agent is deterministic. deterministic 40

Deterministic agents and negotiations An agent is deterministic if it is never ready to engage in more than one atom ( no forks ). A negotiation is deterministic if every agent is deterministic deterministic

Deterministic negotiations: Results Theorem [CONCUR 13]: The shortcut and merge rules are complete and polynomial for acyclic deterministic negotiations Theorem [FOSSACS 14]: The shortcut, merge, and iteration rules are complete and polynomial for arbitrary deterministic negotiations 42

Weakly deterministic negotiations A negotiation is weakly deterministic if every atom has a deterministic party weakly deterministic

Weakly deterministic negotiations A negotiation is weakly deterministic if every atom has a deterministic party weakly deterministic

Weakly Deterministic Negotiations: Results Theorem [CONCUR 13]: The shortcut, merge, and useless arc rules are complete for acyclic, weakly deterministic negotiations.

Deterministic negotiations: Results Theorem [FOSSACS 14]: The shortcut, merge, and iteration rules are complete and polynomial for arbitrary deterministic negotiations 46

A Proof Sketch: Loop fragments A loop is a minimal firing sequence leading from a reachable marking to itself. A loop fragment is the subnegotiation that occurs in the loop 47

A Proof Sketch: Loop fragments A loop is a minimal firing sequence leading from a reachable marking to itself. A loop fragment is the subnegotiation that occurs in the loop 48

A Proof Sketch: Loop fragments A loop is a minimal firing sequence leading from a reachable marking to itself. A loop fragment is the subnegotiation that occurs in the loop 49

A Proof Sketch: Loop fragments Lemma: every loop fragment of a sound deterministic negotiation has a synchronizer Synchronizers 50

A Proof Sketch: Loop fragments Lemma: every loop fragment of a sound deterministic negotiation has a synchronizer loop has no synchronizer, but negotiation is not deterministic 51

A Proof Sketch: Loop fragments Almost acyclic loop fragment: loop fragment that becomes acyclic after cutting it along a synchronizer Lemma: every cyclic, sound and deterministic negotiation contains an almost acyclic loop. 52

A Proof Sketch: Loop fragments Almost acyclic loop fragment: loop fragment that becomes acyclic after cutting it along a synchronizer Lemma: every cyclic, sound and deterministic negotiation contains an almost acyclic loop fragment. 53

A Proof Sketch: Loop fragments Theorem [CONCUR 13]: Acyclic sound and deterministic negotiations can be reduced using the shortcut and merge rules. Corollary: loop fragments can be reduced to a self-loop using the shortcut and merge rules. The self-loop can be reduced with the iteration rule. 54

A Proof Sketch: Polynomiality Problem: the reduction of a loop fragment to a self-loop produces side-effects Careful analysis required to ensure polynomialty. 55

A Proof Sketch: Polynomiality Theorem: a sound and deterministic negotiation with n atoms and k outcomes can be reduced by means of O(n 4 k) applications of the shortcut, merge, and iteration rules. Conjecture: O(n 2 k) applications suffice. 56

New paper: Negotiation Programs How can we implement negotiations? How can we implement sound negotiations? (correct by construction) 57

Negotiation Programs: an example n 0 : discuss a proposal? n 1 : team A makes plan. n 2 : team B makes plan. n 3 : plans are consistent? n f : termination 58

Negotiation Programs: an example 59

Negotiation Programs: an example 60

Semantics of negotiations: Mazurkiewicz traces 61

Semantics of negotiations: Mazurkiewicz traces 62

Semantics of negotiations: Mazurkiewicz traces 63

Mazurciewicz traces with concatenation Independence of negotiation atoms (actually outcomes): disjoint sets of participants 64

A grammar for negotiation programs set of agents X Y U Z = X concatenation for each X a name space X is a subset of X 65

Semantics of negotiation programs the empty negotiation endalternative loopalternative trace concatenation 66

Boxes 67

Box for e 68

Conatenation of boxes 69

The alternative operator endalternative loopalternative 70

Equivalence result equivalence: same Mazurciewicz traces Theorem: for each negotiation program there is an equivalent sound and deterministic negotiation which has almost the same size. for each sound and deterministic negotiation there is an equivalent negotiation program with the same set of agents. proof based on reduction results 71

A concrete progamming language 72

concrete vs abstract concrete: abstract: 73

a final example 74

a final example 75

a final example 76

On Negotiation as Concurrency Primitive Javier Esparza, Techn. Univ. München (D) Jörg Desel, FernUniversität in Hagen (D) 77