In the early 80’s, Japan, Inc. lost hundreds of millions on the Fifth Generation Project ,building parallel Prolog machines. One aspect of the project’s failure was overreach: Prolog was used for every aspect of the computer, including its operating system. Stretching logic programming to fulfill the requirements of imperative programming entailed so many compromises and complexities that even devotés became skeptics in the end.

Ten years later, Prolog, as alluring a courtesan as ever, enticed another application, this time successful, and, ironically enough, in an operating-system kernel. Windows NT has an enormous problem to solve: booting up in the presence of driver conflicts. The problem is enormous because the number of possible hardware and device-driver configurations in a PC is astronomical (or combinatorial, if you prefer, since PCs are built from combinations of independently purchased parts like motherboards, network interface cards, I/O controllers, and more, and each one has multiple possible drivers with idiosyncratic dependencies on other components and drivers). It’s infeasible to store a boot-order list for every possible configuration. Instead, conflict information must be stored in a compact list of facts and rules.

The current generation of technologists is hearing the siren song again, this time in the context of ginormous web-based social and knowledge graphs of entities, relationships, intents, plans, and actions. Let’s give logic programming another look and see whether our old friend Prolog is still capable or whether new approaches like LINQ and term-rewriting can and should take its place. This is the first post in a series of investigations into alternatives. We’ll begin by resurrecting the Prolog interpreter that Windows NT used and recapitulating its samples in other forms, namely with LINQ and with term-rewriting. We’ll progress into more modern scenarios such as fantasy sports, choosing constrained entertainment options, and satisfying exotic trading specifications.

By Win7 for policy management in system console this was changed up to a version of the CSP from Microsoft Solver Foundation, which resolves problems of conflict in configurations pushed out to all machines by corporate IT.
There were real advances in constraint solving during the 90’s and naughts, leaving the old Prolog engines far behind. It is impressive how capable and flexible modern solvers are. For MSF we used a language much more like Mathematica than Prolog, though there are obviously shared roots.