Introduction
Logic programming is an interesting paradigm according to which you can express programs in terms of relations that involve some logic variables and expect results that reflect what these logical variables have to be to make sure that these relations are verified. We then speak about "goals" that "succeed", as the logical engine was able to come up some particular configuration for the logical variables so these relations are verified.
This sort of programming, also known as relational programming – as it is about relations representing goals that have to succeed - lays the foundation of an alternative way of designing algorithms. Indeed, logical (or relational) programs are highly declarative; in this, you don't tell the computer how to compute a certain result for you. Instead, you specify the rules governing the relationships between your data, and based on those, you ask for some conclusions that would have been inferred by the knowledge...