Results 11  20
of
60
Flexible Type Analysis
 In 1999 ACM International Conference on Functional Programming
, 1999
"... Runtime type dispatch enables a variety of advanced optimization techniques for polymorphic languages, including tagfree garbage collection, unboxed function arguments, and flattened data structures. However, modern typepreserving compilers transform types between stages of compilation, making ty ..."
Abstract

Cited by 76 (20 self)
 Add to MetaCart
Runtime type dispatch enables a variety of advanced optimization techniques for polymorphic languages, including tagfree garbage collection, unboxed function arguments, and flattened data structures. However, modern typepreserving compilers transform types between stages of compilation, making type dispatch prohibitively complex at low levels of typed compilation. It is crucial therefore for type analysis at these low levels to refer to the types of previous stages. Unfortunately, no current intermediate language supports this facility. To fill this gap, we present the language LX, which provides a rich language of type constructors supporting type analysis (possibly of previousstage types) as a programming idiom. This language is quite flexible, supporting a variety of other applications such as analysis of quantified types, analysis with incomplete type information, and type classes. We also show that LX is compatible with a typeerasure semantics. 1 Introduction Typedirected co...
Composing Monads
, 1993
"... Monads are becoming an increasingly important tool for functional programming. Different monads can be used to model a wide range of programming language features. However, real programs typically require a combination of different features, so it is important to have techniques for combining severa ..."
Abstract

Cited by 68 (4 self)
 Add to MetaCart
Monads are becoming an increasingly important tool for functional programming. Different monads can be used to model a wide range of programming language features. However, real programs typically require a combination of different features, so it is important to have techniques for combining several features in a single monad. In practice, it is usually possible to construct a monad that supports some specific combination of features. However, the techniques used are typically adhoc and it is very difficult to find general techniques for combining arbitrary monads. This report gives three general constructions for the composition of monads, each of which depends on the existence of an auxiliary function linking the monad structures of the components. In each case, we establish a set of laws that the auxiliary function must satisfy to ensure that the composition is itself a monad. Using the notation of constructor classes, we describe some specific applications of these constructions. These results are used in the development of a simple expression evaluator that combines exceptions, output and an environment of variable bindings using a composition of three corresponding monads. 1
Towards Better Inlining Decisions Using Inlining Trials
 In Proceedings of the 1994 ACM Conference on LISP and Functional Programming
, 1994
"... Inlining trials are a general mechanism for making better automatic decisions about whether a routine is profitable to inline. Unlike standard sourcelevel inlining heuristics, an inlining trial captures the effects of optimizations applied to the body of the inlined routine when calculating the cos ..."
Abstract

Cited by 57 (6 self)
 Add to MetaCart
Inlining trials are a general mechanism for making better automatic decisions about whether a routine is profitable to inline. Unlike standard sourcelevel inlining heuristics, an inlining trial captures the effects of optimizations applied to the body of the inlined routine when calculating the costs and benefits of inlining. The results of inlining trials are stored in a persistent database to be reused when making future inlining decisions at similar call sites. Type group analysis can determine the amount of available static information exploited during compilation, and the results of analyzing the compilation of an inlined routine help decide when a future call site would lead to substantially the same generated code as a given inlining trial. We have implemented inlining trials and type group analysis in an optimizing compiler for SELF, and by making wiser inlining decisions we were able to cut compilation time and compiled code space with virtually no loss of execution speed. We...
Semantics of Types for Mutable State
, 2004
"... Proofcarrying code (PCC) is a framework for mechanically verifying the safety of machine language programs. A program that is successfully verified by a PCC system is guaranteed to be safe to execute, but this safety guarantee is contingent upon the correctness of various trusted components. For in ..."
Abstract

Cited by 55 (5 self)
 Add to MetaCart
Proofcarrying code (PCC) is a framework for mechanically verifying the safety of machine language programs. A program that is successfully verified by a PCC system is guaranteed to be safe to execute, but this safety guarantee is contingent upon the correctness of various trusted components. For instance, in traditional PCC systems the trusted computing base includes a large set of lowlevel typing rules. Foundational PCC systems seek to minimize the size of the trusted computing base. In particular, they eliminate the need to trust complex, lowlevel type systems by providing machinecheckable proofs of type soundness for real machine languages. In this thesis, I demonstrate the use of logical relations for proving the soundness of type systems for mutable state. Specifically, I focus on type systems that ensure the safe allocation, update, and reuse of memory. For each type in the language, I define logical relations that explain the meaning of the type in terms of the operational semantics of the language. Using this model of types, I prove each typing rule as a lemma. The major contribution is a model of System F with general references — that is, mutable cells that can hold values of any closed type including other references, functions, recursive types, and impredicative quantified types. The model is based on ideas from both possible worlds and the indexed model of Appel and McAllester. I show how the model of mutable references is encoded in higherorder logic. I also show how to construct an indexed possibleworlds model for a von Neumann machine. The latter is used in the Princeton Foundational PCC system to prove type safety for a fullfledged lowlevel typed assembly language. Finally, I present a semantic model for a region calculus that supports typeinvariant references as well as memory reuse. iii
The Cecil language  specification and rationale: Version 3.2
, 2004
"... Cecil is a purely objectoriented language intended to support rapid construction of highquality, extensible software. Cecil combines multimethods with a simple classless object model, a kind of dynamic inheritance, modules, and optional static type checking. Instance variables in Cecil are access ..."
Abstract

Cited by 53 (4 self)
 Add to MetaCart
