In this paper we extend, by allowing the use of rank 2 intersection, the non-standard type assignment system for the detection and elimination of dead-code in typed functional programs presented by Coppo et al in the Static Analysis Symposium '96. The main application of this method is the optimization of programs extracted from proofs in logical frameworks, but it could be used as well in the elimination of dead-code determined by program specialization. The use of nonstandard types (also called annotated types) allows to exploit the type structure of the language for investigating program properties. Dead-code is detected via annotated type inference, which can be performed in a complete way, by reducing it to the solution of a system of inequalities between annotation variables. Even though the language considered in the paper is the simply typed λ-calculus with cartesian product, if-then-else, fixpoint, and arithmetic constants we can generalize our approach to polymorphic languages like Miranda, Haskell, and CAML.

Detecting and Removing Dead-Code using Rank 2 Intersection

DAMIANI, Ferruccio;
1998-01-01

Abstract

In this paper we extend, by allowing the use of rank 2 intersection, the non-standard type assignment system for the detection and elimination of dead-code in typed functional programs presented by Coppo et al in the Static Analysis Symposium '96. The main application of this method is the optimization of programs extracted from proofs in logical frameworks, but it could be used as well in the elimination of dead-code determined by program specialization. The use of nonstandard types (also called annotated types) allows to exploit the type structure of the language for investigating program properties. Dead-code is detected via annotated type inference, which can be performed in a complete way, by reducing it to the solution of a system of inequalities between annotation variables. Even though the language considered in the paper is the simply typed λ-calculus with cartesian product, if-then-else, fixpoint, and arithmetic constants we can generalize our approach to polymorphic languages like Miranda, Haskell, and CAML.
1998
1st International Workshop on Types for Proofs and Programs, TYPES 1996
Aussois, France
15 December 1996 through 19 December 1996
Types for Proofs and Programs
Springer
1512
66
87
9783540651376
http://www.di.unito.it/~lambda/biblio/entry-tipoIC-Damiani-Prost-IWT-98.html
http://www.springer.com/computer/foundations/book/978-3-540-65137-6
http://www.springerlink.com/content/pj7h071h692l1052/?p=1c98d8d0410c4fc683a41cba7cfdf965&pi=4
F. DAMIANI; FREDERIC PROST
File in questo prodotto:
File Dimensione Formato  
LNCS-types96-1998.pdf

Accesso riservato

Descrizione: Articolo proncipale
Tipo di file: PDF EDITORIALE
Dimensione 1.13 MB
Formato Adobe PDF
1.13 MB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2318/71345
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 11
  • ???jsp.display-item.citation.isi??? ND
social impact