^zhurnaly   -   Random   -   Recent   -   Running   -   Mantra   -   Tarot   -   Help

ResolutionAndUnification

PROLOG means "PROgramming in LOGic". It's a computer language built upon the mathematics of proof: Socrates is mortal, all men are Socrates, therefore all men are mortal, and so forth. (^_^) Logic doesn't imply truth. But it does provide rules for avoiding procedural errors in reasoning. PROLOG implements those rules in software.

PROLOG has two foundations: unification and resolution. Unification is a system for filling in slots in formulæ; resolution is a system for making deductions from a list of facts. Both are simple, almost obvious—but of course, figuring out how to express the obvious in a correct and useful way is utterly nontrivial.

Most computer languages are procedural: a programmer writes out all the steps needed to reach the answer, and tells the machine exactly what to do in what order. There may be choices along the way, branches to take or avoid depending on partial results, but the process to follow at every point is clear. PROLOG and a few other languages, in contrast, are declarative: a programmer describes a situation and then asks the computer to achieve a goal. The computer decides what path to take to get there. This is an extraordinarily powerful technique for solving many problems, since it doesn't demand that the human know all the details of how to get the answer in advance.

So why hasn't PROLOG taken over the world (of programming, that is)? Maybe logic is too clean, too pure, to abstract to apply to messy real-life tasks. Maybe the early implementations of PROLOG were too inefficient, mathematically sound but so slow as to be practically irrelevant to anything beyond toy problems. (The joke used to be that with PROLOG you could get something for nothing, but only if you were willing to wait forever to get it!)

But maybe PROLOG was just too radical a paradigm shift. People are used to telling others how to do their jobs; we constantly give and receive orders (albeit not always willingly) and we know how to follow recipes. It's quite a twist to say, "Here are the ingredients and the rules for their reactions with each other; now bake me a cake!" One must trust the other person or the computer to do the right thing, to discover which raw materials to use and how to combine them. That takes a leap of faith. And sometimes the leaper falls; there aren't any solutions, or at least no solutions within the given rules.

That happens a lot in everyday life. It's tough to entrust others with jobs without looking over their shoulders. It's tougher to forgive them when they fail because there was no way to succeed.

Thursday, November 11, 1999 at 11:08:36 (EST) = Datetag19991111

TopicProgramming


(correlates: 13 Comments on Migraine Visions, YouCanHaveItAll, ThanksAndAcknowledgements4, ...)

1 person liked this