Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Ivan Lanese Computer Science Department University of Pisa (moved to Bologna) Synchronization strategies for global computing models Ph.D. thesis discussion.

Similar presentations


Presentation on theme: "1 Ivan Lanese Computer Science Department University of Pisa (moved to Bologna) Synchronization strategies for global computing models Ph.D. thesis discussion."— Presentation transcript:

1 1 Ivan Lanese Computer Science Department University of Pisa (moved to Bologna) Synchronization strategies for global computing models Ph.D. thesis discussion Supervisor: prof. Ugo Montanari

2 2 Roadmap Global computing Background on Synchronized Hyperedge Replacement Comparing models for GC Parametric synchronizations with mobility Observational semantics and compositionality Conclusions

3 3 Roadmap Global computing Background on Synchronized Hyperedge Replacement Comparing models for GC Parametric synchronizations with mobility Observational semantics and compositionality Conclusions

4 4 What is global computing? Essentially networks deployed on huge areas Global computing systems quite common nowadays –Internet, wireless communication networks, overlay networks …

5 5 Features of global computing systems Distribution –Localities may have a semantic meaning Mobility Heterogeneity –Interoperability, coordination Openness Reconfigurability Non-functional requirements

6 6 Formal methods for GC Building models of the system Old aims –Analyze the properties of the system before building it –Concentrate on a particular aspect –Abstract from details But new approaches/tools must be used –Mobility and non-functional requirements must be modeled explicitly –Need for compositionality –Need for more abstraction

7 7 High level models Models of coordination among components Components interact via interfaces Declarative specification of synchronization constraints –Possible evolutions derived as solution of system of constraints Single components may be complex We need powerful primitives –Multiple synchronizations –Abstractions of full protocols

8 8 Roadmap Global computing Background on Synchronized Hyperedge Replacement Comparing models for GC Parametric synchronizations with mobility Observational semantics and compositionality Conclusions

9 9 Synchronized Hyperedge Replacement A graph transformation approach –Suitable to deal with distribution, synchronization, mobility (Hyper)edges are components connected through common nodes Productions describe the evolution of single edges –Local effect, easy to implement –Declarative approach Synchronization via actions performed on nodes –Determines which productions can be applied concurrently –Allows to define complex transformations –Not only binary synchronization

10 10 Hyperedge Replacement Systems R 1 2 3 4 L 1 2 3 4 H l A production describes how the hyperedge L is rewritten into the graph R

11 11 Hyperedge Replacement Systems R R’ 1 2 3 4 1 2 3 Many concurrent rewritings are allowed L L’ 1 2 3 4 1 2 3 H l A production describes how the hyperedge L is rewritten into the graph R

12 12 Synchronizing productions l Synchronization: productions execute actions on nodes l A transition is allowed iff the synchronization constraints imposed on actions are satisfied l Two synchronization models existed in the literature –Milner: message passing –Hoare: agreement

13 13 An example: Milner SHR a A1 a B1 a A2 a B1B2 A2B2 l Pair of edges can synchronize by performing complementary actions

14 14 SHR with mobility a A1 a A1B1 a A2 a B1B2 A2B2 xy x=y l We use node mobility –Actions carry tuples of references to nodes (new or already existent) –References associated to synchronized actions are matched and corresponding nodes are merged

15 15 Algebraic presentation of SHR Graphs represented as terms –Edges (applied to nodes) are basic constants –Operators for parallel composition and hiding of nodes Node mobility corresponds to name mobility Transitions described by a LTS Inference rules to derive transitions from productions

16 16 Roadmap Global computing Background on Synchronized Hyperedge Replacement Comparing models for GC Parametric synchronizations with mobility Observational semantics and compositionality Conclusions

17 17 Why comparing models? Different models for GC exist –Process calculi, graphs, UML, … Each model has strengths and weaknesses Compare models to –Find strengths and weaknesses –Combine the strengths –Categorize them –Move some steps toward a (maybe) unique model

18 18 Which comparisons? N models → 2 N comparisons Must select some representatives –Show at a first sight some interesting connections We have chosen –Logic programming –Synchronized Hyperedge Replacement –A process calculus: Fusion Calculus

19 19 Logic programming Traditionally language for AI and problem solving In the GC scenario seen as goal rewriting framework Unification as synchronization primitive Focus on partial computations

20 20 Fusion Calculus Calculus for mobility inspired by π-calculus Symmetric input/output Arbitrary fusions allowed Can simulate π-calculus

