Understanding Logic Programming
Learn about how logic programming works.
We'll cover the following...
Logic programming
The logic programming paradigm is not as widely used as the ones we’ve discussed previously, but it has some interesting concepts. Logic programming is based on formal logic. A program written in a language that implements this paradigm is constructed of a set of sentences in a logical form that will express facts and rules about a specific problem domain. This might sound complicated and strange, but as we’ll see, the basic concepts of this paradigm are rather simple. Consider the following diagram:
Press + to interact
In the diagram above, we can see a family tree. Looking at it, we can see the following:
- Anna and Bob have a child, Lisa.
- Lisa and Fred have a child, Karen.
- Fred and Sue