public static double testTheoryOverExamples(List examples) {
    { double correct = 0.0;
      QueryIterator query = null;
      Cons consQuery = Stella.NIL;
      Proposition prop = null;

      { TrainingExample example = null;
        Cons iter000 = examples.theConsList;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          example = ((TrainingExample)(iter000.value));
          consQuery = ((Cons)(Stella_Object.copyConsTree(example.query)));
          prop = ((Proposition)(Logic.conceiveFormula(((Cons)(Stella_Object.copyConsTree(consQuery))))));
          query = Logic.makeQuery(Stella.NIL, ((Cons)(Stella_Object.copyConsTree(example.query))), Stella.NIL, Stella.NIL);
          if (Surrogate.subtypeOfBooleanP(Stella_Object.safePrimaryType(example.output))) {
            if (BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper)(example.output)))) {
              {
                Proposition.helpUpdateTopLevelProposition(prop, Logic.KWD_RETRACT_TRUE);
                if (TruthValue.trueTruthValueP(Logic.callAsk(query))) {
                  correct = correct + 1;
                }
                Proposition.helpUpdateTopLevelProposition(prop, Logic.KWD_ASSERT_TRUE);
              }
            }
            else {
              {
                Proposition.helpUpdateTopLevelProposition(prop, Logic.KWD_RETRACT_FALSE);
                if (TruthValue.unknownTruthValueP(Logic.callAsk(query))) {
                  correct = correct + 1;
                }
                Proposition.helpUpdateTopLevelProposition(prop, Logic.KWD_ASSERT_FALSE);
              }
            }
          }
          else {
          }
        }
      }
      return (correct / examples.length());
    }
  }