Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The course staff is providing function functions parse and unparse in the file parse.ss that convert boolean expressions in Scheme notation to a simple inductively defined type called boolExp and vice-versa. The coding of parse and unparse is not difficult, but it is tedious (like most parsing) so the course staff is providing this code rather than asking students to write it. The Scheme primitive read: -> SchemeExp is a procedure of no arguments that reads a Scheme expression from the console. DrScheme pops up an input box to serve as the console when (read) is executed.

...

Code Block
parse: bool-SchemeExp -> boolExp
unparse: boolExp -> bool-SchemeExp

The course staff is also providing a simple test file for the eval functtion. A good solution to this problem will include much more comprehensive test data for all functions, including some much larger
test cases for reduce. The normalize function is difficult to test on large data because the printed
output for some important normalized trees (represented as DAGs (Directed Acyclic Graphs) in memory) is so large.

Given a parsed input of type boolExp , the simplification process consists of following four phases:

...