Automatic useless-code elimination for HOT functional programs
نویسندگان
چکیده
In this paper we present two type inference systems for detecting useless-code in higher-order 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 useless-code 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 useless-code determined by program transformations.
منابع مشابه
Implementation of Constraint Systems for Useless Variable Elimination
Superfluous variables are often produced as the byproducts of program transformations, compilation, and poorly written code. These variables are irrelevant to the computational outcome of their programs. Eliminating them as a means of higherlevel optimization may increase program execution speed. This paper explores an implementation of Wand and Siveroni’s algorithm for useless variable elimina...
متن کاملUseless-Code Elimination and Program Slicing for the Pi-Calculus
In this paper, we study program transformations called uselesscode elimination and program slicing in the context of the π-calculus. The aim of useless-code elimination and program slicing is to simplify a program by eliminating useless or unimportant part of the program. We define formal correctness criteria for those transformations, present a type-based transformation method, and prove its c...
متن کاملUseless Code Elimination and Programm Slicing for the Pi-Calculus
In this paper, we study program transformations called uselesscode elimination and program slicing in the context of the π-calculus. The aim of useless-code elimination and program slicing is to simplify a program by eliminating useless or unimportant part of the program. We define formal correctness criteria for those transformations, present a type-based transformation method, and prove its c...
متن کاملPartial Redundancy Elimination on Predicated Code
Partial redundancy elimination (PRE) is one of the most widespread optimizations in compilers. However, current PRE-techniques are inadequate to handle predicated code, i.e., programs where instructions are guarded by a 1-bit register that dynamically controls whether the effect of instruction should be committed or nullified. In fact, to exclude corrupting the semantics they must be overly con...
متن کاملCompiler Validation by Program Analysis of the Cross-Product
The paper presents a deductive framework for proving program equivalence and its application to automatic verification of transformations performed by optimizing compilers. To leverage existing program analysis techniques, we reduce the equivalence checking problem to analysis of one system a cross-product of the two input programs. We show how the approach can be effectively used for checking ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Funct. Program.
دوره 10 شماره
صفحات -
تاریخ انتشار 2000