Results 1 -
7 of
7
Monadic Regions
- UNDER CONSIDERATION FOR PUBLICATION IN J. FUNCTIONAL PROGRAMMING
"... Region-based type systems provide programmer control over memory management without sacrificing type-safety. However, the type systems for region-based languages, such as the ML-Kit or Cyclone, are relatively complicated, and proving their soundness is nontrivial. This paper shows that the complicat ..."
Abstract
-
Cited by 23 (1 self)
- Add to MetaCart
Region-based type systems provide programmer control over memory management without sacrificing type-safety. However, the type systems for region-based languages, such as the ML-Kit or Cyclone, are relatively complicated, and proving their soundness is nontrivial. This paper shows that the complication is in principle unnecessary. In particular, we show that plain old parametric polymorphism, as found in Haskell, is all that is needed. We substantiate this claim by giving a type- and meaning-preserving translation from a variation of the region calculus of Tofte and Talpin to a monadic variant of System F with region primitives whose types and operations are inspired by (and generalize) the ST monad of Launchbury and Peyton Jones.
Monadic and Substructural Type Systems for Region-Based Memory Management
- Cornell University
, 2007
"... Region-based memory management is a scheme for managing dynamically allocated data. A defining characteristic of region-based memory management is the bulk deallocation of data, which avoids both the tedium of malloc/free and the overheads of a garbage collector. Type systems for region-based memory ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
(Show Context)
Region-based memory management is a scheme for managing dynamically allocated data. A defining characteristic of region-based memory management is the bulk deallocation of data, which avoids both the tedium of malloc/free and the overheads of a garbage collector. Type systems for region-based memory manag-ment enhance the utility of this scheme by statically determining when a program is guaranteed to not perform any erroneous region operations. We describe three type systems for region-based memory management: • a type-and-effect system (à la the Tofte-Talpin region calculus); • a novel monadic type system; • a novel substructural type system. We demonstrate how to successively encode the type-and-effect system into the monadic type system and the monadic type system into the substructural type system. These type systems and encodings support the argument that the type-and-effect systems that have traditionally been used to ensure the safety of region-based memory management are neither the simplest nor the most expressive type
A functional programming technique for forms in graphical user interfaces
- IFL 2004
, 2005
"... This paper presents FunctionalForms, a combinator library for constructing fully functioning forms in a concise and flexible way. A form is a part of a graphical user interface (GUI) restricted to displaying a value and allowing the user to modify it. The library is built on top of the medium-level ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
(Show Context)
This paper presents FunctionalForms, a combinator library for constructing fully functioning forms in a concise and flexible way. A form is a part of a graphical user interface (GUI) restricted to displaying a value and allowing the user to modify it. The library is built on top of the medium-level GUI library wxHaskell. To obtain complete separation between the structure of a form’s layout and that of the edited values, we introduce a novel use of compositional functional references.
Chapter 1 Disjoint Forms in Graphical User Interfaces
"... Abstract: Forms are parts of a graphical user interface (GUI) that show a (structured) value and allow the user to update it. Some forms express a choice between two or more (structured) values using radio buttons or check boxes. We show that explicitly modelling such a choice leads to a cleaner sep ..."
Abstract
- Add to MetaCart
(Show Context)
Abstract: Forms are parts of a graphical user interface (GUI) that show a (structured) value and allow the user to update it. Some forms express a choice between two or more (structured) values using radio buttons or check boxes. We show that explicitly modelling such a choice leads to a cleaner separation of logic and layout. This is done by extending the combinator library FunctionalForms with disjoint form combinators. To implement these, we have generalized the technique of compositional functional references which underlies the library. 1.1
Simplification of Subtyping Constraints and Its Application for Monadic Programming
, 1997
"... We discuss type inference for a language which supports both polymorphic records (variants) and implicit subtyping --- useful features for object-oriented programming. We extend subtyping relation to type constructor variables. We show that such extension is especially useful for typing monadic-styl ..."
Abstract
- Add to MetaCart
(Show Context)
We discuss type inference for a language which supports both polymorphic records (variants) and implicit subtyping --- useful features for object-oriented programming. We extend subtyping relation to type constructor variables. We show that such extension is especially useful for typing monadic-style functional programs, that is, imperative-style programs written in a purely functional language such as Haskell. It gives reasonably simple types to monadic (imperative) programs and is, in a sense, similar to the effect system. We use the notion of constrained types. The point is to separate matching constraints and subtyping constraints in order to avoid the difficulties caused by recursive type constraints. We will focus on simplification of such mixed constraints. 1 Introduction Monadic style is now becoming more and more popular in purely functional programming community. It uses two fundamental operators overloaded using a constructor class of Haskell [3]: class Monad m where retu...
Concurrent and Distributed Functional Systems
- DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF BRISTOL
, 1999
"... This thesis presents the Brisk Machine [54], a machine for executing functional languages, designed to be simple and flexible to support a number of run-time execution models for the Brisk compiler. Design considerations have been made to support dynamic loading, deterministic concurrency [23,51], d ..."
Abstract
- Add to MetaCart
This thesis presents the Brisk Machine [54], a machine for executing functional languages, designed to be simple and flexible to support a number of run-time execution models for the Brisk compiler. Design considerations have been made to support dynamic loading, deterministic concurrency [23,51], distribution, debugging tools and logic programming [76]. To achieve this, the compiler's intermediate language, the Brisk Kernel Language BKL is simpler than the STG language [100], as evaluation, extension and optimisation issues are relegated to special built-in functions. Moreover, function calls are saturated, as any function has an known arity and in every call to it, is applied to the rightnumber of arguments, which makes the machine dynamic and supports dynamic loading. To incorporate