Tribal Ownership Nicholas Cameron James Noble Tobias Wrigstad Victoria University of Wellington Uppsala University.

Slides:



Advertisements
Similar presentations
Multiplying Polynomials
Advertisements

1 Variant Ownership with Existential Types Nicholas Cameron Sophia Drossopoulou Imperial College London.
Family Polymorphism & Nested Inheritance Yevgen Voronenko.
Class 15 - Overhead 11Object Oriented Programming Using C #define t_circle 1 #define t_rectangle 2 struct circle_shape {short type; double x,y; double.
Supervised by: Dr Sophia Drossopoulou, Dr Nobuko Yoshida Wildcards, Variance and Virtual Classes.
“OOP” Principles and Philosophy Classes and Objects Inheritance Message Passing Encapsulation Overloading Polymorphism.
Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
More about classes and objects Classes in Visual Basic.NET.
Numbers
Abstract Classes b b An abstract class is a placeholder in a class hierarchy that represents a generic concept b b An abstract class cannot be instantiated.
Virtual Functions Junaed Sattar November 10, 2008 Lecture 10.
Lecture 6: Polymorphism - The fourth pillar of OOP - 1.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Factory Method Design Pattern (1) –A creational design.
CS415 C++ Programming Takamitsu Kawai x4212 G11 CERC building WV Virtual Environments Lab West Virginia University.
2.5 OOP Principles Part 2 academy.zariba.com 1. Lecture Content 1.Polymorphism 2.Cohesion 3.Coupling 2.
Run-Time Type Identification Jim Fawcett CSE687 – Object Oriented Design Spring 2007.
Lecture 3 Casting Abstract Classes and Methods Interfaces.
Object-Oriented Programming with C++ Yingcai Xiao.
Existential Quantification for Variant Ownership Nicholas Cameron Sophia Drossopoulou Imperial College London (Victoria University of Wellington)‏
Object Oriented Programming Lecture 11: Polymorphism.
1 Lecture 6: Polymorphism - The fourth pillar of OOP -
Multiple Ownership Nicholas Cameron Sophia Drossopoulou James Noble Matthew Smith.
Multiple Ownership Nicholas Cameron Sophia Drossopoulou James Noble Matthew Smith.
(1) ICS 313: Programming Language Theory Chapter 12: Object Oriented Programming.
Encoding Ownership Types in Java Nicholas Cameron James Noble Victoria University of Wellington, New Zealand.
SHEEP CLONING Paley Li, Nicholas Cameron, and James Noble 1.
Repeating patterns Can you work out the next shape in the pattern?
1 Interfaces and Abstract Classes The ability to define the behavior of an object without specifying that behavior is to be implemented Interface class.
COME 339 WEEK 1. Example: The Course Class 2 TestCourceRunCourse.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 20 - Virtual Functions Outline 20.1Introduction 20.2Type Fields and switch Statements 20.3Virtual.
Testing in OO Environment The reasons for testing is not any different for any of the design and implementation methodologies, including OO methodology.
CSC241 Object-Oriented Programming (OOP) Lecture No. 17.
How many …?. What shape can you see? I can see some _____. Q1 Q1 stars.
1 C++ Classes & Object Oriented Programming Overview & Terminology.
JAVA TRAINING IN NOIDA. JAVA Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented and specifically.
10-1 人生与责任 淮安工业园区实验学校 连芳芳 “ 自我介绍 ” “ 自我介绍 ” 儿童时期的我.
1 Section 11.4 Java Interfaces – The Implementation Perspective Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Angles Between Parallel Lines. Key words: Corresponding angles Alternate angles Interior angles.
Comparing Universes and Existential Ownership Types Nicholas Cameron Werner Dietl ETH Zurich Victoria University of Wellington.
DEVRY COMP 220 iLab 7 Polymorphism Lab Report and Source Code Check this A+ tutorial guideline at
Polymorphism.
Nicholas Cameron James Noble Victoria University of Wellington
Ch 10- Advanced Object-Oriented Programming Features
Module 5: Common Type System
Polymorphism.
Name the shape below. rectangle rhombus square triangle A B C D
Inheritance "Question: What is the object oriented way of getting rich? Answer: Inheritance.“ “Inheritance is new code that reuses old code. Polymorphism.
Yahoo Mail Customer Support Number
Most Effective Techniques to Park your Manual Transmission Car
How do Power Car Windows Ensure Occupants Safety
Cross SECTIONS.
Basic Shapes ©
Polymorphism.
HYBRID INHERITANCE : AMBIGUITY REMOVAL
Practical Session 2 Class Design
THANK YOU!.
Area of a Composite Calculate the area of this shape Total Area =
Shapes.
Thank you.
Thank you.
Cross section: Triangle
Object-Oriented Programming
Eighth step for Learning C++ Programming
C++ Programming CLASS This pointer Static Class Friend Class
Ninth step for Learning C++ Programming
Rectangle, x = 100, y = 200 Ellipse, x = 200, y = 300 #1.
Can you work out the next shape in the pattern?
2D Shapes Rectangle Circle Triangle Rectangle. What shape is the door? Rectangle.
Can you work out the next shape in the pattern?
Presentation transcript:

