Functional Programming for Domain-Specific Languages

Chapter

Abstract

Domain-specific languages are a popular application area for functional programming; and conversely, functional programming is a popular implementation vehicle for domain-specific languages—at least, for embedded ones. Why is this? The appeal of embedded domain-specific languages is greatly enhanced by the presence of convenient lightweight tools for defining, implementing, and optimising new languages; such tools represent one of functional programming’s strengths. In these lectures we discuss functional programming techniques for embedded domain-specific languages; we focus especially on algebraic datatypes and higher-order functions, and their influence on deep and shallow embeddings.

References

  1. 1.
    Fowler, M.: Domain-Specific Languages. Addison-Wesley, Reading (2011)Google Scholar
  2. 2.
    Mernik, M., Heering, J., Sloane, A.M.: When and how to develop domain-specific languages. ACM Comput. Surv. 37(4), 316–344 (2005)CrossRefGoogle Scholar
  3. 3.
    Bentley, J.: Little languages. Commun. ACM 29(8), 711–721 (1986). Also in ‘More Programming Pearls’ (Addison-Wesley, 1988)CrossRefMathSciNetGoogle Scholar
  4. 4.
    Boulton, R., Gordon, A., Gordon, M., Harrison, J., Herbert, J., Tassel, J.V.: Experience with embedding hardware description languages in HOL. In: Stavridou, V., Melham, T.F., Boute, R.T. (eds.) Proceedings of the IFIP TC10/WG 10.2 International Conference on Theorem Provers in Circuit Design: Theory, Practice and Experience. Volume A-10 of IFIP Transactions, pp. 129–156. North-Holland/Elsevier, Nijmegen (1992)Google Scholar
  5. 5.
    Yorgey, B.: Diagrams 0.6 (2012). http://projects.haskell.org/diagrams/
  6. 6.
    Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Commun. ACM 15(12), 1053–1058 (1972)CrossRefGoogle Scholar
  7. 7.
    Wand, M.: Final algebra semantics and data type extensions. J. Comput. Syst. Sci. 19, 27–44 (1979)CrossRefMATHMathSciNetGoogle Scholar
  8. 8.
    Kamin, S.: An implementation-oriented semantics of Wadler’s pretty-printing combinators. Oregon Graduate Institute (1998). http://www-sal.cs.uiuc.edu/~kamin/pubs/pprint.ps
  9. 9.
    Erwig, M., Walkingshaw, E.: Semantics-driven DSL design. In: Mernik, M. (ed.) Formal and Practical Aspects of Domain-Specific Languages: Recent Developments, 56–80. IGI-Global, Hershey (2012)Google Scholar
  10. 10.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)Google Scholar
  11. 11.
    Cook, W.R.: On understanding data abstraction, revisited. In: OOPSLA, pp. 557–572. ACM (2009)Google Scholar
  12. 12.
    Wadler, P.L.: The expression problem. Posting to java-genericity mailing list (1998)Google Scholar
  13. 13.
    Hutton, G.: Fold and unfold for program semantics. In: Proceedings of the Third ACM SIGPLAN International Conference on Functional Programming, Baltimore, Maryland, pp. 280–288 (1998)Google Scholar
  14. 14.
    W3C: Scalable vector graphics (SVG) 1.1: recognized color keyword names (2011). http://www.w3.org/TR/SVG11/types.html#ColorKeywords
  15. 15.
    Henderson, P.: Functional geometry. In: Lisp and Functional Programming, pp. 179–187 (1982). http://users.ecs.soton.ac.uk/ph/funcgeo.pdf
  16. 16.
    Henderson, P.: Functional geometry. High. Order Symb. Comput. 15(4), 349–365 (2002). Revision of [15]CrossRefMATHGoogle Scholar
  17. 17.
    Buß, F.: Functional geometry (2005). http://www.frank-buss.de/lisp/functional.html
  18. 18.

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.Department of Computer ScienceUniversity of OxfordOxfordUK

Personalised recommendations