...
- a Scheme program in the file
boolsimp.ss
equivalent to the Java program that you are required to write; - a Java "stub" file
boolSimp.dj1
that defines a composite hierarchy of "abstract syntax" tree classes rooted in the classForm
representing boolean expressions; - a Java library file
Parser.java
contain a classParser
with- a
read()
method that reads a boolean expression represented in "Scheme form" and returns the corresponsing JavaForm
abstract syntax tree and - a (commented out)
reduce()
method that composes the visitors you must write inboolSimp.dj1
to simplify reduce whatever formula theParser
instance contains to simplified form.
- a
- a Java "stub" test file
boolSimpTest.java
that includes some rudimentary tests of the code in theboolSimp.dj1
stub file.
...
The interpreter version of the support code replaces the ConvertToIf
, Normalize
, HeadNormalize
, Evaluate
, and Print}}
visitors by methods named {{convertToIf
, normalize
, headNormalize
, eval
, and print
.
...
- boolsimp.ss is the reference Scheme program.
- BoolSimp.dj1 is a stub program for a visitor solution.
- BoolSimpTest.java is a stub test file for a visitor solution.
- Parser.java is a parser file for a visitor solution.
- interpBoolSimpInterpBoolSimp.dj1 is a stub program for an interpreter solution.
- InterpBoolSimpTest.java is a stub test file for an interpreter solution.
- InterpParser.java is a parser file for an interpreter solution.
...