Linguistics 482 - Computational Linguistics Prolog Notes A. C. Brett acbrett@uvic.ca
Department of Linguistics
University of Victoria
Clearihue C139
Last updated: 9 October 2005

Starting the Editor

You can use the Amzi! Development Environment Editor to correct errors in your Prolog program, or to modify your program while you're developing and testing it.

Editing an Existing Program File

To start the Editor so that you can make changes to an existing program, do the following:
  1. Click on the word "File" at the top of the Development Environment window (or, while depressing the [Alt], press the "f" key).
  2. Click on the Open File option in the menu that opens (or, use the down arrow to get to the Open File option and press the [Enter] or [Return] key).
  3. Pick the file containing the program you want to edit in the Open window that appears. (Follow the instructions in the section on Consulting a Prolog Program beginning with point 3.)

Notes:

Editing a New Program File

The Development Environment Editor can be used to create a new Prolog program file as follows:
  1. Click on the word "File" at the top of the Development Environment window.
  2. Pick the New File option. The Editor will start and an empty window will open with a name such as "Edit1".
  3. Type your program statements, and edit them, as necessary, using the conventional text editing operations.
  4. When you are done, click "File" at the top of the Development Environment window, and pick the Save As... option.
  5. In the File Save As window that opens, type the name you want to assign you program file in the "File name:" in the panel in the upper left-hand area of the window.
  6. Then click on the "OK" button in the upper right-hand corner of the window.
In the Save As window, type the name you want to use for your file. If necessary, select the disk drive on which you want to write your program in the panel in the lower right-hand area of the window.

You can close the Editor window (by clicking on the "X" button in the upper right-hand corner, or by picking the Close option in the menu that opens when you click on the Amzi! logo in the upper left-hand corner of the Editor window); but, note that the Editor window can remain open when you start the Listener.

You can start the Listener and consult your program by following the instructions in the appropriate sections of these notes.

Linguistics 482 Prolog Introductory Notes Top of Page