Typing record concatenation for free - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Rapport (Rapport De Recherche) Année : 1992

Typing record concatenation for free

Didier Rémy
  • Fonction : Auteur
  • PersonId : 915856

Résumé

We show that any functional language with record extension pocesses record concatenation for free. We exhibit a translation from the latter into the former. We obtain a type system for a language with record concatenation by composing the translation with type-checking in a language with record extension. We apply this method to a version of ML with record extension and obtain an extension of ML with either asymmetric or symmetric concatenation. The latter extension is simple, flexible and has a very efficient type inference algorithm in practice. Concatenation together with removal of fields needs one more construct than extension of records. It can be added to the version of ML with record extension. However, many typed languages with record cannot type such a construct. The method still applies to them, producing type systems for record concatenation without removal of fields. Object systems also benefit of the encoding which shows that multiple inheritance does not actually require the concatenation of records but only their extension.

Domaines

Autre [cs.OH]
Fichier principal
Vignette du fichier
RR-1739.pdf (259.97 Ko) Télécharger le fichier

Dates et versions

inria-00076978 , version 1 (29-05-2006)

Identifiants

  • HAL Id : inria-00076978 , version 1

Citer

Didier Rémy. Typing record concatenation for free. [Research Report] RR-1739, INRIA. 1992. ⟨inria-00076978⟩
90 Consultations
245 Téléchargements

Partager

Gmail Facebook X LinkedIn More