public static Vector getRuleIoVariables(Proposition rule) {
    { Vector vars = ((Vector)(KeyValueList.dynamicSlotValue(rule.dynamicSlots, Logic.SYM_LOGIC_IO_VARIABLES, null)));
      Proposition master = null;

      if (vars != null) {
        return (vars);
      }
      master = ((Proposition)(KeyValueList.dynamicSlotValue(rule.dynamicSlots, Logic.SYM_LOGIC_MASTER_PROPOSITION, null)));
      if (master != null) {
        vars = ((Vector)(KeyValueList.dynamicSlotValue(master.dynamicSlots, Logic.SYM_LOGIC_IO_VARIABLES, null)));
        if (vars != null) {
          return (vars);
        }
      }
      if (rule.kind == Logic.KWD_IMPLIES) {
        { Vector arguments = rule.arguments;
          Description ant = ((Description)((arguments.theArray)[0]));
          Description cq = ((Description)((arguments.theArray)[1]));

          if (Description.namedDescriptionP(ant)) {
            return (cq.ioVariables);
          }
          else {
            return (ant.ioVariables);
          }
        }
      }
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("get-rule-io-variables: don't know how to access IO-vars of rule: `" + rule + "'");
        throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
  }