Multiple Ownership Nicholas Cameron Sophia Drossopoulou James Noble Matthew Smith.

Slides:



Advertisements
Similar presentations
Lecture 4 Towards a Verifying Compiler: Data Abstraction Wolfram Schulte Microsoft Research Formal Methods 2006 Purity, Model fields, Inconsistency _____________.
Advertisements

Taming Wildcards in Javas Type System Ross Tate Alan Leung Sorin Lerner University of California, San Diego.
Formal Methods in Software Engineering
1 A Model for Java with Wildcards Nicholas Cameron Sophia Drossopoulou Erik Ernst.
1 Variant Ownership with Existential Types Nicholas Cameron Sophia Drossopoulou Imperial College London.
Interval Heaps Complete binary tree. Each node (except possibly last one) has 2 elements. Last node has 1 or 2 elements. Let a and b be the elements in.
Supervised by: Dr Sophia Drossopoulou, Dr Nobuko Yoshida Wildcards, Variance and Virtual Classes.
1 Classes, Encapsulation, Methods and Constructors (Continued) Class definitions Instance data Encapsulation and Java modifiers Method declaration and.
Ownership, Encapsulation and the Disjointness of Type and Effect Dave Clarke, Sophia Drossopoulou/2002 Encapsulation seminar Dec Sharon Goldschlager.
Atomic Volumes for Mesh Completion Joshua Podolak Szymon Rusinkiewicz Princeton University.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Defining Your Own Classes.
Chapter 9 Chapter 9: Managing Groups, Folders, Files, and Object Security.
Chapter 14: Overloading and Templates
Introduction to Robotics Kinematics. Link Description.
1 Module 2: Fundamental Concepts Problems Programs –Programming languages.
Taming the Wildcards: Combining Definition- and Use-Site Variance – Altidor John Altidor Taming the Wildcards: Combining Definition- and Use-Site Variance.
NETWORK TOPOLOGY.
Chapter 41 Enhanced Entity-Relationship and Object Modeling.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
Sharing Resources Lesson 6. Objectives Manage NTFS and share permissions Determine effective permissions Configure Windows printing.
1 SD-Rtree: A Scalable Distributed Rtree Witold Litwin & Cédric du Mouza & Philippe Rigaux.
Pregel: A System for Large-Scale Graph Processing Presented by Dylan Davis Authors: Grzegorz Malewicz, Matthew H. Austern, Aart J.C. Bik, James C. Dehnert,
More with Methods (parameters, reference vs. value, array processing) Corresponds with Chapters 5 and 6.
University Course Timetabling with Soft Constraints Hana Rudova, Keith Murray Presented by: Marlien Edward.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 6 Functions.
PL/SQLPL/SQL Oracle11g : PL/SQL Programming Chapter 6 Functions.
1 Chapter Overview Creating Drive and Folder Shares Using Distributed File System Installing Network Printers Administering Network Printers Managing Share.
Distributed Information Retrieval Using a Multi-Agent System and The Role of Logic Programming.
Existential Quantification for Variant Ownership Nicholas Cameron Sophia Drossopoulou Imperial College London (Victoria University of Wellington)‏
IS 475/675 - Introduction to Database Design
Chapter 12 Support for Object oriented Programming.
A Universe-Type-Based Verification Technique for Mutable Static Fields and Methods Alexander J Summers Sophia Drossopoulou Imperial College London Peter.
More on Description Logic(s) Frederick Maier. Note Added 10/27/03 So, there are a few errors that will be obvious to some: So, there are a few errors.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
Multiple Ownership Nicholas Cameron Sophia Drossopoulou James Noble Matthew Smith.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 15: Overloading and Templates.
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.
2 Software CASE tools state-of-the-art UML modeling Partially automatic code generation Refactoring browsers (occasionally) Context-sensitive search and.
Oracle9i Developer: PL/SQL Programming Chapter 5 Functions.
JavaScript 101 Lesson 6: Introduction to Functions.
Sharing Resources Lesson 6. Objectives Manage NTFS and share permissions Determine effective permissions Configure Windows printing.
Towards a Semantic Model for Java Wildcards Sophia Drossopoulou Mariangiola Dezani-Ciancaglini Imperial College London Università di Torino Italy Nicholas.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
1 Sections 6.4 – 6.5 Methods and Variables Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
ER Diagrams ● Many different notations are available ● From wikipedia:wikipedia: Entity-relationship modelwikipedia: Entity-relationship model ● How do.
Comparing Universes and Existential Ownership Types Nicholas Cameron Werner Dietl ETH Zurich Victoria University of Wellington.
On Subtyping, Wildcards, and Existential Types
CHAPTER
Nicholas Cameron James Noble Victoria University of Wellington
Conceptual Design & ERD Modelling
Computing Square Roots
Chapter 3: Using Methods, Classes, and Objects
Seminar 3 UML Class Diagram.
Classes, Encapsulation, Methods and Constructors (Continued)
HTTP/2.
What would be our focus ? Geometry deals with Declarative or “What is” knowledge. Computer Science deals with Imperative or “How to” knowledge 2/23/2019.
5 × 7 = × 7 = 70 9 × 7 = CONNECTIONS IN 7 × TABLE
5 × 8 = 40 4 × 8 = 32 9 × 8 = CONNECTIONS IN 8 × TABLE
4 × 6 = 24 8 × 6 = 48 7 × 6 = CONNECTIONS IN 6 × TABLE
5 × 6 = 30 2 × 6 = 12 7 × 6 = CONNECTIONS IN 6 × TABLE
10 × 8 = 80 5 × 8 = 40 6 × 8 = CONNECTIONS IN 8 × TABLE MULTIPLICATION.
Database Design Dr. M.E. Fayad, Professor
3 × 12 = 36 6 × 12 = 72 7 × 12 = CONNECTIONS IN 12 × TABLE
A simple function.
Prof. Arfaoui. COM390 Chapter 6
5 × 12 = × 12 = × 12 = CONNECTIONS IN 12 × TABLE MULTIPLICATION.
CMPT 120 Lecture 19 – Unit 3 – Graphics and Animation
5 × 9 = 45 6 × 9 = 54 7 × 9 = CONNECTIONS IN 9 × TABLE
3 × 7 = 21 6 × 7 = 42 7 × 7 = CONNECTIONS IN 7 × TABLE
Presentation transcript:

