Scrap your boilerplate: prologically!

  • Authors:
  • Ralf Lämmel

  • Affiliations:
  • Universität Koblenz-Landau, Koblenz, Germany

  • Venue:
  • PPDP '09 Proceedings of the 11th ACM SIGPLAN conference on Principles and practice of declarative programming
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

"Scrap Your Boilerplate" (SYB) is an established style of generic functional programming. The present paper reconstructs SYB within the Prolog language with the help of the univ operator and higher-order logic programming techniques. We pay attention to the particularities of Prolog. For instance, we deal with traversal of non-ground terms. We also develop an alternative model of SYB-like traversal based on metaprogramming. This generative, type-driven model is also amenable to type-driven optimization.