Infering Ownership Types for Encapsulated Object-Oriented Program Components

Author(s):  
Arnd Poetzsch-Heffter ◽  
Kathrin Geilmann ◽  
Jan Schäfer
2021 ◽  
Author(s):  
◽  
Paley Guangping Li

<p>Modern object-oriented programming languages frequently need the ability to clone, duplicate, and copy objects. The usual approaches taken by languages are rudimentary, primarily because these approaches operate with little understanding of the object being cloned. Deep cloning naively copies every object that has a reachable reference path from the object being cloned, even if the objects being copied have no innate relationship with that object. For more sophisticated cloning operations, languages usually only provide the capacity for programmers to define their own cloning operations for specific objects, and with no help from the type system.  Sheep cloning is an automated operation that clones objects by leveraging information about those objects’ structures, which the programmer imparts into their programs with ownership types. Ownership types are a language mechanism that defines an owner for every object in the program. Ownership types create a hierarchical structure for the heap.  In this thesis, we construct an extensible formal model for an object-oriented language with ownership types (Core), and use it to explore different formalisms of sheep cloning. We formalise three distinct operational semantics of sheep cloning, and for each approach we include proofs or proof outlines where appropriate, and provide a comparative analysis of each model’s benefits. Our main contribution is the descripSC formal model of sheep cloning and its proof of type soundness.  The second contribution of this thesis is the formalism of Mojo-jojo, a multiple ownership system that includes existential quantification over types and context parameters, along with a constraint system for context parameters. We prove type soundness for Mojo-jojo. Multiple ownership is a mechanism which allows objects to have more than one owner. Context parameters in Mojo-jojo can use binary operators such as: intersection, union, and disjointness.</p>


2021 ◽  
Author(s):  
◽  
Alex Potanin

<p>Modern object-oriented programming languages support many techniques that simplify the work of a programmer. Among them is generic types: the ability to create generic descriptions of algorithms and object structures that will be automatically specialised by supplying the type information when they are used. At the same time, object-oriented technologies still suffer from aliasing: the case of many objects in a program's memory referring to the same object via different references. Ownership types enforce encapsulation in object-oriented programs by ensuring that objects cannot be referred to from the outside of the object(s) that own them. Existing ownership programming languages either do not support generic types or attempt to add them on top of ownership restrictions. The goal of this work is to bring object ownership into mainstream object-oriented programming languages. This thesis presents Generic Ownership which provides perobject ownership on top of a generic imperative language. Surprisingly, the resulting system not only provides ownership guarantees comparable to the established systems, but also requires few additional language mechanisms to achieve them due to full reuse of generic types. In this thesis I formalise the core of Generic Ownership, highlighting that the restriction of this calls, owner preservation over subtyping, and appropriate owner nesting are the only necessary requirements for ownership. I describe two formalisms: (1) a simple formalism, capturing confinement in a functional setting, and (2) a complete formalism, providing a way for Generic Ownership to support both deep and shallow variations of ownership types. I support the formal work by describing how the Ownership Generic Java (OGJ) language is implemented as a minimal extension to Java 5. OGJ is the first publicly available language implementation that supports ownership, confinement, and generic types at the same time. I demonstrate OGJ in practice: show how to use OGJ to write programs and provide insights into the implementations of Generic Ownership.</p>


2021 ◽  
Author(s):  
◽  
Paley Guangping Li

<p>Modern object-oriented programming languages frequently need the ability to clone, duplicate, and copy objects. The usual approaches taken by languages are rudimentary, primarily because these approaches operate with little understanding of the object being cloned. Deep cloning naively copies every object that has a reachable reference path from the object being cloned, even if the objects being copied have no innate relationship with that object. For more sophisticated cloning operations, languages usually only provide the capacity for programmers to define their own cloning operations for specific objects, and with no help from the type system.  Sheep cloning is an automated operation that clones objects by leveraging information about those objects’ structures, which the programmer imparts into their programs with ownership types. Ownership types are a language mechanism that defines an owner for every object in the program. Ownership types create a hierarchical structure for the heap.  In this thesis, we construct an extensible formal model for an object-oriented language with ownership types (Core), and use it to explore different formalisms of sheep cloning. We formalise three distinct operational semantics of sheep cloning, and for each approach we include proofs or proof outlines where appropriate, and provide a comparative analysis of each model’s benefits. Our main contribution is the descripSC formal model of sheep cloning and its proof of type soundness.  The second contribution of this thesis is the formalism of Mojo-jojo, a multiple ownership system that includes existential quantification over types and context parameters, along with a constraint system for context parameters. We prove type soundness for Mojo-jojo. Multiple ownership is a mechanism which allows objects to have more than one owner. Context parameters in Mojo-jojo can use binary operators such as: intersection, union, and disjointness.</p>


