(April 18, 2008; Carnegie Mellon University POP Seminar)
20080418-Manticore-CMU.pdf
The Manticore project is an effort to design and implement a new
functional language for parallel programming. Unlike some earlier
parallel languages, Manticore is a heterogeneous language that
supports parallelism at multiple levels. Specifically, we combine
CML-style explicit concurrency with NESL/Nepal-style data-parallelism,
along with a number of other implicitly-parallel programming
constructs inspired by common functional progrmming idioms.
In this talk, I'll describe and motivate the high-points in the design
of the Manticore language, as well as outline some challenges in its
implementation. I'll present a flexible runtime model that supports
multiple scheduling disciplines (e.g., for both fine-grain and
course-grain parallelism) in a uniform framework. Finally, I'll
describe some future research directions, aiming to combine static and
dyanmic information for the implementation and optimization of
parallel constructs.
Type-systems for Region-based Memory Management
(Nov. 30, 2005; Northeastern University Programming Languages Seminar)
20051130-NortheasternPL.ppt
Region-based memory management offers a healthy compromise in tuning a
program's memory usage; by reclaiming groups of related objects
wholesale, region-based languages may avoid both the inefficiency of
garbage collectors and the tedium of malloc/free. Type systems for
region-based languages further enhance their utility by statically
catching (possibly) erroneous use of the region primitives. In this
talk, we'll look at three "flavors" of type systems for region-based
languages:
- a type-and-effect system (a la Tofte-Talpin)
- a monadic type system
- a sub-structural type system
Our goal is to demonstrate that we may successively encode the
type-and-effect system into the monadic type system and monadic type
system into the sub-structural type system.
The essence of the first encoding is to translate effects to an
indexed monad, inspired by (and generalizing) the ST monad of
Launchbury and Peyton Jones. The upshot of this translation is that
we are able to trade the subtleties of an effect system for the
simplicity of a monadic system, where plain old parametric
polymorphism (a la System F) provides sufficient encapsulation.
However, both the type-and-effect system and the monadic type system
rquire that regions have last-in-first-out (LIFO) lifetimes following
the block structure of the language. This places sever restrictions
on when objects may be effectively reclaimed and many natural programs
may give rise to (unbounded) leaks when compard to a garbage collected
implementation. Hence, we introduce a sub-structural type system that
eliminates the LIFO restriction. The key idea is to separate the
lifetime of a region from the scope of the region's name, by providing
explicit region creation and destruction primitives.
The essence of the second encoding, then, is to "break open" the monad
and reveal it's store passing implementation. Furthermore, the
sub-structural type system allows us to faithfully encode even more
advanced features, such as Cyclone's dynamic regions and unique
pointers.