In the advent of Internet era the code mobility of a program becomes one of the critical features to programming languages. But lazy functional languages(LFLs) do not provide code mobility to their programs even though LFLs provide many desirable properties.
Recently there have been a number of researches to provide code mobility to LFL programs by translating LFL programs to Java programs. These approaches are basically based on architectural similarities between abstract machines of LFL and Java. The abstract machines of Lazy functional languages and Java programming language, Spineless Tagless G-Machine(STGM) and Java Virtual Machine(JVM) respectively, share important common features such as built-in garbage collector and stack machine architecture. Thus, we can provide code mobility to LFL by translating LFL to Java utilizing these commom features. But current translation schemes don`t fully utilize these architectural common features.
In this paper, we propose a new translation scheme which fully utilizes architectural common features between STGM and JVM. By redefining STGM as an eval-apply evaluation model, we have defined a new translation scheme which utilizes Java Virtual Machine Stack for function evaluation and totally eliminates stack simulation which causes array manipulation overhead.
Benchmark Java programs translated by our translation scheme run faster on Java 1.3 platform than those translated by previous schemes.