Пример #1
0
  public void printCircuit() {

    for (Instruction e : evaluationQueue.keySet()) {
      if (e.doneWithinCircuit()) {
        System.out.println(e);
      }
    }
  }
Пример #2
0
  public void writeCircuitFile() {
    try {
      PrintWriter printWriter =
          new PrintWriter(new BufferedWriter(new FileWriter(getName() + ".arith")));

      printWriter.println("total " + currentWireId);
      for (Instruction e : evaluationQueue.keySet()) {
        if (e.doneWithinCircuit()) {
          printWriter.print(e + "\n");
        }
      }
      printWriter.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }