Optimizing ML Using a Hierarchy of Monadic Types

We describe a type system and typed semantics that use a hierarchy of monads to describe and delimit a variety of effects, including non-termination, exceptions, and state, in a call-by-value functional language. The type system and semantics can be used to organize and justify a variety of optimizing transformations in the presence of effects. In addition, we describe a simple monad inferencing algorithm that computes the minimum effect for each subexpression of a program, and provides more accurate effects information than local syntactic methods.

[1]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[2]  John Launchbury,et al.  Unboxed values as first class citizens , 1991 .

[3]  Simon L. Peyton Jones,et al.  Unboxed Values as First Class Citizens in a Non-Strict Functional Language , 1991, FPCA.

[4]  Pierre Jouvelot,et al.  Polymorphic type, region and effect inference , 1992, Journal of Functional Programming.

[5]  Andrew K. Wright Typing References by Effect Inference , 1992, ESOP.

[6]  Amr Sabry,et al.  The essence of compiling with continuations , 1993, PLDI '93.

[7]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[8]  Pierre Jouvelot,et al.  The Type and Effect Discipline , 1994, Inf. Comput..

[9]  Andrew W. Appel Loop headers in λ-calculus or CPS , 1994 .

[10]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

[11]  Simon L. Peyton Jones,et al.  State in Haskell , 1995, LISP Symb. Comput..

[12]  David Tarditi,et al.  Design and Implementation of Code Optimizations for a Type-Directed Compiler for Standard ML. , 1996 .

[13]  Simon L. Peyton Jones,et al.  Compiling Haskell by Program Transformation: A Report from the Trenches , 1996, ESOP.

[14]  Lars Birkedal,et al.  From region inference to von Neumann machines via region representation inference , 1996, POPL '96.

[15]  J. Launchbury,et al.  Towards Algebras of Encapsulated , 1997 .

[16]  Mads Tofte,et al.  Region-based Memory Management , 1997, Inf. Comput..

[17]  P. Wadler The Marriage of Eeects and Monads , 1998 .

[18]  Simon L. Peyton Jones,et al.  Bridging the gulf: a common intermediate language for ML and Haskell , 1998, POPL '98.

[19]  Philip Wadler,et al.  The marriage of effects and monads , 1998, ICFP '98.

[20]  Andrew P. Tolmach,et al.  From ML to Ada: Strongly-typed language interoperability via source translation , 1998, Journal of Functional Programming.