HW1: Enconding Cyptarithmetic Puzzles:
Here you can find some lisp files to handle the CNF formulas and two SAT solvers. You can use the binaries of MiniSat and WalkSat to solve the your assignment. The binary can be run at the Unix machines in the department, alternatively you can compile the source on your own machine as well. Follow the README file that c ontains instructions and descriptions of the files you need. This assignment is now due on Thursday September 18th.
Introduction to Emacs, Lisp and Slime:
Here you will find few pointers to getting yourself started with Lisp. One of the first things you need to get familiar with is Emacs and its interface with Lisp.
Emacs: To get your hands dirty with Emacs you should type “emacs” on your terminal, then “C-x help t” (This means hold the Control key while typing “x”, then type “help”, then “t”). Follow the instructions and you’ll be in a good shape to one of the best text-editor-developing tool there is out there.
Lisp: Just to get started, type “lisp” on your terminal and go through the tutorials by Myrosia Dzikovska (.pdf and .pdf) and Daphne Liu (.pdf), and this Lisp primer.
However, you should migrate to run Lisp from Emacs. This gives you the most power of going between writing and testing Lisp. For instance, Emacs keeps a buffer with the history of your Lisp session. This way you can view all that you have typed, as well as what Lisp functions have returned. Also, key bindings from Emacs allows you to find online documentation about functions you use, tab completion, and other nice features.
A simple way to do this is by running a shell in Emacs by typing “M-x shell”. Then type “lisp” (if that does not work, type the full path where lisp resides. On my mac, this is /opt/local/bin/lisp. Type “which lisp” on your terminal to find out).
Another way to run Lisp from Emacs is to download this file, place it in your bin directory (~/bin), make it executable (chmod +x), and type ecll (or ugecll). You should at this point have Emacs with a buffer running Lisp. If you do not, check that your path includes your bin directory. For more information on how to debug your programs take a look at this file.
Yet, a better way to use Lisp within Emacs is with Slime (the Superior Lisp Interaction Mode for Emacs). Add the lines below to your .emacs file, then try some slime commands and definitely look at the manual.
(add-to-list 'load-path "/usr/grads/share/emacs/site-lisp/slime/") ;; your SLIME directory. Notice SLIME is installed
;;by default in the graduate network, Undergraduates
;;need to find the path for their installation.
(setq inferior-lisp-program "/usr/staff/bin/sbcl") ; your Lisp system
(require 'slime)
(slime-setup)
Other people’s websites with useful information are here: