} else cont=false;
    public static Trace[] extractTraces(UnflatFilter[] topFilters,HashMap[] execCounts,LinearAnalyzer lfa) {	LinkedList Q=new LinkedList();	HashMap visited=new HashMap();	LinkedList traces=new LinkedList();	HashMap outNodes=new HashMap();	HashMap inNodes=new HashMap();	for(int i=0;i<topFilters.length;i++)	    Q.add(topFilters[i]);	while(Q.size()>0) {	    UnflatFilter filter=(UnflatFilter)Q.removeFirst();	    FilterContent content;	    if(filter.filter instanceof SIRFileReader)		content=new FileInputContent(filter);	    else if(filter.filter instanceof SIRFileWriter)		content=new FileOutputContent(filter);	    else		content=new FilterContent(filter);	    boolean linear=content.getArray()!=null;	    System.out.println("IS LINEAR: "+linear);	    /*if(content.isLinear()) {	      FilterContent[] linearStuff=LinearFission.fiss(content,content.getArray().length);	      for(int i=0;i<linearStuff.length;i++)	      System.out.println("Linear: "+linearStuff[i].getArray().length+" "+linearStuff[i].getArray()[0]);	      for(int i=0;i<linearStuff.length;i++) {	      FilterTraceNode filterNode=new FilterTraceNode(linearStuff[i]);	      node.setNext(filterNode);	      filterNode.setPrevious(node);	      node=filterNode;	      filter=newFilter;	      }	      }*/	    TraceNode node;	    Trace trace;	    if(!visited.containsKey(filter)) {		System.err.println("Visiting: "+filter.filter.getClass().getName());		visited.put(filter,null);		if(filter.in!=null&&filter.in.length>0) {		    //node=new InputTraceNode(filter.inWeights,getInNodes(outNodes,filter.in));		    node=getInNode(outNodes,inNodes,filter);		    trace=new Trace((InputTraceNode)node);		    FilterTraceNode filterNode=new FilterTraceNode(content);		    node.setNext(filterNode);		    filterNode.setPrevious(node);		    node=filterNode;		} else {		    node=new FilterTraceNode(content);		    trace=new Trace(node);		}		//if(!(filter.filter instanceof SIRPredefinedFilter)) //Don't map FileReader/Writer		traces.add(trace);		boolean cont=true;		while(cont&&filter.out!=null&&filter.out.length==1&&filter.out[0].length==1&&filter.out[0][0].dest.in.length<2) {		    UnflatFilter newFilter=filter.out[0][0].dest;		    if(newFilter.filter instanceof SIRFileReader)			content=new FileInputContent(newFilter);		    else if(newFilter.filter instanceof SIRFileWriter)			content=new FileOutputContent(newFilter);		    else			content=new FilterContent(newFilter);		    System.out.println("IS LINEAR: "+linear);		    /*if(content.isLinear()) {			FilterContent[] linearStuff=LinearFission.fiss(content,content.getArray().length/2);			for(int i=0;i<linearStuff.length;i++)			    System.out.println("Linear: "+linearStuff[i].getArray().length+" "+linearStuff[i].getArray()[0]);			for(int i=0;i<linearStuff.length;i++) {			    FilterTraceNode filterNode=new FilterTraceNode(linearStuff[i]);			    node.setNext(filterNode);			    filterNode.setPrevious(node);			    node=filterNode;			    filter=newFilter;			}			} else {*/			if(!((newFilter.filter instanceof SIRPredefinedFilter)||(filter.filter instanceof SIRPredefinedFilter))) {			    //if((content.getArray()!=null)==linear) {			    			    //if(content.isLinear()) {			    			    //} else {			    FilterTraceNode filterNode=new FilterTraceNode(content);			    node.setNext(filterNode);			    filterNode.setPrevious(node);			    node=filterNode;			    //}			    filter=newFilter;			    			} else			    cont=false;			//}		}		if(filter.out!=null&&filter.out.length>0) {		    OutputTraceNode outNode=null;		    //if(filter.filter instanceof SIRFileReader) {		    //SIRFileReader read=(SIRFileReader)filter.filter;		    //outNode=new EnterTraceNode(read.getFileName(),true,filter.outWeights);		    //} else		    outNode=new OutputTraceNode(filter.outWeights);		    node.setNext(outNode);		    outNode.setPrevious(node);		    outNodes.put(filter,outNode);		    for(int i=0;i<filter.out.length;i++) {			UnflatEdge[] inner=filter.out[i];			for(int j=0;j<inner.length;j++) {			    UnflatFilter dest=inner[j].dest;			    if(!visited.containsKey(dest))				Q.add(dest);			}		    }		}		trace.finish();	    }	}	//Fix Output Nodes	Set outFilters=outNodes.keySet();	UnflatFilter[] outArray=new UnflatFilter[outFilters.size()];	outFilters.toArray(outArray);	for(int i=0;i<outArray.length;i++) {	    UnflatFilter outFilter=outArray[i];	    OutputTraceNode outNode=(OutputTraceNode)outNodes.get(outFilter);	    InputTraceNode[][] dests=new InputTraceNode[outFilter.out.length][0];	    for(int j=0;j<dests.length;j++) {		UnflatEdge[] destFilters=outFilter.out[j];		InputTraceNode[] subDests=new InputTraceNode[destFilters.length];		for(int k=0;k<destFilters.length;k++) {		    subDests[k]=(InputTraceNode)inNodes.get(destFilters[k].dest);		}		dests[j]=subDests;	    }	    outNode.setDests(dests);	}	Trace[] out=new Trace[traces.size()];	traces.toArray(out);	return out;    }