Results 1  10
of
17
Parametricity and Local Variables
, 1995
"... We propose that the phenomenon of local state may be understood in terms of Strachey 's concept of parametric (i.e., uniform) polymorphism. The intuitive basis for our proposal is the following analogy: a nonlocal procedure is independent of locallydeclared variables in the same way that a pa ..."
Abstract

Cited by 102 (6 self)
 Add to MetaCart
We propose that the phenomenon of local state may be understood in terms of Strachey 's concept of parametric (i.e., uniform) polymorphism. The intuitive basis for our proposal is the following analogy: a nonlocal procedure is independent of locallydeclared variables in the same way that a parametrically polymorphic function is independent of types to which it is instantiated. A connection between parametricity and representational abstraction was first suggested by J. C. Reynolds. Reynolds used logical relations to formalize this connection in languages with type variables and userdefined types. We use relational parametricity to construct a model for an Algollike language in which interactions between local and nonlocal entities satisfy certain relational criteria. Reasoning about local variables essentially involves proving properties of polymorphic functions. The new model supports straightforward validations of all the test equivalences that have been proposed in the literatu...
Types, Abstraction, and Parametric Polymorphism, Part 2
, 1991
"... The concept of relations over sets is generalized to relations over an arbitrary category, and used to investigate the abstraction (or logicalrelations) theorem, the identity extension lemma, and parametric polymorphism, for Cartesianclosedcategory models of the simply typed lambda calculus and P ..."
Abstract

Cited by 53 (1 self)
 Add to MetaCart
