%@ page language="java" contentType="text/html" %> <%-- Include common initialisation code --%> <%@ include file="/arch/common.jsp" %> <%-- The current tab --%> <% String currentTab = "Research"; %> <%-- Content of navigation pane --%> <%@ include file="nav.jsp" %> <% showCurrentLink=true; %> <%-- Current navigation location --%> <% String currentNav = "Reports and Theses"; %> <%-- Include the code for the document header --%> <%@ include file="/arch/header.jsp" %>
Gary Meehan, Compiling Functional Programs to Java Byte-code (September 2, 1997).
The aim of the G-machine is to deconstruct a functional program, represented as a graph, into a list of linear instructions --- G-Code --- which, when executed, will construct an equivalent graph and reduce it into Weak Head Normal Form. The Java Virtual Machine (JVM) provides a machine-independent execution environment which executes Java byte-code. This byte-code is essentially a machine code for object-oriented programs. It was designed as the target of a Java compiler, but there is no reason why it cannot be used as the target of other languages. In this report we shall look at compiling functional programs down to the JVM, using the G-machine as a guide.