Modular Design of Domain-Specific Languages Using Splittings of Catamorphisms

  • Éric BadouelEmail author
  • Rodrigue Aimé Djeumen Djatcha
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11187)


Language oriented programming is an approach to software composition based on domain specific languages (DSL) dedicated to specific aspects of an application domain. In order to combine such languages we embed them into a host language (namely Haskell, a strongly typed higher-order lazy functional language). A DSL is then given by an algebraic type, whose operators are the constructors of abstract syntax trees. Such a multi-sorted signature is associated to a polynomial functor. An algebra for this functor tells us how to interpret the programs. Using Bekić’s Theorem we define a modular decomposition of algebras that leads to a class of parametric multi-sorted signatures, associated with regular functors, allowing for the modular design of DSLs.


Abstract syntax trees Catamorphisms Bekić’s Theorem Component-based design Domain specific languages 



We are very grateful to the reviewers for the relevance of their comments which greatly helped us to improve the presentation of this work.


  1. 1.
    Abramsky, S., Jung, A.: Domain theory. In: Abramsky, S., Gabbay, D.M., Maibaum, T.S.E. (eds.) Handbook of Logic in Computer Science, Semantic Structures, vol. 3, pp. 1–168. Clarendon Press, Oxford (1994)Google Scholar
  2. 2.
    Backhouse, K.: A functional semantics of attribute grammars. In: Katoen, J.-P., Stevens, P. (eds.) TACAS 2002. LNCS, vol. 2280, pp. 142–157. Springer, Heidelberg (2002). Scholar
  3. 3.
    Badouel, E., Hélouët, L., Morvan, C., Kouamou, G., Nsaibirni, R.F.J.: Active workspaces: distributed collaborative systems based on guarded attribute grammars. SIGAPP Appl. Comput. Rev. 15(3), 6–34 (2015). Scholar
  4. 4.
    Bekić, H.: Definable operations in general algebras, and the theory of automata and flowcharts. In: Jones, C.B. (ed.) Programming Languages and Their Definition. LNCS, vol. 177, pp. 30–55. Springer, Heidelberg (1984). Scholar
  5. 5.
    Dmitriev, S.: Language oriented programming: The next paradigm.
  6. 6.
    Fokkinga, M.M., Jeuring, J., Meertens, L., Meijer, E.: A translation from attribute grammars to catamorphisms. Squiggolist 2(1), 20–26 (1991)Google Scholar
  7. 7.
    Fowler, M.: Language workbenches: the killer-app for domain specific languages.
  8. 8.
    Ganzinger, H., Giegerich, R.: Attribute coupled grammars. In: Proceedings of 1984 SIGPLAN Symposium on Compiler Construction, Montréal, June 1984, pp. 157–170. ACM Press, New York (1984).
  9. 9.
    Giegerich, R.: Composition and evaluation of attribute coupled grammars. Acta Inf. 25(4), 355–423 (1988). Scholar
  10. 10.
    Hudak, P.: Building domain-specific embedded languages. ACM Comput. Surv. 28(4) (1996). article 196. Scholar
  11. 11.
    Johnsson, T.: Attribute grammars as a functional programming paradigm. In: Kahn, G. (ed.) FPCA 1987. LNCS, vol. 274, pp. 154–173. Springer, Heidelberg (1987). Scholar
  12. 12.
    Joyal, A., Street, R., Verity, D.: Traced monoidal categories. In: Mathematical Proceedings of the Cambridge Philosophical Society, vol. 119, no. 3, pp. 447–468 (1996). Scholar
  13. 13.
    Kastens, U., Waite, W.M.: Modularity and reusability in attribute grammars. Acta Inf. 31(7), 601–627 (1994). Scholar
  14. 14.
    Krueger, C.W.: Software reuse. ACM Comput. Surv. 24(2), 131–183 (1992). Scholar
  15. 15.
    Plotkin, G.: Post-graduate lectures notes in advanced domain theory (incorporating the “Pisa Notes”). University of Edinburgh (1981)Google Scholar
  16. 16.
    Simonyi, C.: The death of computer languages, the birth of intentional programming. In: Randell, B. (ed.) The Future of Software: Proceedings of Joint International Computers Ltd. and University of Newcastle Seminar. University of Newcastle (1995). (Also as Technical report MSR-TR-95-52, Microsoft Research, Redmond, WA)Google Scholar
  17. 17.
    Simpson, A.K., Plotkin, G.D.: Complete axioms for categorical fixed-point operators. In: Proceedings of 15th Annual IEEE Symposium on Logic in Computer Science, LICS 2000, Santa Barbara, CA, June 2000, pp. 30–41. IEEE CS Press, Washington (2000).
  18. 18.
    Swierstra, W.: Data types à la carte. J. Funct. Program. 18(4), 423–436 (2008). Scholar
  19. 19.
    Van Wyk, E.: Aspects as modular language extensions. Electron. Notes Theor. Comput. Sci. 82(3), 555–574 (2003). Scholar
  20. 20.
    Van Wyk, E.: Implementing aspect-oriented programming constructs as modular language extensions. Sci. Comput. Program. 68(1), 38–61 (2007). Scholar
  21. 21.
    Van Wyk, E., de Moor, O., Sittampalam, G., Piretti, I.S., Backhouse, K., Kwiatkowski, P.: Intensional programming: a host of language features. Technical report PRG-RR-01-21, Oxford University Computing Laboratory (2001)Google Scholar
  22. 22.
    Ward, M.P.: Language-oriented programming. Softw. Concepts Tools 15(4), 147–161 (1994)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.Inria Rennes – Bretagne Atlantique, IRISA, Campus universitaire de BeaulieuRennes CedexFrance
  2. 2.Faculty of SciencesUniversity of DoualaDoualaCameroon

Personalised recommendations