public boolean isSingleRateActor() {
   for (Action action : mActor.getImplementation().getActions()) {
     PortSignature portSignature = action.getPortSignature();
     for (PortInstance portInstance : portSignature.getPorts()) {
       if (portSignature.getPortRate(portInstance) > 1) return false;
     }
   }
   return true; // executesIndefinitely();
 }
  /**
   * An actor is a multi-rate static actor (SDF) if 1.all ports are active in all actions in the
   * periodic phase 2.all actions in the periodic phase have the same port signature
   *
   * @return true if it is an SDF actor and false otherwise.
   */
  private boolean isMultiRateStaticActor() {
    if (!hasStaticSchedule()) return false;

    // check if all ports are active in the periodic phase
    List<Action> actions =
        new ArrayList<Action>(getStaticSchedule().getRepeatedPhase().getFlatSequence());
    for (PortInstance portInstance : mActor.getPorts()) {
      if (!getPortAnalysis(portInstance).isActiveInAllActions(actions)) return false;
    }

    // Check if all actions in the periodic phase have the same port signatures
    PortSignature refPortSignature = null;
    for (Action action : getStaticSchedule().getRepeatedPhase().getFlatSequence()) {
      if (refPortSignature == null) refPortSignature = action.getPortSignature();
      else {
        if (refPortSignature.isSubsetOf(action.getPortSignature())
            && action.getPortSignature().isSubsetOf(refPortSignature)) continue;
        else return false;
      }
    }
    return executesIndefinitely();
  }