Type safety for FJ and FGJ

  • Authors:
  • Shuling Wang;Quan Long;Zongyan Qiu

  • Affiliations:
  • LMAM and Department of Informatics, School of Math., Peking University, Beijing, China;LMAM and Department of Informatics, School of Math., Peking University, Beijing, China;LMAM and Department of Informatics, School of Math., Peking University, Beijing, China

  • Venue:
  • ICTAC'06 Proceedings of the Third international conference on Theoretical Aspects of Computing
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Mainly concerned with type safety, Featherweight Java, or FJ, is a well known minimal core for Java and Generic Java. However, in the type system of FJ, the treatment of downcast is omitted. In this paper we propose a stronger type system for FJ and FGJ. In order to deal with the cast problems, we introduce some special techniques for types, and also strengthen the types for expressions and methods in terms of the type declaration notations. Supported by the type system and our techniques, we can ensure properties stronger than the ones proved in Igarashi et al’s original FJ paper. Examples making the above mentioned contributions clear are illustrated throughout this paper. Furthermore a case study on design patterns showing the advantages of our results is given.