References: functional programming languages implementation on VM's


Due to the popularization of virtual machines' (VM's) based programming environments, it has been up to date to port different languages for such ones. Initiatives such as Microsoft's .NET has already stimulated the implementation of various languages, and directed the cientific communitty in a way to provide implementations of functional languages for VM's. The references listed below has the objective to serve as a basic set of readings to the ones who intends to tread through the path of such implementation/integration, in particular for the Haskell language. However, the list bellow is not closed, in a way that we may have forgeted someone, so if you know about a important reference concerning this matter, send a message to mscla@cin.ufpe.br.


Index

Scripting COM Components in Haskell
Calling Hell From Heaven and Heaven From Hell
Implementing Functional Languages on Object-Oriented Virtual Machines
A Haskell  to Java Virtual Machine Code Compiler
Compiling Standard ML to Java Bytecodes
Scripting .NET Using Mondrian
Compiling Scheme to JVM bytecode A Performance Study
ILX: Extending the .NET Common IL for Functional Language Interoperability
Object-Oriented Style Overloading for Haskell
Technical Overview of the Common Language Runtime
Stacking then up A Comparison of Virtual Machines
Design and Implementation of Generics for the .NET Common Language Runtime


Title: Scripting COM Components in Haskell

Abstract:
Designers of advanced languages such as ML, Prolog, or Haskell, face an unphill struggle to persuade potential users of the merits of their approach. In fact, it has hitherto been impossible to find other than niche applications because (foreing languages interfaces notwithstanding) it has been too difficult to integrate software components written in new languages with large bodies of existing code.
Microsoft's Component Object Model (COM) offers this community a new opportunity. Because the interface between objects is by design language independent and armslength, it is possible either to write glue programs that integrate existing COM objects, or to write software components whose services can be used by clients written in more conventional languages.
We describe our experience of exploiting this opportunity in the purely-functional language Haskell. We describe a design for integrating COM components into Haskell programs, and we demonstrate why someone might want to script their COM components in this way.

Authors: Simon Peyton Jones, Erik Meijer and Daan Leijen
Date: December 1997
Full Text: [pdf]

 

Title: Calling Hell From Heaven and Heaven From Hell

Abstract:
The increasing popularity of component-based programming tools offer a big opportunity to designers of advanced programming languages, such as Haskell. If we can package our programs as software components, then it is easy to integrate them into applications written in other languages.
In earlier work we described a preliminary integration of Haskell with Microsoft's Component Object Model (COM), focusing on how Haskell can create and invoke COM objects. This paper develops that work, concentrating on the mechanisms that support  externally-callable Haskell functions, and the encapsulation of Haskell programs as COM objects.

Authors: Sigbjorn Finne, Daan Leijen, Erik Meijer and Simon Peyton Jones
Date: November 1999
Full Text: [pdf]

 

Title: Implementing Functional Languages on Object-Oriented Virtual Machines

Abstract:
We discuss some of the issues involved in implementing functional languages on object-oriented virtual environments (VE) such as Java Virtual Machine and Microsoft's .NET. The paper concentrates on how functional languages type systems can be supported in these OO-typed evironments, and on how functional and OO languages can interwork. Mondrian, a new functional language specifically designed for such environments, is introduced as an example.

Authors: Nigel Perry and Erik Meijer
Date: ???
Full Text: [pdf]

 

Title: A Haskell  to Java Virtual Machine Code Compiler

Abstract:
For some time now, we have been interested in usin Haskell to programm inexpensive embedded processors, such as those in SUN's new Java family. this paper describes our first attempt to produce a Haskell to Java Virtual Machine code compiler, based on a mapping between the G-machine and the Java Virtual Machine. Although this mapping looks good, it is not perfect, and our first results suggest that the compiled  Java Virtual Machine code may be rather larger and slower than one might hope.

Authors: David Wakeling
Date: ???
Full Text: [pdf]

 

Title: Compiling Standard ML to Java Bytecodes

Abstract:
MLJ compiles SML'97 into verifier-compliant Java byte-codes. Its features include type-checked interlanguage working extensions which allow ML and Java code to call each other, automatic recompilation management, compact compiled code and runtime performance which, using a 'just in time' compiling Java virtual machine, usually exceeds that of existing specialised bytecode interpreters for ML. Notable features of the compiler itself include whole-program optimisation based on rewriting, compilation of polymorphism by specialisation, a novel monadic intermediate language which expresses effect information in the type system and some interesting data representation choices.

Authors: Nick Benton, Andrew Kennedy and George Russel
Date: ???
Full Text: [pdf]

 

Title: Scripting .NET Using Mondrian

Abstract:
We introduce the design of Mondrian, a functional scripting language for glueing together components on the .NET platform. Mondrian is monadic statement centric with pure expressions and non-strict evaluation and explores the melding of the OO and the purely lazy functional paradigms.

Authors: Eric Meijer, Nigel Perry and Arjan van Yzendoorn
Date: ???
Full Text: [pdf]

 

Title: Compiling Scheme to JVM bytecode A Performance Study

Abstract:
We have added a Java virtual machine (henceforth JVM) bytecode generator to the optimizing Scheme-to-C compiler Bigloo. We named this new compiler BiglooJVM. We have used this new compiler to evaluate how suitable the JVM bytecode is as a target for compiling strict functional languages such as Scheme. In this paper, we focus on the performance issue. We have measured the execution time of many Scheme programs when compiled to C and when compiled to JVM. We found that for each benchmark, at least one of our hardware platforms ran the BiglooJVM version in less than twice the time taken by the Bigloo version. In order to deliver fast programs the generated JVM bytecode must be carefully crafted in order to benefit from the speedup of just-in-time compilers.

