2 Search Results for "Eyolfson, Jon"


Document
C++ const and Immutability: An Empirical Study of Writes-Through-const

Authors: Jon Eyolfson and Patrick Lam

Published in: LIPIcs, Volume 56, 30th European Conference on Object-Oriented Programming (ECOOP 2016)


Abstract
The ability to specify immutability in a programming language is a powerful tool for developers, enabling them to better understand and more safely transform their code without fearing unintended changes to program state. The C++ programming language allows developers to specify a form of immutability using the const keyword. In this work, we characterize the meaning of the C++ const qualifier and present the ConstSanitizer tool, which dynamically verifies a stricter form of immutability than that defined in C++: it identifies const uses that are either not consistent with transitive immutability, that write to mutable fields, or that write to formerly-const objects whose const-ness has been cast away. We evaluate a set of 7 C++ benchmark programs to find writes-through-const, establish root causes for how they fail to respect our stricter definition of immutability, and assign attributes to each write (namely: synchronized, not visible, buffer/cache, delayed initialization, and incorrect). ConstSanitizer finds 17 archetypes for writes in these programs which do not respect our version of immutability. Over half of these seem unnecessary to us. Our classification and observations of behaviour in practice contribute to the understanding of a widely-used C++ language feature.

Cite as

Jon Eyolfson and Patrick Lam. C++ const and Immutability: An Empirical Study of Writes-Through-const. In 30th European Conference on Object-Oriented Programming (ECOOP 2016). Leibniz International Proceedings in Informatics (LIPIcs), Volume 56, pp. 8:1-8:25, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2016)


Copy BibTex To Clipboard

@InProceedings{eyolfson_et_al:LIPIcs.ECOOP.2016.8,
  author =	{Eyolfson, Jon and Lam, Patrick},
  title =	{{C++ const and Immutability: An Empirical Study of Writes-Through-const}},
  booktitle =	{30th European Conference on Object-Oriented Programming (ECOOP 2016)},
  pages =	{8:1--8:25},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-014-9},
  ISSN =	{1868-8969},
  year =	{2016},
  volume =	{56},
  editor =	{Krishnamurthi, Shriram and Lerner, Benjamin S.},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops-dev.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2016.8},
  URN =		{urn:nbn:de:0030-drops-61024},
  doi =		{10.4230/LIPIcs.ECOOP.2016.8},
  annote =	{Keywords: empirical study, dynamic analysis, immutability}
}
Document
C++ const and Immutability: An Empirical Study of Writes-Through-const (Artifact)

Authors: Jon Eyolfson and Patrick Lam

Published in: DARTS, Volume 2, Issue 1, Special Issue of the 30th European Conference on Object-Oriented Programming (ECOOP 2016)


Abstract
This artifact is based on ConstSanitizer, a dynamic program analysis tool that detects deep immutability violations through const qualifiers. Our tool instruments any code compiled by clang with the -fsanitizer=const flag. Our implementation includes both instrumentation of LLVM code and a runtime library to support our analysis. The provided package includes our tool and all experiments used in our companion paper. Instructions are also provided.

Cite as

Jon Eyolfson and Patrick Lam. C++ const and Immutability: An Empirical Study of Writes-Through-const (Artifact). In Special Issue of the 30th European Conference on Object-Oriented Programming (ECOOP 2016). Dagstuhl Artifacts Series (DARTS), Volume 2, Issue 1, pp. 3:1-3:2, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2016)


Copy BibTex To Clipboard

@Article{eyolfson_et_al:DARTS.2.1.3,
  author =	{Eyolfson, Jon and Lam, Patrick},
  title =	{{C++ const and Immutability: An Empirical Study of Writes-Through-const (Artifact)}},
  pages =	{3:1--3:2},
  journal =	{Dagstuhl Artifacts Series},
  ISSN =	{2509-8195},
  year =	{2016},
  volume =	{2},
  number =	{1},
  editor =	{Eyolfson, Jon and Lam, Patrick},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops-dev.dagstuhl.de/entities/document/10.4230/DARTS.2.1.3},
  URN =		{urn:nbn:de:0030-drops-61249},
  doi =		{10.4230/DARTS.2.1.3},
  annote =	{Keywords: empirical study, dynamic analysis, immutability}
}
  • Refine by Author
  • 2 Eyolfson, Jon
  • 2 Lam, Patrick

  • Refine by Classification

  • Refine by Keyword
  • 2 dynamic analysis
  • 2 empirical study
  • 2 immutability

  • Refine by Type
  • 2 document

  • Refine by Publication Year
  • 2 2016

Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail