Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What My Master Thesis is About

What My Master Thesis is About

Nick De Cooman

March 07, 2012
Tweet

More Decks by Nick De Cooman

Other Decks in Programming

Transcript

  1. &%*.* 2 Alias Encapsulated objects Aggregate object No restrictions; Objects

    can be accessed from everywhere Consider a simple data structure
  2. .$'# 4 Consider a sorted linked list Local Reference Elements

    are sorted from small to large 21 53 60 89 34 Alias to encapsulated object
  3. #!)!%)*&(&#$) 5 May affect correctness of aggregate object It might

    get bypassed by direct aliases to internal objects Elements are NOT sorted anymore ! 21 53 12 89 34 Assume Value gets updated through alias
  4. -%() !'/') 6 Purpose ‣ Structure the object store/soup/heap ‣

    Restrict reference passing and specify operations that can be performed on references. Confine an object inside a data structure Prevent representation exposure Statically enforced At compile-time
  5. #.!##!)(&**!&% 8 Representation objects: Internal objects for which no reference

    outside the container can exist. Argument objects: Can be accessed from elsewhere, but are treated as being immutable. ECOOP ‘98 Code example
  6. !$!**!&%)& #.!##!)(&**!&% 9 Consider a simple list with iterator size

    content TOO RESTRICTIVE! content iterator Iterator Cannot be used by the outside size iterator Iterator Cannot access internal representation Possibilty 1 Possibilty 2
  7. -%() !'/')&("* %')+#*!&% 10 Allow instances of inner classes to

    access the representation of the instances of the outer class they are associated with content size iterator POPL ‘03
  8.  * !) )!)!)&+* 11 Organize distributed object heap through

    ownership types Distributed environment actor Remote reference
  9. * &&#&/ 13 Type System a for Organizing the Object

    Soupin Ambient-Oriented Applications Both implementation and formal semantics AmbientTalk Supervised by
  10. /''(& 14 Type of Access Inwards Cardinality Initial proposal Ability

    to specify which action a remote object can execute on an object Ability to specify how many remote references can point to an object Annotate or tag values to achieve desirable behaviour Inwards Cardinality 0 = LOCAL OBJECT Make an object to be treaten immutable Limit the number of remote references
  11.  %-()(!%#!*/ 15 Local objects cannot be remotely accessed No

    remote reference can ever exist @local Only 1 external reference is allowed at a time @unique External uniquenss 1 0 Cardinality Cardinality
  12.  %-()(!%#!*/ 16 Limit the number of remote references to

    N. @cardinality: N N At each point in time, only N references can be used def futRef := waitFor: uniqueRef; when: futRef becomes: { |ref| // DO COMPUTATION // ref<-release() } Install listener to wait for reference to be obtained Regular future object Release reference so that it can be obtained by other actor Cardinality
  13. /'&)) 17 State of the object cannot be modified by

    the outside @readOnly Only read operations are allowed def profile := object: { def getName(){...}; def setName(n)@mutator{...}; } taggedAs: [readOnly] Annotate mutator method to indicate that it changes the object state Can only be executed locally
  14. !$#!% 18 FEB Literature study First proposal First iteration Second

    proposal 1-APR 15-APR Second iteration Formαl Semαntics JUN AUG Writing MAR 16-APR 30-APR Validation 1-JUN 15-JUN MAY
  15. &%#+)!&% 19 @local 0 @unique 1 Limit the number of

    remote references to N. @cardinality: N N Organize remote references through various kind of ownership annotations. 2 dimensions Inwards Cardinality Type Of Access State of the object cannot be modified by the outside @readOnly Local objects cannot be remotely accessed Only 1 external reference is allowed at a time