public static double trainAndTestRuleInduction(List trainSet, List testSet) {
    { Module homeModule = ((Module)(((Context)(Stella.$CONTEXT$.get()))));
      Module testModule = Stella.findOrCreateModule(((Module)(((Context)(Stella.$CONTEXT$.get())))).moduleFullName + "INDUCED-RULES");
      double result = 0.0;

      testModule.changeModule();
      Context.clearContext(testModule);
      if (Logic.$RULE_INDUCTION_STRATEGY$ == Logic.KWD_TOP_DOWN) {
        Logic.topDownRuleInduction(trainSet);
      }
      else if (Logic.$RULE_INDUCTION_STRATEGY$ == Logic.KWD_BOTTOM_UP) {
        Logic.bottomUpRuleInduction(trainSet, Logic.$SIMPLIFY_RULE_ANTECEDENTp$);
      }
      else {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("`" + Logic.$RULE_INDUCTION_STRATEGY$ + "' is not a valid case option");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
      Logic.assertInducedRules();
      result = Logic.testTheoryOverExamples(testSet);
      homeModule.changeModule();
      return (result);
    }
  }