Departmental Bulletin Paper Implementing Data-Flow Fusion DSL on Clojure


11pp.1 - 6 , 2016-03-24 , 法政大学大学院情報科学研究科
Abstract— This paper presents a new optimization tech-nique for programming language Clojure based on the stan-dard fusion technique that merges list operations into a simplified loop.Short-cut fusions, foldr/build fusion, and stream fusions are standard fusion techniques used in a functional programming.Moreover, a recent fusion technique proposed by Lippmeier.Data flow fusion [7] can fuse loops containing several data consumers over stream operators on Haskell. However, this isonly for Haskell. Clojure’s transducers [2] are factory func-tions generating abstract list objects. The functions generated by them wait evaluation as a lazy evaluation partially.We introduce data-flow fusion macros into Clojure as a dynamic typing mechanism and show the difference of data flow fusion between that of Clojure and Haskell.We focus on Clojure which is a functional programming language with attracting features of dynamic typing, Lisp macros, partial lazy evaluation, and running on the Java Virtual Machine (JVM).Our macro compiles S-expression of Clojure to Clojure code and Java class file. Our ideas are implemented as a domain specific language, which has strong points of the pro-vision of a simple interface for loop fusion, and independence from the implementation of a Clojure Compiler.We discuss the advantages and disadvantages of data-flow fusion macro from experimental results and adaptability of our macro.

Number of accesses :  

Other information