The concept of relations over sets is generalized to relations over an arbitrary category, and used to investigate the abstraction (or logicalrelations) theorem, the identity extension lemma, and parametric polymorphism, for Cartesianclosedcategory models of the simply typed lambda calculus and PLcategory models of the polymorphic typed lambda calculus. Treatments of Kripke relations and of complete relations on domains are included.
Binding Time Analysis: A New PERspective
 In Proceedings of the ACM Symposium on Partial Evaluation and SemanticsBased Program Manipulation (PEPM'91
, 1991
"... Given a description of the parameters in a program that will be known at partial evaluation time, a binding time analysis must determine which parts of the program are dependent solely on these known parts (and therefore also known at partial evaluation time). In this paper a binding time analysis f ..."
Abstract

Cited by 34 (6 self)
 Add to MetaCart
Given a description of the parameters in a program that will be known at partial evaluation time, a binding time analysis must determine which parts of the program are dependent solely on these known parts (and therefore also known at partial evaluation time). In this paper a binding time analysis for the simply typed lambda calculus is presented. The analysis takes the form of an abstract interpretation and uses a novel formalisation of the problem of binding time analysis, based on the use of partial equivalence relations. A simple proof of correctness is achieved by the use of logical relations. 1 Introduction Given a description of the parameters in a program that will be known at partial evaluation time, a binding time analysis must determine which parts of the program are dependent solely on these known parts (and therefore also known at partial evaluation time). A binding time analysis performed prior to the partial evaluation process can have several practical benefits (see [...
Abstract Interpretation of Functional Languages: From Theory to Practice
, 1991
"... Abstract interpretation is the name applied to a number of techniques for reasoning about programs by evaluating them over nonstandard domains whose elements denote properties over the standard domains. This thesis is concerned with higherorder functional languages and abstract interpretations with ..."
Abstract

Cited by 25 (0 self)
 Add to MetaCart
Abstract interpretation is the name applied to a number of techniques for reasoning about programs by evaluating them over nonstandard domains whose elements denote properties over the standard domains. This thesis is concerned with higherorder functional languages and abstract interpretations with a formal semantic basis. It is known how abstract interpretation for the simply typed lambda calculus can be formalised by using binary logical relations. This has the advantage of making correctness and other semantic concerns straightforward to reason about. Its main disadvantage is that it enforces the identification of properties as sets. This thesis shows how the known formalism can be generalised by the use of ternary logical relations, and in particular how this allows abstract values to deno...
Notes on Sconing and Relators
, 1993
"... This paper describes a semantics of typed lambda calculi based on relations. The main mathematical tool is a categorytheoretic method of sconing, also called glueing or Freyd covers. Its correspondence to logical relations is also examined. 1 Introduction Many modern programming languages feature ..."
Abstract

Cited by 24 (0 self)
 Add to MetaCart
This paper describes a semantics of typed lambda calculi based on relations. The main mathematical tool is a categorytheoretic method of sconing, also called glueing or Freyd covers. Its correspondence to logical relations is also examined. 1 Introduction Many modern programming languages feature rather sophisticated typing mechanisms. In particular, languages such as ML include polymorphic data types, which allow considerable programming flexibility. Several notions of polymorphism were introduced into computer science by Strachey [Str67], among them the important notion of parametric polymorphism. Strachey's intuitive definition is that a polymorphic function is parametric if it has a uniformly given algorithm in all types, that is, if the function's behavior is independent of the type at which the function is instantiated. Reynolds [Rey83] proposed a mathematical definition of parametric polymorphic functions by means of invariance with respect to certain relations induced by typ...
Reflexive Graphs and Parametric Polymorphism
, 1993
"... this paper is to understand why that is a parametric categorical model. In [10] Ma and Reynolds propose a parametricity hypothesis for a functor between categorical models of polymorphism which essentially requires that there is an extension of (a certain form of) an identity relation functor which ..."
Abstract

Cited by 18 (0 self)
 Add to MetaCart
this paper is to understand why that is a parametric categorical model. In [10] Ma and Reynolds propose a parametricity hypothesis for a functor between categorical models of polymorphism which essentially requires that there is an extension of (a certain form of) an identity relation functor which preserve the model structure. There is no mention in the paper of any case when the parametricity hypothesis is satified, nor if there is a canonical completion of a category to one which satisfies the hypothesis. We shall suggest how the construction of a PLcategory of relations on a given category presented in [10] can be viewed as a "parametric completion". We shall also follow the suggestion of Ma in [9] that subtyping is a kind of parametricity requirement and show how to fit subtyping in the same setup. The basic idea is to use reflexive graphs of categories as in [12]. We shall employ their construction to present a kind of parametric completion of a given category. We also give a different presentation of the RELconstruction in [10], and use it to discuss some examples. We show in particular that the RELconstruction acts (essentially) in the same way on a category and on its completion. Hence it follows that the identity functor on the completion satisfies the parametricity hypothesis. Discussions with Eugenio Moggi, Peter O'Hearn, Edmund Robinson, and Thomas Streicher were very useful. Paul Taylor's beutiful diagram macros were used for typesetting all the diagrams in the text. 1 Graphs of categories
Strictness logic and polymorphic invariance
 In Proc. Logical Found. Comp. Sci
, 1992
"... We describe a logic for reasoning about higherorder strictness properties of typed lambda terms. The logic arises from axiomatising the inclusion order on certain closed subsets of domains. The axiomatisation of the lattice of strictness properties is shown to be sound and complete, and we then giv ..."
Abstract

Cited by 16 (2 self)
 Add to MetaCart
We describe a logic for reasoning about higherorder strictness properties of typed lambda terms. The logic arises from axiomatising the inclusion order on certain closed subsets of domains. The axiomatisation of the lattice of strictness properties is shown to be sound and complete, and we then give a program logic for assigning properties to terms. This places work on strictness analysis via type inference on a firm theoretical foundation. We then use proof theoretic techniques to show how the derivable strictness properties of different instances of polymorphically typed terms are related. 1
Polymorphic Strictness Analysis Using Frontiers
 Proceedings of the 1993 ACM on Partial Evaluation and SemanticsBased Program Manipulation (PEPM '93), ACM
, 1992
"... This paper shows how to implement sensible polymorphic strictness analysis using the Frontiers algorithm. A central notion is to only ever analyse each function once, at its simplest polymorphic instance. Subsequent nonbase uses of functions are dealt with by generalising their simplest instance an ..."
Abstract

Cited by 8 (0 self)
 Add to MetaCart
This paper shows how to implement sensible polymorphic strictness analysis using the Frontiers algorithm. A central notion is to only ever analyse each function once, at its simplest polymorphic instance. Subsequent nonbase uses of functions are dealt with by generalising their simplest instance analyses. This generalisation is done using an algorithm developed by Baraki, based on embeddingclosure pairs. Compared with an alternative approach of expanding the program out into a collection of monomorphic instances, this technique is hundreds of times faster for realistic programs. There are some approximations involved, but these do not seem to have a detrimental effect on the overall result. The overall effect of this technology is to considerably expand the range of programs for which the Frontiers algorithm gives useful results reasonably quickly. 1 Introduction The Frontiers algorithm was introduced in [CP85 ] as an allegedly efficient way of doing forwards strictness analysis, al...
A Logical Framework for Program Analysis
 Proceedings of the 1992 Glasgow Functional Programming Workshop
, 1992
"... Using logics to express program properties, and deduction systems for proving properties of programs, gives a very elegant way of defining program analysis techniques. This paper addresses a shortcoming of previous work in the area by establishing a more general framework for such logics, as is comm ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
Using logics to express program properties, and deduction systems for proving properties of programs, gives a very elegant way of defining program analysis techniques. This paper addresses a shortcoming of previous work in the area by establishing a more general framework for such logics, as is commonly done for progam analysis using abstract interpretation. Moreover, there are natural extensions of this work which deal with polymorphic languages. 1 Introduction Kuo and Mishra gave a `type' deduction system for proving strictness properties of programs, and gave a type inference (sometimes called type reconstruction) algorithm for determining these strictness types [10]. The algorithm was proved correct by showing that the types deduced by it were true in an operational model of the language. They observed that their algorithm was not as powerful as one based on the strictness abstract interpretation of [4], and it appeared to be because their type system lacked intersection types. Bo...
Parametricity as Subtyping
, 1992
"... A polymorphic function is parametric if it has uniform behavior for all type parameters. This property is useful when writing, reasoning about, and compiling functional programs. We show how to syntactically define and reason about parametricity in a language with intersection types and bounded poly ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
A polymorphic function is parametric if it has uniform behavior for all type parameters. This property is useful when writing, reasoning about, and compiling functional programs. We show how to syntactically define and reason about parametricity in a language with intersection types and bounded polymorphism. Within this framework, parametricity is subtyping, and reasoning about parametricity becomes reasoning about the welltypedness of terms. This work also demonstrates the expressiveness of languages that combine intersection types and bounded polymorphism. 1 Introduction A polymorphic function is parametric if it uses the same algorithm regardless of which type parameter is instantiated. As a consequence, it has a uniform behavior over all type parameters, in the sense that for any related inputs, the function produces related outputs. Let us look at an example. Consider the polymorphic "doubling" function double = ø : f ø!ø : x ø : f (fx) : 8ø: (ø!ø )!(ø!ø ) : By passing int and...