Tribal ownership
Download
1 / 41

Tribal Ownership - PowerPoint PPT Presentation


  • 67 Views
  • Uploaded on

Tribal Ownership. Nicholas Cameron James Noble Tobias Wrigstad Victoria University of Wellington Uppsala University. Tribe. world. c1:Canvas. c2:Canvas. s1:Shape. s3:Shape. s2:Shape. s4:Shape. r1:Rectangle. r2:Rectangle. c3:InCanvas. Ownership. world. c1 :Canvas. c2 :Canvas.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Tribal Ownership' - eagan-pitts


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Tribal ownership

Tribal Ownership

Nicholas Cameron

James Noble

Tobias Wrigstad

Victoria University of Wellington

Uppsala University


Tribe
Tribe

world

c1:Canvas

c2:Canvas

s1:Shape

s3:Shape

s2:Shape

s4:Shape

r1:Rectangle

r2:Rectangle

c3:InCanvas

...


Ownership
Ownership

world

c1:Canvas

c2:Canvas

s1:Shape

s3:Shape

s2:Shape

s4:Shape

r1:Rectangle

r2:Rectangle

c3:InCanvas

...


Tribal ownership1
Tribal Ownership

world

c1:Canvas

c2:Canvas

s1:Shape

s3:Shape

s2:Shape

s4:Shape

r1:Rectangle

r2:Rectangle

c3:InCanvas

...



Virtual classes
Virtual Classes

  • Virtual Classes

  • Nested Classes

  • Family Polymorphism

  • Class Families

  • Nested Inheritance

  • ...


Virtual classes1
Virtual Classes

  • Scala

  • Newspeak

  • GBeta

  • ...


Tribe1
Tribe

class Canvas {

class Shape { ... }

class Circle extends Shape { ... }

class Rectangle extends Shape { ... }

...

}

class ICanvas extends Canvas {

class Shape {

void onClick() { ... }

}

}


Tribe2
Tribe

class Canvas {

class Shape { ... }

class Circle extends Shape { ... }

class Rectangle extends Shape { ... }

...

}

class InCanvas extends Canvas {

class Shape {

void onClick() { ... }

}

}


Tribe3
Tribe

Canvas

Shape

Circle

Rectangle


Tribe4
Tribe

Canvas

InCanvas

Shape

Shape

onClick()

Circle

Circle

onClick()

Rectangle

Rectangle

onClick()


Canvas

InCanvas

Shape

Shape

onClick()

Circle

Circle

onClick()

Rectangle

Rectangle

onClick()


Tribe5
Tribe

world

c1:Canvas

c2:Canvas

s1:Shape

s3:Shape

s2:Shape

s4:Shape

r1:Rectangle

r2:Rectangle

c3:InCanvas

...


Tribe types
Tribe Types

c1.Shape

c2.Shape


Tribe types1
Tribe Types

class Canvas {

this.Shape f1;

world.Canvas f2;

class Shape {

this.out.out.Canvasf3;

this.out.Circle f4;

}

class Circle extends Shape { ... }

}


Tribe types2
Tribe Types

class Canvas {

this.Shape f1;

world.Canvas f2;

class Shape { ... }

}

world

f2:Canvas

f4:Canvas

:Canvas

f1:Shape

:Shape

f3:Circle


Tribe types3
Tribe Types

class Canvas { ...

class Shape {

this.out.Circle f3;

this.out.out.Canvas f4;

}

}

world

f2:Canvas

f4:Canvas

:Canvas

f1:Shape

:Shape

f3:Circle



Ownership types1
Ownership Types

class List<owner, dOwner> {

ListNode<this, dOwner> first;

...

}

class ListNode<owner, dOwner> {

ListNode<owner, dOwner> next;

Object<dOwner> datum;

...

}

new List<this, world>();



world

c1:Canvas

c2:Canvas

s1:Shape

s3:Shape

r1:Rectangle

r2:Rectangle

[email protected]

22



Tribe6
Tribe

class Canvas {

this.Shape f1;

world.Canvas f2;

class Shape {

this.out.Circle f3;

this.out.out.Canvas f4;

}

class Circle extends Shape { ... }

}


Tribal ownership3
Tribal Ownership

class Canvas {

this.Shape f1;

world.Canvas f2;

class Shape {

this.out.Circle f3;

this.out.out.Canvas f4;

}

class Circle extends Shape { ... }

}


What about list
What about List?

class List<owner, dOwner> {

ListNode<this, dOwner> first;

...

}

class ListNode<owner, dOwner> {

ListNode<owner, dOwner> next;

Object<dOwner> datum;

...

}

new List<this, world>();


What about list generics
What about List? - Generics

class List<X> {

this.ListNode first;

class ListNode {

this.out.ListNode next;

Xdatum;

...

}

...

}

new this.List<world.Object>();


What about list generics1
What about List? - Generics

class List<X> {

this.ListNode first;

class ListNode {

this.out.ListNode next;

X datum;

...

}

...

}

new this.List<world.Object>();


What about list1
What about List?

class List<X> {

this.ListNode first;

class ListNode {

this.out.ListNode next;

X datum;

...

}

...

}

new this.List<world.Object>();


What about list module classes
What about List? – Module classes

module Collections {

class List<X> {

...

}

}

class Foo imports world.Collections {

this.List<world.Object> f;

}



Encapsulation1
Encapsulation

Owners-as-Dominators

Owners-as-Modifiers




Encapsulation2
Encapsulation

Owners-as-Local-Dominators



O as ld1
O-as-LD

public

private

Only public classes can

be named externally


Summary
Summary

  • Virtual classes in Tribe give ownership

    • No syntactic overhead

  • Generics

  • Module classes

    • Cross family inheritance

  • Owners-as-Local-Dominators




ad