© Roman Barták 1997

Table of Contents

Previous Chapter

Next Chapter


This page gathers information on PROLOG in a popular form of questions and answers. I expect it to evolve into reach and useful part of the site. If you send me your questions, I try to collect them and find answers.

Tip: Till this page fulfils, you can also visit Usenet Newsgroup comp.lang.prolog.

Q: What is it PROLOG?

A: PROLOG is a programming language based on ideas of logic programming. In fact, the word PROLOG means PROgramming in LOGic.

Q: What kind of SW is PROLOG especially useful for writing ?

A: Prolog seems to be good for problems in which logic is intimately involved, or whose solutions have a logical characterization. Like other interactive, symbolic languages, Prolog is also good for rapid prototyping.

Q: What are the major examples of use of PROLOG in 'real life' applications ?

A: You can find PROLOG in areas like expert systems or theorem provers construction. The variant of PROLOG called DATALOG is used in database management.

Q: Is it possible to change standard behaviour of PROLOG interpreter (first rule, the most left subgoal)?

A: It is easy to write a complete PROLOG interpreter in PROLOG with different behaviour via meta-programming technique (see page with Introductory Samples).

Q: What is it a meta-program?

A: Meta-program is a program that uses other program as its data. For example, meta-interpreter of a given programming language is an interpreter of that language written in the same language.

Q: What is it CLP (Constraint Logic Programming)?

A: CLP is an extension of PROLOG (logic programming) where the unification is substituted by solving equalities and other types of constraints over particular domain like reals, integers, strings etc. See my Guide to Constraint Programming for more information about constraints.

Q: Can CLP (Constraint Logic Programming) be implemented just in PROLOG ?

A: Using the technique known as meta-programming, it is possible to implement CLP completely in PROLOG (see page with Advanced Examples). The disadvantage of this approach is degradation of performance that is typical for meta-programming.

Q: What are the advantages of CLP on Prolog in practical applications?

A: CLP(X) uses "interpretable" domain X, e.g., reals, integers, strings, while pure Prolog is limited to "uninterpretable" Herbrand Universe. Also, Prolog uses unification as a main data operation while CLP allows declarative constraints which are more general than unification.

Q: Will PROLOG withstand in competition with modern LP languages such as Goedel ?

A: I think that languages like Goedel, ALF, LIFE etc. are currently more oriented to theory than to real-world applications. In real-life usage, I give more chances to CLP which is sometimes assumed as a PROLOG lifesaver for practical applications.

Q: I think language X is better than Prolog. What do you think?

A: Many people now agree that different languages are good for different things.

Table of Contents

Previous Chapter

Next Chapter

Last update 16th August 1998
Designed and maintained by
Roman Bartak
© August 1998