USING PROLOG ON THE LING NETWORK In order to avoid a heavy load on "julius", our departmental server, please only run prolog processes on the other Sun computers on the ling network. If you are not on the console of a Sun computer in Oxley Hall, you can login remotely (e.g., using telnet) to puck.ling.ohio-state.edu. "puck" is currently the server for most computational linguistics software, and it is faster than the other Suns. The implementation of Prolog currently installed on our system is SICStus Prolog version 3.0 #5. There are two ways to run prolog. STARTING PROLOG Prolog can be run by typing "prolog" directly as a Unix command, but a fuller range of editing capabilities is available by running prolog through the Emacs text editor. After starting emacs, type ESC x run-prolog This command causes a new emacs buffer to be created (named *prolog* by default), which can be used to interact with the prolog process (often called the "inferior prolog" process). You can edit text in this buffer with all of the standard emacs commands, as well as switch to other buffers containing any other files, including grammar files or files of text that you are analyzing. Typing C-c C-c when the *prolog* buffer is selected interrupts the prolog process. You may need to do this if the evaluation of your query appears not to be terminating. SETTING UP In order to automatically invoke the Prolog mode when editing files whose names end in the suffix ".pl", you should add one line to the end of the file named ".emacs" in your home directory. This is a file that is used to customize the behavior of Emacs. Note that this file name begins with a dot, and it is normally invisible when you list your directory, unless you use the -a option after the ls command. Add the following line to the end of your .emacs file: (load "~kasper/cl/prolog-cust") INTERACTIVE HISTORY AND EDITING EXPRESSIONS The *prolog* buffer has a command history associated with it, which allows you to easily repeat or edit previous commands you have typed: [ESC p] insert earlier input expression at the ?- prompt [ESC n] insert later input expression at the ?- prompt [ESC s] insert previous input that has the string typed so far as a prefix. If you followed the setup instuctions above and you are using Emacs 19, a Prolog pull-down menu will be available on the Emacs menu bar when you are in Prolog mode. A full list of special commands available in the *prolog* buffer can also be seen by typing (C-h m) while in that buffer. EDITING PROGRAMS Emacs has a special mode for editing prolog programs (including grammar files for ALE and CUF), which is used automatically when editing files with a .pl extension. The prolog mode provides the following commands, in addition to the standard emacs commands for text editing. C-c K prolog-compile-buffer C-c k prolog-compile-region C-c C-k prolog-compile-predicate C-c C prolog-consult-buffer C-c c prolog-consult-region C-c C-c prolog-consult-predicate These allow selected prolog expressions to be sent to the Prolog process without explicitly copying them to the *prolog* buffer. SICSTUS PROLOG MANUAL An on-line manual for SICSTUS prolog is available on our WWW server at the URL http://ling.ohio-state.edu/comp/sicstus-doc/sicstus_toc.html A complete on-line manual for emacs is available within Emacs using the "info" hypertext format. Type (C-h i) to bring up the info directory, then look for the following entry. * Emacs: (emacs). The extensible self-documenting text editor. An entry may be selected by moving the cursor to its line, and typing the RETURN key. THE ALE SYSTEM (Carpenter and Penn) The files provided with the ALE system (version 2.0) are available in the directory ~kasper/ALE/. After starting prolog, the ALE program is loaded by typing the command: compile('~kasper/ALE/ale'). The sample HPSG grammar provided with ALE is in the file ~kasper/ALE/hpsg.pl, and it can be loaded into ALE by typing compile_gram('~kasper/ALE/hpsg').