21 21 Hoare SHR vs logic programming Hoare synchronization strictly related to unification Strong relation between Hoare SHR and Synchronized Logic Programming –A subset of logic programming –Transactional application of many clauses –Exploits function symbols for synchronization

22 22 Summary of the comparison Hoare SHRSLP GraphGoal HyperedgeAtom NodeVariable Parallel comp.AND comp. ActionFunction sym. ProductionClause TransitionTransaction

23 23 Main results Simple (homomorphic) mapping from Hoare SHR to SLP Complete correspondance Suggests how to introduce restriction in logic programming

24 24 Milner SHR vs Fusion Calculus Many common features –Synchronization in Milner style –Mobility using fusions –LTS semantics Straightforward mapping of Fusion into Milner SHR SHR adds: –Graphical presentation –Multiple synchronizations –Concurrent semantics

25 25 Summary of the comparison FusionMilner SHR ProcessesGraphs Sequential processesHyperedges NamesNodesParallel comp. ScopeRestriction PrefixesProductions TransitionsInterleaving tr.

26 26 Example We can also execute both the steps at the same time

27 27 Main results Simple (homomorphic) mapping Complete correspondance Suggests many generalizations of Fusion –A concurrent semantics –PRISMA Calculus

28 28 Milner vs Hoare Surprisingly the most difficult step Expressiveness as sets of reconfigurations that can be specified Simulating Hoare using Milner –Must implement n-ary synchronization using binary synchronization Simulating Milner using Hoare –Milner synchronization is asymmetric –Milner restriction affects the behaviour, Hoare restriction just the observation

29 29 Some results Not equivalent in general In closed 2-shared graphs Milner is more powerful than Hoare –Hoare implemented by dropping the distinction between actions and coactions A translation of graphs can be used to bridge the gap in many cases –Amoeboids to simulate synchronization Hoare amoeboids are broadcasters Milner amoeboids are routers –Mutual exclusion can not be enforced

30 30 And so? Synchronization and mobility strategies are an important characteristic of a model Difficult to simulate a strategy using another one Have strategies as parameters of the model

31 31 Roadmap Global computing Background on Synchronized Hyperedge Replacement Comparing models for GC Parametric synchronizations with mobility Observational semantics and compositionality Conclusions

32 32 Synchronization Algebras with Mobility (1) Abstract formalization of a synchronization model Extend Winskel’s synchronization algebras to deal with name mobility and local resources Allow to have synchronization strategies as first-class citizens –Can be used to have models with parametric synchronization policies –Many synchronization policies in the same model –Different policies can be compared and combined Common policies can be expressed as SAMs –Simple ones: Milner, Hoare, broadcast –More complex ones: with priority, …

33 33 Synchronization Algebras with Mobility (2)

34 34 Synchronization Algebras with Mobility (2) SAs specify composition of actions –(a,a, τ ): a synchronizes with a producing τ SAMs also provide –Arities for actions –Mapping from parameters of synchronizing actions to parameters of the result –Fusions among parameters –Final actions (can be performed on local channels) –Some more technical stuff

35 35 Sample synchronization abc

36 36 Milner SAM Normal actions, coactions, τ, ε l (in, out, τ) l (a, ε, a) l Final actions: τ, ε aε a inout τ

37 37 Combining SAMs SAMs form a category Standard constructions can be used to compose SAMs –Coproduct makes different protocols available –Product applies two protocols concurrently

38 38 Parametric SHR Application of SAMs to SHR Different models obtained via instantiation –Allows to recover Hoare and Milner SHR… –…and to easily define new models Properties can be proved in general –Allows to highlight relations between properties of SAMs and properties of the model

39 39 The airport case study Taken from AGILE project on architectures for mobility Models airplanes taking off and landing at airports and persons traveling using them We concentrate on a small part of the case study

40 40 Take-off transition univ inPi chk inPl univ

41 41 Specifying the transition (1) at: > in: > chk: > newat in chk at at: > in: > at in

42 42 Specifying the transition (2) at: > chk: > newat chkat

43 43 Synchronization in the example The productions define exactly the wanted kind of transitions The used SAM is the coproduct of a Milner SAM and a broadcast SAM Defining the same transition using, e.g., only Milner is far more difficult

