A Type System for Tom

Claude Kirchner 1 Pierre-Etienne Moreau 2 Cláudia Tavares 2, *
* Auteur correspondant
2 PAREO - Formal islands: foundations and applications
INRIA Lorraine, LORIA - Laboratoire Lorrain de Recherche en Informatique et ses Applications
Abstract : Extending a given language with new dedicated features is a general and quite used approach to make the programming language more adapted to problems. Being closer to the application, this leads to less programming flaws and easier maintenance. But of course one would still like to perform program analysis on these kinds of extended languages, in particular type checking and inference. But in this case one has to make the typing of the extended features compatible with the ones in the starting language. The Tom programming language is a typical example of such a situation as it consists of an extension of Java that adds pattern matching, more particularly associative pattern matching, and reduction strategies. This paper presents a type system with subtyping for Tom, that is compatible with Java's type system, and that performs both type checking and type inference. We propose an algorithm that checks if all patterns of a Tom program are well-typed. In addiction, we propose an algorithm based on equality and subtyping constraints that infers types of variables occurring in a pattern. Both algorithms are exemplified and the proposed type system is showed to be sound and complete.
Type de document :
Communication dans un congrès
Ian Mackie and Anamaria Martins Moreira. Proceedings Tenth International Workshop on Rule-Based Programming - RULE 2009, Jun 2009, Brasilia, Brazil. 21, 2010, Rule-Based Programming. 〈10.4204/EPTCS.21.5〉
Liste complète des métadonnées

Littérature citée [16 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/inria-00426439
Contributeur : Cláudia Tavares <>
Soumis le : mercredi 5 janvier 2011 - 10:57:01
Dernière modification le : jeudi 11 janvier 2018 - 06:22:10
Document(s) archivé(s) le : samedi 3 décembre 2016 - 00:18:09

Fichier

RULE09-paper.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

Collections

Citation

Claude Kirchner, Pierre-Etienne Moreau, Cláudia Tavares. A Type System for Tom. Ian Mackie and Anamaria Martins Moreira. Proceedings Tenth International Workshop on Rule-Based Programming - RULE 2009, Jun 2009, Brasilia, Brazil. 21, 2010, Rule-Based Programming. 〈10.4204/EPTCS.21.5〉. 〈inria-00426439v2〉

Partager

Métriques

Consultations de la notice

233

Téléchargements de fichiers

115