Study on Voice Controlled Computing
Using the PROLOG Compiler/Interpreter
Load or compile Posing Queries Exiting the Program

PROLOG is most often implemented as an interpreted language. A search of the Internet will uncover several good interpreters and a few good compilers, many of them free. I chose to use the Gnu PROLOG compiler because I wanted to compile my programs under Linux, and the GNU organization has a good reputation for its software packages. I was not disappointed in my selection. The things I will cover here, I know to be accurate for the GNU system, and are mostly accurate for other compilers and interpreters.

The first order of business is compiling the source code or loading it into the interpreter. If you are using a system other than GNU's check the syntax for this step in its manual. But compilation under the GNU system follows the form of compilation under their other compilers:

gplc ... -o outputfile

Once you have loaded the source code file or run the executable, you will be in an interactive environment. The program will wait for you to type a query and will give you the result(s). When you enter a simple True/False query the program will tell you true or false, then give you back the prompt. When you enter a wh query you may get multiple answers. Only the first answer will be displayed right away. If that is the only answer you want, press ENTER. To get the next answer, press the semicolon (;). To have all the answers displayed, press 'a'.

To quit the program, press Ctrl-D.

For more information on using the PROLOG compiler or interpreter, consult your manual or try one of the manuals or tutorials on the web. A couple helpful ones are:

Back to the outline