2012 ◽  
Vol 22 (6) ◽  
pp. 797-852 ◽  
Author(s):  
BRUNO C. D. S. OLIVEIRA ◽  
TOM SCHRIJVERS ◽  
WILLIAM R. COOK

AbstractIncremental Programming (IP) is a programming style in which new program components are defined as increments of other components. Examples of IP mechanisms include Object-oriented programming inheritance, aspect-oriented programming advice, and feature-oriented programming. A characteristic of IP mechanisms is that, while individual components can be independently defined, the composition of components makes those components become tightly coupled, sharing both control and data flows. This makes reasoning about IP mechanisms a notoriously hard problem: modular reasoning about a component becomes very difficult; and it is very hard to tell if two tightly coupled components interfere with each other's control and data flows. This paper presents modular reasoning about interference (MRI), a purely functional model of IP embedded in Haskell. MRI models inheritance with mixins and side effects with monads. It comes with a range of powerful reasoning techniques: equational reasoning, parametricity, and reasoning with algebraic laws about effectful operations. These techniques enable MRI in the presence of side effects. MRI formally captures harmlessness, a hard-to-formalize notion in the interference literature, in two theorems. We prove these theorems with a non-trivial combination of all three reasoning techniques.


2021 ◽  
Author(s):  
◽  
Alex Potanin

<p>Modern object-oriented programming languages support many techniques that simplify the work of a programmer. Among them is generic types: the ability to create generic descriptions of algorithms and object structures that will be automatically specialised by supplying the type information when they are used. At the same time, object-oriented technologies still suffer from aliasing: the case of many objects in a program's memory referring to the same object via different references. Ownership types enforce encapsulation in object-oriented programs by ensuring that objects cannot be referred to from the outside of the object(s) that own them. Existing ownership programming languages either do not support generic types or attempt to add them on top of ownership restrictions. The goal of this work is to bring object ownership into mainstream object-oriented programming languages. This thesis presents Generic Ownership which provides perobject ownership on top of a generic imperative language. Surprisingly, the resulting system not only provides ownership guarantees comparable to the established systems, but also requires few additional language mechanisms to achieve them due to full reuse of generic types. In this thesis I formalise the core of Generic Ownership, highlighting that the restriction of this calls, owner preservation over subtyping, and appropriate owner nesting are the only necessary requirements for ownership. I describe two formalisms: (1) a simple formalism, capturing confinement in a functional setting, and (2) a complete formalism, providing a way for Generic Ownership to support both deep and shallow variations of ownership types. I support the formal work by describing how the Ownership Generic Java (OGJ) language is implemented as a minimal extension to Java 5. OGJ is the first publicly available language implementation that supports ownership, confinement, and generic types at the same time. I demonstrate OGJ in practice: show how to use OGJ to write programs and provide insights into the implementations of Generic Ownership.</p>


2012 ◽  
Vol 22 (1) ◽  
pp. 11-21
Author(s):  
Patti Martin ◽  
Nannette Nicholson ◽  
Charia Hall

Family support has evolved from a buzzword of the 1990s to a concept founded in theory, mandated by federal law, valued across disciplines, and espoused by both parents and professionals. This emphasis on family-centered practices for families of young children with disabilities, coupled with federal policy initiatives and technological advances, served as the impetus for the development of Early Hearing Detection and Intervention (EHDI) programs (Nicholson & Martin, in press). White, Forsman, Eichwald, and Muñoz (2010) provide an excellent review of the evolution of EHDI systems, which include family support as one of their 9 components. The National Center for Hearing Assessment and Management (NCHAM), the Maternal and Child Health Bureau, and the Center for Disease Control Centers cosponsored the first National EHDI Conference. This conference brought stakeholders including parents, practitioners, and researchers from diverse backgrounds together to form a learning collaborative (Forsman, 2002). Attendees represented a variety of state, national, and/or federal agencies and organizations. This forum focused effort on the development of EHDI programs infused with translating research into practices and policy. When NCHAM, recognizing the critical role of family support in the improvement of outcomes for both children and families, created a think tank to investigate the concept of a conference centered on support for families of children who are deaf or hard of hearing in 2005, the “Investing in Family Support” (IFSC) conference was born. This conference was specifically designed to facilitate and enhance EHDI efforts within the family support arena. From this venue, a model of family support was conceptualized and has served as the cornerstone of the IFSC annual conference since 2006. Designed to be a functional framework, the IFSC model delineates where and how families find support. In this article, we will promote and encourage continued efforts towards defining operational measures and program components to ultimately quantify success as it relates to improved outcomes for these children and their families. The authors view this opportunity to revisit the theoretical underpinnings of family support, the emerging research in this area, and the basics of the IFSC Model of Family Support as a call to action. We challenge professionals who work with children identified as deaf or hard of hearing to move family support from conceptualization to practices that are grounded in evidence and ever mindful of the unique and dynamic nature of individual families.


Sign in / Sign up

Export Citation Format

Share Document