Logo University of Washington Department of Computer Science & Engineering
 CSE 401Au '02: Assignment #1, Due Friday, 10/11/02
  CSE Home  About Us    Search    Contact Info 

Individual homework

#1 - #4 should be done and turned in individually, not as a group.

  1. Define a comprehensive regular expression for Java-style or C-style floating point constants. The following are valid numbers (just examples, not an exhaustive collection):
    56
    +234.775
    .45
    -76.
    345E+5
    3.5e-2
    Use symbols, otherwise things will turn out pretty ugly pretty soon (even though in the beginning they look pretty pretty). Good decomposition works everywhere, and regular exceptions are no expression. Or vice versa.

    Click here to see a solution.

  2. Define a regular expression for calendaristic dates. Choose some reasonable format, and try to reject erroneus dates. Specify what "loopholes" your system has (what invalid dates pass through).

  3. ASU 3.16cd

  4. ASU 3.17 (for 3.16cd only) Be sure to use Algorithm 3.2.

Project

If you have formed a group, the following may be done by your group; turn in only one solution per group.

To form a group, send email to our TA, stavan at cs, giving the names and unix login of each group member. Two persons per group are strongly recommended.

  1. First, copy and build the base pl/0 compiler, using the directions here. Test it on the sample program here.

  2. Write, compile, and run a PL/0 program that gets integers separated with spaces, then last of which is zero, then outputs them in reverse order.

  3. Read the compiler code and turn in a textual description of its design. Imagine you need to explain the program to a colleague to bring him or her up to speed with extending the compiler. The description should include the principal types and hierarchies, how objects work together, what important conventions are used throughout.

CSE logo Department of Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to cse401-webmaster at cs.washington.edu]