public static List loadNeuralNetworkFile(String file) {
    { List nets = List.newList();
      InputFileStream stream = InputFileStream.newInputFileStream(file);
      int numHidden = 0;
      Cons prop = Stella.NIL;
      Stella_Object temp = null;
      int numIn = 0;
      PropositionNeuralNetwork net = null;

      for (;;) {
        if (!(InputStream.readSExpression(stream, new Object[1]) == Logic.SYM_LOGIC_DEFNETWORK)) {
          return (nets.reverse());
        }
        prop = ((Cons)(InputStream.readSExpression(stream, new Object[1])));
        numIn = ((IntegerWrapper)(InputStream.readSExpression(stream, new Object[1]))).wrapperValue;
        numHidden = ((IntegerWrapper)(InputStream.readSExpression(stream, new Object[1]))).wrapperValue;
        net = Logic.allocateNeuralNetwork(numIn, numHidden);
        { int i = Stella.NULL_INTEGER;
          int iter000 = 0;
          int upperBound000 = numIn - 1;

          for (;iter000 <= upperBound000; iter000 = iter000 + 1) {
            i = iter000;
            { int h = Stella.NULL_INTEGER;
              int iter001 = 0;
              int upperBound001 = numHidden - 1;

              for (;iter001 <= upperBound001; iter001 = iter001 + 1) {
                h = iter001;
                temp = InputStream.readSExpression(stream, new Object[1]);
                if (Stella_Object.eqlP(temp, Stella.ZERO_WRAPPER)) {
                  temp = FloatWrapper.wrapFloat(0.0);
                }
                (net.ih.theArray)[((i * net.ih.nofColumns) + h)] = (((FloatWrapper)(temp)));
              }
            }
          }
        }
        { int h = Stella.NULL_INTEGER;
          int iter002 = 0;
          int upperBound002 = numHidden - 1;

          for (;iter002 <= upperBound002; iter002 = iter002 + 1) {
            h = iter002;
            (net.ho.theArray)[h] = (((FloatWrapper)(InputStream.readSExpression(stream, new Object[1]))));
          }
        }
        nets.push(net);
      }
    }
  }