2013 · 21 citations · 38 references
ComputingComputer ScienceFormal MethodsProgramming LanguagesSafety EngineeringData-flow AnalysisType CheckingType SystemsAliasesProgram LogicsProgram RefinementRefinementRefinement TypesStatic Type CheckingType AliasesType Safety
Reasoning about side effects and aliasing is the heart of verifying imperative programs. Unrestricted side effects through one reference can invalidate assumptions about an alias. We present a new type system approach to reasoning about safe assumptions in the presence of aliasing and side effects, unifying ideas from reference immutability type systems and rely-guarantee program logics. Our approach, rely-guarantee references, treats multiple references to shared objects similarly to multiple threads in rely-guarantee program logics. We propose statically associating rely and guarantee conditions with individual references to shared objects. Multiple aliases to a given object may coexist only if the guarantee condition of each alias implies the rely condition for all other aliases. We demonstrate that existing reference immutability type systems are special cases of rely-guarantee references.
38
An axiomatic basis for computer programming
C. A. R. Hoare · Communications of the ACM · 1969 · 3.9K citations · Full text
Thierry Coquand, Gérard Huet · Information and Computation · 1988 · 1.1K citations · Full text
An axiomatic proof technique for parallel programs I
Susan Owicki, David Gries · Acta Informatica · 1976 · 1K citations