/cs4500wc

My CS4500 Project from the Fall of 2011, taught by Will Clinger.

Primary LanguageScala

Group:   Cool Project, Bro!
Version: 0.8
Date:    12/11/11

---- NOTES ----
This is a software project written for the Fall session of CS4500 taught by
Will Clinger by:

Adam Alix <adam.alix@gmail.com>
Paul Murray <pawl_murray@gmail.com
Phil Quinn <pquinn@ccs.neu.edu>

Clients please see included software_upgrade_request.txt.

---- BUILDING ----
This software can be built by executing `make' in the project's base directory.

EX:

$ cd <project-base-dir>
$ make

---- UNIT TESTING ----
Running unit tests is not available on the CCIS Linux machines as of now.  To
run this package's unit tests, you must install Scala Build Tools on a machine
that has maven version 2 or later installed:

https://github.com/harrah/xsbt/wiki
http://maven.apache.org/

Once you have installed sbt, you can run unit tests by invoking the following
commands:

$ sbt compile
$ sbt test

---- RUNNING ----
To run the software, you must first build it (make) and then use the cs4500
script in the project's base directory to invoke it:

$ cd <project-base-dir>
$ ./cs4500 file1 file2

`file1' is the name of the input text file containing the specification for an
ADT written in the grammar specified by the Homework Assignment 8.  For grammar
details, see Grammer section below.  URL:

http://www.ccs.neu.edu/course/cs4500wc/assignment8.txt

`file2' is the name of the output file to which R6RS scheme tests will be
written.  The file will be created within the directory it is called from so
long as the caller has write permissions.

---- GRAMMAR ----
Grammar for input files (file1):

    <input>  ::=  "Signatures:" <signatures> "Equations:" <equations>

    <signatures>  ::=  <signature>
                    |  <signature> <signatures>

    <signature>  ::=  "ADT:" <typename> <operationSpecs>

    <typename>  ::=  <identifier>

    <operationSpecs>  ::=  <operationSpec>
                        |  <operationSpec> <operationSpecs>

    <operationSpec>  ::=  <operation> ":"            "->" <type>
                       |  <operation> ":" <argTypes> "->" <type>

    <operation>  ::=  <identifier>

    <argTypes>  ::=  <type>
                  |  <type> "*" <argTypes>

    <type>  ::=  "int"
              |  "boolean"
              |  "character"
              |  "string"
              |  <typename>

    <equations>  ::=  <empty>
                   |  <equation> <equations>

    <equation>  ::=  <term> "=" <rhs>

    <term>  ::=  <identifier>
              |  "(" <operation> <args> ")"

    <args>  ::=  <empty>
              |  <term> <args>

    <rhs>  ::=  "#t"  |  "#f"
             |  <uinteger 10>
             |  <identifier>
             |  "(" <operation> <rhsArgs> ")"
             |  "(" <primitive> <rhsArgs> ")"

    <rhsArgs>  ::=  <empty>
                 |  <rhs> <rhsArgs>

    <primitive>  ::=  "not"
                   |  "+"  |  "-"  |  "*"
                   |  "="  |  "<"  |  ">"

---- CHANGELOG ----
12/11/11:
This is the final version of the software project.  The following are new
features:
 - Enhanced value generation
 - Random value generation
 - Expression rewriting according to equations
 - Output executable scheme expressions
 - Comprehensive tests
 - Enhanced code documentation

Clients, please see included software_upgrade_request.txt for additional
information regarding the version of Scala used to build this application.

Bump in Version (0.2 -> 0.8)

11/4/11:
Prototype 2 of the software.  This version correclty parses all Equations but
does not yet apply the rewrite rules found in Equations.  Due to a backlog of
work involving attempting to port code to Scala version 2.7.5, our prototype is
not complete.

We have included the Scala library and compiler jars in order to run our
software on CCIS machines.  Version .3 will be feature complete and a work
around for the CCIS Scala version has been planned.

Bump in Version (0.1 -> 0.2)

10/18/11:
Initial software prototype for first homework assignment.

---- ACKNOWLEDGEMENTS ----
This software was built using tools included with the standard distribution of
Scala 2.9.1:
http://www.scala-lang.org/downloads

Testing was made feasible (read: reasonable) by the ScalaTest library:
http://www.scalatest.org/download

---- NOTES ON USING LARCENY, FROM WILL CLINGER ----
In Larceny, the most convenient way to run the black-box test
program is to place all of the libraries to be tested within
a single file, followed by the black-box test program.  (If a
library L1 is imported by some other library L2, then L1 must
come first within that file.)  Suppose, for example, that the
libraries to be tested are in files T1.sls through Tn.sls, and
the black-box test program generated by your software is in
file2.  The black-box test program can then be run as follows:

    % cat T1.sls ... Tn.sls file2 > complete.sps
    % larceny --r6rs --program complete.sps

Equivalently:

    % cat T1.sls ... Tn.sls file2 | larceny --r6rs