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.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReferences
Fowler, M.: Domain-Specific Languages. Addison-Wesley, Reading (2011)
Mernik, M., Heering, J., Sloane, A.M.: When and how to develop domain-specific languages. ACM Comput. Surv. 37(4), 316–344 (2005)
Bentley, J.: Little languages. Commun. ACM 29(8), 711–721 (1986). Also in ‘More Programming Pearls’ (Addison-Wesley, 1988)
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)
Yorgey, B.: Diagrams 0.6 (2012). http://projects.haskell.org/diagrams/
Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Commun. ACM 15(12), 1053–1058 (1972)
Wand, M.: Final algebra semantics and data type extensions. J. Comput. Syst. Sci. 19, 27–44 (1979)
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
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)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)
Cook, W.R.: On understanding data abstraction, revisited. In: OOPSLA, pp. 557–572. ACM (2009)
Wadler, P.L.: The expression problem. Posting to java-genericity mailing list (1998)
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)
W3C: Scalable vector graphics (SVG) 1.1: recognized color keyword names (2011). http://www.w3.org/TR/SVG11/types.html#ColorKeywords
Henderson, P.: Functional geometry. In: Lisp and Functional Programming, pp. 179–187 (1982). http://users.ecs.soton.ac.uk/ph/funcgeo.pdf
Henderson, P.: Functional geometry. High. Order Symb. Comput. 15(4), 349–365 (2002). Revision of [15]
Buß, F.: Functional geometry (2005). http://www.frank-buss.de/lisp/functional.html
Escher, M.C.: Square limit (1964). http://www.wikipaintings.org/en/m-c-escher/square-limit
Acknowledgements
I am very grateful to the organisers of the Central European Functional Programming Summer School on Domain-Specific Languages in Cluj-Napoca, Romania, for the invitation to speak at the school on the subject of FP and DSLs. My thanks go to the students who provided assistance during the practical sessions: Andrew Bate, Kwok Cheung, Bogdan Panait, and Christopher Rosset. Nick Wu and other members of the Algebra of Programming research group at Oxford made helpful suggestions on the material, and an anonymous reviewer made some suggestions to improve the presentation. This work was partially supported by UK EPSRC grant Reusability and Dependent Types (EP/G034516/1).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Gibbons, J. (2015). Functional Programming for Domain-Specific Languages. In: Zsók, V., Horváth, Z., Csató, L. (eds) Central European Functional Programming School. CEFP 2013. Lecture Notes in Computer Science(), vol 8606. Springer, Cham. https://doi.org/10.1007/978-3-319-15940-9_1
Download citation
DOI: https://doi.org/10.1007/978-3-319-15940-9_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-15939-3
Online ISBN: 978-3-319-15940-9
eBook Packages: Computer ScienceComputer Science (R0)