44 44 Heterogeneous SHR Allows to model heterogeneous systems –Different primitives in different parts of the system –Example: wireless connections with broadcast and wired connections with Milner Technical trick: use different SAMs on different nodes Concentrates on dynamic management of SAMs Conservative extension of parametric SHR

45 45 A network example l Network with routers and clients l Channels can have –4Kb/16Kb packets –Error detection/no error detection l To communicate a client creates a virtual communication channel that uses the underlying infrastructure l The communication channel supports 16Kb packets/error detection only if all the underlying channels do

46 46 Modeling the scenario l Eight different SAMs with all the combinations of –4Kb or 16Kb –No error detection or error detection –Communication or control l SAMs provide variants of Milner synchronization –E.g. actions for detecting errors

47 47 Building a virtual channel C RR C R R 16,√ 4,× 16,× 4,√ 16,√ 16,× 4,√ comm,16,× Act

48 48 PRISMA Calculus SAM-based process calculus –Prefixes of the form x a y. P –Synchronization ruled by the SAM –Mobility using fusions –Standard operators can be defined Milner PRISMA Calculus is (essentially) Fusion Calculus

49 49 Comparison with parametric SHR The two frameworks are at the same level of abstraction SHR more apt as architectural model PRISMA Calculus more apt to experiment new primitives –Can be enriched following standard process calculi techniques

50 50 Hints on technical difficulties In some SAMs (e.g., Hoare) a set of processes must interact to allow a synchronization on x –All the processes –All the processes that know x –All the processes able to synchronize on x We have chosen the last approach

51 51 Roadmap Global computing Background on Synchronized Hyperedge Replacement Comparing models for GC Parametric synchronizations with mobility Observational semantics and compositionality Conclusions

52 52 Observational semantics and compositionality Allows to have an abstract description of system behaviour Compositionality useful to –Compute abstract behavior of the system from the behavior of the components –Compute the behavior of a system when plugged in its execution environment Bisimilarity is a standard tool Bisimilarity is a congruence is a key property

53 53 Abstract semantics for parametric SHR Bisimulation can be defined in a standard way for SHR Under reasonable conditions on the SAM bisimilarity is a congruence for parametric SHR –Milner, Hoare and many others satisfy the conditions Proof exploits bialgebraic techniques

54 54 Congruence results for Fusion Calculus Bisimilarity is not a congruence for Fusion Calculus (not closed under substitutions) The comparison with SHR shows why congruence fails and suggests how to solve the problem We have proposed a new concurrent semantics which is compositional

55 55 The idea of the semantics

56 56 The idea of the semantics Allowing many actions in the same transition but on different channels –Process a|b can execute a and b concurrently going to 0 (but can also execute either a or b) –Process a|a is bisimilar to a.a –Process a|a|b can perform τ and b concurrently going to 0 Allows to observe the degree of parallelism of a process

57 57 Congruence properties

58 58 Congruence properties no more a counterexample since the two terms are not bisimilar

59 59 Congruence properties no more a counterexample since the two terms are not bisimilar Observing where a synchronization is performed becomes important –Otherwise congruence non preserved by context a|[-] –Actions a τ in addition to normal τ

60 60 Observational semantics of PRISMA Hyperbisimilarity is a congruence Common axioms bisimulate for each SAM A translation along a morphism can be used to change the used SAM Some classes of translations preserve observational properties

61 61 Roadmap Global computing Background on Synchronized Hyperedge Replacement Comparing models for GC Parametric synchronizations with mobility Observational semantics and compositionality Conclusions

62 62 Conclusions on SHR SHR is an interesting model for GC –Deals well with distribution, synchronization, mobility –Can be extended to deal with eterogeneity –Good compositionality features have been proved –Some extensions for dealing with non-functional requirements are under analysis [Hirsch & Tuosto] Strong connections with process calculi –Allow cross-fertilization

63 63 Conclusions on synchronization models Synchronization and mobility patterns are a dimension in the space of GC models –Can be factored out l Parametric models help the modeling phase l Different SAMs can –be composed –interoperate

64 64 Conclusions on compositionality l General and original result on compositionality for graph transformations l Interesting result for Fusion Calculus –Connection between concurrency and compositionality

65 65 Future work l Further analysis required in many directions l Exploiting the mappings for cross-fertilization l Comparing SHR with other graph transformation frameworks l Analyzing the properties of the new models l Moving from Fusion towards π-calculus l Techniques for proving compositionality

