Soundness of object-oriented languages with coinductive big-step semantics

  • Authors:
  • Davide Ancona

  • Affiliations:
  • DISI, Università di Genova, Italy

  • Venue:
  • ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

It is well known that big-step operational semantics are not suitable for proving soundness of type systems, because of their inability to distinguish stuck from non-terminating computations. We show how this problem can be solved by interpreting coinductively the rules for the standard big-step operational semantics of a Java-like language, thus making the claim of soundness more intuitive: whenever a program is well-typed, its coinductive operational semantics returns a value. Indeed, coinduction allows non-terminating computations to return values; this is proved by showing that the set of proof trees defining the semantic judgment forms a complete metric space when equipped with a proper distance function. In this way, we are able to prove soundness of a nominal type system w.r.t. the coinductive semantics. Since the coinductive semantics is sound w.r.t. the usual small-step operational semantics, the standard claim of soundness can be easily deduced.