Skip to main content

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

  • Conference paper
  • First Online:
Functional and Logic Programming (FLOPS 2020)

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

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
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

Institutional subscriptions

Notes

  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}\).

References

  1. Baelde, D., et al.: Abella: a system for reasoning about relational specifications. Journal of Formalized Reasoning 7(2) (2014). https://doi.org/10.6092/issn.1972-5787/4650. http://jfr.unibo.it/article/download/4650/4137

  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). https://doi.org/10.1145/2676726.2676982

  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). https://doi.org/10.1007/3-540-45306-7_26

    Chapter  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). https://github.com/mcimini/lang-n-play

  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). https://doi.org/10.1145/3276604.3276983

  8. Dmitriev, S.: Language oriented programming: the next programming paradigm (2004). http://www.onboard.jetbrains.com/is1/articles/04/10/lop/mps.pdf

  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). https://doi.org/10.1007/978-3-662-48899-7_32

  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). https://doi.org/10.1145/2103656.2103719

  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). https://doi.org/10.1145/2076021.2048099. http://doi.acm.org/10.1145/2076021.2048099

  13. Flatt, M., PLT: reference: racket. Technical report PLT-TR-2010-1. PLT Design Inc. (2010). https://racket-lang.org/tr1/

  14. Fowler, M.: Language workbenches: the killer-app for domain specific languages? (2005). http://www.martinfowler.com/articles/languageWorkbench.html

  15. Gabbay, D., Reyle, U.: N-prolog: an extension of prolog with hypothetical implications I. J. Logic Program. 1(4), 319–355 (1984). http://www.sciencedirect.com/science/article/pii/0743106684900293

    Article  MathSciNet  Google Scholar 

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

  17. JetBrains: JetBrains MPS - Meta Programming System. http://www.jetbrains.com/mps/

  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. http://doi.acm.org/10.1145/1932682.1869497

  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). https://doi.org/10.1007/3-540-61292-0_1

    Chapter  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). https://doi.org/10.1007/s10009-010-0142-1

    Article  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). https://doi.org/10.1145/2791060.2791092. http://doi.acm.org/10.1145/2791060.2791092

  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). https://doi.org/10.1016/j.cl.2016.09.004

    Article  Google Scholar 

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

    Book  Google Scholar 

  25. Pfenning, F., Elliott, C.: Higher-order abstract syntax. SIGPLAN Not. 23(7), 199–208 (1988). https://doi.org/10.1145/960116.54010

    Article  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). https://doi.org/10.1007/3-540-48660-7_14

    Chapter  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)

    Article  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). https://doi.org/10.1145/2983990.2984027

  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

Authors

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. https://doi.org/10.1007/978-3-030-59025-3_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-59025-3_7

  • 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)

Publish with us

Policies and ethics