Abstract
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.
Keywords
This work was partially supported by ANR Headwork.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
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)
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). https://doi.org/10.1007/3-540-46002-0_11
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). https://doi.org/10.1145/2695664.2695698
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). https://doi.org/10.1007/BFb0048939
Dmitriev, S.: Language oriented programming: The next paradigm. http://www.onboard.jetbrains.com/articles/04/10/lop/
Fokkinga, M.M., Jeuring, J., Meertens, L., Meijer, E.: A translation from attribute grammars to catamorphisms. Squiggolist 2(1), 20–26 (1991)
Fowler, M.: Language workbenches: the killer-app for domain specific languages. http://www.martinfowler.com/articles/languageWorkbench.html
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). https://doi.org/10.1145/502874.502890
Giegerich, R.: Composition and evaluation of attribute coupled grammars. Acta Inf. 25(4), 355–423 (1988). https://doi.org/10.1007/bf02737108
Hudak, P.: Building domain-specific embedded languages. ACM Comput. Surv. 28(4) (1996). article 196. https://doi.org/10.1145/242224.242477
Johnsson, T.: Attribute grammars as a functional programming paradigm. In: Kahn, G. (ed.) FPCA 1987. LNCS, vol. 274, pp. 154–173. Springer, Heidelberg (1987). https://doi.org/10.1007/3-540-18317-5_10
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). https://doi.org/10.1017/s0305004100074338
Kastens, U., Waite, W.M.: Modularity and reusability in attribute grammars. Acta Inf. 31(7), 601–627 (1994). https://doi.org/10.1007/bf01177548
Krueger, C.W.: Software reuse. ACM Comput. Surv. 24(2), 131–183 (1992). https://doi.org/10.1145/130844.130856
Plotkin, G.: Post-graduate lectures notes in advanced domain theory (incorporating the “Pisa Notes”). University of Edinburgh (1981)
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)
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). https://doi.org/10.1109/lics.2000.855753
Swierstra, W.: Data types à la carte. J. Funct. Program. 18(4), 423–436 (2008). https://doi.org/10.1017/s0956796808006758
Van Wyk, E.: Aspects as modular language extensions. Electron. Notes Theor. Comput. Sci. 82(3), 555–574 (2003). https://doi.org/10.1016/s1571-0661(05)82628-3
Van Wyk, E.: Implementing aspect-oriented programming constructs as modular language extensions. Sci. Comput. Program. 68(1), 38–61 (2007). https://doi.org/10.1016/j.scico.2005.06.006
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)
Ward, M.P.: Language-oriented programming. Softw. Concepts Tools 15(4), 147–161 (1994)
Acknowledgement
We are very grateful to the reviewers for the relevance of their comments which greatly helped us to improve the presentation of this work.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Badouel, É., Djeumen Djatcha, R.A. (2018). Modular Design of Domain-Specific Languages Using Splittings of Catamorphisms. In: Fischer, B., Uustalu, T. (eds) Theoretical Aspects of Computing – ICTAC 2018. ICTAC 2018. Lecture Notes in Computer Science(), vol 11187. Springer, Cham. https://doi.org/10.1007/978-3-030-02508-3_4
Download citation
DOI: https://doi.org/10.1007/978-3-030-02508-3_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-02507-6
Online ISBN: 978-3-030-02508-3
eBook Packages: Computer ScienceComputer Science (R0)