----------------------------------------------------------------------

CSE 401 Autumn 2001 (Henry)

[Home] [Admin] [Details] [Help] [Other]

Assignments 7 (Reading and Exploration)

($Revision: 1.5 $)

----------------------------------------------------------------------

Do by Friday, November 16, 2001

There will be no turn in needed for this assignment, although you will be expected to have done the work!

  • Read ASU 6.1 through 6.4 on type checking; 6.5 is optional.

  • Read ASU 8.1 through 8.7 (eg, all of chapter 8) on intermediate code generation and control flow translation schemes.

  • Lower priority (you'll eventually have to read this): Read ASU 7.1 through 7.5 on run time environments data storage, and procedure calling.

  • Read this high level description of floating point numbers, as encoded using the IEEE-754 Floating point standard. This is what the "double" precision data type in C uses, as you were experimenting with in the last assignment involving lex and yacc. Read the discussion of the special values of floating point numbers, as well as the a table that describes the algebra of special floating point numbers.

  • As a group, read, contemplate (if not understand!) and discuss Alan Perlis' epigrams of programming . These epigrams are short sayings that encapsulate a lot of wisdom about computing and computer science. Perlis was involved in computing since the mid 1950's, and was a faculty member at Yale University. He was involved in the design of several programming languages, the implementation of many more, and was a champion of the language APL.

  • As a group, experiment with simple aspects of the unix program dc. dc is a simple postfix desk calculator. dc's arithmetic is based on scaled arbitrary precision integers.
    • Read the manual page for dc (do a "man dc"). The command interface is cryptic, to say the least!
    • Invoke dc from the shell, and try typing postfix expressions to it.
    • The operator 'p' prints out the top item of the stack. For example, "2 3 + p" will print 5; "2 16 ^ p" will print 65536; "2 100 ^ p" will print many digits, and so forth for integers.
    • Set the scale factor using the unary 'k' operator; this will determine where the decimal point goes. Thus, "3 k 1.234 1.234 + p" will print 2.468, and so on.

----------------------------------------------------------------------

401admin at cs.washington.edu