Multiple Ownership Nicholas Cameron Sophia Drossopoulou James Noble Matthew Smith

Background – Ownership Types Multiple Ownership Objects in Boxes Variance - ? MOJO Effects

Background

Ownership Types The heap is messy:

Ownership Types Organise it:

Ownership Types Give each object an owner:

Ownership Types class Project { Task t1; Task t2; List clients; }

Our Work

The Objects In Boxes Model

A Box is a Set of Objects

Objects in Boxes Single owner interpretation: An object is in its owner’s box

Programs are not Trees

One Owner is not Enough 75% of ownership structures require multiple ownership [34] Mitchell, ECOOP, ’06 Trees can not describe non-hierarchical structures

Objects in Boxes Multiple Ownership: objects may be in more than one box An object with multiple owners is in the intersection of their boxes:

Objects in Boxes

A Descriptive System Describes the heap Does not restrict references etc.

MOJO

MOJO Class declarations have the usual, formal ownership parameters: class C …

MOJO Class declarations have the usual, formal ownership parameters: class C … Types may have multiple corresponding actual owner parameters: C

MOJO Class declarations have the usual, formal ownership parameters: class C … Types may have multiple corresponding actual owner parameters: C

MOJO Class declarations have the usual, formal ownership parameters: class C … Types may have multiple corresponding actual owner parameters: C

MOJO class Connection { … } class Client { Connection c; } class Server { Connection c; }

Variance

Variance Connection Some owner

Variance Connection Some box May be the intersection of several boxes Variance in the number of owners

Subtyping Subtyping with wildcards is variant with respect to owners: C

Subtyping Subtyping with wildcards is variant with respect to owners: C

Subtyping Subtyping with wildcards is variant with respect to owners: C

Subtyping Subtyping with wildcards is variant with respect to owners: C

Constraints class C a intersects b, b disjoint c { … }

Constraints class D a intersects b { D } class E a disjoint b { }

Constraints class D a intersects b { D } class E a disjoint b { D  }

Constraints class D a intersects b { D Object } class E a disjoint b { D  }

Typing - strict Strict method sends and assignments to deal with variance of owners: class C { C f; } C ca; C c1; C c2; ca.f = ca;

Typing - strict Strict method sends and assignments to deal with variance of owners: class C { C f; } C ca; C c1; C c2; ca.f = ca; c1.f = c2; 

Typing - strict

Effects

Effects

Effects Task t1; Task t2; … t1.f; // reads x / writes ε

Effects Task t1; Task t2; … t1.f; // reads x / writes ε t1.f = t2.f; // reads x,y / writes x

Effects with Multiple Owners Task t1; Task t2; … t1.f; // reads x & ? / writes ε

Effects with Multiple Owners Task t1; Task t2; … t1.f; // reads x & ? / writes ε t1.f = t2.f; // reads x & ?,y & z/ writes x & ?

Effects with Multiple Owners t1.f = t2.f; // reads x & ?,y & z/ writes x & ?

Disjointness Two expressions are disjoint if their effects do not overlap Complicated by ? – but & = intersection

Future Work

Future Work Explore variant owners using existential types class TaskList { Task datum; TaskList next; }

Future Work Reference and modification control

Future Work Constraints Topology - inside Unary - may read, may write Binary – may point to, may modify

Summary Ownership Types Multiple Ownership Objects in Boxes Variance MOJO Effects Thank you! Any questions?