Logic programming is a probably more accurately called ``programming with relations'', in contrast to functional programming, which is ``programming with functions''.
The idea is that a function with arguments can always be written as a relation with arguments:
Having gone from functions to relations, we can generalize our objectives and give rules to compute not only those special relations that correspond to functions (where the last component of each tuple is uniquely fixed by the others), but more general relations as well.
We will describe logic programming using a syntax that is based on Prolog, the most commonly used programming language in this paradigm.