Adobe PDF (232.9 kB)
Title Details:
Recursion
Authors: Sakellariou, Ilias
Vasileiadis, Nikolaos
Kefalas, Petros
Stamatis, Dimosthenis
Reviewer: Tsadiras, Athanasios
Description:
Abstract:
Recursion is the primary technique for program development in Prolog, as the language's basic syntax does not include traditional looping or conditional branching constructs found in other languages. The chapter begins by presenting the elements of a recursive definition, highlighting—through examples—their expressive power and conciseness. It is emphasized that recursion is a general programming methodology applicable in all languages, and attention is drawn to common mistakes made when developing recursive definitions. Finally, the chapter presents the predicates used for performing arithmetic operations in Prolog, aiming to provide examples of interesting yet relatively simple recursive implementations.
Type: Chapter
Creation Date: 2015
Item Details:
License: http://creativecommons.org/licenses/by-nc-sa/3.0/gr
Handle http://hdl.handle.net/11419/783
Bibliographic Reference: Sakellariou, I., Vasileiadis, N., Kefalas, P., & Stamatis, D. (2015). Recursion [Chapter]. In Sakellariou, I., Vasileiadis, N., Kefalas, P., & Stamatis, D. 2015. Logic Programming Techniques [Undergraduate textbook]. Kallipos, Open Academic Editions. https://hdl.handle.net/11419/783
Language: Greek
Consists of: 1. Ανάπτυξη του factorial/2
2. Ανάπτυξη του divides/2
3. Κώδικας Prolog Κεφαλαίου 6
Is Part of: Logic Programming Techniques
Publication Origin: Kallipos, Open Academic Editions