public static Cons callGetRules(Stella_Object relationref) {
    { LogicObject description = Logic.getDescription(relationref);
      Cons rules = Stella.NIL;

      if (description == null) {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("Can't find a relation named `" + relationref + "'");
          throw ((NoSuchObjectException)(NoSuchObjectException.newNoSuchObjectException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
      if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(description), Logic.SGT_LOGIC_NAMED_DESCRIPTION)) {
        { NamedDescription description000 = ((NamedDescription)(description));

          rules = LogicObject.applicableRulesOfDescription(description000, Logic.KWD_FORWARD, false).concatenate(LogicObject.applicableRulesOfDescription(description000, Logic.KWD_BACKWARD, false), Cons.cons(Description.helpGetForwardChainingRules(description000), Stella.NIL));
          { Description complement = ((Description)(KeyValueList.dynamicSlotValue(description000.dynamicSlots, Logic.SYM_LOGIC_COMPLEMENT_DESCRIPTION, null)));

            if (complement != null) {
              rules = rules.concatenate(LogicObject.applicableRulesOfDescription(complement, Logic.KWD_FORWARD, false), Cons.cons(LogicObject.applicableRulesOfDescription(complement, Logic.KWD_BACKWARD, false), Cons.cons(Description.helpGetForwardChainingRules(complement), Stella.NIL)));
            }
          }
        }
      }
      else {
      }
      return (rules);
    }
  }