Select this to skip to main content [CSUSB] >> [CNS] >> [Comp Sci Dept] >> [R J Botting] >> [CSci620] >> lab16 [Source]
[Index] [Schedule] [Syllabi] [Text] [Labs] [Projects] [Resources] [Search] [Grading]
Notes: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
Thu May 20 16:23:13 PDT 2004


    CS620 LISP Laboratory Number 3

      Check out New things on the Course Web Page

      [ ]


      This lab should teach you how to create and use new functions that manipulate lists. You should record your insights and confusions in a page or two of notes.

      Let me know by calling me across to your workstation when done. To earn full credit the work must be done before the end of the lab.

      Required Work

      Use a text editor and the XLISP system to develop a working version of the meta-interpreter in the text.

      Work in pairs of one, two, or three people at on machine. It is best if one person has the book and dictates the code, one person types, and the third person (if any) takes notes and comments on what is going on. Change roles very now and then.


      1. If the book has (equal ......) do not type (= .....). '=' is for numbers only.
      2. The only known error is in the last branch of evunconds, line 3 on page 192: (t eval body) should be (t (eval body)).


      A page of notes (WWW, online, offline) on the functions in the last part of the LISP chapter. Include what you have learned by coding and debugging them.


    Look at the source code for XLISP

    [ ]

    To Leave LISP

    To exit lisp, input the EOT character CTRL/D

. . . . . . . . . ( end of section CS620 LISP Laboratory Number 2) <<Contents | Index>>

Dirty LISP

It is possible to write LISP code that is full of loops and the equivalent of {...} and assignments. The key operators are: PROG, PROGN, DO, DO*,...

You should resist the temptation to use these since your task is to learn functional thinking... which avoids these concepts.

In more advanced classes you may use (LET ....) and (LET* ....) to avoid an intermediate function.


  • BNF::="Backus-Naur Form", for syntax and grammar, developed by Backus and Naur.
  • EBNF::="Extended " BNF.
  • HTML::= "HyperText Markup Language", used on the WWW.
  • HTML_page::syntax= "<HTML>" head body.
  • Java::="An " OO " Language from Sun".
  • LISP::= "LISt Processing Language".
  • LRM::="Language Reference Manual".
  • OO::="Object-Oriented".
  • Prolog::="Programming in Logic".
  • TBA::="To Be Announced".
  • UML::="Unified Modeling Language".
  • URL::=Universal_Resource_Locator,
  • Universal_Resource_Locator::syntax= protocol ":" location, where
    1. protocol::= "http" | "ftp" | "mailto" | ... ,
    2. location::= O( "//" host) O(pathname).

    (End of Net)
  • WWW::= See, index to web site for this class.
  • XBNF::="eXtreme" BNF, developed by the teacher from EBNF, designed to ASCII input of syntax, semantics, and other formal specifications.

    Formulae and Definitions in Alphabetical Order