System.err.println("filter " + filter.getName() + " is not fusable because has file I/O");
if (debugging) { System.err.println("filter " + filter.getName() + " is not fusable because has file I/O"); }
    public static boolean isFusable(SIRStream str) {        // must be a filter to fuse        if (!(str instanceof SIRFilter)) {            return false;        }        SIRFilter filter = (SIRFilter)str;        // special case: identity filters are fusable (even though        // they fail some of the later tests, like having a work function)        if (filter instanceof SIRIdentity) {            return true;        }        // must have a work function        if (filter.getWork()==null) {            //XXX: debugging            System.err.println("filter " + filter.getName() + " is not fusable because has no work fn");            return false;        }        // must have static rates        if (filter.getPeek().isDynamic() ||            filter.getPop().isDynamic() ||            filter.getPush().isDynamic()) {            System.err.println("filter " + filter.getName() + " is not fusable because has dynamic rates");            return false;        }        // don't fuse message senders or receivers because message        // timing breaks down after fusion (need standalone filter for        // proper SDEP and message delivery in cluster backend)        SIRPortal[] receivesFrom = SIRPortal.getPortalsWithReceiver(filter);        SIRPortal[] sendsTo = SIRPortal.getPortalsWithSender(filter);        if (receivesFrom.length>=1 || sendsTo.length>=1) {            System.err.println("filter " + filter.getName() + " is not fusable because has messages");            return false;        }        // don't fuse file readers or file writers        if (filter instanceof SIRFileReader || filter instanceof SIRFileWriter) {            System.err.println("filter " + filter.getName() + " is not fusable because has file I/O");            return false;        }        // otherwise fusable        return true;    }