Search Results

Documents authored by Pearce, David J.


Document
On Leveraging Tests to Infer Nullable Annotations

Authors: Jens Dietrich, David J. Pearce, and Mahin Chandramohan

Published in: LIPIcs, Volume 263, 37th European Conference on Object-Oriented Programming (ECOOP 2023)


Abstract
Issues related to the dereferencing of null pointers are a pervasive and widely studied problem, and numerous static analyses have been proposed for this purpose. These are typically based on dataflow analysis, and take advantage of annotations indicating whether a type is nullable or not. The presence of such annotations can significantly improve the accuracy of null checkers. However, most code found in the wild is not annotated, and tools must fall back on default assumptions, leading to both false positives and false negatives. Manually annotating code is a laborious task and requires deep knowledge of how a program interacts with clients and components. We propose to infer nullable annotations from an analysis of existing test cases. For this purpose, we execute instrumented tests and capture nullable API interactions. Those recorded interactions are then refined (santitised and propagated) in order to improve their precision and recall. We evaluate our approach on seven projects from the spring ecosystems and two google projects which have been extensively manually annotated with thousands of @Nullable annotations. We find that our approach has a high precision, and can find around half of the existing @Nullable annotations. This suggests that the method proposed is useful to mechanise a significant part of the very labour-intensive annotation task.

Cite as

Jens Dietrich, David J. Pearce, and Mahin Chandramohan. On Leveraging Tests to Infer Nullable Annotations. In 37th European Conference on Object-Oriented Programming (ECOOP 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 263, pp. 10:1-10:25, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)


Copy BibTex To Clipboard

@InProceedings{dietrich_et_al:LIPIcs.ECOOP.2023.10,
  author =	{Dietrich, Jens and Pearce, David J. and Chandramohan, Mahin},
  title =	{{On Leveraging Tests to Infer Nullable Annotations}},
  booktitle =	{37th European Conference on Object-Oriented Programming (ECOOP 2023)},
  pages =	{10:1--10:25},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-281-5},
  ISSN =	{1868-8969},
  year =	{2023},
  volume =	{263},
  editor =	{Ali, Karim and Salvaneschi, Guido},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2023.10},
  URN =		{urn:nbn:de:0030-drops-182037},
  doi =		{10.4230/LIPIcs.ECOOP.2023.10},
  annote =	{Keywords: null analysis, null safety, testing, program analysis}
}
Document
Contracts in the Wild: A Study of Java Programs (Artifact)

Authors: Jens Dietrich, David J. Pearce, Kamil Jezek, and Premek Brada

Published in: DARTS, Volume 3, Issue 2, Special Issue of the 31st European Conference on Object-Oriented Programming (ECOOP 2017)


Abstract
This artefact contains a dataset of open-source programs obtained from the Maven Central Repository and scripts that first extract contracts from these programs and then perform several analyses on the contracts extracted. The extraction and analysis is fully automated and directly produces the tables presented in the accompanying paper. The results show how contracts are used in real-world program, and how their usage changes between versions and within inheritance hierarchies.

Cite as

Jens Dietrich, David J. Pearce, Kamil Jezek, and Premek Brada. Contracts in the Wild: A Study of Java Programs (Artifact). In Special Issue of the 31st European Conference on Object-Oriented Programming (ECOOP 2017). Dagstuhl Artifacts Series (DARTS), Volume 3, Issue 2, pp. 6:1-6:4, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2017)


Copy BibTex To Clipboard

@Article{dietrich_et_al:DARTS.3.2.6,
  author =	{Dietrich, Jens and Pearce, David J. and Jezek, Kamil and Brada, Premek},
  title =	{{Contracts in the Wild: A Study of Java Programs (Artifact)}},
  pages =	{6:1--6:4},
  journal =	{Dagstuhl Artifacts Series},
  ISSN =	{2509-8195},
  year =	{2017},
  volume =	{3},
  number =	{2},
  editor =	{Dietrich, Jens and Pearce, David J. and Jezek, Kamil and Brada, Premek},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/DARTS.3.2.6},
  URN =		{urn:nbn:de:0030-drops-72871},
  doi =		{10.4230/DARTS.3.2.6},
  annote =	{Keywords: verification, design-by-contract, assertions, preconditions, postconditions, runtime checking, java, input validation}
}
Document
Contracts in the Wild: A Study of Java Programs

Authors: Jens Dietrich, David J. Pearce, Kamil Jezek, and Premek Brada

Published in: LIPIcs, Volume 74, 31st European Conference on Object-Oriented Programming (ECOOP 2017)


Abstract
The use of formal contracts has long been advocated as an approach to develop programs that are provably correct. However, the reality is that adoption of contracts has been slow in practice. Despite this, the adoption of lightweight contracts — typically utilising runtime checking — has progressed. In the case of Java, built-in features of the language (e.g. assertions and exceptions) can be used for this. Furthermore, a number of libraries which facilitate contract checking have arisen. In this paper, we catalogue 25 techniques and tools for lightweight contract checking in Java, and present the results of an empirical study looking at a dataset extracted from the 200 most popular projects found on Maven Central, constituting roughly 351,034 KLOC. We examine (1) the extent to which contracts are used and (2) what kind of contracts are used. We then investigate how contracts are used to safeguard code, and study problems in the context of two types of substitutability that can be guarded by contracts: (3) unsafe evolution of APIs that may break client programs and (4) violations of Liskovs Substitution Principle (LSP) when methods are overridden. We find that: (1) a wide range of techniques and constructs are used to represent contracts, and often the same program uses different techniques at the same time; (2) overall, contracts are used less than expected, with significant differences between programs; (3) projects that use contracts continue to do so, and expand the use of contracts as they grow and evolve; and, (4) there are cases where the use of contracts points to unsafe subtyping (violations of Liskov's Substitution Principle) and unsafe evolution.

Cite as

Jens Dietrich, David J. Pearce, Kamil Jezek, and Premek Brada. Contracts in the Wild: A Study of Java Programs. In 31st European Conference on Object-Oriented Programming (ECOOP 2017). Leibniz International Proceedings in Informatics (LIPIcs), Volume 74, pp. 9:1-9:29, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2017)


