Abstract
The language of logic can be used as a declarative programming language, i.e., the programmer has to describe what the problem is, not how it should be solved. We introduce logic programming by means of an example and explain how the system answers questions given a certain program. The possibility of recursive definitions is one of the cornerstones of logic programming. Prolog is a particular form of logic programming; it has been implemented in a certain way. As a consequence, although declarative in principle, Prolog also has certain procedural aspects. The syntax of logic programming in general and of Prolog in particular is very simple. Although the reasoning mechanism should use unification, many systems work with a simpler form, called matching, for reasons of efficiency. Lists are important terms in logic programming. Cut is a procedural device needed to keep programs efficient. Negation is implemented by means of cut and hence differs from logical negation. Logic programming has many applications in (deductive) databases and in Artificial Intelligence. We discuss the most important pitfalls.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this chapter
Cite this chapter
de Swart, H.C.M.(. (2018). Applications: Prolog; Relational Databases and SQL; Social Choice Theory. In: Philosophical and Mathematical Logic. Springer Undergraduate Texts in Philosophy. Springer, Cham. https://doi.org/10.1007/978-3-030-03255-5_9
Download citation
DOI: https://doi.org/10.1007/978-3-030-03255-5_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-03253-1
Online ISBN: 978-3-030-03255-5
eBook Packages: Religion and PhilosophyPhilosophy and Religion (R0)