Abstract
Without doubt Prolog, as the most prominent member of the logic programming (LP) approach, presents significant differences from the mainstream programming paradigms. However, demonstrating its flexibility to larger audiences can indeed be a challenging task, since the declarative style of LP lies outside the mainstream programming languages most are familiar with. In this paper, we demonstrate how alternative implementations of a single list operation can prove to be a rather helpful tool for demonstrating a plethora of Prolog programming aspects and techniques, and some issues associated with these, such as efficiency, readability and writability of code.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Bratko, I.: PROLOG Programming for Artificial Intelligence, 4th edn. Addison-Wesley Longman Publishing Co., Inc, USA (2012)
Brna, P., et al.: Prolog programming techniques. Instr. Sci. 20(2), 111–133 (1991). https://doi.org/10.1007/BF00120879
Clocksin, W.F., Mellish, C.S.: Programming in Prolog, 5 edn.. Springer, Berlin (2003). https://doi.org/10.1007/978-3-642-55481-0
Flach, P., Sokol, K., Wielemaker, J.: Simply logical - the first three decades. In: Warren, D.S., Dahl, V., Eiter, T., Hermenegildo, M., Kowalski, R., Rossi, F. (eds.) Prolog: 50 Years of Future, LNAI 13900, pp. 184–193. Springer, Cham (2023)
Gegg-Harrison, T.S.: Learning prolog in a schema-based environment. Inst. Sci. 20(2), 173–192 (1991). https://doi.org/10.1007/BF00120881
Hermenegildo, M.V., Morales, J.F., Lopez-Garcia, P.: Some thoughts on how to teach prolog. In: Warren, D.S., Dahl, V., Eiter, T., Hermenegildo, M., Kowalski, R., Rossi, F. (eds.) Prolog: 50 Years of Future, LNAI 13900, pp. 107–123. Springer, Cham (2023)
Hogan, A., Blomqvist, E., Cochez, M., D’amato, C., Melo, G.D., Gutierrez, C., Kirrane, S., Gayo, J.E.L., Navigli, R., Neumaier, S., Ngomo, A.C.N., Polleres, A., Rashid, S.M., Rula, A., Schmelzeisen, L., Sequeda, J., Staab, S., Zimmermann, A.: Knowledge graphs. ACM Comput. Surv. 54(4), 1–37 (2022). https://doi.org/10.1145/3447772
Morales, J.F., Abreu, S., Hermenegildo, M.V.: Teaching prolog with active logic documents. In: Warren, D.S., Dahl, V., Eiter, T., Hermenegildo, M., Kowalski, R., Rossi, F. (eds.) Prolog: 50 Years of Future, LNAI 13900, pp. 171–183. Springer, Cham (2023)
O’Keefe, R.A.: The Craft of Prolog. MIT Press, Cambridge (1990)
Ross, P.: Advanced Prolog: Techniques and Examples. Addison-Wesley (1989)
Sekovanić, V., Lovrenčić, S.: Challenges in teaching logic programming. In: 2022 45th Jubilee International Convention on Information, Communication and Electronic Technology (MIPRO), pp. 594–598 (2022). https://doi.org/10.23919/MIPRO55190.2022.9803530
Sterling, L., Shapiro, E.: The Art of Prolog (2nd Ed.): Advanced Programming Techniques. MIT Press, Cambridge (1994)
Van Someren, M.W.: What’s wrong? Understanding beginners’ problems with Prolog. Instr. Sci. 19(4), 257–282 (1990). https://doi.org/10.1007/BF00116441
Warren, D.S.: Introduction to Prolog. In: Warren, D.S., Dahl, V., Eiter, T., Hermenegildo, M., Kowalski, R., Rossi, F. (eds.) Prolog: 50 Years of Future, LNAI 13900, pp. 3–19. Springer, Cham (2023)
Warren, D.S.: Writing correct prolog programs. In: Warren, D.S., Dahl, V., Eiter, T., Hermenegildo, M., Kowalski, R., Rossi, F. (eds.) Prolog: 50 Years of Future, LNAI 13900, pp. 62–70. Springer, Cham (2023)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this chapter
Cite this chapter
Bassiliades, N., Sakellariou, I., Kefalas, P. (2023). Demonstrating Multiple Prolog Programming Techniques Through a Single Operation. In: Warren, D.S., Dahl, V., Eiter, T., Hermenegildo, M.V., Kowalski, R., Rossi, F. (eds) Prolog: The Next 50 Years. Lecture Notes in Computer Science(), vol 13900. Springer, Cham. https://doi.org/10.1007/978-3-031-35254-6_6
Download citation
DOI: https://doi.org/10.1007/978-3-031-35254-6_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-35253-9
Online ISBN: 978-3-031-35254-6
eBook Packages: Computer ScienceComputer Science (R0)