Cecil is a purely objectoriented language intended to support rapid construction of highquality, extensible software. Cecil combines multimethods with a simple classless object model, a kind of dynamic inheritance, modules, and optional static type checking. Instance variables in Cecil are accessed solely through messages, allowing instance variables to be replaced or overridden by methods and vice versa. Cecil’s predicate objects mechanism allows an object to be classified automatically based on its runtime (mutable) state. Cecil’s static type system distinguishes between subtyping and code inheritance, but Cecil enables these two graphs to be described with a single set of declarations, streamlining the common case where the two graphs are parallel. Cecil includes a fairly flexible form of parameterization, including explicitly parameterized objects, types, and methods, as well as implicitly parameterized methods related to the polymorphic functions commonly found in functional languages. By making type declarations optional, Cecil aims to allow mixing of and migration between exploratory and production programming styles. Cecil supports a module mechanism that enables independentlydeveloped subsystems to be encapsulated, allowing them to be typechecked and reasoned about in isolation despite the presence of multimethods and subclassing. Objects can be extended externally with additional
Curry: A Truly Functional Logic Language
, 1995
"... Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. However, integrated functional logic languages are currently not widely used. This is due to the fact that the operational principles are not w ..."
Abstract

Cited by 53 (5 self)
 Add to MetaCart
Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. However, integrated functional logic languages are currently not widely used. This is due to the fact that the operational principles are not well understood and many different evaluation strategies have been proposed which resulted in many different functional logic languages. To overcome this situation, we propose the functional logic language Curry which can deal as a standard language in this area. It includes important ideas of existing functional logic languages and recent developments, and combines the most important features of functional and logic languages. Thus, Curry can be the basis to combine the currently separated research efforts of the functional and logic programming communities and to boost declarative programming in general. Moreover, since functions provide for more efficient evaluation strategies and ...
A Coinduction Principle for Recursively Defined Domains
 THEORETICAL COMPUTER SCIENCE
, 1992
"... This paper establishes a new property of predomains recursively defined using the cartesian product, disjoint union, partial function space and convex powerdomain constructors. We prove that the partial order on such a recursive predomain D is the greatest fixed point of a certain monotone operator ..."
Abstract

Cited by 40 (3 self)
 Add to MetaCart
This paper establishes a new property of predomains recursively defined using the cartesian product, disjoint union, partial function space and convex powerdomain constructors. We prove that the partial order on such a recursive predomain D is the greatest fixed point of a certain monotone operator associated to D. This provides a structurally defined family of proof principles for these recursive predomains: to show that one element of D approximates another, it suffices to find a binary relation containing the two elements that is a postfixed point for the associated monotone operator. The statement of the proof principles is independent of any of the various methods available for explicit construction of recursive predomains. Following Milner and Tofte [10], the method of proof is called coinduction. It closely resembles the way bisimulations are used in concurrent process calculi [9]. Two specific instances of the coinduction principle already occur in work of Abramsky [2, 1] in the form of `internal full abstraction' theorems for denotational semantics of SCCS and the lazy lambda calculus. In the first case postfixed binary relations are precisely Abramsky's partial bisimulations, whereas in the second case they are his applicative bisimulations. The coinduction principle also provides an apparently useful tool for reasoning about equality of elements of recursively defined datatypes in (strict or lazy) higher order functional programming languages.
Dictionaryfree Overloading by Partial Evaluation
"... One of the most novel features in the functional programming language Haskell is the system of type classes used to support a combination of overloading and polymorphism. Current implementations of type class overloading are based on the use of dictionary values, passed as extra parameters to overlo ..."
Abstract

Cited by 35 (1 self)
 Add to MetaCart
One of the most novel features in the functional programming language Haskell is the system of type classes used to support a combination of overloading and polymorphism. Current implementations of type class overloading are based on the use of dictionary values, passed as extra parameters to overloaded functions. Unfortunately, this can have a significant effect on runtime performance, for example, by reducing the effectiveness of important program analyses and optimizations. This paper describes how a simple partial evaluator can be used to avoid the need for dictionary values at runtime by generating specialized versions of overloaded functions. This eliminates the runtime costs of overloading. Furthermore, and somewhat surprisingly given the presence of multiple versions of some functions, for all of the examples that we have tried so far, specialization actually leads to a reduction in the size of compiled programs.
Ordersorted polymorphism in isabelle
 Logical Environments
, 1993
"... MLstyle polymorphism can be generalized from a singlesorted algebra of types to an ordersorted one by adding a partially ordered layer of “sorts ” on top of the types. Type inference proceeds as in the Hindley/Milner system, except that ordersorted unification of types is used. The resulting sys ..."
Abstract

Cited by 33 (2 self)
 Add to MetaCart
MLstyle polymorphism can be generalized from a singlesorted algebra of types to an ordersorted one by adding a partially ordered layer of “sorts ” on top of the types. Type inference proceeds as in the Hindley/Milner system, except that ordersorted unification of types is used. The resulting system has been implemented in Isabelle to permit type variables to range over userdefinable subsets of all types. Ordersorted polymorphism allows a simple specification of type restrictions in many logical systems. It accommodates userdefined parametric overloading and allows for a limited form of abstract axiomatic reasoning. It can also explain type inference with Standard ML’s equality types and Haskell’s type classes. 1
Semantic Essence of AsmL
, 2004
"... The Abstract State Machine Language, AsmL, is a novel executable specification language based on the theory of Abstract State Machines. AsmL is objectoriented, provides highlevel mathematical datastructures, and is built around the notion of synchronous updates and finite choice. AsmL is full ..."
Abstract

Cited by 33 (5 self)
 Add to MetaCart
The Abstract State Machine Language, AsmL, is a novel executable specification language based on the theory of Abstract State Machines. AsmL is objectoriented, provides highlevel mathematical datastructures, and is built around the notion of synchronous updates and finite choice. AsmL is fully integrated into the .NET framework and Microsoft development tools. In this paper, we explain the design rationale of AsmL and provide static and dynamic semantics for a kernel of the language.