Copy BibTex To Clipboard

@InProceedings{dietrich_et_al:LIPIcs.ECOOP.2017.9,
  author =	{Dietrich, Jens and Pearce, David J. and Jezek, Kamil and Brada, Premek},
  title =	{{Contracts in the Wild: A Study of Java Programs}},
  booktitle =	{31st European Conference on Object-Oriented Programming (ECOOP 2017)},
  pages =	{9:1--9:29},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-035-4},
  ISSN =	{1868-8969},
  year =	{2017},
  volume =	{74},
  editor =	{M\"{u}ller, Peter},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2017.9},
  URN =		{urn:nbn:de:0030-drops-72590},
  doi =		{10.4230/LIPIcs.ECOOP.2017.9},
  annote =	{Keywords: verification, design-by-contract, assertions, preconditions, postconditions, runtime checking, java, input validation}
}
Document
10152 Abstracts Collection – Relationships, Objects, Roles, and Queries in Modern Languages

Authors: Guido Boella, Erik Meijer, David J. Pearce, Friedrich Steimann, and Frank Tip

Published in: Dagstuhl Seminar Proceedings, Volume 10152, Relationships, Objects, Roles, and Queries in Modern Programming Languages (2010)


Abstract
From 11/04/10 to 16/04/10, the Dagstuhl Seminar 10152 ``Relationships, Objects, Roles, and Queries in Modern Programming Languages'' was held in Schloss Dagstuhl~--~Leibniz Center for Informatics. During the seminar, several participants presented their current research, and ongoing work and open problems were discussed. Abstracts of the presentations given during the seminar as well as abstracts of seminar results and ideas are put together in this paper. The first section describes the seminar topics and goals in general. Links to extended abstracts or full papers are provided, if available.

Cite as

Guido Boella, Erik Meijer, David J. Pearce, Friedrich Steimann, and Frank Tip. 10152 Abstracts Collection – Relationships, Objects, Roles, and Queries in Modern Languages. In Relationships, Objects, Roles, and Queries in Modern Programming Languages. Dagstuhl Seminar Proceedings, Volume 10152, pp. 1-11, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2010)


Copy BibTex To Clipboard

@InProceedings{boella_et_al:DagSemProc.10152.1,
  author =	{Boella, Guido and Meijer, Erik and Pearce, David J. and Steimann, Friedrich and Tip, Frank},
  title =	{{10152 Abstracts Collection – Relationships, Objects, Roles, and Queries in Modern Languages}},
  booktitle =	{Relationships, Objects, Roles, and Queries in Modern Programming Languages},
  pages =	{1--11},
  series =	{Dagstuhl Seminar Proceedings (DagSemProc)},
  ISSN =	{1862-4405},
  year =	{2010},
  volume =	{10152},
  editor =	{Guido Boella and Erik Meijer and David J. Pearce and Friedrich Steimann and Frank Tip},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/DagSemProc.10152.1},
  URN =		{urn:nbn:de:0030-drops-25750},
  doi =		{10.4230/DagSemProc.10152.1},
  annote =	{Keywords: Relationships, Roles, Software Modelling, Programming Languages}
}
Document
10152 Executive Summary – Relationships, Objects, Roles, and Queries in Modern Languages

Authors: Guido Boella, Erik Meijer, David J. Pearce, Friedrich Steimann, and Frank Tip

Published in: Dagstuhl Seminar Proceedings, Volume 10152, Relationships, Objects, Roles, and Queries in Modern Programming Languages (2010)


Abstract
During the 4 days of the seminar, 21 talks, 4 tutorials and 6 demos were given by the participants. In addition, a beauty contest was run on the last day, where participants were invited to solve a benchmark problem using their system.

Cite as

Guido Boella, Erik Meijer, David J. Pearce, Friedrich Steimann, and Frank Tip. 10152 Executive Summary – Relationships, Objects, Roles, and Queries in Modern Languages. In Relationships, Objects, Roles, and Queries in Modern Programming Languages. Dagstuhl Seminar Proceedings, Volume 10152, pp. 1-3, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2010)


Copy BibTex To Clipboard

@InProceedings{boella_et_al:DagSemProc.10152.2,
  author =	{Boella, Guido and Meijer, Erik and Pearce, David J. and Steimann, Friedrich and Tip, Frank},
  title =	{{10152 Executive Summary – Relationships, Objects, Roles, and Queries in Modern Languages}},
  booktitle =	{Relationships, Objects, Roles, and Queries in Modern Programming Languages},
  pages =	{1--3},
  series =	{Dagstuhl Seminar Proceedings (DagSemProc)},
  ISSN =	{1862-4405},
  year =	{2010},
  volume =	{10152},
  editor =	{Guido Boella and Erik Meijer and David J. Pearce and Friedrich Steimann and Frank Tip},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/entities/document/10.4230/DagSemProc.10152.2},
  URN =		{urn:nbn:de:0030-drops-25743},
  doi =		{10.4230/DagSemProc.10152.2},
  annote =	{Keywords: Relationships, Roles, Software Modelling, Programming Languages}
}
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