Translations:Prolog Tutorial/9/en
Ir para navegação
Ir para pesquisar
- Chapter 2 explains Prolog syntax and many essentials of Prolog programming through the use of carefully chosen sample programs. The sample programs are arranged to guide the student through the development of Prolog programs that are constructed in a top-down, declarative fashion. Care has been taken to cover Prolog programming techniques that are very useful in an artificial intelligence course. In fact, this primer can serve as a convenient, small, concise Prolog introduction for such a course. Semantic issues have been addressed by introducing early the concept of a program clause tree that is used to define in an abstract way what are supposed to be the consequences of a Prolog program specification. The author believes this to be a viable way to promote the basic semantic issues of software verification for Prolog programming. The last section of this chapter introduces an example that shows that Prolog can be effectively used to give careful, precise specifications of systems, contrary to its usual reputation as being hard to document because it is easy to use as an exploratory programming tool.