The University of Sheffield
Department of Computer Science

Ricky Barefield Undergraduate Dissertation 2005/06

"A Haskell-To-Java Translation Tool"

Supervised by Dr MP Stannett

Abstract

Combining Haskell and Java has been a topic for investigation for some time, whether it be by converting byte codes or source code. In this report we argue that the conversion of source codes enable a Java programmer to make use of a functional language where it can express either data structures or algorithms more aptly. We have achieved a successful translation of a subset of Haskell by making extensive use of the Java class system; overcoming difficulties with Java's strict nature by delaying computation until necessary. Whilst much work has already been done, given the opportunity there are many more Haskell constructs which are un-modelled such as anonymous functions and lambda abstraction. The focus of attention for future continuation of this project should be on modelling these constructs.