Results 11  20
of
23
Detecting and removing dead code using rank 2 intersection
 IN INTERNATIONAL WORKSHOP:"TYPES'96", 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 is the ..."
Abstract

Cited by 5 (4 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.
Reflections on Reflections
, 1997
"... In the functional programming literature, compiling is often expressed as a translation between source and target program calculi. In recent work, Sabry and Wadler proposed the notion of a reflection as a basis for relating the source and target calculi. A reflection elegantly describes the situati ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
In the functional programming literature, compiling is often expressed as a translation between source and target program calculi. In recent work, Sabry and Wadler proposed the notion of a reflection as a basis for relating the source and target calculi. A reflection elegantly describes the situation where there is a kernel of the source language that is isomorphic to the target language. However, we believe that the reflection criteria is so strong that it often excludes the usual situation in compiling where one is compiling from a higherlevel to a lowerlevel language. We give a detailed analysis of several translations commonly used in compiling that fail to be reflections. We conclude that, in addition to the notion of reflection, there are several relations weaker a reflection that are useful for characterizing translations. We show that several familiar translations (that are not naturally reflections) form what we call a reduction correspondence. We introduce the more genera...
A Computational Formalization for Partial Evaluation (Extended Version)
, 1996
"... We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluationorder independent view of bindingtime analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "controlba ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluationorder independent view of bindingtime analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "controlbased bindingtime improvements" for let expressions. Specifically,
The TkInter homepage. http://www.python.org/topics/tkinter
 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

Cited by 2 (1 self)
 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. Capsule Review Dead code is a subterm M of a term t = C[M] which does not matter to computation, that is, which may be replaced by any other term of the same type without altering the observational behaviour of the program: C[M] =obs C[N] for any N with the type of M. Deadcode may be replaced by dummy variable, or even completely removed, in order to optimize a program. The interest in deadcode by the authors started as a byproduct of a proof system which generated programs meeting a specification out of proofs that the specification is satisfiable.
Semantic Predicate Types and Approximation for Classbased Object Oriented Programming
"... Abstract. We define a small functional calculus that expresses classbased object oriented features and is modelled on the similar calculi of Featherweight Java [34] and Middleweight Java [15], which are ultimately based upon the Java programming language. We define a predicate system, similar to th ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
Abstract. We define a small functional calculus that expresses classbased object oriented features and is modelled on the similar calculi of Featherweight Java [34] and Middleweight Java [15], which are ultimately based upon the Java programming language. We define a predicate system, similar to the one defined in [10], and show subject reduction and expansion, and argue that program analysis systems can be built on top of this system. Generalising the concept of approximant from the Lambda Calculus, we show that all expressions that we can assign a predicate to have an approximant that satisfies the same predicate. From this, a characterisation of (head)normalisation follows. 1
Foundations for Partial Evaluation of Functional Programs with Computational Effects
 ACM Computing Surveys
, 1998
"... ing with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works, requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept, ACM Inc., 1515 Broadway, New York, N ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
ing with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works, requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept, ACM Inc., 1515 Broadway, New York, NY 10036 USA, fax +1 (212) 8690481, or permissions@acm.org. 2 \Delta J. Hatcliff e 2 Terms[ ml ] e ::= x j pnq j tick j x : e j @ e0 e1 j unit e j let x ( e1 in e2 2 Types[ ml ] ::= nat j 1 ! e 2 j e \Gamma 2 Assumptions[ ml ] \Gamma ::= \Delta j \Gamma; x : \Gamma ` ml x : \Gamma(x) \Gamma ` ml pnq : nat \Gamma ` ml tick : f nat \Gamma; x : 1 ` ml e : e 2 \Gamma ` ml x : e : 1 ! e 2 \Gamma ` ml e0 : 1 ! e 2 \Gamma ` ml e1 : 1 \Gamma ` ml @ e0 e1 : e 2 monadic constructs: \Gamma ` ml e : \Gamma ` ml unit e : e \Gamma ` ml e 1 : e 1 \Gamma; x : 1 ` ml e 2 : e 2 \Gamma ` ml let x ( e1 in e2 : e 2 Fig. 1. The computational metalanguage ml input/output, and robust...
Type Theory and Projections for Static Analysis
, 1995
"... A system of annotated types is proposed as a means of describing and inferring static information, such as strictness and constancy, about functional programs. An abstract semantics is given in terms of projections. A close connection between annotated type assignment and projection analysis is demo ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
A system of annotated types is proposed as a means of describing and inferring static information, such as strictness and constancy, about functional programs. An abstract semantics is given in terms of projections. A close connection between annotated type assignment and projection analysis is demonstrated.
Contents
, 2005
"... A summary of the motivation and theory behind abstract interpretation, including the accumulating semantics, Galois connections and widening. A complete demonstration of the use of abstract interpretation to define a safe and optimal sign analysis in the context of a simple imperative language is pr ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
A summary of the motivation and theory behind abstract interpretation, including the accumulating semantics, Galois connections and widening. A complete demonstration of the use of abstract interpretation to define a safe and optimal sign analysis in the context of a simple imperative language is presented. In addition, a example of widening is described to improve the termination properties of an interval analysis of the same language. Keywords: • Semantics • Program analysis
Foundations for Partial Evaluation of Functional Languages with Computational Effects
"... Research on partial evaluation has flourished in the context of pure functional languages, yet modern functional languages include many notions of computation that partial evaluation technology has only recently been able to handle. We summarize how using Moggi's computational metalanguage as inter ..."
Abstract
 Add to MetaCart
Research on partial evaluation has flourished in the context of pure functional languages, yet modern functional languages include many notions of computation that partial evaluation technology has only recently been able to handle. We summarize how using Moggi's computational metalanguage as intermediate language provides a foundation for this recent advance in technology. 1 Partial Evaluation of Programs with Computational Effects Partial evaluation is a highly useful program specialization technique that can be applied to programs from any language paradigm. Yet, it is in the paradigm of pure functional languages that partial evaluation technology grew to maturity. The simple semantics of pure functional programs (which do not include computational effects such as state modification, input/output, and firstclass exceptions) makes it easier to perform the basic actions of partial evaluation such as static analysis, function unfolding (inlining), and symbolic execution. Clearly, t...
A Framework for the Analysis of Syntactic Replacement Restrictions
, 1999
"... We formalize the notion of syntactic replacement restriction, which is useful for modeling reductionbased systems which compute with terms and impose restrictions on the possible computations (typically by means of strategies). We emphasize the syntactic flavour of our approach: the restrictions a ..."
Abstract
 Add to MetaCart
We formalize the notion of syntactic replacement restriction, which is useful for modeling reductionbased systems which compute with terms and impose restrictions on the possible computations (typically by means of strategies). We emphasize the syntactic flavour of our approach: the restrictions are associated to components of terms and (in principle) they do not depend on either a particular Term Rewriting System or a computational mechanism (like rewriting, narrowing, residuation, etc.). The replacement restrictions can be used to improve the computational behavior of the unrestricted mechanism. We give a general descriptive and algebraic framework to deal with replacement restrictions. For the descriptive part, we introduce and motivate properties which characterize classes of replacement restrictions. For the algebraic side, the set of replacement restrictions is presented as a complete Boolean algebra. The algebraic operations (and others which we also define) can be used to com...