Authors: Bernard Paul Serpette and Manuel Serrano
Date: ???
Full Text: [pdf]

 

Title: ILX: Extending the .NET Common IL for Functional Language           Interoperability

Abstract:
This paper describes several extensions to the .NET Common Intermediary Language (CIL), each of which is designed to eenable easier implementation of typed high-level programming languages on the .NET platform, and to promote closer integration and interoperability between those languages. In particular we aim for easier interoperability between components whose interfaces are exposed using function types, discriminated unions and parametric polymorphism, regardless of the languages in which these components are implemented. We show that it is possible to add these constructs to an existing, "real-world" intermediary language and that this allows corresponding subsets of constructs to be compiled uniformly, which in turn will allow programmers to use these constructs seamlessly between different languages. In this paper we discuss the motivations for our extensions, which are together called Extended IL (ILX), and describe them via examples. In this setting, many of the traditional responsibilities of the backend of a compiler must be moved to ILX and the execution environment, in particular those related to representation choices and low-level optimizations. We have modified a Haskell compiler to generate this language, and have implemented an assembler that translates the extensions to regular or polymorphic CIL code.

Authors: Don Syme
Date: ???
Full Text: [pdf]

 

Title: Object-Oriented Style Overloading for Haskell

Abstract:
 

Haskell has a sophisticated mechanism for overloading identifiers with multiple definitions at distinct types. Object-oriented programming has a similar notion of overriding and overloading for methods names. Unfortunately, it is not possible to encode object-oriented overloading directly using Haskell overloading. This deficiency becomes particularly tiresome when Haskell programs wish to call methods imported from an object-oriented library. We explore various encodings of object-oriented classes into Haskell, demonstrate precisely where Haskell's existing type class system is unsatisfactory, and propose two refinements. We proceed in three stages. Firstly, we discuss various ways of accommodating sub-typing; we conclude that a simple encoding using Haskell classes is better for our purpose than a more substantial language extension. Second, we introduce a new notion of closed class, and show how this enables improvement of constraints beyond what is possible in Haskell. Closed classes make it easy to encode the truely ad hoc overloading of object-oriented methods without the need for name mangling or gratuitous type annotations. Thirdly, we allow overlapping instances, and define what it means for one instance to be better than another. This mechanism will turn out to mimic the rather complex overloading resolution rules used by object-oriented languages to select the most-specific method at a call site. In the Appendix, we present type checking and inference rules, as well as details of constraint entailment and simplification. However, this workshop paper is somewhat exploratory: the design may shift once we gain experience with an implementation, and we have not devoted any time to showing any formal properties of our system.

Authors: Mark Shields and Simon Peyton Jones
Date: ???
Full Text: [pdf]

 

Title: Technical Overview of the Common Language Runtime

Abstract:
In the last few years many language researchers have moved to the JVM as the delivery vehicle for their languages. Althrough the JVM is a great target for the Java programming language, it is not necessarily a good platform for other languages, especially languages that require semantic features that do not appear in Java. In this paper we compare the JVM with the Microsoft .NET Common Language Infrastructure (CLI), which has been designed from the ground up to be a multi-language platform.

Authors: ErikMeijer and JimMiller
Date: ???
Full Text: [pdf]

 

 

Title: Stacking then up A Comparison of Virtual Machines

Abstract:
A popular trend in current software technology is to gain program portability by compiling programs to an intermediate form based on an abstract machine definition. Such approaches date back at least to the 1970s, but have achieved new impetus based on the current popularity of the programming language Java. Implementations of language Java compile programs to bytecodes understood by the Java Virtual Machine (JVM). More recently Microsoft have released preliminary details of their ".NET" platform, which is based on an abstract machine superficially similar to the JVM. In each case program execution is normally mediated by a just in time compiler (JIT), although in principle interpretative execution is also possible.
Although these two competing technologies share some common aims the objectives of the virtual machine designs are significantly different. In particular, the ease with which embedded systems might use samll-footprint versions of these virtual machines depends on detailed properties of the virtual machine definitions.
In this study, a compiler was implemented which can produce output code that may be run on either the JVM or .NET platforms. The compiler is available in the public domain, and facilitates comparisons to be made both at compile time and at runtime.

 

Authors: John Gough
Date: ???
Full Text: [pdf]

 

Title: Design and Implementation of Generics for the .NET Common Language Runtime

Abstract:
The Microsoft .NET Common Language Runtime provides a shared type system, intermediate language and dynamic execution environment for the implementation and inter-operation of multiple source languages. In this paper we extend it with direct support for parametric polymorphism (also known as generics), describing the design through examples written in an extended version of the C# programming language, and explaining aspects of implementation by reference to a prototype extension to the runtime.
Our design is very expressive, supporting parameterized types, polymorphic static, instance and virtual methods, "F-bounded" type parameters, instantiation at pointer and value types, polymorphic recursion, and exact run-time types.
Early performance results are encouraging and suggest that programmers will not need to pay an overhead for using generics, achieving performance almost matching hand-specialized code.

 

Authors: Andrew Kennedy and Don Syme
Date: ???
Full Text: [pdf]