// ===========================================================================
// This file has been generated by
// xtc Factory Factory, version 1.13.3,
// (C) 2004-2008 Robert Grimm,
// on Thursday, May 1, 2008 at 11:37:15 PM.
// Edit at your own risk.
// ===========================================================================

package xtc.lang.overlog;

import java.util.List;

import xtc.tree.Node;
import xtc.tree.GNode;

/**
 * Node factory <code>xtc.lang.overlog.OverlogJavaFactory</code>.
 *
 * <p />This class has been generated by
 * the xtc Factory Factory, version 1.13.3,
 * (C) 2004-2008 Robert Grimm.
 */
public class OverlogJavaFactory {

  /** Create a new node factory. */
  public OverlogJavaFactory() {
    // Nothing to do.
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node keys(String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("PrimitiveType", "int");
    Node v$3 = GNode.create("Dimensions", "[");
    Node v$4 = GNode.create("Type", v$2, v$3);
    Node v$5 = GNode.create("PrimitiveType", "int");
    Node v$6 = GNode.create("Dimensions", "[");
    Node v$7 = GNode.create("ArrayInitializer", false);
    Node v$8 = GNode.create("NewArrayExpression", v$5, null, v$6, v$7);
    Node v$9 = GNode.create("Declarator", name, null, v$8);
    Node v$10 = GNode.create("Declarators", v$9);
    Node v$11 = GNode.create("FieldDeclaration", v$1, v$4, v$10);
    return v$11;
  }

  /**
   * Create an expression statement.
   *
   * @param name The name.
   * @param lifetime The lifetime.
   * @param size The size.
   * @param keys The keys.
   * @return The generic node.
   */
  public Node tableInit(Node name, Node lifetime, Node size, Node keys) {
    Node v$1 = GNode.create("PrimaryIdentifier", "tables");
    Node v$2 = GNode.create("QualifiedIdentifier", "ID");
    Node v$3 = GNode.create("Arguments", name);
    Node v$4 = GNode.create("NewClassExpression", null, null, v$2, v$3, null);
    Node v$5 = GNode.create("QualifiedIdentifier", "MaterializedTable");
    Node v$6 = GNode.create("QualifiedIdentifier", "ID");
    Node v$7 = GNode.create("Arguments", name);
    Node v$8 = GNode.create("NewClassExpression", null, null, v$6, v$7, null);
    Node v$9 = GNode.create("Arguments", v$8, lifetime, size, keys);
    Node v$10 = GNode.create("NewClassExpression", null, null, v$5, v$9, 
      null);
    Node v$11 = GNode.create("Arguments", v$4, v$10);
    Node v$12 = GNode.create("CallExpression", v$1, null, "put", v$11);
    Node v$13 = GNode.create("ExpressionStatement", v$12);
    return v$13;
  }

  /**
   * Create an expression statement.
   *
   * @param name The name.
   * @param lifetime The lifetime.
   * @param size The size.
   * @return The generic node.
   */
  public Node periodicInit(Node name, Node lifetime, Node size) {
    Node v$1 = GNode.create("PrimaryIdentifier", "tables");
    Node v$2 = GNode.create("QualifiedIdentifier", "ID");
    Node v$3 = GNode.create("Arguments", name);
    Node v$4 = GNode.create("NewClassExpression", null, null, v$2, v$3, null);
    Node v$5 = GNode.create("QualifiedIdentifier", "MaterializedTable");
    Node v$6 = GNode.create("QualifiedIdentifier", "ID");
    Node v$7 = GNode.create("Arguments", name);
    Node v$8 = GNode.create("NewClassExpression", null, null, v$6, v$7, null);
    Node v$9 = GNode.create("PrimitiveType", "int");
    Node v$10 = GNode.create("Dimensions", "[");
    Node v$11 = GNode.create("IntegerLiteral", "1");
    Node v$12 = GNode.create("ArrayInitializer", v$11);
    Node v$13 = GNode.create("NewArrayExpression", v$9, null, v$10, v$12);
    Node v$14 = GNode.create("Arguments", v$8, lifetime, size, v$13);
    Node v$15 = GNode.create("NewClassExpression", null, null, v$5, v$14, 
      null);
    Node v$16 = GNode.create("Arguments", v$4, v$15);
    Node v$17 = GNode.create("CallExpression", v$1, null, "put", v$16);
    Node v$18 = GNode.create("ExpressionStatement", v$17);
    return v$18;
  }

  /**
   * Create an expression statement.
   *
   * @param tuplename The tuplename.
   * @param name The name.
   * @return The generic node.
   */
  public Node tableAddPeriodic(Node tuplename, Node name) {
    Node v$1 = GNode.create("PrimaryIdentifier", "tables");
    Node v$2 = GNode.create("QualifiedIdentifier", "ID");
    Node v$3 = GNode.create("Arguments", tuplename);
    Node v$4 = GNode.create("NewClassExpression", null, null, v$2, v$3, null);
    Node v$5 = GNode.create("Arguments", v$4);
    Node v$6 = GNode.create("CallExpression", v$1, null, "get", v$5);
    Node v$7 = GNode.create("PrimaryIdentifier", "myAddr");
    Node v$8 = GNode.create("IntegerLiteral", "1");
    Node v$9 = GNode.create("IntegerLiteral", "1");
    Node v$10 = GNode.create("Arguments", v$7, v$8, v$9);
    Node v$11 = GNode.create("NewClassExpression", null, null, name, v$10, 
      null);
    Node v$12 = GNode.create("Arguments", v$11);
    Node v$13 = GNode.create("CallExpression", v$6, null, "insert", v$12);
    Node v$14 = GNode.create("ExpressionStatement", v$13);
    return v$14;
  }

  /**
   * Create an expression statement.
   *
   * @param tuplename The tuplename.
   * @param name The name.
   * @return The generic node.
   */
  public Node tableAddTuple(Node tuplename, Node name) {
    Node v$1 = GNode.create("PrimaryIdentifier", "tables");
    Node v$2 = GNode.create("QualifiedIdentifier", "ID");
    Node v$3 = GNode.create("Arguments", tuplename);
    Node v$4 = GNode.create("NewClassExpression", null, null, v$2, v$3, null);
    Node v$5 = GNode.create("Arguments", v$4);
    Node v$6 = GNode.create("CallExpression", v$1, null, "get", v$5);
    Node v$7 = GNode.create("Arguments", false);
    Node v$8 = GNode.create("NewClassExpression", null, null, name, v$7, 
      null);
    Node v$9 = GNode.create("Arguments", v$8);
    Node v$10 = GNode.create("CallExpression", v$6, null, "insert", v$9);
    Node v$11 = GNode.create("ExpressionStatement", v$10);
    return v$11;
  }

  /**
   * Create a for statement.
   *
   * @param name The name.
   * @param tablename The tablename.
   * @return The generic node.
   */
  public Node joinLoop(String name, Node tablename) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "tables");
    Node v$5 = GNode.create("PrimaryIdentifier", "IDMap");
    Node v$6 = GNode.create("Arguments", tablename);
    Node v$7 = GNode.create("CallExpression", v$5, null, "getId", v$6);
    Node v$8 = GNode.create("Arguments", v$7);
    Node v$9 = GNode.create("CallExpression", v$4, null, "get", v$8);
    Node v$10 = GNode.create("Arguments", false);
    Node v$11 = GNode.create("CallExpression", v$9, null, "elements", v$10);
    Node v$12 = GNode.create("EnhancedForControl", v$1, v$3, name, v$11);
    Node v$13 = GNode.create("Block", false);
    Node v$14 = GNode.create("ForStatement", v$12, v$13);
    return v$14;
  }

  /**
   * Create a for statement.
   *
   * @param name The name.
   * @param tablename The tablename.
   * @param statement The statement.
   * @return The generic node.
   */
  public Node joinLoopStmnt(String name, Node tablename, Node statement) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "tables");
    Node v$5 = GNode.create("PrimaryIdentifier", "IDMap");
    Node v$6 = GNode.create("Arguments", tablename);
    Node v$7 = GNode.create("CallExpression", v$5, null, "getId", v$6);
    Node v$8 = GNode.create("Arguments", v$7);
    Node v$9 = GNode.create("CallExpression", v$4, null, "get", v$8);
    Node v$10 = GNode.create("Arguments", false);
    Node v$11 = GNode.create("CallExpression", v$9, null, "elements", v$10);
    Node v$12 = GNode.create("EnhancedForControl", v$1, v$3, name, v$11);
    Node v$13 = GNode.create("ExpressionStatement", statement);
    Node v$14 = GNode.create("Block", v$13);
    Node v$15 = GNode.create("ForStatement", v$12, v$14);
    return v$15;
  }

  /**
   * Create a class declaration.
   *
   * @param name The name.
   * @param count The count.
   * @param idname The idname.
   * @return The generic node.
   */
  public Node tupleClass(String name, Node count, Node idname) {
    Node v$1 = GNode.create("Modifier", "public");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$4 = GNode.create("Type", v$3, null);
    Node v$5 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$6 = GNode.create("Type", v$5, null);
    Node v$7 = GNode.create("TypeArguments", v$6);
    Node v$8 = GNode.create("TypeInstantiation", "Marshaller", v$7);
    Node v$9 = GNode.create("InstantiatedType", v$8);
    Node v$10 = GNode.create("Type", v$9, null);
    Node v$11 = GNode.create("Implementation", v$4, v$10);
    Node v$12 = GNode.create("Modifiers", false);
    Node v$13 = GNode.create("QualifiedIdentifier", "Object");
    Node v$14 = GNode.create("Type", v$13, null);
    Node v$15 = GNode.create("Dimensions", "[");
    Node v$16 = GNode.create("Declarator", "terms", v$15, null);
    Node v$17 = GNode.create("Declarators", v$16);
    Node v$18 = GNode.create("FieldDeclaration", v$12, v$14, v$17);
    Node v$19 = GNode.create("Modifiers", false);
    Node v$20 = GNode.create("QualifiedIdentifier", "ID");
    Node v$21 = GNode.create("Type", v$20, null);
    Node v$22 = GNode.create("Declarator", "id", null, null);
    Node v$23 = GNode.create("Declarators", v$22);
    Node v$24 = GNode.create("FieldDeclaration", v$19, v$21, v$23);
    Node v$25 = GNode.create("Modifiers", false);
    Node v$26 = GNode.create("QualifiedIdentifier", "String");
    Node v$27 = GNode.create("Type", v$26, null);
    Node v$28 = GNode.create("Declarator", "name", null, null);
    Node v$29 = GNode.create("Declarators", v$28);
    Node v$30 = GNode.create("FieldDeclaration", v$25, v$27, v$29);
    Node v$31 = GNode.create("Modifier", "public");
    Node v$32 = GNode.create("Modifiers", v$31);
    Node v$33 = GNode.create("FormalParameters", false);
    Node v$34 = GNode.create("PrimaryIdentifier", "terms");
    Node v$35 = GNode.create("QualifiedIdentifier", "Object");
    Node v$36 = GNode.create("ConcreteDimensions", count);
    Node v$37 = GNode.create("NewArrayExpression", v$35, v$36, null, null);
    Node v$38 = GNode.create("Expression", v$34, "=", v$37);
    Node v$39 = GNode.create("ExpressionStatement", v$38);
    Node v$40 = GNode.create("PrimaryIdentifier", "id");
    Node v$41 = GNode.create("PrimaryIdentifier", "IDMap");
    Node v$42 = GNode.create("Arguments", idname);
    Node v$43 = GNode.create("CallExpression", v$41, null, "getId", v$42);
    Node v$44 = GNode.create("Expression", v$40, "=", v$43);
    Node v$45 = GNode.create("ExpressionStatement", v$44);
    Node v$46 = GNode.create("PrimaryIdentifier", "name");
    Node v$47 = GNode.create("QualifiedIdentifier", "String");
    Node v$48 = GNode.create("Arguments", idname);
    Node v$49 = GNode.create("NewClassExpression", null, null, v$47, v$48, 
      null);
    Node v$50 = GNode.create("Expression", v$46, "=", v$49);
    Node v$51 = GNode.create("ExpressionStatement", v$50);
    Node v$52 = GNode.create("Block", v$39, v$45, v$51);
    Node v$53 = GNode.create("ConstructorDeclaration", v$32, null, name, 
      v$33, null, v$52);
    Node v$54 = GNode.create("Modifier", "public");
    Node v$55 = GNode.create("Modifiers", v$54);
    Node v$56 = GNode.create("FormalParameters", false);
    Node v$57 = GNode.create("PrimaryIdentifier", "terms");
    Node v$58 = GNode.create("QualifiedIdentifier", "Object");
    Node v$59 = GNode.create("ConcreteDimensions", count);
    Node v$60 = GNode.create("NewArrayExpression", v$58, v$59, null, null);
    Node v$61 = GNode.create("Expression", v$57, "=", v$60);
    Node v$62 = GNode.create("ExpressionStatement", v$61);
    Node v$63 = GNode.create("PrimaryIdentifier", "id");
    Node v$64 = GNode.create("PrimaryIdentifier", "IDMap");
    Node v$65 = GNode.create("Arguments", idname);
    Node v$66 = GNode.create("CallExpression", v$64, null, "getId", v$65);
    Node v$67 = GNode.create("Expression", v$63, "=", v$66);
    Node v$68 = GNode.create("ExpressionStatement", v$67);
    Node v$69 = GNode.create("PrimaryIdentifier", "name");
    Node v$70 = GNode.create("QualifiedIdentifier", "String");
    Node v$71 = GNode.create("Arguments", idname);
    Node v$72 = GNode.create("NewClassExpression", null, null, v$70, v$71, 
      null);
    Node v$73 = GNode.create("Expression", v$69, "=", v$72);
    Node v$74 = GNode.create("ExpressionStatement", v$73);
    Node v$75 = GNode.create("PrimaryIdentifier", "terms");
    Node v$76 = GNode.create("IntegerLiteral", "0");
    Node v$77 = GNode.create("SubscriptExpression", v$75, v$76);
    Node v$78 = GNode.create("QualifiedIdentifier", "NetAddr");
    Node v$79 = GNode.create("Arguments", false);
    Node v$80 = GNode.create("NewClassExpression", null, null, v$78, v$79, 
      null);
    Node v$81 = GNode.create("Expression", v$77, "=", v$80);
    Node v$82 = GNode.create("ExpressionStatement", v$81);
    Node v$83 = GNode.create("Block", v$62, v$68, v$74, v$82);
    Node v$84 = GNode.create("ConstructorDeclaration", v$55, null, name, 
      v$56, null, v$83);
    Node v$85 = GNode.create("Modifier", "public");
    Node v$86 = GNode.create("Modifiers", v$85);
    Node v$87 = GNode.create("QualifiedIdentifier", "ID");
    Node v$88 = GNode.create("Type", v$87, null);
    Node v$89 = GNode.create("FormalParameters", false);
    Node v$90 = GNode.create("PrimaryIdentifier", "id");
    Node v$91 = GNode.create("ReturnStatement", v$90);
    Node v$92 = GNode.create("Block", v$91);
    Node v$93 = GNode.create("MethodDeclaration", v$86, null, v$88, "getId", 
      v$89, null, null, v$92);
    Node v$94 = GNode.create("QualifiedIdentifier", "SuppressWarnings");
    Node v$95 = GNode.create("StringLiteral", "\"unchecked\"");
    Node v$96 = GNode.create("Annotation", v$94, v$95);
    Node v$97 = GNode.create("Modifier", "public");
    Node v$98 = GNode.create("Modifiers", v$96, v$97);
    Node v$99 = GNode.create("TypeParameter", "T", null);
    Node v$100 = GNode.create("TypeParameters", v$99);
    Node v$101 = GNode.create("QualifiedIdentifier", "T");
    Node v$102 = GNode.create("Type", v$101, null);
    Node v$103 = GNode.create("Modifiers", false);
    Node v$104 = GNode.create("PrimitiveType", "int");
    Node v$105 = GNode.create("Type", v$104, null);
    Node v$106 = GNode.create("FormalParameter", v$103, v$105, null, "index", 
      null);
    Node v$107 = GNode.create("FormalParameters", v$106);
    Node v$108 = GNode.create("QualifiedIdentifier", "T");
    Node v$109 = GNode.create("Type", v$108, null);
    Node v$110 = GNode.create("PrimaryIdentifier", "terms");
    Node v$111 = GNode.create("PrimaryIdentifier", "index");
    Node v$112 = GNode.create("SubscriptExpression", v$110, v$111);
    Node v$113 = GNode.create("CastExpression", v$109, v$112);
    Node v$114 = GNode.create("ReturnStatement", v$113);
    Node v$115 = GNode.create("Block", v$114);
    Node v$116 = GNode.create("MethodDeclaration", v$98, v$100, v$102, 
      "getTerm", v$107, null, null, v$115);
    Node v$117 = GNode.create("Modifier", "public");
    Node v$118 = GNode.create("Modifiers", v$117);
    Node v$119 = GNode.create("PrimitiveType", "int");
    Node v$120 = GNode.create("Type", v$119, null);
    Node v$121 = GNode.create("FormalParameters", false);
    Node v$122 = GNode.create("PrimaryIdentifier", "terms");
    Node v$123 = GNode.create("SelectionExpression", v$122, "length");
    Node v$124 = GNode.create("ReturnStatement", v$123);
    Node v$125 = GNode.create("Block", v$124);
    Node v$126 = GNode.create("MethodDeclaration", v$118, null, v$120, 
      "size", v$121, null, null, v$125);
    Node v$127 = GNode.create("Modifier", "public");
    Node v$128 = GNode.create("Modifiers", v$127);
    Node v$129 = GNode.create("QualifiedIdentifier", "Object");
    Node v$130 = GNode.create("Dimensions", "[");
    Node v$131 = GNode.create("Type", v$129, v$130);
    Node v$132 = GNode.create("FormalParameters", false);
    Node v$133 = GNode.create("PrimaryIdentifier", "terms");
    Node v$134 = GNode.create("ReturnStatement", v$133);
    Node v$135 = GNode.create("Block", v$134);
    Node v$136 = GNode.create("MethodDeclaration", v$128, null, v$131, 
      "terms", v$132, null, null, v$135);
    Node v$137 = GNode.create("ClassBody", 9).
      add(v$18).add(v$24).add(v$30).add(v$53).add(v$84).add(v$93).add(v$116).
      add(v$126).add(v$136);
    Node v$138 = GNode.create("ClassDeclaration", v$2, name, null, null, 
      v$11, v$137);
    return v$138;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @param args The args.
   * @return The generic node.
   */
  public Node tupleNew(Node name, List<Node> args) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "Event");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("Arguments", args.size()).
      addAll(args);
    Node v$5 = GNode.create("NewClassExpression", null, null, name, v$4, 
      null);
    Node v$6 = GNode.create("Declarator", "e", null, v$5);
    Node v$7 = GNode.create("Declarators", v$6);
    Node v$8 = GNode.create("FieldDeclaration", v$1, v$3, v$7);
    return v$8;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @param args The args.
   * @return The generic node.
   */
  public Node tableNew(Node name, List<Node> args) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "Event");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$5 = GNode.create("PrimaryIdentifier", "TableUpdate");
    Node v$6 = GNode.create("SelectionExpression", v$5, "INSERT");
    Node v$7 = GNode.create("Arguments", args.size()).
      addAll(args);
    Node v$8 = GNode.create("NewClassExpression", null, null, name, v$7, 
      null);
    Node v$9 = GNode.create("Arguments", v$6, v$8);
    Node v$10 = GNode.create("NewClassExpression", null, null, v$4, v$9, 
      null);
    Node v$11 = GNode.create("Declarator", "e", null, v$10);
    Node v$12 = GNode.create("Declarators", v$11);
    Node v$13 = GNode.create("FieldDeclaration", v$1, v$3, v$12);
    return v$13;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @param args The args.
   * @return The generic node.
   */
  public Node tableDelete(Node name, List<Node> args) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "Event");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$5 = GNode.create("PrimaryIdentifier", "TableUpdate");
    Node v$6 = GNode.create("SelectionExpression", v$5, "DELETE");
    Node v$7 = GNode.create("Arguments", args.size()).
      addAll(args);
    Node v$8 = GNode.create("NewClassExpression", null, null, name, v$7, 
      null);
    Node v$9 = GNode.create("Arguments", v$6, v$8);
    Node v$10 = GNode.create("NewClassExpression", null, null, v$4, v$9, 
      null);
    Node v$11 = GNode.create("Declarator", "e", null, v$10);
    Node v$12 = GNode.create("Declarators", v$11);
    Node v$13 = GNode.create("FieldDeclaration", v$1, v$3, v$12);
    return v$13;
  }

  /**
   * Create an expression statement.
   *
   * @return The generic node.
   */
  public Node bufferEvent() {
    Node v$1 = GNode.create("PrimaryIdentifier", "eQueue");
    Node v$2 = GNode.create("PrimaryIdentifier", "e");
    Node v$3 = GNode.create("Arguments", v$2);
    Node v$4 = GNode.create("CallExpression", v$1, null, "buffer", v$3);
    Node v$5 = GNode.create("ExpressionStatement", v$4);
    return v$5;
  }

  /**
   * Create an expression statement.
   *
   * @return The generic node.
   */
  public Node saveEvent() {
    Node v$1 = GNode.create("PrimaryIdentifier", "matches");
    Node v$2 = GNode.create("PrimaryIdentifier", "e");
    Node v$3 = GNode.create("Arguments", v$2);
    Node v$4 = GNode.create("CallExpression", v$1, null, "add", v$3);
    Node v$5 = GNode.create("ExpressionStatement", v$4);
    return v$5;
  }

  /**
   * Create a call expression.
   *
   * @return The generic node.
   */
  public Node countCall() {
    Node v$1 = GNode.create("PrimaryIdentifier", "matches");
    Node v$2 = GNode.create("Arguments", false);
    Node v$3 = GNode.create("CallExpression", v$1, null, "size", v$2);
    return v$3;
  }

  /**
   * Create a class declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node tableInitializerClass(String name) {
    Node v$1 = GNode.create("Modifier", "public");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("QualifiedIdentifier", "OLG");
    Node v$4 = GNode.create("Type", v$3, null);
    Node v$5 = GNode.create("Extension", v$4);
    Node v$6 = GNode.create("Modifier", "public");
    Node v$7 = GNode.create("Modifiers", v$6);
    Node v$8 = GNode.create("Modifiers", false);
    Node v$9 = GNode.create("QualifiedIdentifier", "String");
    Node v$10 = GNode.create("Type", v$9, null);
    Node v$11 = GNode.create("FormalParameter", v$8, v$10, null, "host", 
      null);
    Node v$12 = GNode.create("Modifiers", false);
    Node v$13 = GNode.create("PrimitiveType", "int");
    Node v$14 = GNode.create("Type", v$13, null);
    Node v$15 = GNode.create("FormalParameter", v$12, v$14, null, "port", 
      null);
    Node v$16 = GNode.create("Modifiers", false);
    Node v$17 = GNode.create("QualifiedIdentifier", "String");
    Node v$18 = GNode.create("Type", v$17, null);
    Node v$19 = GNode.create("FormalParameter", v$16, v$18, null, 
      "epochFile", null);
    Node v$20 = GNode.create("FormalParameters", v$11, v$15, v$19);
    Node v$21 = GNode.create("PrimaryIdentifier", "host");
    Node v$22 = GNode.create("PrimaryIdentifier", "port");
    Node v$23 = GNode.create("PrimaryIdentifier", "epochFile");
    Node v$24 = GNode.create("Arguments", v$21, v$22, v$23);
    Node v$25 = GNode.create("CallExpression", null, null, "super", v$24);
    Node v$26 = GNode.create("ExpressionStatement", v$25);
    Node v$27 = GNode.create("Block", v$26);
    Node v$28 = GNode.create("ConstructorDeclaration", v$7, null, name, v$20, 
      null, v$27);
    Node v$29 = GNode.create("Modifier", "public");
    Node v$30 = GNode.create("Modifiers", v$29);
    Node v$31 = GNode.create("Modifiers", false);
    Node v$32 = GNode.create("QualifiedIdentifier", "String");
    Node v$33 = GNode.create("Type", v$32, null);
    Node v$34 = GNode.create("FormalParameter", v$31, v$33, null, "host", 
      null);
    Node v$35 = GNode.create("Modifiers", false);
    Node v$36 = GNode.create("PrimitiveType", "int");
    Node v$37 = GNode.create("Type", v$36, null);
    Node v$38 = GNode.create("FormalParameter", v$35, v$37, null, "port", 
      null);
    Node v$39 = GNode.create("FormalParameters", v$34, v$38);
    Node v$40 = GNode.create("PrimaryIdentifier", "host");
    Node v$41 = GNode.create("PrimaryIdentifier", "port");
    Node v$42 = GNode.create("Arguments", v$40, v$41);
    Node v$43 = GNode.create("CallExpression", null, null, "super", v$42);
    Node v$44 = GNode.create("ExpressionStatement", v$43);
    Node v$45 = GNode.create("Block", v$44);
    Node v$46 = GNode.create("ConstructorDeclaration", v$30, null, name, 
      v$39, null, v$45);
    Node v$47 = GNode.create("Modifier", "public");
    Node v$48 = GNode.create("Modifiers", v$47);
    Node v$49 = GNode.create("Modifiers", false);
    Node v$50 = GNode.create("QualifiedIdentifier", "NetAddr");
    Node v$51 = GNode.create("Type", v$50, null);
    Node v$52 = GNode.create("FormalParameter", v$49, v$51, null, "addr", 
      null);
    Node v$53 = GNode.create("Modifiers", false);
    Node v$54 = GNode.create("QualifiedIdentifier", "String");
    Node v$55 = GNode.create("Type", v$54, null);
    Node v$56 = GNode.create("FormalParameter", v$53, v$55, null, 
      "epochFile", null);
    Node v$57 = GNode.create("FormalParameters", v$52, v$56);
    Node v$58 = GNode.create("PrimaryIdentifier", "addr");
    Node v$59 = GNode.create("PrimaryIdentifier", "epochFile");
    Node v$60 = GNode.create("Arguments", v$58, v$59);
    Node v$61 = GNode.create("CallExpression", null, null, "super", v$60);
    Node v$62 = GNode.create("ExpressionStatement", v$61);
    Node v$63 = GNode.create("Block", v$62);
    Node v$64 = GNode.create("ConstructorDeclaration", v$48, null, name, 
      v$57, null, v$63);
    Node v$65 = GNode.create("Modifier", "public");
    Node v$66 = GNode.create("Modifiers", v$65);
    Node v$67 = GNode.create("Modifiers", false);
    Node v$68 = GNode.create("QualifiedIdentifier", "NetAddr");
    Node v$69 = GNode.create("Type", v$68, null);
    Node v$70 = GNode.create("FormalParameter", v$67, v$69, null, "addr", 
      null);
    Node v$71 = GNode.create("Modifiers", false);
    Node v$72 = GNode.create("QualifiedIdentifier", "String");
    Node v$73 = GNode.create("Type", v$72, null);
    Node v$74 = GNode.create("FormalParameter", v$71, v$73, null, 
      "epochFile", null);
    Node v$75 = GNode.create("Modifiers", false);
    Node v$76 = GNode.create("PrimitiveType", "boolean");
    Node v$77 = GNode.create("Type", v$76, null);
    Node v$78 = GNode.create("FormalParameter", v$75, v$77, null, "dbg", 
      null);
    Node v$79 = GNode.create("FormalParameters", v$70, v$74, v$78);
    Node v$80 = GNode.create("PrimaryIdentifier", "addr");
    Node v$81 = GNode.create("PrimaryIdentifier", "epochFile");
    Node v$82 = GNode.create("PrimaryIdentifier", "dbg");
    Node v$83 = GNode.create("Arguments", v$80, v$81, v$82);
    Node v$84 = GNode.create("CallExpression", null, null, "super", v$83);
    Node v$85 = GNode.create("ExpressionStatement", v$84);
    Node v$86 = GNode.create("Block", v$85);
    Node v$87 = GNode.create("ConstructorDeclaration", v$66, null, name, 
      v$79, null, v$86);
    Node v$88 = GNode.create("Modifier", "public");
    Node v$89 = GNode.create("Modifiers", v$88);
    Node v$90 = GNode.create("VoidType", false);
    Node v$91 = GNode.create("FormalParameters", false);
    Node v$92 = GNode.create("Block", false);
    Node v$93 = GNode.create("MethodDeclaration", v$89, null, v$90, 
      "initialize", v$91, null, null, v$92);
    Node v$94 = GNode.create("EmptyDeclaration", false);
    Node v$95 = GNode.create("ClassBody", v$28, v$46, v$64, v$87, v$93, v$94);
    Node v$96 = GNode.create("ClassDeclaration", v$2, name, null, v$5, null, 
      v$95);
    return v$96;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @param name The name.
   * @return The generic node.
   */
  public Node termAssignInteger(Node index, Node name) {
    Node v$1 = GNode.create("PrimaryIdentifier", "terms");
    Node v$2 = GNode.create("SubscriptExpression", v$1, index);
    Node v$3 = GNode.create("QualifiedIdentifier", "Integer");
    Node v$4 = GNode.create("Arguments", name);
    Node v$5 = GNode.create("NewClassExpression", null, null, v$3, v$4, null);
    Node v$6 = GNode.create("Expression", v$2, "=", v$5);
    Node v$7 = GNode.create("ExpressionStatement", v$6);
    return v$7;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @param name The name.
   * @return The generic node.
   */
  public Node termAssignBoolean(Node index, Node name) {
    Node v$1 = GNode.create("PrimaryIdentifier", "terms");
    Node v$2 = GNode.create("SubscriptExpression", v$1, index);
    Node v$3 = GNode.create("QualifiedIdentifier", "Boolean");
    Node v$4 = GNode.create("Arguments", name);
    Node v$5 = GNode.create("NewClassExpression", null, null, v$3, v$4, null);
    Node v$6 = GNode.create("Expression", v$2, "=", v$5);
    Node v$7 = GNode.create("ExpressionStatement", v$6);
    return v$7;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @param name The name.
   * @return The generic node.
   */
  public Node termAssignAddress(Node index, Node name) {
    Node v$1 = GNode.create("PrimaryIdentifier", "terms");
    Node v$2 = GNode.create("SubscriptExpression", v$1, index);
    Node v$3 = GNode.create("Expression", v$2, "=", name);
    Node v$4 = GNode.create("ExpressionStatement", v$3);
    return v$4;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @param name The name.
   * @return The generic node.
   */
  public Node termAssignString(Node index, Node name) {
    Node v$1 = GNode.create("PrimaryIdentifier", "terms");
    Node v$2 = GNode.create("SubscriptExpression", v$1, index);
    Node v$3 = GNode.create("Expression", v$2, "=", name);
    Node v$4 = GNode.create("ExpressionStatement", v$3);
    return v$4;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @param name The name.
   * @return The generic node.
   */
  public Node termAssignFloat(Node index, Node name) {
    Node v$1 = GNode.create("PrimaryIdentifier", "terms");
    Node v$2 = GNode.create("SubscriptExpression", v$1, index);
    Node v$3 = GNode.create("QualifiedIdentifier", "Float");
    Node v$4 = GNode.create("Arguments", name);
    Node v$5 = GNode.create("NewClassExpression", null, null, v$3, v$4, null);
    Node v$6 = GNode.create("Expression", v$2, "=", v$5);
    Node v$7 = GNode.create("ExpressionStatement", v$6);
    return v$7;
  }

  /**
   * Create a method declaration.
   *
   * @return The generic node.
   */
  public Node tupleReadExternal() {
    Node v$1 = GNode.create("Modifier", "public");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$4 = GNode.create("Type", v$3, null);
    Node v$5 = GNode.create("Modifiers", false);
    Node v$6 = GNode.create("QualifiedIdentifier", "DataInputStream");
    Node v$7 = GNode.create("Type", v$6, null);
    Node v$8 = GNode.create("FormalParameter", v$5, v$7, null, "in", null);
    Node v$9 = GNode.create("FormalParameters", v$8);
    Node v$10 = GNode.create("QualifiedIdentifier", "IOException");
    Node v$11 = GNode.create("ThrowsClause", v$10);
    Node v$12 = GNode.create("Block", false);
    Node v$13 = GNode.create("MethodDeclaration", v$2, null, v$4, 
      "readFromStream", v$9, null, v$11, v$12);
    return v$13;
  }

  /**
   * Create a method declaration.
   *
   * @return The generic node.
   */
  public Node tupleWriteExternal() {
    Node v$1 = GNode.create("Modifier", "public");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("VoidType", false);
    Node v$4 = GNode.create("Modifiers", false);
    Node v$5 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$6 = GNode.create("Type", v$5, null);
    Node v$7 = GNode.create("FormalParameter", v$4, v$6, null, "t", null);
    Node v$8 = GNode.create("Modifiers", false);
    Node v$9 = GNode.create("QualifiedIdentifier", "DataOutputStream");
    Node v$10 = GNode.create("Type", v$9, null);
    Node v$11 = GNode.create("FormalParameter", v$8, v$10, null, "out", null);
    Node v$12 = GNode.create("FormalParameters", v$7, v$11);
    Node v$13 = GNode.create("QualifiedIdentifier", "IOException");
    Node v$14 = GNode.create("ThrowsClause", v$13);
    Node v$15 = GNode.create("Block", false);
    Node v$16 = GNode.create("MethodDeclaration", v$2, null, v$3, 
      "writeToStream", v$12, null, v$14, v$15);
    return v$16;
  }

  /**
   * Create a method declaration.
   *
   * @return The generic node.
   */
  public Node tupleToString() {
    Node v$1 = GNode.create("Modifier", "public");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("QualifiedIdentifier", "String");
    Node v$4 = GNode.create("Type", v$3, null);
    Node v$5 = GNode.create("FormalParameters", false);
    Node v$6 = GNode.create("Modifiers", false);
    Node v$7 = GNode.create("QualifiedIdentifier", "StringBuffer");
    Node v$8 = GNode.create("Type", v$7, null);
    Node v$9 = GNode.create("QualifiedIdentifier", "StringBuffer");
    Node v$10 = GNode.create("PrimaryIdentifier", "name");
    Node v$11 = GNode.create("Arguments", v$10);
    Node v$12 = GNode.create("NewClassExpression", null, null, v$9, v$11, 
      null);
    Node v$13 = GNode.create("Declarator", "str", null, v$12);
    Node v$14 = GNode.create("Declarators", v$13);
    Node v$15 = GNode.create("FieldDeclaration", v$6, v$8, v$14);
    Node v$16 = GNode.create("Block", v$15);
    Node v$17 = GNode.create("MethodDeclaration", v$2, null, v$4, "toString", 
      v$5, null, null, v$16);
    return v$17;
  }

  /**
   * Create an expression statement.
   *
   * @return The generic node.
   */
  public Node appendOpen() {
    Node v$1 = GNode.create("PrimaryIdentifier", "str");
    Node v$2 = GNode.create("StringLiteral", "\"(\"");
    Node v$3 = GNode.create("Arguments", v$2);
    Node v$4 = GNode.create("CallExpression", v$1, null, "append", v$3);
    Node v$5 = GNode.create("ExpressionStatement", v$4);
    return v$5;
  }

  /**
   * Create an expression statement.
   *
   * @return The generic node.
   */
  public Node appendClose() {
    Node v$1 = GNode.create("PrimaryIdentifier", "str");
    Node v$2 = GNode.create("StringLiteral", "\")\"");
    Node v$3 = GNode.create("Arguments", v$2);
    Node v$4 = GNode.create("CallExpression", v$1, null, "append", v$3);
    Node v$5 = GNode.create("ExpressionStatement", v$4);
    return v$5;
  }

  /**
   * Create an expression statement.
   *
   * @return The generic node.
   */
  public Node appendComma() {
    Node v$1 = GNode.create("PrimaryIdentifier", "str");
    Node v$2 = GNode.create("StringLiteral", "\",\"");
    Node v$3 = GNode.create("Arguments", v$2);
    Node v$4 = GNode.create("CallExpression", v$1, null, "append", v$3);
    Node v$5 = GNode.create("ExpressionStatement", v$4);
    return v$5;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node appendBoolean(Node index) {
    Node v$1 = GNode.create("PrimaryIdentifier", "str");
    Node v$2 = GNode.create("QualifiedIdentifier", "Boolean");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "terms");
    Node v$5 = GNode.create("SubscriptExpression", v$4, index);
    Node v$6 = GNode.create("CastExpression", v$3, v$5);
    Node v$7 = GNode.create("Arguments", false);
    Node v$8 = GNode.create("CallExpression", v$6, null, "booleanValue", v$7);
    Node v$9 = GNode.create("Arguments", v$8);
    Node v$10 = GNode.create("CallExpression", v$1, null, "append", v$9);
    Node v$11 = GNode.create("ExpressionStatement", v$10);
    return v$11;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node appendInt(Node index) {
    Node v$1 = GNode.create("PrimaryIdentifier", "str");
    Node v$2 = GNode.create("QualifiedIdentifier", "Integer");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "terms");
    Node v$5 = GNode.create("SubscriptExpression", v$4, index);
    Node v$6 = GNode.create("CastExpression", v$3, v$5);
    Node v$7 = GNode.create("Arguments", false);
    Node v$8 = GNode.create("CallExpression", v$6, null, "intValue", v$7);
    Node v$9 = GNode.create("Arguments", v$8);
    Node v$10 = GNode.create("CallExpression", v$1, null, "append", v$9);
    Node v$11 = GNode.create("ExpressionStatement", v$10);
    return v$11;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node appendAddress(Node index) {
    Node v$1 = GNode.create("PrimaryIdentifier", "str");
    Node v$2 = GNode.create("QualifiedIdentifier", "NetAddr");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "terms");
    Node v$5 = GNode.create("SubscriptExpression", v$4, index);
    Node v$6 = GNode.create("CastExpression", v$3, v$5);
    Node v$7 = GNode.create("Arguments", false);
    Node v$8 = GNode.create("CallExpression", v$6, null, "toString", v$7);
    Node v$9 = GNode.create("Arguments", v$8);
    Node v$10 = GNode.create("CallExpression", v$1, null, "append", v$9);
    Node v$11 = GNode.create("ExpressionStatement", v$10);
    return v$11;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node appendFloat(Node index) {
    Node v$1 = GNode.create("PrimaryIdentifier", "str");
    Node v$2 = GNode.create("QualifiedIdentifier", "Float");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "terms");
    Node v$5 = GNode.create("SubscriptExpression", v$4, index);
    Node v$6 = GNode.create("CastExpression", v$3, v$5);
    Node v$7 = GNode.create("Arguments", false);
    Node v$8 = GNode.create("CallExpression", v$6, null, "floatValue", v$7);
    Node v$9 = GNode.create("Arguments", v$8);
    Node v$10 = GNode.create("CallExpression", v$1, null, "append", v$9);
    Node v$11 = GNode.create("ExpressionStatement", v$10);
    return v$11;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node appendString(Node index) {
    Node v$1 = GNode.create("PrimaryIdentifier", "str");
    Node v$2 = GNode.create("QualifiedIdentifier", "String");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "terms");
    Node v$5 = GNode.create("SubscriptExpression", v$4, index);
    Node v$6 = GNode.create("CastExpression", v$3, v$5);
    Node v$7 = GNode.create("Arguments", v$6);
    Node v$8 = GNode.create("CallExpression", v$1, null, "append", v$7);
    Node v$9 = GNode.create("ExpressionStatement", v$8);
    return v$9;
  }

  /**
   * Create a return statement.
   *
   * @return The generic node.
   */
  public Node returnString() {
    Node v$1 = GNode.create("PrimaryIdentifier", "str");
    Node v$2 = GNode.create("Arguments", false);
    Node v$3 = GNode.create("CallExpression", v$1, null, "toString", v$2);
    Node v$4 = GNode.create("ReturnStatement", v$3);
    return v$4;
  }

  /**
   * Create a class declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node eventHandlerClass(String name) {
    Node v$1 = GNode.create("Modifier", "public");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("QualifiedIdentifier", "EventHandler");
    Node v$4 = GNode.create("Type", v$3, null);
    Node v$5 = GNode.create("Implementation", v$4);
    Node v$6 = GNode.create("Modifier", "public");
    Node v$7 = GNode.create("Modifiers", v$6);
    Node v$8 = GNode.create("FormalParameters", false);
    Node v$9 = GNode.create("Block", false);
    Node v$10 = GNode.create("ConstructorDeclaration", v$7, null, name, v$8, 
      null, v$9);
    Node v$11 = GNode.create("ClassBody", v$10);
    Node v$12 = GNode.create("ClassDeclaration", v$2, name, null, null, v$5, 
      v$11);
    return v$12;
  }

  /**
   * Create a method declaration.
   *
   * @return The generic node.
   */
  public Node eventHandlerProcess() {
    Node v$1 = GNode.create("Modifier", "public");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("VoidType", false);
    Node v$4 = GNode.create("Modifiers", false);
    Node v$5 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$6 = GNode.create("Type", v$5, null);
    Node v$7 = GNode.create("FormalParameter", v$4, v$6, null, "t", null);
    Node v$8 = GNode.create("Modifiers", false);
    Node v$9 = GNode.create("QualifiedIdentifier", "ID");
    Node v$10 = GNode.create("Type", v$9, null);
    Node v$11 = GNode.create("QualifiedIdentifier", "Table");
    Node v$12 = GNode.create("Type", v$11, null);
    Node v$13 = GNode.create("TypeArguments", v$10, v$12);
    Node v$14 = GNode.create("TypeInstantiation", "Map", v$13);
    Node v$15 = GNode.create("InstantiatedType", v$14);
    Node v$16 = GNode.create("Type", v$15, null);
    Node v$17 = GNode.create("FormalParameter", v$8, v$16, null, "tables", 
      null);
    Node v$18 = GNode.create("Modifiers", false);
    Node v$19 = GNode.create("QualifiedIdentifier", "EventQueue");
    Node v$20 = GNode.create("Type", v$19, null);
    Node v$21 = GNode.create("FormalParameter", v$18, v$20, null, "eQueue", 
      null);
    Node v$22 = GNode.create("FormalParameters", v$7, v$17, v$21);
    Node v$23 = GNode.create("Block", false);
    Node v$24 = GNode.create("MethodDeclaration", v$2, null, v$3, "process", 
      v$22, null, null, v$23);
    return v$24;
  }

  /**
   * Create a field declaration.
   *
   * @return The generic node.
   */
  public Node eventHandlerMatches() {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "Event");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("TypeArguments", v$3);
    Node v$5 = GNode.create("TypeInstantiation", "List", v$4);
    Node v$6 = GNode.create("InstantiatedType", v$5);
    Node v$7 = GNode.create("Type", v$6, null);
    Node v$8 = GNode.create("QualifiedIdentifier", "Event");
    Node v$9 = GNode.create("Type", v$8, null);
    Node v$10 = GNode.create("TypeArguments", v$9);
    Node v$11 = GNode.create("TypeInstantiation", "ArrayList", v$10);
    Node v$12 = GNode.create("InstantiatedType", v$11);
    Node v$13 = GNode.create("Arguments", false);
    Node v$14 = GNode.create("NewClassExpression", null, null, v$12, v$13, 
      null);
    Node v$15 = GNode.create("Declarator", "matches", null, v$14);
    Node v$16 = GNode.create("Declarators", v$15);
    Node v$17 = GNode.create("FieldDeclaration", v$1, v$7, v$16);
    return v$17;
  }

  /**
   * Create a field declaration.
   *
   * @return The generic node.
   */
  public Node newID() {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "ID");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("QualifiedIdentifier", "ID");
    Node v$5 = GNode.create("Arguments", false);
    Node v$6 = GNode.create("NewClassExpression", null, null, v$4, v$5, null);
    Node v$7 = GNode.create("Declarator", "i", null, v$6);
    Node v$8 = GNode.create("Declarators", v$7);
    Node v$9 = GNode.create("FieldDeclaration", v$1, v$3, v$8);
    return v$9;
  }

  /**
   * Create an expression statement.
   *
   * @return The generic node.
   */
  public Node writeID() {
    Node v$1 = GNode.create("PrimaryIdentifier", "id");
    Node v$2 = GNode.create("PrimaryIdentifier", "id");
    Node v$3 = GNode.create("PrimaryIdentifier", "out");
    Node v$4 = GNode.create("Arguments", v$2, v$3);
    Node v$5 = GNode.create("CallExpression", v$1, null, "writeToStream", 
      v$4);
    Node v$6 = GNode.create("ExpressionStatement", v$5);
    return v$6;
  }

  /**
   * Create an expression statement.
   *
   * @return The generic node.
   */
  public Node readID() {
    Node v$1 = GNode.create("PrimaryIdentifier", "id");
    Node v$2 = GNode.create("PrimaryIdentifier", "i");
    Node v$3 = GNode.create("PrimaryIdentifier", "in");
    Node v$4 = GNode.create("Arguments", v$3);
    Node v$5 = GNode.create("CallExpression", v$2, null, "readFromStream", 
      v$4);
    Node v$6 = GNode.create("Expression", v$1, "=", v$5);
    Node v$7 = GNode.create("ExpressionStatement", v$6);
    return v$7;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node writeInt(Node index) {
    Node v$1 = GNode.create("PrimaryIdentifier", "out");
    Node v$2 = GNode.create("PrimaryIdentifier", "t");
    Node v$3 = GNode.create("QualifiedIdentifier", "Integer");
    Node v$4 = GNode.create("Type", v$3, null);
    Node v$5 = GNode.create("TypeArguments", v$4);
    Node v$6 = GNode.create("Arguments", index);
    Node v$7 = GNode.create("CallExpression", v$2, v$5, "getTerm", v$6);
    Node v$8 = GNode.create("Arguments", false);
    Node v$9 = GNode.create("CallExpression", v$7, null, "intValue", v$8);
    Node v$10 = GNode.create("Arguments", v$9);
    Node v$11 = GNode.create("CallExpression", v$1, null, "writeInt", v$10);
    Node v$12 = GNode.create("ExpressionStatement", v$11);
    return v$12;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node readInt(String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("PrimitiveType", "int");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "in");
    Node v$5 = GNode.create("Arguments", false);
    Node v$6 = GNode.create("CallExpression", v$4, null, "readInt", v$5);
    Node v$7 = GNode.create("Declarator", name, null, v$6);
    Node v$8 = GNode.create("Declarators", v$7);
    Node v$9 = GNode.create("FieldDeclaration", v$1, v$3, v$8);
    return v$9;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node writeBoolean(Node index) {
    Node v$1 = GNode.create("PrimaryIdentifier", "out");
    Node v$2 = GNode.create("PrimaryIdentifier", "t");
    Node v$3 = GNode.create("QualifiedIdentifier", "Boolean");
    Node v$4 = GNode.create("Type", v$3, null);
    Node v$5 = GNode.create("TypeArguments", v$4);
    Node v$6 = GNode.create("Arguments", index);
    Node v$7 = GNode.create("CallExpression", v$2, v$5, "getTerm", v$6);
    Node v$8 = GNode.create("Arguments", false);
    Node v$9 = GNode.create("CallExpression", v$7, null, "booleanValue", v$8);
    Node v$10 = GNode.create("Arguments", v$9);
    Node v$11 = GNode.create("CallExpression", v$1, null, "writeBoolean", 
      v$10);
    Node v$12 = GNode.create("ExpressionStatement", v$11);
    return v$12;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node readBoolean(String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("PrimitiveType", "boolean");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "in");
    Node v$5 = GNode.create("Arguments", false);
    Node v$6 = GNode.create("CallExpression", v$4, null, "readBoolean", v$5);
    Node v$7 = GNode.create("Declarator", name, null, v$6);
    Node v$8 = GNode.create("Declarators", v$7);
    Node v$9 = GNode.create("FieldDeclaration", v$1, v$3, v$8);
    return v$9;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node writeFloat(Node index) {
    Node v$1 = GNode.create("PrimaryIdentifier", "out");
    Node v$2 = GNode.create("PrimaryIdentifier", "t");
    Node v$3 = GNode.create("QualifiedIdentifier", "Float");
    Node v$4 = GNode.create("Type", v$3, null);
    Node v$5 = GNode.create("TypeArguments", v$4);
    Node v$6 = GNode.create("Arguments", index);
    Node v$7 = GNode.create("CallExpression", v$2, v$5, "getTerm", v$6);
    Node v$8 = GNode.create("Arguments", false);
    Node v$9 = GNode.create("CallExpression", v$7, null, "floatValue", v$8);
    Node v$10 = GNode.create("Arguments", v$9);
    Node v$11 = GNode.create("CallExpression", v$1, null, "writeFloat", v$10);
    Node v$12 = GNode.create("ExpressionStatement", v$11);
    return v$12;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node readFloat(String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("PrimitiveType", "float");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "in");
    Node v$5 = GNode.create("Arguments", false);
    Node v$6 = GNode.create("CallExpression", v$4, null, "readFloat", v$5);
    Node v$7 = GNode.create("Declarator", name, null, v$6);
    Node v$8 = GNode.create("Declarators", v$7);
    Node v$9 = GNode.create("FieldDeclaration", v$1, v$3, v$8);
    return v$9;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node writeString(Node index) {
    Node v$1 = GNode.create("PrimaryIdentifier", "out");
    Node v$2 = GNode.create("PrimaryIdentifier", "t");
    Node v$3 = GNode.create("QualifiedIdentifier", "String");
    Node v$4 = GNode.create("Type", v$3, null);
    Node v$5 = GNode.create("TypeArguments", v$4);
    Node v$6 = GNode.create("Arguments", index);
    Node v$7 = GNode.create("CallExpression", v$2, v$5, "getTerm", v$6);
    Node v$8 = GNode.create("Arguments", v$7);
    Node v$9 = GNode.create("CallExpression", v$1, null, "writeUTF", v$8);
    Node v$10 = GNode.create("ExpressionStatement", v$9);
    return v$10;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node readString(String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "String");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "in");
    Node v$5 = GNode.create("Arguments", false);
    Node v$6 = GNode.create("CallExpression", v$4, null, "readUTF", v$5);
    Node v$7 = GNode.create("Declarator", name, null, v$6);
    Node v$8 = GNode.create("Declarators", v$7);
    Node v$9 = GNode.create("FieldDeclaration", v$1, v$3, v$8);
    return v$9;
  }

  /**
   * Create an expression statement.
   *
   * @param index The index.
   * @return The generic node.
   */
  public Node writeAddress(Node index) {
    Node v$1 = GNode.create("QualifiedIdentifier", "NetAddr");
    Node v$2 = GNode.create("Type", v$1, null);
    Node v$3 = GNode.create("PrimaryIdentifier", "terms");
    Node v$4 = GNode.create("IntegerLiteral", "0");
    Node v$5 = GNode.create("SubscriptExpression", v$3, v$4);
    Node v$6 = GNode.create("CastExpression", v$2, v$5);
    Node v$7 = GNode.create("PrimaryIdentifier", "t");
    Node v$8 = GNode.create("QualifiedIdentifier", "NetAddr");
    Node v$9 = GNode.create("Type", v$8, null);
    Node v$10 = GNode.create("TypeArguments", v$9);
    Node v$11 = GNode.create("Arguments", index);
    Node v$12 = GNode.create("CallExpression", v$7, v$10, "getTerm", v$11);
    Node v$13 = GNode.create("PrimaryIdentifier", "out");
    Node v$14 = GNode.create("Arguments", v$12, v$13);
    Node v$15 = GNode.create("CallExpression", v$6, null, "writeToStream", 
      v$14);
    Node v$16 = GNode.create("ExpressionStatement", v$15);
    return v$16;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node netAddrNew(String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "NetAddr");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("Declarator", name, null, null);
    Node v$5 = GNode.create("Declarators", v$4);
    Node v$6 = GNode.create("FieldDeclaration", v$1, v$3, v$5);
    return v$6;
  }

  /**
   * Create an expression statement.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node readAddress(Node name) {
    Node v$1 = GNode.create("QualifiedIdentifier", "NetAddr");
    Node v$2 = GNode.create("Type", v$1, null);
    Node v$3 = GNode.create("PrimaryIdentifier", "terms");
    Node v$4 = GNode.create("IntegerLiteral", "0");
    Node v$5 = GNode.create("SubscriptExpression", v$3, v$4);
    Node v$6 = GNode.create("CastExpression", v$2, v$5);
    Node v$7 = GNode.create("PrimaryIdentifier", "in");
    Node v$8 = GNode.create("Arguments", v$7);
    Node v$9 = GNode.create("CallExpression", v$6, null, "readFromStream", 
      v$8);
    Node v$10 = GNode.create("Expression", name, "=", v$9);
    Node v$11 = GNode.create("ExpressionStatement", v$10);
    return v$11;
  }

  /**
   * Create an expression statement.
   *
   * @param name The name.
   * @param tuple The tuple.
   * @return The generic node.
   */
  public Node registerMarshaller(Node name, Node tuple) {
    Node v$1 = GNode.create("PrimaryIdentifier", "marshallers");
    Node v$2 = GNode.create("QualifiedIdentifier", "ID");
    Node v$3 = GNode.create("Arguments", name);
    Node v$4 = GNode.create("NewClassExpression", null, null, v$2, v$3, null);
    Node v$5 = GNode.create("Arguments", false);
    Node v$6 = GNode.create("NewClassExpression", null, null, tuple, v$5, 
      null);
    Node v$7 = GNode.create("Arguments", v$4, v$6);
    Node v$8 = GNode.create("CallExpression", v$1, null, "put", v$7);
    Node v$9 = GNode.create("ExpressionStatement", v$8);
    return v$9;
  }

  /**
   * Create an expression statement.
   *
   * @param name The name.
   * @param handlerName The handlerName.
   * @return The generic node.
   */
  public Node registerHandle(Node name, Node handlerName) {
    Node v$1 = GNode.create("PrimaryIdentifier", "handlers");
    Node v$2 = GNode.create("QualifiedIdentifier", "ID");
    Node v$3 = GNode.create("Arguments", name);
    Node v$4 = GNode.create("NewClassExpression", null, null, v$2, v$3, null);
    Node v$5 = GNode.create("Arguments", false);
    Node v$6 = GNode.create("NewClassExpression", null, null, handlerName, 
      v$5, null);
    Node v$7 = GNode.create("Arguments", v$4, v$6);
    Node v$8 = GNode.create("CallExpression", v$1, null, "put", v$7);
    Node v$9 = GNode.create("ExpressionStatement", v$8);
    return v$9;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node watchNew(String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "WatchSubscriber");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("QualifiedIdentifier", "WatchSubscriber");
    Node v$5 = GNode.create("Arguments", false);
    Node v$6 = GNode.create("NewClassExpression", null, null, v$4, v$5, null);
    Node v$7 = GNode.create("Declarator", name, null, v$6);
    Node v$8 = GNode.create("Declarators", v$7);
    Node v$9 = GNode.create("FieldDeclaration", v$1, v$3, v$8);
    return v$9;
  }

  /**
   * Create an expression statement.
   *
   * @param tupleName The tupleName.
   * @param subName The subName.
   * @return The generic node.
   */
  public Node watchSub(Node tupleName, Node subName) {
    Node v$1 = GNode.create("PrimaryIdentifier", "eQueue");
    Node v$2 = GNode.create("QualifiedIdentifier", "ID");
    Node v$3 = GNode.create("Arguments", tupleName);
    Node v$4 = GNode.create("NewClassExpression", null, null, v$2, v$3, null);
    Node v$5 = GNode.create("Arguments", v$4, subName);
    Node v$6 = GNode.create("CallExpression", v$1, null, "subscribe", v$5);
    Node v$7 = GNode.create("ExpressionStatement", v$6);
    return v$7;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node exitNew(String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "ExitSubscriber");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("QualifiedIdentifier", "ExitSubscriber");
    Node v$5 = GNode.create("ThisExpression", null);
    Node v$6 = GNode.create("Arguments", v$5);
    Node v$7 = GNode.create("NewClassExpression", null, null, v$4, v$6, null);
    Node v$8 = GNode.create("Declarator", name, null, v$7);
    Node v$9 = GNode.create("Declarators", v$8);
    Node v$10 = GNode.create("FieldDeclaration", v$1, v$3, v$9);
    return v$10;
  }

  /**
   * Create an expression statement.
   *
   * @param tupleName The tupleName.
   * @param subName The subName.
   * @return The generic node.
   */
  public Node exitSub(Node tupleName, Node subName) {
    Node v$1 = GNode.create("PrimaryIdentifier", "eQueue");
    Node v$2 = GNode.create("QualifiedIdentifier", "ID");
    Node v$3 = GNode.create("Arguments", tupleName);
    Node v$4 = GNode.create("NewClassExpression", null, null, v$2, v$3, null);
    Node v$5 = GNode.create("Arguments", v$4, subName);
    Node v$6 = GNode.create("CallExpression", v$1, null, "subscribe", v$5);
    Node v$7 = GNode.create("ExpressionStatement", v$6);
    return v$7;
  }

  /**
   * Create a field declaration.
   *
   * @param tuple The tuple.
   * @param name The name.
   * @param period The period.
   * @param interval The interval.
   * @return The generic node.
   */
  public Node periodicNew(String tuple, Node name, Node period, Node interval) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "myAddr");
    Node v$5 = GNode.create("Arguments", v$4, period, interval);
    Node v$6 = GNode.create("NewClassExpression", null, null, name, v$5, 
      null);
    Node v$7 = GNode.create("Declarator", tuple, null, v$6);
    Node v$8 = GNode.create("Declarators", v$7);
    Node v$9 = GNode.create("FieldDeclaration", v$1, v$3, v$8);
    return v$9;
  }

  /**
   * Create an expression statement.
   *
   * @param tuple The tuple.
   * @param period The period.
   * @param iterations The iterations.
   * @return The generic node.
   */
  public Node registerPeg(Node tuple, Node period, Node iterations) {
    Node v$1 = GNode.create("PrimaryIdentifier", "peg");
    Node v$2 = GNode.create("Arguments", tuple, period, iterations);
    Node v$3 = GNode.create("CallExpression", v$1, null, "register", v$2);
    Node v$4 = GNode.create("ExpressionStatement", v$3);
    return v$4;
  }

  /**
   * Create a field declaration.
   *
   * @param type The type.
   * @param name The name.
   * @return The generic node.
   */
  public Node varDecl(Node type, String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("Type", type, null);
    Node v$3 = GNode.create("Declarator", name, null, null);
    Node v$4 = GNode.create("Declarators", v$3);
    Node v$5 = GNode.create("FieldDeclaration", v$1, v$2, v$4);
    return v$5;
  }

  /**
   * Create a field declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node tupleAssign(String name) {
    Node v$1 = GNode.create("Modifiers", false);
    Node v$2 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "t");
    Node v$5 = GNode.create("Declarator", name, null, v$4);
    Node v$6 = GNode.create("Declarators", v$5);
    Node v$7 = GNode.create("FieldDeclaration", v$1, v$3, v$6);
    return v$7;
  }

  /**
   * Create a new class expression.
   *
   * @param host The host.
   * @param port The port.
   * @return The generic node.
   */
  public Node netAddr(Node host, Node port) {
    Node v$1 = GNode.create("QualifiedIdentifier", "NetAddr");
    Node v$2 = GNode.create("Arguments", host, port);
    Node v$3 = GNode.create("NewClassExpression", null, null, v$1, v$2, null);
    return v$3;
  }

  /**
   * Create a call expression.
   *
   * @param lhs The lhs.
   * @param rhs The rhs.
   * @return The generic node.
   */
  public Node equals(Node lhs, Node rhs) {
    Node v$1 = GNode.create("Arguments", rhs);
    Node v$2 = GNode.create("CallExpression", lhs, null, "equals", v$1);
    return v$2;
  }

  /**
   * Create a logical negation expression.
   *
   * @param lhs The lhs.
   * @param rhs The rhs.
   * @return The generic node.
   */
  public Node notEquals(Node lhs, Node rhs) {
    Node v$1 = GNode.create("Arguments", rhs);
    Node v$2 = GNode.create("CallExpression", lhs, null, "equals", v$1);
    Node v$3 = GNode.create("LogicalNegationExpression", v$2);
    return v$3;
  }

  /**
   * Create an expression statement.
   *
   * @return The generic node.
   */
  public Node aggFunctionCall() {
    Node v$1 = GNode.create("PrimaryIdentifier", "matches");
    Node v$2 = GNode.create("PrimaryIdentifier", "eQueue");
    Node v$3 = GNode.create("Arguments", v$1, v$2);
    Node v$4 = GNode.create("CallExpression", null, null, "agg", v$3);
    Node v$5 = GNode.create("ExpressionStatement", v$4);
    return v$5;
  }

  /**
   * Create a method declaration.
   *
   * @param name The name.
   * @param tname The tname.
   * @param type The type.
   * @param access The access.
   * @return The generic node.
   */
  public Node aggMinFunction(String name, Node tname, Node type, Node access) {
    Node v$1 = GNode.create("Modifier", "protected");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("VoidType", false);
    Node v$4 = GNode.create("Modifiers", false);
    Node v$5 = GNode.create("QualifiedIdentifier", "Event");
    Node v$6 = GNode.create("Type", v$5, null);
    Node v$7 = GNode.create("TypeArguments", v$6);
    Node v$8 = GNode.create("TypeInstantiation", "List", v$7);
    Node v$9 = GNode.create("InstantiatedType", v$8);
    Node v$10 = GNode.create("Type", v$9, null);
    Node v$11 = GNode.create("FormalParameter", v$4, v$10, null, "in", null);
    Node v$12 = GNode.create("Modifiers", false);
    Node v$13 = GNode.create("QualifiedIdentifier", "EventQueue");
    Node v$14 = GNode.create("Type", v$13, null);
    Node v$15 = GNode.create("FormalParameter", v$12, v$14, null, "eQueue", 
      null);
    Node v$16 = GNode.create("FormalParameters", v$11, v$15);
    Node v$17 = GNode.create("Modifiers", false);
    Node v$18 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$19 = GNode.create("Type", v$18, null);
    Node v$20 = GNode.create("Declarator", name, null, null);
    Node v$21 = GNode.create("Declarators", v$20);
    Node v$22 = GNode.create("FieldDeclaration", v$17, v$19, v$21);
    Node v$23 = GNode.create("PrimaryIdentifier", "in");
    Node v$24 = GNode.create("Arguments", false);
    Node v$25 = GNode.create("CallExpression", v$23, null, "isEmpty", v$24);
    Node v$26 = GNode.create("ReturnStatement", null);
    Node v$27 = GNode.create("Block", v$26);
    Node v$28 = GNode.create("ConditionalStatement", v$25, v$27, null);
    Node v$29 = GNode.create("Modifiers", false);
    Node v$30 = GNode.create("QualifiedIdentifier", "Event");
    Node v$31 = GNode.create("Type", v$30, null);
    Node v$32 = GNode.create("QualifiedIdentifier", "Event");
    Node v$33 = GNode.create("Type", v$32, null);
    Node v$34 = GNode.create("PrimaryIdentifier", "in");
    Node v$35 = GNode.create("IntegerLiteral", "0");
    Node v$36 = GNode.create("Arguments", v$35);
    Node v$37 = GNode.create("CallExpression", v$34, null, "get", v$36);
    Node v$38 = GNode.create("CastExpression", v$33, v$37);
    Node v$39 = GNode.create("Declarator", "f", null, v$38);
    Node v$40 = GNode.create("Declarators", v$39);
    Node v$41 = GNode.create("FieldDeclaration", v$29, v$31, v$40);
    Node v$42 = GNode.create("PrimaryIdentifier", "f");
    Node v$43 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$44 = GNode.create("Type", v$43, null);
    Node v$45 = GNode.create("InstanceOfExpression", v$42, v$44);
    Node v$46 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$47 = GNode.create("Type", v$46, null);
    Node v$48 = GNode.create("PrimaryIdentifier", "f");
    Node v$49 = GNode.create("CastExpression", v$47, v$48);
    Node v$50 = GNode.create("Arguments", false);
    Node v$51 = GNode.create("CallExpression", v$49, null, "getTuple", v$50);
    Node v$52 = GNode.create("Expression", tname, "=", v$51);
    Node v$53 = GNode.create("ExpressionStatement", v$52);
    Node v$54 = GNode.create("Block", v$53);
    Node v$55 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$56 = GNode.create("Type", v$55, null);
    Node v$57 = GNode.create("PrimaryIdentifier", "f");
    Node v$58 = GNode.create("CastExpression", v$56, v$57);
    Node v$59 = GNode.create("Expression", tname, "=", v$58);
    Node v$60 = GNode.create("ExpressionStatement", v$59);
    Node v$61 = GNode.create("Block", v$60);
    Node v$62 = GNode.create("ConditionalStatement", v$45, v$54, v$61);
    Node v$63 = GNode.create("Modifiers", false);
    Node v$64 = GNode.create("Type", type, null);
    Node v$65 = GNode.create("Declarator", "min", null, access);
    Node v$66 = GNode.create("Declarators", v$65);
    Node v$67 = GNode.create("FieldDeclaration", v$63, v$64, v$66);
    Node v$68 = GNode.create("Modifiers", false);
    Node v$69 = GNode.create("QualifiedIdentifier", "Event");
    Node v$70 = GNode.create("Type", v$69, null);
    Node v$71 = GNode.create("PrimaryIdentifier", "f");
    Node v$72 = GNode.create("Declarator", "minEvent", null, v$71);
    Node v$73 = GNode.create("Declarators", v$72);
    Node v$74 = GNode.create("FieldDeclaration", v$68, v$70, v$73);
    Node v$75 = GNode.create("Modifiers", false);
    Node v$76 = GNode.create("QualifiedIdentifier", "Event");
    Node v$77 = GNode.create("Type", v$76, null);
    Node v$78 = GNode.create("PrimaryIdentifier", "in");
    Node v$79 = GNode.create("EnhancedForControl", v$75, v$77, "e", v$78);
    Node v$80 = GNode.create("PrimaryIdentifier", "e");
    Node v$81 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$82 = GNode.create("Type", v$81, null);
    Node v$83 = GNode.create("InstanceOfExpression", v$80, v$82);
    Node v$84 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$85 = GNode.create("Type", v$84, null);
    Node v$86 = GNode.create("PrimaryIdentifier", "e");
    Node v$87 = GNode.create("CastExpression", v$85, v$86);
    Node v$88 = GNode.create("Arguments", false);
    Node v$89 = GNode.create("CallExpression", v$87, null, "getTuple", v$88);
    Node v$90 = GNode.create("Expression", tname, "=", v$89);
    Node v$91 = GNode.create("ExpressionStatement", v$90);
    Node v$92 = GNode.create("Block", v$91);
    Node v$93 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$94 = GNode.create("Type", v$93, null);
    Node v$95 = GNode.create("PrimaryIdentifier", "e");
    Node v$96 = GNode.create("CastExpression", v$94, v$95);
    Node v$97 = GNode.create("Expression", tname, "=", v$96);
    Node v$98 = GNode.create("ExpressionStatement", v$97);
    Node v$99 = GNode.create("Block", v$98);
    Node v$100 = GNode.create("ConditionalStatement", v$83, v$92, v$99);
    Node v$101 = GNode.create("PrimaryIdentifier", "min");
    Node v$102 = GNode.create("Arguments", v$101);
    Node v$103 = GNode.create("CallExpression", access, null, "compareTo", 
      v$102);
    Node v$104 = GNode.create("IntegerLiteral", "0");
    Node v$105 = GNode.create("RelationalExpression", v$103, "<", v$104);
    Node v$106 = GNode.create("PrimaryIdentifier", "min");
    Node v$107 = GNode.create("Expression", v$106, "=", access);
    Node v$108 = GNode.create("ExpressionStatement", v$107);
    Node v$109 = GNode.create("PrimaryIdentifier", "minEvent");
    Node v$110 = GNode.create("PrimaryIdentifier", "e");
    Node v$111 = GNode.create("Expression", v$109, "=", v$110);
    Node v$112 = GNode.create("ExpressionStatement", v$111);
    Node v$113 = GNode.create("Block", v$108, v$112);
    Node v$114 = GNode.create("ConditionalStatement", v$105, v$113, null);
    Node v$115 = GNode.create("Block", v$100, v$114);
    Node v$116 = GNode.create("ForStatement", v$79, v$115);
    Node v$117 = GNode.create("PrimaryIdentifier", "eQueue");
    Node v$118 = GNode.create("PrimaryIdentifier", "minEvent");
    Node v$119 = GNode.create("Arguments", v$118);
    Node v$120 = GNode.create("CallExpression", v$117, null, "buffer", v$119);
    Node v$121 = GNode.create("ExpressionStatement", v$120);
    Node v$122 = GNode.create("Block", v$22, v$28, v$41, v$62, v$67, v$74, 
      v$116, v$121);
    Node v$123 = GNode.create("MethodDeclaration", v$2, null, v$3, "agg", 
      v$16, null, null, v$122);
    return v$123;
  }

  /**
   * Create a method declaration.
   *
   * @param name The name.
   * @param tname The tname.
   * @param type The type.
   * @param access The access.
   * @return The generic node.
   */
  public Node aggMaxFunction(String name, Node tname, Node type, Node access) {
    Node v$1 = GNode.create("Modifier", "protected");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("VoidType", false);
    Node v$4 = GNode.create("Modifiers", false);
    Node v$5 = GNode.create("QualifiedIdentifier", "Event");
    Node v$6 = GNode.create("Type", v$5, null);
    Node v$7 = GNode.create("TypeArguments", v$6);
    Node v$8 = GNode.create("TypeInstantiation", "List", v$7);
    Node v$9 = GNode.create("InstantiatedType", v$8);
    Node v$10 = GNode.create("Type", v$9, null);
    Node v$11 = GNode.create("FormalParameter", v$4, v$10, null, "in", null);
    Node v$12 = GNode.create("Modifiers", false);
    Node v$13 = GNode.create("QualifiedIdentifier", "EventQueue");
    Node v$14 = GNode.create("Type", v$13, null);
    Node v$15 = GNode.create("FormalParameter", v$12, v$14, null, "eQueue", 
      null);
    Node v$16 = GNode.create("FormalParameters", v$11, v$15);
    Node v$17 = GNode.create("Modifiers", false);
    Node v$18 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$19 = GNode.create("Type", v$18, null);
    Node v$20 = GNode.create("Declarator", name, null, null);
    Node v$21 = GNode.create("Declarators", v$20);
    Node v$22 = GNode.create("FieldDeclaration", v$17, v$19, v$21);
    Node v$23 = GNode.create("PrimaryIdentifier", "in");
    Node v$24 = GNode.create("Arguments", false);
    Node v$25 = GNode.create("CallExpression", v$23, null, "isEmpty", v$24);
    Node v$26 = GNode.create("ReturnStatement", null);
    Node v$27 = GNode.create("Block", v$26);
    Node v$28 = GNode.create("ConditionalStatement", v$25, v$27, null);
    Node v$29 = GNode.create("Modifiers", false);
    Node v$30 = GNode.create("QualifiedIdentifier", "Event");
    Node v$31 = GNode.create("Type", v$30, null);
    Node v$32 = GNode.create("QualifiedIdentifier", "Event");
    Node v$33 = GNode.create("Type", v$32, null);
    Node v$34 = GNode.create("PrimaryIdentifier", "in");
    Node v$35 = GNode.create("IntegerLiteral", "0");
    Node v$36 = GNode.create("Arguments", v$35);
    Node v$37 = GNode.create("CallExpression", v$34, null, "get", v$36);
    Node v$38 = GNode.create("CastExpression", v$33, v$37);
    Node v$39 = GNode.create("Declarator", "f", null, v$38);
    Node v$40 = GNode.create("Declarators", v$39);
    Node v$41 = GNode.create("FieldDeclaration", v$29, v$31, v$40);
    Node v$42 = GNode.create("PrimaryIdentifier", "f");
    Node v$43 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$44 = GNode.create("Type", v$43, null);
    Node v$45 = GNode.create("InstanceOfExpression", v$42, v$44);
    Node v$46 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$47 = GNode.create("Type", v$46, null);
    Node v$48 = GNode.create("PrimaryIdentifier", "f");
    Node v$49 = GNode.create("CastExpression", v$47, v$48);
    Node v$50 = GNode.create("Arguments", false);
    Node v$51 = GNode.create("CallExpression", v$49, null, "getTuple", v$50);
    Node v$52 = GNode.create("Expression", tname, "=", v$51);
    Node v$53 = GNode.create("ExpressionStatement", v$52);
    Node v$54 = GNode.create("Block", v$53);
    Node v$55 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$56 = GNode.create("Type", v$55, null);
    Node v$57 = GNode.create("PrimaryIdentifier", "f");
    Node v$58 = GNode.create("CastExpression", v$56, v$57);
    Node v$59 = GNode.create("Expression", tname, "=", v$58);
    Node v$60 = GNode.create("ExpressionStatement", v$59);
    Node v$61 = GNode.create("Block", v$60);
    Node v$62 = GNode.create("ConditionalStatement", v$45, v$54, v$61);
    Node v$63 = GNode.create("Modifiers", false);
    Node v$64 = GNode.create("Type", type, null);
    Node v$65 = GNode.create("Declarator", "min", null, access);
    Node v$66 = GNode.create("Declarators", v$65);
    Node v$67 = GNode.create("FieldDeclaration", v$63, v$64, v$66);
    Node v$68 = GNode.create("Modifiers", false);
    Node v$69 = GNode.create("QualifiedIdentifier", "Event");
    Node v$70 = GNode.create("Type", v$69, null);
    Node v$71 = GNode.create("PrimaryIdentifier", "f");
    Node v$72 = GNode.create("Declarator", "minEvent", null, v$71);
    Node v$73 = GNode.create("Declarators", v$72);
    Node v$74 = GNode.create("FieldDeclaration", v$68, v$70, v$73);
    Node v$75 = GNode.create("Modifiers", false);
    Node v$76 = GNode.create("QualifiedIdentifier", "Event");
    Node v$77 = GNode.create("Type", v$76, null);
    Node v$78 = GNode.create("PrimaryIdentifier", "in");
    Node v$79 = GNode.create("EnhancedForControl", v$75, v$77, "e", v$78);
    Node v$80 = GNode.create("PrimaryIdentifier", "e");
    Node v$81 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$82 = GNode.create("Type", v$81, null);
    Node v$83 = GNode.create("InstanceOfExpression", v$80, v$82);
    Node v$84 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$85 = GNode.create("Type", v$84, null);
    Node v$86 = GNode.create("PrimaryIdentifier", "e");
    Node v$87 = GNode.create("CastExpression", v$85, v$86);
    Node v$88 = GNode.create("Arguments", false);
    Node v$89 = GNode.create("CallExpression", v$87, null, "getTuple", v$88);
    Node v$90 = GNode.create("Expression", tname, "=", v$89);
    Node v$91 = GNode.create("ExpressionStatement", v$90);
    Node v$92 = GNode.create("Block", v$91);
    Node v$93 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$94 = GNode.create("Type", v$93, null);
    Node v$95 = GNode.create("PrimaryIdentifier", "e");
    Node v$96 = GNode.create("CastExpression", v$94, v$95);
    Node v$97 = GNode.create("Expression", tname, "=", v$96);
    Node v$98 = GNode.create("ExpressionStatement", v$97);
    Node v$99 = GNode.create("Block", v$98);
    Node v$100 = GNode.create("ConditionalStatement", v$83, v$92, v$99);
    Node v$101 = GNode.create("PrimaryIdentifier", "min");
    Node v$102 = GNode.create("Arguments", v$101);
    Node v$103 = GNode.create("CallExpression", access, null, "compareTo", 
      v$102);
    Node v$104 = GNode.create("IntegerLiteral", "0");
    Node v$105 = GNode.create("RelationalExpression", v$103, ">", v$104);
    Node v$106 = GNode.create("PrimaryIdentifier", "min");
    Node v$107 = GNode.create("Expression", v$106, "=", access);
    Node v$108 = GNode.create("ExpressionStatement", v$107);
    Node v$109 = GNode.create("PrimaryIdentifier", "minEvent");
    Node v$110 = GNode.create("PrimaryIdentifier", "e");
    Node v$111 = GNode.create("Expression", v$109, "=", v$110);
    Node v$112 = GNode.create("ExpressionStatement", v$111);
    Node v$113 = GNode.create("Block", v$108, v$112);
    Node v$114 = GNode.create("ConditionalStatement", v$105, v$113, null);
    Node v$115 = GNode.create("Block", v$100, v$114);
    Node v$116 = GNode.create("ForStatement", v$79, v$115);
    Node v$117 = GNode.create("PrimaryIdentifier", "eQueue");
    Node v$118 = GNode.create("PrimaryIdentifier", "minEvent");
    Node v$119 = GNode.create("Arguments", v$118);
    Node v$120 = GNode.create("CallExpression", v$117, null, "buffer", v$119);
    Node v$121 = GNode.create("ExpressionStatement", v$120);
    Node v$122 = GNode.create("Block", v$22, v$28, v$41, v$62, v$67, v$74, 
      v$116, v$121);
    Node v$123 = GNode.create("MethodDeclaration", v$2, null, v$3, "agg", 
      v$16, null, null, v$122);
    return v$123;
  }

  /**
   * Create a method declaration.
   *
   * @param name The name.
   * @param tname The tname.
   * @param type The type.
   * @param access The access.
   * @return The generic node.
   */
  public Node aggCountFunction(String name, Node tname, Node type, Node access) {
    Node v$1 = GNode.create("Modifier", "protected");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("VoidType", false);
    Node v$4 = GNode.create("Modifiers", false);
    Node v$5 = GNode.create("QualifiedIdentifier", "Event");
    Node v$6 = GNode.create("Type", v$5, null);
    Node v$7 = GNode.create("TypeArguments", v$6);
    Node v$8 = GNode.create("TypeInstantiation", "List", v$7);
    Node v$9 = GNode.create("InstantiatedType", v$8);
    Node v$10 = GNode.create("Type", v$9, null);
    Node v$11 = GNode.create("FormalParameter", v$4, v$10, null, "in", null);
    Node v$12 = GNode.create("Modifiers", false);
    Node v$13 = GNode.create("QualifiedIdentifier", "EventQueue");
    Node v$14 = GNode.create("Type", v$13, null);
    Node v$15 = GNode.create("FormalParameter", v$12, v$14, null, "eQueue", 
      null);
    Node v$16 = GNode.create("FormalParameters", v$11, v$15);
    Node v$17 = GNode.create("Modifiers", false);
    Node v$18 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$19 = GNode.create("Type", v$18, null);
    Node v$20 = GNode.create("Declarator", name, null, null);
    Node v$21 = GNode.create("Declarators", v$20);
    Node v$22 = GNode.create("FieldDeclaration", v$17, v$19, v$21);
    Node v$23 = GNode.create("Modifiers", false);
    Node v$24 = GNode.create("QualifiedIdentifier", "Event");
    Node v$25 = GNode.create("Type", v$24, null);
    Node v$26 = GNode.create("QualifiedIdentifier", "Event");
    Node v$27 = GNode.create("Type", v$26, null);
    Node v$28 = GNode.create("PrimaryIdentifier", "in");
    Node v$29 = GNode.create("IntegerLiteral", "0");
    Node v$30 = GNode.create("Arguments", v$29);
    Node v$31 = GNode.create("CallExpression", v$28, null, "get", v$30);
    Node v$32 = GNode.create("CastExpression", v$27, v$31);
    Node v$33 = GNode.create("Declarator", "f", null, v$32);
    Node v$34 = GNode.create("Declarators", v$33);
    Node v$35 = GNode.create("FieldDeclaration", v$23, v$25, v$34);
    Node v$36 = GNode.create("PrimaryIdentifier", "f");
    Node v$37 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$38 = GNode.create("Type", v$37, null);
    Node v$39 = GNode.create("InstanceOfExpression", v$36, v$38);
    Node v$40 = GNode.create("QualifiedIdentifier", "TableUpdate");
    Node v$41 = GNode.create("Type", v$40, null);
    Node v$42 = GNode.create("PrimaryIdentifier", "f");
    Node v$43 = GNode.create("CastExpression", v$41, v$42);
    Node v$44 = GNode.create("Arguments", false);
    Node v$45 = GNode.create("CallExpression", v$43, null, "getTuple", v$44);
    Node v$46 = GNode.create("Expression", tname, "=", v$45);
    Node v$47 = GNode.create("ExpressionStatement", v$46);
    Node v$48 = GNode.create("Block", v$47);
    Node v$49 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$50 = GNode.create("Type", v$49, null);
    Node v$51 = GNode.create("PrimaryIdentifier", "f");
    Node v$52 = GNode.create("CastExpression", v$50, v$51);
    Node v$53 = GNode.create("Expression", tname, "=", v$52);
    Node v$54 = GNode.create("ExpressionStatement", v$53);
    Node v$55 = GNode.create("Block", v$54);
    Node v$56 = GNode.create("ConditionalStatement", v$39, v$48, v$55);
    Node v$57 = GNode.create("Modifiers", false);
    Node v$58 = GNode.create("PrimitiveType", "int");
    Node v$59 = GNode.create("Type", v$58, null);
    Node v$60 = GNode.create("PrimaryIdentifier", "in");
    Node v$61 = GNode.create("Arguments", false);
    Node v$62 = GNode.create("CallExpression", v$60, null, "size", v$61);
    Node v$63 = GNode.create("Declarator", "count", null, v$62);
    Node v$64 = GNode.create("Declarators", v$63);
    Node v$65 = GNode.create("FieldDeclaration", v$57, v$59, v$64);
    Node v$66 = GNode.create("Modifiers", false);
    Node v$67 = GNode.create("Type", type, null);
    Node v$68 = GNode.create("Declarator", "thing", null, access);
    Node v$69 = GNode.create("Declarators", v$68);
    Node v$70 = GNode.create("FieldDeclaration", v$66, v$67, v$69);
    Node v$71 = GNode.create("PrimaryIdentifier", "eQueue");
    Node v$72 = GNode.create("PrimaryIdentifier", "f");
    Node v$73 = GNode.create("Arguments", v$72);
    Node v$74 = GNode.create("CallExpression", v$71, null, "buffer", v$73);
    Node v$75 = GNode.create("ExpressionStatement", v$74);
    Node v$76 = GNode.create("Block", v$22, v$35, v$56, v$65, v$70, v$75);
    Node v$77 = GNode.create("MethodDeclaration", v$2, null, v$3, "count", 
      v$16, null, null, v$76);
    return v$77;
  }

  /**
   * Create a call expression.
   *
   * @param name The name.
   * @param args The args.
   * @return The generic node.
   */
  public Node functionCall(String name, List<Node> args) {
    Node v$1 = GNode.create("PrimaryIdentifier", "Function");
    Node v$2 = GNode.create("Arguments", args.size()).
      addAll(args);
    Node v$3 = GNode.create("CallExpression", v$1, null, name, v$2);
    return v$3;
  }

  /**
   * Create a class declaration.
   *
   * @param name The name.
   * @return The generic node.
   */
  public Node executableClass(Node name) {
    Node v$1 = GNode.create("Modifier", "public");
    Node v$2 = GNode.create("Modifiers", v$1);
    Node v$3 = GNode.create("Modifier", "public");
    Node v$4 = GNode.create("Modifier", "static");
    Node v$5 = GNode.create("Modifiers", v$3, v$4);
    Node v$6 = GNode.create("VoidType", false);
    Node v$7 = GNode.create("Modifiers", false);
    Node v$8 = GNode.create("QualifiedIdentifier", "String");
    Node v$9 = GNode.create("Type", v$8, null);
    Node v$10 = GNode.create("Dimensions", "[");
    Node v$11 = GNode.create("FormalParameter", v$7, v$9, null, "args", v$10);
    Node v$12 = GNode.create("FormalParameters", v$11);
    Node v$13 = GNode.create("PrimaryIdentifier", "args");
    Node v$14 = GNode.create("SelectionExpression", v$13, "length");
    Node v$15 = GNode.create("IntegerLiteral", "2");
    Node v$16 = GNode.create("RelationalExpression", v$14, "<", v$15);
    Node v$17 = GNode.create("PrimaryIdentifier", "System");
    Node v$18 = GNode.create("SelectionExpression", v$17, "out");
    Node v$19 = GNode.create("StringLiteral", 
      "\"Usage: runOLG <host> <port> [epochFile]\"");
    Node v$20 = GNode.create("Arguments", v$19);
    Node v$21 = GNode.create("CallExpression", v$18, null, "println", v$20);
    Node v$22 = GNode.create("ExpressionStatement", v$21);
    Node v$23 = GNode.create("PrimaryIdentifier", "System");
    Node v$24 = GNode.create("IntegerLiteral", "0");
    Node v$25 = GNode.create("Arguments", v$24);
    Node v$26 = GNode.create("CallExpression", v$23, null, "exit", v$25);
    Node v$27 = GNode.create("ExpressionStatement", v$26);
    Node v$28 = GNode.create("Block", v$22, v$27);
    Node v$29 = GNode.create("ConditionalStatement", v$16, v$28, null);
    Node v$30 = GNode.create("Modifiers", false);
    Node v$31 = GNode.create("QualifiedIdentifier", "OLG");
    Node v$32 = GNode.create("Type", v$31, null);
    Node v$33 = GNode.create("Declarator", "olg", null, null);
    Node v$34 = GNode.create("Declarators", v$33);
    Node v$35 = GNode.create("FieldDeclaration", v$30, v$32, v$34);
    Node v$36 = GNode.create("PrimaryIdentifier", "args");
    Node v$37 = GNode.create("SelectionExpression", v$36, "length");
    Node v$38 = GNode.create("IntegerLiteral", "2");
    Node v$39 = GNode.create("EqualityExpression", v$37, "==", v$38);
    Node v$40 = GNode.create("PrimaryIdentifier", "olg");
    Node v$41 = GNode.create("PrimaryIdentifier", "args");
    Node v$42 = GNode.create("IntegerLiteral", "0");
    Node v$43 = GNode.create("SubscriptExpression", v$41, v$42);
    Node v$44 = GNode.create("QualifiedIdentifier", "Integer");
    Node v$45 = GNode.create("PrimaryIdentifier", "args");
    Node v$46 = GNode.create("IntegerLiteral", "1");
    Node v$47 = GNode.create("SubscriptExpression", v$45, v$46);
    Node v$48 = GNode.create("Arguments", v$47);
    Node v$49 = GNode.create("NewClassExpression", null, null, v$44, v$48, 
      null);
    Node v$50 = GNode.create("Arguments", false);
    Node v$51 = GNode.create("CallExpression", v$49, null, "intValue", v$50);
    Node v$52 = GNode.create("Arguments", v$43, v$51);
    Node v$53 = GNode.create("NewClassExpression", null, null, name, v$52, 
      null);
    Node v$54 = GNode.create("Expression", v$40, "=", v$53);
    Node v$55 = GNode.create("ExpressionStatement", v$54);
    Node v$56 = GNode.create("Block", v$55);
    Node v$57 = GNode.create("PrimaryIdentifier", "olg");
    Node v$58 = GNode.create("PrimaryIdentifier", "args");
    Node v$59 = GNode.create("IntegerLiteral", "0");
    Node v$60 = GNode.create("SubscriptExpression", v$58, v$59);
    Node v$61 = GNode.create("QualifiedIdentifier", "Integer");
    Node v$62 = GNode.create("PrimaryIdentifier", "args");
    Node v$63 = GNode.create("IntegerLiteral", "1");
    Node v$64 = GNode.create("SubscriptExpression", v$62, v$63);
    Node v$65 = GNode.create("Arguments", v$64);
    Node v$66 = GNode.create("NewClassExpression", null, null, v$61, v$65, 
      null);
    Node v$67 = GNode.create("Arguments", false);
    Node v$68 = GNode.create("CallExpression", v$66, null, "intValue", v$67);
    Node v$69 = GNode.create("PrimaryIdentifier", "args");
    Node v$70 = GNode.create("IntegerLiteral", "3");
    Node v$71 = GNode.create("SubscriptExpression", v$69, v$70);
    Node v$72 = GNode.create("Arguments", v$60, v$68, v$71);
    Node v$73 = GNode.create("NewClassExpression", null, null, name, v$72, 
      null);
    Node v$74 = GNode.create("Expression", v$57, "=", v$73);
    Node v$75 = GNode.create("ExpressionStatement", v$74);
    Node v$76 = GNode.create("Block", v$75);
    Node v$77 = GNode.create("ConditionalStatement", v$39, v$56, v$76);
    Node v$78 = GNode.create("PrimaryIdentifier", "System");
    Node v$79 = GNode.create("SelectionExpression", v$78, "out");
    Node v$80 = GNode.create("StringLiteral", "\"Starting olg\"");
    Node v$81 = GNode.create("Arguments", v$80);
    Node v$82 = GNode.create("CallExpression", v$79, null, "println", v$81);
    Node v$83 = GNode.create("ExpressionStatement", v$82);
    Node v$84 = GNode.create("PrimaryIdentifier", "olg");
    Node v$85 = GNode.create("Arguments", false);
    Node v$86 = GNode.create("CallExpression", v$84, null, "start", v$85);
    Node v$87 = GNode.create("ExpressionStatement", v$86);
    Node v$88 = GNode.create("Block", v$29, v$35, v$77, v$83, v$87);
    Node v$89 = GNode.create("MethodDeclaration", v$5, null, v$6, "main", 
      v$12, null, null, v$88);
    Node v$90 = GNode.create("ClassBody", v$89);
    Node v$91 = GNode.create("ClassDeclaration", v$2, "RunOLG", null, null, 
      null, v$90);
    return v$91;
  }

  /**
   * Create a conditional statement.
   *
   * @param cond The cond.
   * @param statement The statement.
   * @return The generic node.
   */
  public Node conditional(Node cond, Node statement) {
    Node v$1 = GNode.create("ExpressionStatement", statement);
    Node v$2 = GNode.create("Block", v$1);
    Node v$3 = GNode.create("ConditionalStatement", cond, v$2, null);
    return v$3;
  }

  /**
   * Create a conditional statement.
   *
   * @param cond The cond.
   * @param statements The statements.
   * @return The generic node.
   */
  public Node conditional(Node cond, List<Node> statements) {
    Node v$1 = GNode.create("EmptyStatement", false);
    Node v$2 = GNode.create("Block", statements.size() + 1).
      addAll(statements).add(v$1);
    Node v$3 = GNode.create("ConditionalStatement", cond, v$2, null);
    return v$3;
  }

  /**
   * Create an expression statement.
   *
   * @return The generic node.
   */
  public Node matchesFirst() {
    Node v$1 = GNode.create("PrimaryIdentifier", "t");
    Node v$2 = GNode.create("QualifiedIdentifier", "Tuple");
    Node v$3 = GNode.create("Type", v$2, null);
    Node v$4 = GNode.create("PrimaryIdentifier", "matches");
    Node v$5 = GNode.create("IntegerLiteral", "0");
    Node v$6 = GNode.create("Arguments", v$5);
    Node v$7 = GNode.create("CallExpression", v$4, null, "get", v$6);
    Node v$8 = GNode.create("CastExpression", v$3, v$7);
    Node v$9 = GNode.create("Expression", v$1, "=", v$8);
    Node v$10 = GNode.create("ExpressionStatement", v$9);
    return v$10;
  }

}
