Skip to main content

On the Effectiveness of Higher-Order Logic Programming in Language-Oriented Programming

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 12073)


In previous work we have presented , a functional language-oriented programming language with languages as first-class-citizens. Language definitions can be bound to variables, passed to and returned by functions, and can be modified at run-time before being used. programs are compiled and executed in the higher-order logic programming language \(\lambda \)Prolog. In this paper, we describe our compilation methods, which highlight how the distinctive features of higher-order logic programming are a great fit in implementing a language-oriented programming language.


  • Higher-order logic programming
  • Language-oriented programming
  • Functional programming

This is a preview of subscription content, access via your institution.

Buying options

USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions


  1. 1.

    To remain in line with \(\lambda \)Prolog terminology we use the terms hypothetical reasoning throughout this paper, see [24].

  2. 2.

    We are guaranteed that the rules use the predicate \(\mathtt {step}\) for reductions because the OCaml part of (see the figure on Sect. 3, page 4) specifically generates the \(\lambda \)Prolog term to use \(\mathtt {step}\). Similarly for \(\mathtt {value}\).


  1. Baelde, D., et al.: Abella: a system for reasoning about relational specifications. Journal of Formalized Reasoning 7(2) (2014).

  2. Bogdanas, D., Rosu, G.: K-Java: a complete semantics of Java. In: Proceedings of the 42nd Symposium on Principles of Programming Languages, pp. 445–456. ACM (2015).

  3. Bousse, E., Degueule, T., Vojtisek, D., Mayerhofer, T., Deantoni, J., Combemale, B.: Execution framework of the gemoc studio (tool demo). In: Proceedings of the 2016 ACM SIGPLAN International Conference on Software Language Engineering SLE 2016, pp. 84–89. ACM, New York (2016)

    Google Scholar 

  4. van den Brand, M.G.J., et al.: The Asf+Sdf meta-environment: a component-based language dvelopment environment. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 365–370. Springer, Heidelberg (2001).

    CrossRef  Google Scholar 

  5. Butting, A., Eikermann, R., Kautz, O., Rumpe, B., Wortmann, A.: Modeling language variability with reusable language components. In: Proceedings of the 22nd International Systems and Software Product Line Conference SPLC 2018. ACM, New York (2018)

    Google Scholar 

  6. Cimini, M.: Lang-n-play: a functional programming language with languages as first-class citizens (2018).

  7. Cimini, M.: Languages as first-class citizens (vision paper). In: Proceedings of the 11th ACM SIGPLAN International Conference on Software Language Engineering SLE 2018, pp. 65–69. ACM, New York (2018).

  8. Dmitriev, S.: Language oriented programming: the next programming paradigm (2004).

  9. Dunchev, C., Guidi, F., Coen, C.S., Tassi, E.: ELPI: fast, embeddable, \(\backslash \)lambda prolog interpreter. In: Proceedings of the Logic for Programming, Artificial Intelligence, and Reasoning - 20th International Conference, LPAR-20 2015, Suva, Fiji, 24–28 November 2015, pp. 460–468 (2015).

  10. Ellison, C., Rosu, G.: An executable formal semantics of C with applications. In: Field, J., Hicks, M. (eds.) Proceedings of the 39th Symposium on Principles of Programming Languages, pp. 533–544. ACM (2012).

  11. Erdweg, S., Giarrusso, P.G., Rendel, T.: Language composition untangled. In: LDTA 2012, pp. 7:1–7:8. ACM, New York (2012)

    Google Scholar 

  12. Erdweg, S., Rendel, T., Kästner, C., Ostermann, K.: SugarJ: library-based syntactic language extensibility. SIGPLAN Not. 46(10), 391–406 (2011).

  13. Flatt, M., PLT: reference: racket. Technical report PLT-TR-2010-1. PLT Design Inc. (2010).

  14. Fowler, M.: Language workbenches: the killer-app for domain specific languages? (2005).

  15. Gabbay, D., Reyle, U.: N-prolog: an extension of prolog with hypothetical implications I. J. Logic Program. 1(4), 319–355 (1984).

    CrossRef  MathSciNet  Google Scholar 

  16. Goodman, N.D., Stuhlmüller, A.: The design and implementation of probabilistic programming languages (2014). Accessed 10 Feb 2020

  17. JetBrains: JetBrains MPS - Meta Programming System.

  18. Kats, L.C.L., Visser, E.: The spoofax language workbench: rules for declarative specification of languages and ides. In: OOPSLA, vol. 45, pp. 444–463. ACM, New York, October 2010.

  19. Kelly, S., Lyytinen, K., Rossi, M.: MetaEdit+ a fully configurable multi-user and multi-tool CASE and CAME environment. In: Constantopoulos, P., Mylopoulos, J., Vassiliou, Y. (eds.) CAiSE 1996. LNCS, vol. 1080, pp. 1–21. Springer, Heidelberg (1996).

    CrossRef  Google Scholar 

  20. Kienzle, J., et al.: Concern-oriented language development (COLD): fostering reuse in language engineering. Comput. Lang. Syst. Struct. 54, 139–155 (2018)

    Google Scholar 

  21. Krahn, H., Rumpe, B., Völkel, S.: MontiCore: a framework for compositional development of domain specific languages. Int. J. Softw. Tools Technol. Transf. 12(5), 353–372 (2010).

    CrossRef  Google Scholar 

  22. Kühn, T., Cazzola, W., Olivares, D.M.: Choosy and picky: configuration of language product lines. In: Proceedings of the 19th International Conference on Software Product Line SPLC 2015, pp. 71–80. ACM, New York (2015).

  23. Méndez-Acuña, D., Galindo, J.A., Degueule, T., Combemale, B., Baudry, B.: Leveraging software product lines engineering in the development of external DSLs: a systematic literature review. Comput. Lang. Syst. Struct. 46, 206–235 (2016).

    CrossRef  Google Scholar 

  24. Miller, D., Nadathur, G.: Programming with Higher-Order Logic, 1st edn. Cambridge University Press, New York (2012)

    CrossRef  Google Scholar 

  25. Pfenning, F., Elliott, C.: Higher-order abstract syntax. SIGPLAN Not. 23(7), 199–208 (1988).

    CrossRef  Google Scholar 

  26. Pfenning, F., Schürmann, C.: System description: twelf—a meta-logical framework for deductive systems. CADE 1999. LNCS (LNAI), vol. 1632, pp. 202–206. Springer, Heidelberg (1999).

    CrossRef  Google Scholar 

  27. Rosu, G., Şerbănuţă, T.F.: An overview of the K semantic framework. J. Logic Algebraic Program. 79(6), 397–434 (2010)

    CrossRef  MathSciNet  Google Scholar 

  28. Sewell, P., et al.: Ott: effective tool support for the working semanticist. In: Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming ICFP 2007, pp. 1–12. ACM, New York (2007)

    Google Scholar 

  29. Stefanescu, A., Park, D., Yuwen, S., Li, Y., Rosu, G.: Semantics-based program verifiers for all languages. In: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2016, part of SPLASH 2016, Amsterdam, The Netherlands, 30 October–4 November 2016, pp. 74–91 (2016).

  30. Vacchi, E., Cazzola, W.: Neverlang: a framework for feature-oriented language development. Comput. Lang. Syst. Struct. 43, 1–40 (2015)

    Google Scholar 

  31. Ward, M.P.: Language oriented programming. Softw.-Concepts Tools 15, 147–161 (1995)

    Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Matteo Cimini .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Cimini, M. (2020). On the Effectiveness of Higher-Order Logic Programming in Language-Oriented Programming. In: Nakano, K., Sagonas, K. (eds) Functional and Logic Programming. FLOPS 2020. Lecture Notes in Computer Science(), vol 12073. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-59024-6

  • Online ISBN: 978-3-030-59025-3

  • eBook Packages: Computer ScienceComputer Science (R0)