2013 · 18 citations · 12 references
ComputingComputer ScienceCompilersProgramming LanguagesSyntaxAbstract Syntax TreesCompiler ConstructionObject-oriented ProgrammingSoftware ConstructionType CheckingType SystemsOperational SemanticsStructural Operational Semantics
Abstract. Programmers often need to initialise circular structures of objects. Ini-tialisation should be safe (so that programs can never suffer null pointer exceptions or otherwise observe uninitialised values) and modular (so that each part of the circular structure can be written and compiled separately). Unfortunately, existing languages do not support modular circular initialisation: programmers in practical languages resort to Tony Hoare’s “Billion Dollar Mistake”: initialising variables with nulls, and then hoping to fix them up afterward. While recent research lan-guages have offered some solutions, none fully support safe modular circular initialisation. We present placeholders, a straightforward extension to object-oriented languages that describes circular structures simply, directly, and modularly. In typed lan-guages, placeholders can be described by placeholder types that ensure placehold-ers are used safely. We define an operational semantics for placeholders, a type system for placeholder types, and prove soundness. Incorporating placeholders into object-oriented languages should make programs simultaneously simpler to write, and easier to write correctly. 1
12
Atsushi Igarashi, Benjamin C. Pierce, Philip Wadler · 1999 · 274 citations
Tony Hoare · Communications of the ACM · 1981 · 182 citations
Uniqueness and reference immutability for safe parallelism
Colin S. Gordon, Matthew Parkinson, Jared Parsons et al. · 2012 · 102 citations
Object and reference immutability using Java generics
Yoav Zibin, Alex Potanin, Mahmood Ali et al. · 2007 · 91 citations · Full text
Establishing object invariants with delayed types
Manuel Fähndrich, Songtao Xia · 2007 · 83 citations