Tribal Ownership Nicholas Cameron James Noble Tobias Wrigstad Victoria University of Wellington Uppsala University

Tribe c1:Canvas world s1:Shape s2:Shape r1:Rectangle c2:Canvas s3:Shape s4:Shape r2:Rectangle c3:InCanvas...

Ownership c1:Canvas world s1:Shape s2:Shape r1:Rectangle c2:Canvas s3:Shape s4:Shape r2:Rectangle c3:InCanvas...

Tribal Ownership c1:Canvas world s1:Shape s2:Shape r1:Rectangle c2:Canvas s3:Shape s4:Shape r2:Rectangle c3:InCanvas...

? Questions

Virtual Classes Nested Classes Family Polymorphism Class Families Nested Inheritance...

Virtual Classes Scala Newspeak GBeta...

Tribe class Canvas { class Shape {... } class Circle extends Shape {... } class Rectangle extends Shape {... }... } class ICanvas extends Canvas { class Shape { void onClick() {... } }

Tribe class Canvas { class Shape {... } class Circle extends Shape {... } class Rectangle extends Shape {... }... } class InCanvas extends Canvas { class Shape { void onClick() {... } }

10 Tribe Canvas Shape Circle Rectangle

Tribe Canvas Shape Circle Rectangle InCanvas Shape Circle Rectangle onClick()

Canvas Shape Circle Rectangle InCanvas Shape Circle Rectangle onClick()

Tribe c1:Canvas world s1:Shape s2:Shape r1:Rectangle c2:Canvas s3:Shape s4:Shape r2:Rectangle c3:InCanvas...

c1.Shape c2.Shape Tribe Types

class Canvas { this.Shape f1; world.Canvas f2; class Shape { this.out.out.Canvas f3; this.out.Circle f4; } class Circle extends Shape {... } } Tribe Types

Tribe Types class Canvas { this.Shape f1; world.Canvas f2; class Shape {... } } :Canvas f1:Shape world f2:Canvasf4:Canvas f3:Circle :Shape

Tribe Types :Canvas f1:Shape world f2:Canvasf4:Canvas f3:Circle :Shape class Canvas {... class Shape { this.out.Circle f3; this.out.out.Canvas f4; }

Ownership Types

class List { ListNode first;... } class ListNode { ListNode next; Object datum;... } new List (); Ownership Types

? What if...

c1:Canvas world s1:Shape r1:Rectangle c2:Canvas s3:Shape r2:Rectangle

c1.Shape 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 {... } } 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 Ownership

class List { ListNode first;... } class ListNode { ListNode next; Object datum;... } new List (); What about List?

class List { this.ListNode first; class ListNode { this.out.ListNode next; X datum;... }... } new this.List (); What about List? - Generics

class List { this.ListNode first; class ListNode { this.out.ListNode next; X datum;... }... } new this.List (); What about List? - Generics

class List { this.ListNode first; class ListNode { this.out.ListNode next; X datum;... }... } new this.List (); What about List?

module Collections { class List {... } class Foo imports world.Collections { this.List f; } What about List? – Module classes

Encapsulation

Owners-as-Dominators Owners-as-Modifiers Encapsulation

Descriptive Ownership

O-as-D

Owners-as-Local-Dominators Encapsulation

O-as-LD

O-as-LD private public Only public classes can be named externally

Virtual classes in Tribe give ownership – No syntactic overhead Generics Module classes – Cross family inheritance Owners-as-Local-Dominators Summary

Thank you!

? Questions