Memoizing a monadic mixin DSL

  • Authors:
  • Pieter Wuille;Tom Schrijvers;Horst Samulowitz;Guido Tack;Peter Stuckey

  • Affiliations:
  • Department of Computer Science, K.U.Leuven, Belgium;Department of Applied Mathematics and Computer Science, UGent, Belgium;BM Research;Department of Computer Science, K.U.Leuven, Belgium;National ICT Australia and University of Melbourne, Victoria, Australia

  • Venue:
  • WFLP'11 Proceedings of the 20th international conference on Functional and constraint logic programming
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Modular extensibility is a highly desirable property of a domain-specific language (DSL): the ability to add new features without affecting the implementation of existing features. Functional mixins (also known as open recursion) are very suitable for this purpose. We study the use of mixins in Haskell for a modular DSL for search heuristics used in systematic solvers for combinatorial problems, that generate optimized C++ code from a high-level specification. We show how to apply memoization techniques to tackle performance issues and code explosion due to the high recursion inherent to the semantics of combinatorial search. As such heuristics are conventionally implemented as highly entangled imperative algorithms, our Haskell mixins are monadic. Memoization of monadic components causes further complications for us to deal with.