66 66 Future work l Further analysis required in many directions l Exploiting the mappings for cross-fertilization –Milner logic programming –Multiple synchronizations in process calculi l Comparing SHR with other graph transformation frameworks l Analyzing the properties of the new models l Moving from Fusion towards π-calculus l Techniques for proving compositionality

67 67 Future work l Further analysis required in many directions l Exploiting the mappings for cross-fertilization l Comparing SHR with other graph transformation frameworks –DPO –Bigraphs l Analyzing the properties of the new models l Moving from Fusion towards π-calculus l Techniques for proving compositionality

68 68 Future work l Further analysis required in many directions l Exploiting the mappings for cross-fertilization l Comparing SHR with other graph transformation frameworks l Analyzing the properties of the new models –Concurrent Fusion –PRISMA Calculus l Moving from Fusion towards π-calculus l Techniques for proving compositionality

69 69 Future work l Further analysis required in many directions l Exploiting the mappings for cross-fertilization l Comparing SHR with other graph transformation frameworks l Analyzing the properties of the new models l Moving from Fusion towards π-calculus –Concurrent π-calculus –Parametric π-calculus l Techniques for proving compositionality

70 70 Future work l Further analysis required in many directions l Exploiting the mappings for cross-fertilization l Comparing SHR with other graph transformation frameworks l Analyzing the properties of the new models l Moving from Fusion towards π-calculus l Techniques for proving compositionality –Bialgebraic techniques difficult to apply

71 71 Bibliography of the thesis “A Graphical Fusion Calculus”, I. Lanese and U. Montanari, Proceedings of CoMeta: Computational Metamodels Final Workshop, ENTCS 104 “Mapping Fusion and Synchronized Hyperedge Replacement into Logic Programming”, I. Lanese and U. Montanari, TPLP, special issue, to appear “Synchronization Algebras with Mobility for Graph Transformations”, I. Lanese and U. Montanari, Proceedings of FGUC 2004 – Workshop on Foundations of Global Ubiquitous Computing, ENTCS 138 “Insights Emerged while Comparing Three Models for Global Computing”, I. Lanese and U. Montanari, Proceedings of Dagstuhl seminar 05081 on Foundations of Global Computing, Electronic proceedings, 2005 “Synchronized Hyperedge Replacement for Heterogeneus Systems”, I. Lanese and E. Tuosto, Proceedings of COORDINATION 2005, LNCS 3454 "Hoare vs Milner: Comparing Synchronizations in a Graphical Framework with Mobility", I. Lanese and U. Montanari, Proceedings of GT-VC‘05, ENTCS 154(2)

72 72 Other publications “Software Architecture, Global Computing and Graph Transformation via Horn Clauses”, I. Lanese and U. Montanari, Proceedings of SBES 2002 – 16th Brazilian Symposium on Software Engineering “On Graph(ic) Encodings”, R. Bruni and I. Lanese, Proceedings of Dagstuhl seminar 04241 on Graph transformations and process algebras for modeling distributed and mobile systems, Electronic proceedings, 2004 “New Insights on Architectural Connectors”, R. Bruni, J. Fiadeiro, I. Lanese, A. Lopes and U. Montanari, Proceedings of IFIP TCS’04, Kluwer “Complete Axioms for Stateless Connectors”, R. Bruni, I. Lanese and U. Montanari, Proceedings of CALCO’05, LNCS 3629 “A Basic Algebra of Stateless Connectors”, R. Bruni, I. Lanese and U. Montanari, TCS, to appear "Exploiting User-Definable Synchronizations in Graph Transformation", I. Lanese, Proceedings of GT-VMT'06, ENTCS, to appear

73 73 End of talk

74 74 Example x Initial Graph C Brother: C C C C S Star Reconfiguration: w r x C Brother C C C C C C CCC (4)(3)(2)(1) Star Rec. S S SS (5)

75 75 An example y C x y C z C x y C x y S x r w C(x,y)←C(x,z),C(z,y) C(r(x,w),r(y,w))←S(y,w)

76 76 Dynamics x C C C C C C C CCC S S S S

77 77 Dynamics x C C C C C C C CCC S S S S

78 78 Ideas on the derivation l Each production poses some constraints on the features of the resulting channel l During synchronization the constraints are composed according to the specified pattern l The characteristics of the resulting channel are automatically computed


Download ppt "1 Ivan Lanese Computer Science Department University of Pisa (moved to Bologna) Synchronization strategies for global computing models Ph.D. thesis discussion."

Similar presentations


Ads by Google