CS 394P: Introduction to GLISP

Due: April 6, 2005.

The goals of this exercise are to begin using GLISP and to try it on some examples.

/p/bin/xgcl (Gnu Common Lisp with X interface) should be used for the GLISP exercises. Use (load "/u/novak/gll") on a Linux workstation, or (load "/u/novak/gl") on a Sun workstation, to load the GLISP files. Use (bye) to exit Lisp.

  1. Examine the code in the file glexample.lsp and compile and run the examples and write additions as shown in the file. Hand in a copy of your Lisp output showing the examples and your code. A GLISP function is compiled automatically the first time it is called, so it is not necessary to compile functions explicitly; you can use (glp) after running a function to see the compiled code.

    Some useful functions are:

  2. Write a glispobjects description for a data structure that has circle as a superclass. Test it to verify that circle properties are available by inheritance.

  3. Write a glispobjects description for a data structure that could be viewed as a vector. Write a glispobjects description for the vector view and verify that vector properties, such as magnitude, are available through the view. The file /u/novak/glisp/vector.lsp contains definitions for vectors.

  4. Run GEV (GLISP Edit Value) on the HPP data, using (gev hpp), and on examples of your data to understand how GEV works.