Theoretical foundations of the organization of branches and repetitions in programs in the logic programming language Prolog

Introduction. The organization of branches and repetitions in the context of logical programming is considered by an example of the Prolog language. The fundamental feature of the program in a logical programming language is the fact that a computer must solve a problem by reasoning like a human. Su...

Full description

Saved in:
Bibliographic Details
Main Author: D. V. Zdor
Format: Article
Language:Russian
Published: Don State Technical University 2021-09-01
Series:Advanced Engineering Research
Subjects:
Online Access:https://www.vestnik-donstu.ru/jour/article/view/1780
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850029584015163392
author D. V. Zdor
author_facet D. V. Zdor
author_sort D. V. Zdor
collection DOAJ
description Introduction. The organization of branches and repetitions in the context of logical programming is considered by an example of the Prolog language. The fundamental feature of the program in a logical programming language is the fact that a computer must solve a problem by reasoning like a human. Such a program contains a description of objects and relations between them in the language of mathematical logic. At the same time, the software implementation of branching and repetition remains a challenge in the absence of special operators for the indicated constructions in the logical language. The objectives of the study are to identify the most effective ways to solve problems using branching and repetition by means of the logic programming language Prolog, as well as to demonstrate the results obtained by examples of computational problems.  Materials and Methods. An analysis of the literature on the subject of the study was carried out. Methods of generalization and systematization of knowledge, of the program testing, and analysis of the program execution were used.  Results. Constructions of branching and repetition organization in a Prolog program are proposed. To organize repetitions, various options for completing a recursive cycle when solving problems are given.  Discussion and Conclusions. The methods of organizing branches and repetitions in the logic programming language Prolog are considered. All these methods are illustrated by examples of solving computational problems. The results obtained can be used in the further development of the recursive predicates in logical programming languages, as well as in the educational process when studying logical programming in the Prolog language. The examples of programs given in the paper provide using them as a technological basis for programming branches and repetitions in the logic programming language Prolog.
format Article
id doaj-art-0734335df61c4e889a6ff3bfb8ed93a0
institution DOAJ
issn 2687-1653
language Russian
publishDate 2021-09-01
publisher Don State Technical University
record_format Article
series Advanced Engineering Research
spelling doaj-art-0734335df61c4e889a6ff3bfb8ed93a02025-08-20T02:59:29ZrusDon State Technical UniversityAdvanced Engineering Research2687-16532021-09-0121220020610.23947/2687-1653-2021-21-2-200-2061524Theoretical foundations of the organization of branches and repetitions in programs in the logic programming language PrologD. V. Zdor0Primorskaya State Academy of AgricultureIntroduction. The organization of branches and repetitions in the context of logical programming is considered by an example of the Prolog language. The fundamental feature of the program in a logical programming language is the fact that a computer must solve a problem by reasoning like a human. Such a program contains a description of objects and relations between them in the language of mathematical logic. At the same time, the software implementation of branching and repetition remains a challenge in the absence of special operators for the indicated constructions in the logical language. The objectives of the study are to identify the most effective ways to solve problems using branching and repetition by means of the logic programming language Prolog, as well as to demonstrate the results obtained by examples of computational problems.  Materials and Methods. An analysis of the literature on the subject of the study was carried out. Methods of generalization and systematization of knowledge, of the program testing, and analysis of the program execution were used.  Results. Constructions of branching and repetition organization in a Prolog program are proposed. To organize repetitions, various options for completing a recursive cycle when solving problems are given.  Discussion and Conclusions. The methods of organizing branches and repetitions in the logic programming language Prolog are considered. All these methods are illustrated by examples of solving computational problems. The results obtained can be used in the further development of the recursive predicates in logical programming languages, as well as in the educational process when studying logical programming in the Prolog language. The examples of programs given in the paper provide using them as a technological basis for programming branches and repetitions in the logic programming language Prolog.https://www.vestnik-donstu.ru/jour/article/view/1780logical programmingbranchingrepetition of predicatesrecursive rulerecursion termination condition
spellingShingle D. V. Zdor
Theoretical foundations of the organization of branches and repetitions in programs in the logic programming language Prolog
Advanced Engineering Research
logical programming
branching
repetition of predicates
recursive rule
recursion termination condition
title Theoretical foundations of the organization of branches and repetitions in programs in the logic programming language Prolog
title_full Theoretical foundations of the organization of branches and repetitions in programs in the logic programming language Prolog
title_fullStr Theoretical foundations of the organization of branches and repetitions in programs in the logic programming language Prolog
title_full_unstemmed Theoretical foundations of the organization of branches and repetitions in programs in the logic programming language Prolog
title_short Theoretical foundations of the organization of branches and repetitions in programs in the logic programming language Prolog
title_sort theoretical foundations of the organization of branches and repetitions in programs in the logic programming language prolog
topic logical programming
branching
repetition of predicates
recursive rule
recursion termination condition
url https://www.vestnik-donstu.ru/jour/article/view/1780
work_keys_str_mv AT dvzdor theoreticalfoundationsoftheorganizationofbranchesandrepetitionsinprogramsinthelogicprogramminglanguageprolog