Presentation is loading. Please wait.

Presentation is loading. Please wait.

ASYNCHRONOUS AND DETERMINISTIC OBJECTS ASP: Asynchronous Sequential Processes l Distributed objects l Asynchronous method calls l Futures and Wait-by-necessity.

Similar presentations


Presentation on theme: "ASYNCHRONOUS AND DETERMINISTIC OBJECTS ASP: Asynchronous Sequential Processes l Distributed objects l Asynchronous method calls l Futures and Wait-by-necessity."— Presentation transcript:

1 ASYNCHRONOUS AND DETERMINISTIC OBJECTS ASP: Asynchronous Sequential Processes l Distributed objects l Asynchronous method calls l Futures and Wait-by-necessity l Determinism properties Denis CAROMEL, Ludovic HENRIO, Bernard Paul SERPETTE I3S - INRIA - Univ Nice Sophia-Antipolis

2 Context  -calculus  Objects, not concurrent  Some concurrent extensions, not our way to determinism l  -calculus  Communications, channel based, not object structured  Linear(ized) channels(  o  ), no implicit synchronization l Process Networks  Processes, channel based, not object oriented  Determinism, no implicit synchronization Context

3 Contents 1 - ASP Principles 2 - Syntax and Semantics 3 - Confluence and Determinacy 4 - Conclusion

4     f3 f1 Structure 1- ASP Principles foo f2 Active(a)

5 foo   beta.foo(b) result=beta.foo(b) Sending Requests( REQUEST ) 1- ASP Principles

6 foo   beta.foo(b) result Sending Requests( REQUEST ) 1- ASP Principles result=beta.foo(b)

7 foo   beta.foo(b) Serve(foo);... result Serving Requests( SERVE ) Serve(foo);... bar 1- ASP Principles

8   beta.foo(b) result Serving Requests( SERVE ) Serve(foo) bar foo... foo 1- ASP Principles Serve(foo);...

9 ...foo   End of Service( ENDSERVICE ) value 1- ASP Principles

10 foo   End of Service( ENDSERVICE )... 1- ASP Principles

11 foo   Sending Results( REPLY ) 1- ASP Principles

12   Sending Results( REPLY ) foo 1- ASP Principles

13 delta.send(result)    Wait by Necessity 1- ASP Principles

14 delta.send(result) result.bar()    Wait by Necessity 1- ASP Principles

15 delta.send(result) result.bar()    Wait by Necessity 1- ASP Principles

16    Wait by Necessity result.bar() Futures updates can occur at any time Futures updates can occur at any time 1- ASP Principles

17 2 - Syntax and Semantics 3 - Confluence and Determinacy 4 - Conclusion Contents

18 ASP Syntax : source terms 2- Syntax and Semantics Imperative  -calculus l ASP parallelism primitives

19 2- Syntax and Semantics Local Creating Activity Sending request Receiving replies Service

20 Contents 1 - ASP Principles 2 - Syntax and Semantics 3 - Confluence and Determinacy 4 - Conclusion

21 Compatibility  delta.foo() foo  …. Serve(foo,bar) … Serve(foo,gee) bar gee   3- Confluence and Determinacy Serves the oldest request on foo OR bar

22 Confluence l Potential services: 3- Confluence and Determinacy P0 PQ R l RSL definition: Compatibility  Confluence l Configuration Compatibility: Execution characterized by the order of Request Senders Execution characterized by the order of Request Senders

23 Deterministic Object Networks    {foo,bar}, {foo,gee} delta.gee(a) gee delta.bar(a) bar {bar,gee}, {foo} gee barbar gee 3- Confluence and Determinacy DON(P):

24 Static DON  {foo,bar}, {gee}   {gee}, {f,g}  {bar}, {gee}  {foo,bar}, {gee} foo bar f {foo}, {bar} {gee}, {f,g} {f,g} {gee}, {f,g} f g gee f g {gee}, {f,g} 3- Confluence and Determinacy g

25 Contents 1 - ASP Principles 2 - Syntax and Semantics 3 - Confluence and Determinacy 4 - Conclusion

26 Conclusion An Asynchronous Object Calculus :  Structured asynchronous activities  Structured communications with futures  Data-driven synchronization ASP  Confluence and Determinacy Future updates can occur at any time Execution characterized by the order of request senders Determinacy of programs communicating over trees, … 4- Conclusion Thank You Any Question? Thank You Any Question?

27 Perspectives l Approximation of confluence property  Static analysis l Generalization of confluence property  Functional behavior  Scheduling of requests l Extensions of ASP  Group communication  Component calculus  Mobility and other features

28 Related Work l Futures and Wait by Necessity:  MultiLisp by Halstead  Wait-By-Necessity by Caromel l Determinism:   by Jones  Linearized channels  Process Networks by Kahn and MacQueen l Objects and concurrency:  Obliq, Gordon-Hankin-Lassen  Actors   -calculus, blue calculus, join-calculus

29 l Terms: l Configuration: l Request queue: l Futures list: l Store: Intermediate Structures

30 Static DON versus Process Networks  {foo,bar}, {gee}   {gee}, {f},{g}  {bar}, {gee}  {foo,bar}, {gee} foo bar f {foo}, {bar} {gee}, {f},{g} {f},{g} {gee}, {f},{g} f g gee f g put get

31    Active(a) newact=Active(a) newact Activity Creation( NEWACT )

32   Objects Topology

33 Equivalence Modulo Futures Updates  f1  f2  f3

34 More Futures    ...result.bar()

35 More Futures     result.bar()

36 More Futures     result.bar()

37 More Futures     result.bar()

38 More Futures     result.bar() Futures updates can occur at any time Futures updates can occur at any time

39 Concurrent Constraint Programming l Constraint programming, different notion of store l Shared memory l No internal state in the store (functional agents) l Data-driven / constraint driven synchronization: Blocking Ask l Determinate case

40   Active(a,s) newact=Active(a,s) Activity Creation( NEWACT )

41   Active(a,s) newact=Active(a,s) newact Activity Creation( NEWACT ) ao.s()

42 Equivalence Modulo Futures Updates  f1  f2  f3  f1  f2 

43 Equivalence Modulo Futures Updates   f2  f3   f1  f2 f1

44  Store Partitioning

45  Serve(foo) Serve(foo);... bar foo Request Service( SERVE )

46 Serve(foo) bar foo Serve(foo);... ... foo Request Service( SERVE )

47 Objectives l Model of the following features  Object orientation (activities, communications)  Asynchronous communications with futures  Service policy l Confluence and determinacy  Identify sources of non-determinism  Characterize equivalent executions  Give general properties  Find some properties easy to verify

48 value foo bar ... End Of Service( ENDSERVICE )

49 value bar foo ... End Of Service( ENDSERVICE )

50


Download ppt "ASYNCHRONOUS AND DETERMINISTIC OBJECTS ASP: Asynchronous Sequential Processes l Distributed objects l Asynchronous method calls l Futures and Wait-by-necessity."

Similar presentations


Ads by Google