The files in this directory are simple examples of a rule-based system written in Prolog. These Prolog source files are named demo1.pl through demo4.pl and are different versions of the same basic system. Each higher numbered version is more complex and has a few more features than the previous version. All versions are documented with inline comments that explain what is going on. You should inspect these comments (for all versions) and let me know if you have any questions. A trivial overview of each version is in the file "index", but is for overviewing purposes only. The real comments are in the individual files themselves. To run any of the versions, compile or consult the file (Consulting is probably prefered, as these are trival examples which run fast, and you may want to trace through the logic as you are running the program for the customer) and simply say: | ?= run. If you should notice any unusual behavior as you go through these examples, let me know. This set of programs can be used in a variety of different ways. Some of the ways that come to mind are: 1) For potential customers who are asking about how "expert systems" (often implemented with rule-based systems technology) can be written using Prolog, you can either: a) Customers who know some Prolog - Show them the source code for demo1 (which they should have no trouble following) and its operation. Depending on their interest, work them through how easy it is to INCREMENTALLY add features to each version of the demo. This should be an important sales point. If/When their interest in looking at source code dies, just cut to a running of the final, most capable version: demo4. b) Customers who don't know any Prolog - Cut to the answer -- that is, just run demo4 for them. 2) For potential customers who don't know enough to ask, but want to learn more about Prolog as part of making a buying decision, I would suggest sending them the source code for all of the versions, as they should be able to work their way through them (along with Clocksin and Mellish) with little difficulty. This example is simple enough that people should be able to learn quite a lot from it. Your experience will be the best guage as to what level of knowledge is needed to follow the simplest version. 3) Formal teaching - You may want to incorporate some of this material into a future tutorial. If you take the time to follow what is going on as each version gets more and more capable, it will be clear (I hope) that even more could be done to the architecture that I have used. With some work, a real course on rule-based systems could be written around this series of increasingly complex demonstration programs. I have written code that is relatively easy to understand when viewed procedurally. Not only am I most familiar with this type of coding, but from my experience, it is much easier to explain it to a novice. Vince Pecora