/* Part2Test.java */

/* A class to perform some basic tests on Expressions. */
public class Part2Test {

  /* Test the Expression class. */
  static public void main (String [] argv) {

    /* E1 is equivalent to (sequence (set x 6) (* x (+ 1 x))) */
    Expression v6 = Value.make(6);
    Expression v1 = Value.make(1);
    Expression x = new VarExpr("x");
    Expression e1 = 
      new SeqExpr(new SetExpr(new VarExpr("x"), v6), 
		  new  MultExpr(x, new AddExpr(v1, x)));
    Value r1 = e1.eval();
    System.out.println(e1.toString() + " = " + r1.toString());
  }
}