Results 1 
8 of
8
TypeBased Useless Variable Elimination
, 1999
"... We show a typebased method for useless variable elimination, i.e., transformation that eliminates variables whose values contribute nothing to the final outcome of a computation, and prove its correctness. The algorithm is a surprisingly simple extension of the usual type reconstruction algorithm. ..."
Abstract

Cited by 20 (4 self)
 Add to MetaCart
We show a typebased method for useless variable elimination, i.e., transformation that eliminates variables whose values contribute nothing to the final outcome of a computation, and prove its correctness. The algorithm is a surprisingly simple extension of the usual type reconstruction algorithm. Our method seems more attractive than Wand and Siveroni's 0CFAbased method in many respects. First, it is efficient: it runs in time almost linear in the size of an input expression for a simplytyped calculus, while the 0CFAbased method may require a cubic time. Second, our transformation can be shown to be optimal among those that preserve welltypedness, both for the simplytyped language and for an MLstyle polymorphicallytyped language. On the other hand, the 0CFAbased method is not optimal for the polymophicallytyped language. ANY OTHER IDENTIFYING INFORMATION OF THIS REPORT Summary has been submitted for publication. Uptodate version of this report will be available through ...
A Theory of Program Refinement
, 1998
"... We give a canonical program refinement calculus based on the lambda calculus and classical firstorder predicate logic, and study its proof theory and semantics. The intention is to construct a metalanguage for refinement in which basic principles of program development can be studied. The idea is t ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
We give a canonical program refinement calculus based on the lambda calculus and classical firstorder predicate logic, and study its proof theory and semantics. The intention is to construct a metalanguage for refinement in which basic principles of program development can be studied. The idea is that it should be possible to induce a refinement calculus in a generic manner from a programming language and a program logic. For concreteness, we adopt the simplytyped lambda calculus augmented with primitive recursion as a paradigmatic typed functional programming language, and use classical firstorder logic as a simple program logic. A key feature is the construction of the refinement calculus in a modular fashion, as the combination of two orthogonal extensions to the underlying programming language (in this case, the simplytyped lambda calculus). The crucial observation is that a refinement calculus is given by extending a programming language to allow indeterminate expressions (or ‘stubs’) involving the construction ‘some program x such that P ’. Factoring this into ‘some x...’
Detecting and removing dead code using rank 2 intersection
 IN INTERNATIONAL WORKSHOP:&QUOT;TYPES'96&QUOT;, SELECTED PAPERS, LNCS 1512. SPINGERVERLAG
, 1998
"... In this paper we extend, by allowing rank 2 intersection types, the type assignment system for the detection and elimination of dead code in typed functional programs presented by Coppo et al Giannini and the rst author in the Static Analysis Symposium '96. The main application of this method i ..."
Abstract

Cited by 4 (3 self)
 Add to MetaCart
In this paper we extend, by allowing rank 2 intersection types, the type assignment system for the detection and elimination of dead code in typed functional programs presented by Coppo et al Giannini and the rst author 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. This system rely on annotated types which allow to exploit the type structure of the language for the investigation of program properties. The detection of dead code is obtained via annotated type inference, which canbe 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 typedcalculus with cartesian product, ifthenelse, xpoint, and arithmetic constants we can generalize our approach to polymorphic languages like Miranda, Haskell, and CAML.
TypeBased UselessVariable Elimination
, 2000
"... Uselessvariable elimination is a transformation that eliminates variables whose values contribute nothing to the final outcome of a computation. We present a typebased method for uselessvariable elimination and prove its correctness. The algorithm is a surprisingly simple extension of the usual t ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Uselessvariable elimination is a transformation that eliminates variables whose values contribute nothing to the final outcome of a computation. We present a typebased method for uselessvariable elimination and prove its correctness. The algorithm is a surprisingly simple extension of the usual typereconstruction algorithm. Our method has several attractive features. First, it is simple, so that the proof of the correctness is clear and the method can be easily extended to deal with a polymorphic language. Second, it is efficient: for a simplytyped calculus, it runs in time almost linear in the size of an input expression. Moreover, our transformation is optimal in a certain sense among those that preserve welltypedness, both for the simplytyped language and for an MLstyle polymorphicallytyped language.
Irrelevance, Polymorphism, and Erasure in Type Theory
, 2008
"... Dependent type theory is a proven technology for verified functional programming in which programs and their correctness proofs may be developed using the same rules in a single formal system. In practice, large portions of programs developed in this way have no computational relevance to the ultima ..."
Abstract
 Add to MetaCart
Dependent type theory is a proven technology for verified functional programming in which programs and their correctness proofs may be developed using the same rules in a single formal system. In practice, large portions of programs developed in this way have no computational relevance to the ultimate result of the program and should therefore be removed prior to program execution. In previous work on identifying and removing irrelevant portions of programs, computational irrelevance is usually treated as an intrinsic property of program expressions. We find that such an approach forces programmers to maintain two copies of commonly used datatypes: a computationally relevant one and a computationally irrelevant one. We instead develop an extrinsic notion of computational irrelevance and find that it yields several benefits including (1) avoidance of the above mentioned code duplication problem; (2) an identification of computational irrelevance with a highly general form of parametric polymorphism; and (3) an elective (i.e., user2 directed) notion of proof irrelevance. We also develop a program analysis for identifying irrelevant expressions and show how previously studied types embodying computational irrelevance (including subset types and squash types) are expressible in the extension of type theory developed herein.
uselesscode elimination
, 2001
"... We investigate the use of conjunctive nonstandard type inference for the elimination of useless code in higherorder typed functional programs. In particular, we present a nonstandard type assignment system for detecting useless code together with a mapping that simplifies a program by removing th ..."
Abstract
 Add to MetaCart
We investigate the use of conjunctive nonstandard type inference for the elimination of useless code in higherorder typed functional programs. In particular, we present a nonstandard type assignment system for detecting useless code together with a mapping that simplifies a program by removing the useless code detected using the system. 1.
Automatic uselesscode elimination for HOT . . .
 JOURNAL OF FUNCTIONAL PROGRAMMING
, 2001
"... In this paper we present two type inference systems for detecting uselesscode in higherorder typed functional programs. Type inference can be performed in an efficient and complete way, by reducing it to the solution of a system of constraints. We also give a uselesscode elimination algorithm whi ..."
Abstract
 Add to MetaCart
In this paper we present two type inference systems for detecting uselesscode in higherorder typed functional programs. Type inference can be performed in an efficient and complete way, by reducing it to the solution of a system of constraints. We also give a uselesscode elimination algorithm which is based on a combined use of these type inference systems. The main application of the technique is the optimization of programs extracted from proofs in logical frameworks, but it could be used as well in the elimination of uselesscode determined by program transformations.
Dependence Analysis Through Type Inference
, 1999
"... We introduce a method for dependence analysis in typed functional programming languages. Our approach relies on a type system with simple subtypes for specifying dead code and a type inference algorithm for it. Through a careful seperation of the type system and the problemspecific assumptions we a ..."
Abstract
 Add to MetaCart
We introduce a method for dependence analysis in typed functional programming languages. Our approach relies on a type system with simple subtypes for specifying dead code and a type inference algorithm for it. Through a careful seperation of the type system and the problemspecific assumptions we avoid ad hoc rules in the type system. This, combined with the fact that our approach makes the flow information in a program explicit and is based on wellunderstood concepts makes our approach a good candidate for a general framework for program analysis. Our technique can be used in optimizing compilers, optimization of programs extracted from theorem provers, optimization of modular systems, and software engineering.