14Programming with Logic
Having seen a bit of how inference in first-order predicate logic works using truth trees, you might wonder just how much you can do with inference. The answer is, a whole heck of a lot! In fact, anything that a computer can do—any computation that can be written as a program—can be done by inference in first-order predicate logic!
This isn’t just an empty boast or a theoretical equivalence, but a real and practical fact. There’s a very powerful, very useful programming language called Prolog, in which a program consists of nothing but collections of facts and predicates—all you can do is provide it with a collection of facts and predicates. The execution of a Prolog program is a sequence of inferences performed by ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access