Prolog/Inference Engines

This article needs attention from experts!

By default Prolog does a top-down logic inference.

Example:

We run this as "hasgirlfriend(X)." to get the people who have a girlfriend.

Bi-directional inference:

We run this as "run.".

We don't have to directly ask who has a girlfriend, it gives us all results that can be implied. The benefit of bidirectional inferencing is the speed gain.