Results 1 - 10
of
20
A Supercompiler for Core Haskell
"... Abstract. Haskell is a functional language, with features such as higher order functions and lazy evaluation, which allow succinct programs. These high-level features present many challenges for optimising compilers. We report practical experiments using novel variants of supercompilation, with spec ..."
Abstract
-
Cited by 25 (3 self)
- Add to MetaCart
(Show Context)
Abstract. Haskell is a functional language, with features such as higher order functions and lazy evaluation, which allow succinct programs. These high-level features present many challenges for optimising compilers. We report practical experiments using novel variants of supercompilation, with special attention to let bindings and the generalisation technique. 1
A certified framework for compiling and executing garbage-collected languages
- In ICFP
, 2010
"... We describe the design, implementation, and use of a machinecertified framework for correct compilation and execution of programs in garbage-collected languages. Our framework extends Leroy’s Coq-certified Compcert compiler and Cminor intermediate language. We add: (i) a new intermediate language, G ..."
Abstract
-
Cited by 16 (0 self)
- Add to MetaCart
(Show Context)
We describe the design, implementation, and use of a machinecertified framework for correct compilation and execution of programs in garbage-collected languages. Our framework extends Leroy’s Coq-certified Compcert compiler and Cminor intermediate language. We add: (i) a new intermediate language, GCminor, that includes primitives for allocating memory in a garbage-collected heap and for specifying GC roots; (ii) a precise, low-level specification for a Cminor library for garbage collection; and (iii) a proven semantics-preserving translation from GCminor to Cminor plus the GC library. GCminor neatly encapsulates the interface between mutator and collector code, while remaining simple and flexible enough to be used with a wide variety of source languages and collector styles. Front ends targeting GCminor can be implemented using any compiler technology and any desired degree of verification, including full semantics preservation, type preservation, or informal trust. As an example application of our framework, we describe a compiler for Haskell that translates the Glasgow Haskell Compiler’s Core intermediate language to GCminor. To support a simple but useful memory safety argument for this compiler, the front end uses a novel combination of type preservation and runtime checks, which is of independent interest.
A Usage Analysis With Bounded Usage Polymorphism and Subtyping
- IN PROCEEDINGS OF THE 12TH INTERNATIONAL WORKSHOP ON IMPLEMENTATION OF FUNCTIONAL LANGUAGES, NUMBER AIB-00-7 IN AACHENER INFORMATIK BERICHTE
, 2000
"... Previously proposed usage analyses have proved not to scale up well for large programs. In this paper we present a powerful and accurate type based analysis designed to scale up for large programs. The key features of the type system are usage subtyping and bounded usage polymorphism. Bounded polymo ..."
Abstract
-
Cited by 14 (3 self)
- Add to MetaCart
Previously proposed usage analyses have proved not to scale up well for large programs. In this paper we present a powerful and accurate type based analysis designed to scale up for large programs. The key features of the type system are usage subtyping and bounded usage polymorphism. Bounded polymorphism can lead to huge constraint sets and to express constraints compactly we introduce a new expressive form of constraints which allows constraints to be represented compactly through calls to constraint abstractions.
The architecture of the Utrecht Haskell compiler
- In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell, Haskell ’09
, 2009
"... In this paper we describe the architecture of the Utrecht Haskell Compiler (UHC). UHC is a new Haskell compiler, that supports most (but not all) Haskell 98 features, plus some experimental ex-tensions. It targets multiple backends, including a bytecode inter-preter backend and a whole-program analy ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
(Show Context)
In this paper we describe the architecture of the Utrecht Haskell Compiler (UHC). UHC is a new Haskell compiler, that supports most (but not all) Haskell 98 features, plus some experimental ex-tensions. It targets multiple backends, including a bytecode inter-preter backend and a whole-program analysis backend, both via C. The implementation is rigorously organized as stepwise trans-formations through some explicit intermediate languages. The tree walks of all transformations are expressed as an algebra, with the aid of an Attribute Grammar based preprocessor. The compiler is just one materialization of a framework that supports experimen-tation with language variants, thanks to an aspect-oriented internal organization.
www.cs.uu.nl Abstract Interpretation of Functional Programs using an Attribute Grammar System
, 2007
"... We describe an algorithm for abstract interpretation of an intermediate language in a Haskell compiler, itself also written in Haskell. It computes approximations of possible values for all variables in the program, which can be used for optimizing the object code. The analysis is done by collecting ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
(Show Context)
We describe an algorithm for abstract interpretation of an intermediate language in a Haskell compiler, itself also written in Haskell. It computes approximations of possible values for all variables in the program, which can be used for optimizing the object code. The analysis is done by collecting constraints on variables, which are then solved by fixpoint iteration. The set of constraints grows while solving, as possible values of unknown functions become known. The constraints are collected by decorating the abstract syntax tree with an attribute grammar based preprocessor for Haskell. An introduction to this preprocessor is also given. 1
Heap recycling for lazy languages
- In Proceedings of the 2008 ACM SIGPLAN symposium on Partial
, 2008
"... Abstract Pure functional programming languages preclude destructive updates of heap-allocated data. In such languages, all newly computed algebraic values claim freshly allocated heap space, which typically causes idiomatic programs to be notoriously inefficient when compared to their imperative an ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
(Show Context)
Abstract Pure functional programming languages preclude destructive updates of heap-allocated data. In such languages, all newly computed algebraic values claim freshly allocated heap space, which typically causes idiomatic programs to be notoriously inefficient when compared to their imperative and impure counterparts. We partly overcome this shortcoming by considering a syntactically light language construct for enabling user-controlled in-place updates of algebraic values. The resulting calculus, that is based on a combination of type-based uniqueness and constructor analysis, is guaranteed to maintain referential transparency and is fully compatible with existing run-time systems for nonstrict, pure functional languages.
A Typed Functional Language for Expressing Register Usage
, 1998
"... This paper lays a theoretical ground for exploring a type based approach to register allocation for purely functional languages. We present the compiler intermediate language R , a typed functional language with explicit register usage. The basic idea in our system is to use annotated types to propa ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
(Show Context)
This paper lays a theoretical ground for exploring a type based approach to register allocation for purely functional languages. We present the compiler intermediate language R , a typed functional language with explicit register usage. The basic idea in our system is to use annotated types to propagate information on where, i.e., in which register or stack-slot, a value is or is expected to be. For functions, their types state which registers might be overwritten upon application of the function. The language R , which is a call by value lambda calculus with flavours of assembly language, contains annotations that specify the register and stack behaviour of the machine-code that will be generated for a particular term. The type system uses annotated types and effects to capture estimates and descriptions of the register behaviour of terms. Polymorphism and sub-typing (sub-effecting) allows for very accurate register behaviour descriptions to be made by the types. We state a soundness ...
Losing Functions without Gaining Data – another look at defunctionalisation
"... We describe a transformation which takes a higher-order program, and produces an equivalent first-order program. Unlike Reynoldsstyle defunctionalisation, it does not introduce any new data types, and the results are more amenable to subsequent analysis operations. We can use our method to improve t ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
(Show Context)
We describe a transformation which takes a higher-order program, and produces an equivalent first-order program. Unlike Reynoldsstyle defunctionalisation, it does not introduce any new data types, and the results are more amenable to subsequent analysis operations. We can use our method to improve the results of existing analysis operations, including strictness analysis, pattern-match safety and termination checking. Our transformation is implemented, and works on a Core language to which Haskell programs can be reduced. Our method cannot always succeed in removing all functional values, but in practice is remarkably successful. D.3 [Software]: Program-
N.S.: Supporting separate compilation in a defunctionalizing compiler
- Proceedings of the 2nd Symposium on Languages, Applications and Technologies. OpenAccess Series in Informatics (OASIcs
, 2013
"... Abstract Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation. Our technique allows modules in a Haskell-like language t ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
(Show Context)
Abstract Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation. Our technique allows modules in a Haskell-like language to be separately defunctionalized and compiled, then linked together to generate an executable program. We provide a prototype implementation of our modular defunctionalization technique and we discuss the experiences of its application in a compiler from a large subset of Haskell to low-level C code, based on the intensional transformation.