The knowledge in an expert system can be expressed in Prolog's style of logic. But what about other kinds of knowledge? For example, one on-going area of research is into natural-language understanding: there are many programs that can read text or listen to speech, and extract some kind of meaning from them. A program called Frump was written at Yale by Roger Schank to make summaries of news stories. It was directly connected to the teletype output from news agencies such as Reuters and scanned the text coming along the wire for key words and phrases, compared them with what it knew from previous stories, and output a summary of anything new to a printer. Such programs need some way to represent the meaning of their input, and some form of logic is often first choice. I hope this exercise convinces you that this is feasible.
In fact, almost all schemes used for representing knowledge in A.I., with the possible exception of neural nets and genetic algorithms, can be translated into the standard kind of formal logic (known as first-order predicate calculus). And although Prolog is more restricted in where it allows quantifiers than formal logic, it is still possible, by following certain rules, to translate any statement of formal logic into Prolog.
If you don't like logic, you might now be saying ``if I want to study A.I., I should try to find a less logical language than Prolog''. That will not help for long. Languages such as Pascal, Lisp, and Basic do at first sight seem to require less proficiency in logic. This is because they are lower level than Prolog, and can't accept logical statements directly. When you're trying to represent knowledge in these languages, you first have to decide on its logical meaning, and then translate into a notation that's lower level and even less clear. Prolog at least avoids some of this work.
You will also find logic used as a universal language in the
A.I. literature. Many papers use it to specify what complex
programs do, or to capture patterns of human cognition. And an
increasing number of non-Prolog A.I. languages are based on logic.
That's certainly true of the languages in which most expert
systems are programmed, including the eminently commercial ones used for
share dealing by big City companies. So a knowledge of logic may be
useful for your financial health ...