1 / 55

Deterministic Negotiations : Concurrency for F ree

Deterministic Negotiations : Concurrency for F ree. Javier Esparza Technische Universität München Joint work with Jörg Desel and Philipp Hoffmann. (Multiparty) negotiation. Negotiation as concurrency primitive. Concurrency theory point of view: N egotiation = synchronized choice.

klaus
Download Presentation

Deterministic Negotiations : Concurrency for F ree

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DeterministicNegotiations:ConcurrencyforFree Javier Esparza Technische Universität München Joint work with Jörg Deseland Philipp Hoffmann

  2. (Multiparty) negotiation

  3. Negotiation as concurrency primitive • Concurrency theory point of view: Negotiation = synchronized choice • CSP: • Petri nets: a b • Negotiations: a net-like concurrency model with negotiation as primitive.

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

  5. The Father-Daughter-Mother Negotiation

  6. The Father-Daughter-Mother Negotiation Atomic negotiations (atoms)

  7. The Father-Daughter-Mother Negotiation Initial atom Final atom

  8. An atomic negotiation Parties: subset of agents Outcomes: yes, no, ask_mum Outcomes: yes, no, ask_mum Outcomes: yes, no, ask_mum State transformers (one per outcome):

  9. 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

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

  11. Negotiations as Parallel Computation Model.Parallel Bubblesort 3 5 2 7 1 • Four agents. • Internal states: integers. • Transformer of internalbinaryatom: swap integers if not in ascending order.

  12. Negotiations and Petri nets • Negotiations have the same expressive power as (coloured) 1-safe Petri nets, but can be exponentially more succint.

  13. Analysis problems: Soundness Deadlock!

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

  15. 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.

  16. Computing summaries • A simple algorithm to compute a summary: • Compute the LTS of the negotiation • Applyreduction rules State explosion! Merge Shortcut Iteration

  17. Computing summaries 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. Restrictionto: DETERMINISTIC NEGOTIATIONS

  18. Deterministicnegotiations • A negotiation is deterministicifnoagentisever ready to engage in more than oneatom • Graphically: no proper hyperarcs. non-deterministic

  19. Deterministic negotiations • A negotiation is deterministic if no agent is ever ready to engage in more than one atom • Graphically: no proper hyperarcs. deterministic

  20. Det. Negotiations: Reduction Rules • Aim: find reduction rules acting directly on negotiation diagrams (instead of their transition systems). • Rules must: • preserve soundness: sound after iff sound before; and • preserve the summary: summary after equal to summary before • In [CONCUR 13] wepresentthreelocal rules: application conditions and changes involve only a local neighbourhood of the application point.

  21. Rule 1: Merge ,

  22. Rule 2: iteration

  23. Rule 3: shortcut Orange atom enables whiteatomuncondi-tionally.

  24. 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 rule applications, for some polynomial p.

  25. The Reducibility Theorem • Theorem [CONCUR 13,FOSSACS 14]: • The shortcut, merge, anditerationrulesare completeandpolynomialfordeterministicnegotiations (Also; extensiontoacyclic, weaklydeterministicnegotiations, like theFather-Daughter-Mother neg.) • Concurrencyforfree: • Soundness decidable in polynomial time. • Summarizationascomplexas in thesequentialcase. No additional „exponential“ due tostateexplosion.

  26. Scenarios/Choreographies • Scenario: Concurrentrunofthesystem (usecase) „Global view“ of an execution. Message-passing Message Sequence Chart Source: Harel

  27. Scenario-basedSpecifications • Specification: „regularset“ ofscenarios Message-passing Message Sequence Graph Source: Bille andKosse

  28. Scenario-basedSpecifications • Implementation: communicatingautomata Message-passing Channel systems Source: Schnoebelen

  29. The Realizability Problem • Given a specification, automaticallycompute a realization (implementation), ifthereisone. Message-passing [Alur et al. 01] • Not everyspecificationisrealizable • Realizabilityisundecidable • Deadlock-freerealizability in EXPSPACE and PSPACE-hard

  30. Scenario Mazurkiewicztrace RealizabilityforDeterministicNegotiations We design a programminglanguagefordeterministicnegotiations Implementation Det. Negotiation A B C D Andthespecificationmodel ?

  31. Negotiationprograms • A negotiationprogramisdefinedover: • a setofagents, and • a set of actions • Eachactionisjointlyexecutedby a subset of theagentsof • (cf. distributedalphabets)

  32. Negotiationprograms • A negotiationprogramiseither: • theemptyprogram

  33. Negotiationprograms • A negotiationprogramiseither: • theemptyprogram • a do-od block • do [] end …[] end • [] loop … [] loop • od

  34. A programminglanguage • A negotiationprogramiseither: • theemptyprogram • a do-od block • do [] end …[] end • [] loop … [] loop • od • a layeredcomposition • [Zwiers et al, early 90s]

  35. Mazurkiewicztracesemantics • Weassign a negotiationprogram a setofMazurkiewicztracesovertheprogramactions Agents D B C aa A Actions

  36. Semanticsoflayeredcomposition Semanticsof:traceconcatenation Trace of Trace of Trace of C B A B C A B

  37. Semanticsoflayeredcomposition

  38. Semanticsofblocks Abbreviation: 

  39. An example

  40. An example

  41. Programmingdeterministicnegotiations

  42. Programmingdeterministicnegotiations

  43. Programmingdeterministicnegotiations

  44. Programmingdeterministicnegotiations

  45. Programmingdeterministicnegotiations

  46. The RealizabilityTheorem Theorem (submitted): • Foreverynegotiationprogramofsize thereis a SOUND det.negotiationofsize such that. • ForeverySOUNDdet. negotiationofsizethereis a negotiationprogramofsize such that.

  47. The Realizability Theorem In realizabilityterms: Allspecificationscanbeimplemented, withoutblowup, in linear time. Allspecificationsaresound (and so deadlock/livelock-free). Allsoundimplementations canbespecified.

  48. Fromnegotiationstoprograms • We useourcompletesetofreductionrulesforsounddeterministicnegotiations (SDNs). • Forevery SDN thereis a sequence of negotiationssuch that • , • isobtainedfrombyapplying a rule, and • isthenegotiationoftheemptyprogram

  49. Fromnegotiationstoprograms • For thereversesequence obtainedbyaplyingthereverseofthereductionrules (synthesisrules), weconstruct a matchingsequenceofprograms such thatforevery

  50. Fromnegotiationstoprograms Shortcut rule, case 2

More Related