@gron

Flexible Immutability with Frozen Objects

, , and . Verified Software: Theories, Tools, Experiments, volume 5295 of Lecture Notes in Computer Science, Springer, Berlin / Heidelberg, (2008)
DOI: 10.1007/978-3-540-87873-5_17

Abstract

Object immutability is a familiar concept that allows safe sharing of objects. Existing language support for immutability is based on immutable classes. However, class-based approaches are restrictive because programmers can neither make instances of arbitrary classes immutable, nor can they control when an instance becomes immutable. These restrictions prevent many interesting applications where objects of mutable classes go through a number of modifications before they become immutable. This paper presents a flexible technique to enforce the immutability of individual objects by transferring their ownership to a special freezer object, which prevents further modification. The paper demonstrates how immutability facilitates program verification by extending the Boogie methodology for object invariants to immutable objects. The technique is based on Spec#’s dynamic ownership, but the concepts also apply to other ownership systems that support transfer.

Description

Abstract - SpringerLink

Links and resources

Tags

community

  • @gron
  • @dblp
@gron's tags highlighted