Inferring Ownership Domains From Refinements
Ownership type qualifiers clarify aliasing invariants that cannot be directly expressed in mainstream programming languages. Moreover, they enable extracting abstract object graphs that clarify the object relationships produced at runtime. Adding qualifiers to legacy code after the fact, however, involves significant overhead and difficult interaction.
We propose an inference analysis to generate qualifiers in the code based on developer refinements that express strict encapsulation, logical containment and architectural tiers. The language of refinements consists of: makeOwnedBy, to make an object strictly encapsulated by another; makePartOf, to make an object logically contained in another; makePeer, to make two objects peers; or makeShared, to allow an object to be globally aliased.
Based on the developers’ refinements, the analysis attempts to generate qualifiers that type-check; if it fails to do so, it indicates to developers that their refinements do not match the code as-written, so they must investigate unexpected aliasing, and optionally change the code and re-run the analysis.
We implement the analysis in a tool, OOGRE, and evaluate it on real code, to confirm that it generates qualifiers that are more precise than the default ones. Finally, we confirm that the generated qualifiers enable another analysis to extract hierarchical object graphs that reflect strict encapsulation, logical containment and architectural tiers.
Mon 5 NovDisplayed time zone: Guadalajara, Mexico City, Monterrey change
13:30 - 15:00 | |||
13:30 30mTalk | Exploring feature interactions without specifications: a controlled experiment GPCE 2018 Larissa Soares Universidade Federal da Bahia, Jens Meinicke Magdeburg University, Sarah Nadi University of Alberta, Christian Kästner Carnegie Mellon University, Eduardo Santana de Almeida Universidade Federal da Bahia | ||
14:00 30mTalk | Inferring Ownership Domains From Refinements GPCE 2018 | ||
14:30 30mTalk | Implementing a semi-causal domain-specific language for context detection over binary sensors GPCE 2018 |