public void printCircuit() { for (Instruction e : evaluationQueue.keySet()) { if (e.doneWithinCircuit()) { System.out.println(e); } } }
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(); } }