15-851 Computation & Deduction |
Spring 1997 Frank Pfenning |
A draft of a brief users guide is available in HTML, DVI, PostScript, or PDF format (the latter is searchable, but requires Adobe Acrobat Reader, Version 3.0 or higher). This guide currently only describes the Elf server which is intended to be run as an inferior process to Emacs. At present, this is by far the most efficient way to check signatures and execute Elf code. The installation at CMU is described below.
The recommended way to run Elf is as an inferior process to Emacs. The version installed at CMU should run on the Sun Sparcs, Sun UltaSparcs, and Dec Alpha machines in the Andrew and CS computing environments under XEmacs (preferred) and FSF Emacs 19. If you have problems, or if you need binaries for another architecture, please drop me a note.
If you have access to the cs.cmu.edu cell on AFS (which should be the
case from the andrew.cmu.edu cell), you can simply include the
following lines in your .emacs
file.
(setq load-path (cons "/afs/cs/user/fp/courses/comp-ded/lib/emacs" load-path)) (autoload 'elf-mode "elf-menus" "Major mode for editing Elf source." t) (autoload 'elf-server "elf-menus" "Run an inferior Elf server." t) (autoload 'elfsml "elf-menus" "Run an inferior ElfSML process." t) (setq auto-mode-alist (cons '("\\.elf$" . elf-mode) (cons '("\\.quy$" . elf-mode) auto-mode-alist))) (setq elf-server-program "/afs/cs/user/fp/courses/comp-ded/bin/elf-server") (setq elfsml-program "/afs/cs/user/fp/courses/comp-ded/bin/elfsml")
We show some frequent commands below, in the order they would normally be used. Note that the Elf pull-down menu in the menu-bar references all these commands, which can help when you learn how to use the system.
First, we assume your are browsing the Mini-ML example in directory /afs/cs/user/fp/courses/comp-ded/elf/mini-ml/
.
We assume your .emacs
file is set up as described above and
your are visiting the file mini-ml.elf
. The current
query or declaration refers to the one under the cursor in the current
buffer.
M-x elf-server-configure ; select default CONFIG C-c C-c ; type-check and load current configuration C-x C-f examples.quy ; visit example query file C-c C-e ; execute current query
If you are developing your own code, you should set up your own
CONFIG
file and add to it as you go along. For writing
Elf code, you should consider the syntax highlighting which you can
enable from the Menu bar in XEmacs (but not in FSF Gnu Emacs).
In addition to the commands above, you are also likely to use
the following.
Tab ; smart indent line C-c C-s ; type-check and load current file only C-c C-d ; type-check current declaration only C-c ` ; goto next error location in source C-c C-i ; interrrupt Elf server
Please see the Elf Users Guide or
the file
/afs/cs/user/fp/courses/comp-ded/lib/emacs/README
for
further information.
Elf can also be run directly from a shell, but the interface was not
designed for it. Please see Elf
Users Guide or the file
/afs/cs/user/fp/courses/comp-ded/elf/server.txt
for further
information.