Published November 30, 2020
| Version v1
Conference paper
Behavioural Types for Memory and Method Safety in a Core Object-Oriented Language
Contributors
Others:
- Foundations of Component-based Ubiquitous Systems (FOCUS) ; Inria Sophia Antipolis - Méditerranée (CRISAM) ; Institut National de Recherche en Informatique et en Automatique (Inria)-Institut National de Recherche en Informatique et en Automatique (Inria)-Dipartimento di Informatica - Scienza e Ingegneria [Bologna] (DISI) ; Alma Mater Studiorum Università di Bologna [Bologna] (UNIBO)-Alma Mater Studiorum Università di Bologna [Bologna] (UNIBO)
- Department of Computer Science and Engineering [Bologna] (DISI) ; Alma Mater Studiorum Università di Bologna [Bologna] (UNIBO)
- University of Malta [Malta]
- Aalborg University [Denmark] (AAU)
- Universidade Nova de Lisboa = NOVA University Lisbon (NOVA)
- Work partially supported by the EU H2020 RISE programme under the Marie Skłodowska-Curie grant agreement No. 778233 (BehAPI), the UK EPSRC grant EP/K034413/1 (ABCD), and by NOVA LINCS (UIDB/04516/2020) via FCT.
- European Project: 778233,H2020-EU.1.3.3. - Stimulating innovation by means of cross-fertilisation of knowledge ,778233,BEHAPI(2018)
Description
We present a type-based analysis ensuring memory safety and object protocol completion in the Java-like language Mungo. Objects are annotated with usages, typestates-like specifications of the admissible sequences of method calls. The analysis entwines usage checking, controlling the order in which methods are called, with a static check determining whether references may contain null values. It prevents null pointer dereferencing in a typestate-aware manner and memory leaks and ensures that the intended usage protocol of every object is respected and completed. The type system admits an algorithm that infers the most general usage with respect to a simulation preorder. The type system is implemented in the form of a type checker and a usage inference tool.
Abstract
International audienceAdditional details
Identifiers
- URL
- https://hal.inria.fr/hal-03102375
- URN
- urn:oai:HAL:hal-03102375v1
Origin repository
- Origin repository
- UNICA