public static Stella_Object buildNetworkTree(Proposition prop, Cons propList) {
    if (propList.memberP(prop)) {
      return (FloatWrapper.wrapFloat(((FloatWrapper)(KeyValueList.dynamicSlotValue(prop.dynamicSlots, Logic.SYM_LOGIC_MATCH_SCORE, Stella.NULL_FLOAT_WRAPPER))).wrapperValue));
    }
    if (!(prop.support() == Stella.NIL)) {
      { Cons proofs = prop.support();
        Cons tree = Stella.NIL;

        { PartialSupport proof = null;
          Cons iter000 = proofs;

          for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
            proof = ((PartialSupport)(iter000.value));
            { Proposition fact = proof.fact;
              Cons proofTree = Stella.NIL;

              { Stella_Object arg = null;
                Vector vector000 = fact.arguments;
                int index000 = 0;
                int length000 = vector000.length();
                FloatWrapper score = null;
                Cons iter001 = proof.argumentScores;
                Cons collect000 = null;

                for (;(index000 < length000) &&
                          (!(iter001 == Stella.NIL)); index000 = index000 + 1, iter001 = iter001.rest) {
                  arg = (vector000.theArray)[index000];
                  score = ((FloatWrapper)(iter001.value));
                  if (Stella_Object.isaP(arg, Logic.SGT_LOGIC_PROPOSITION)) {
                    KeyValueList.setDynamicSlotValue(((Proposition)(arg)).dynamicSlots, Logic.SYM_LOGIC_MATCH_SCORE, FloatWrapper.wrapFloat(score.wrapperValue), Stella.NULL_FLOAT_WRAPPER);
                    if (collect000 == null) {
                      {
                        collect000 = Cons.cons(Proposition.buildNetworkTree(((Proposition)(arg)), Cons.cons(prop, propList)), Stella.NIL);
                        if (proofTree == Stella.NIL) {
                          proofTree = collect000;
                        }
                        else {
                          Cons.addConsToEndOfConsList(proofTree, collect000);
                        }
                      }
                    }
                    else {
                      {
                        collect000.rest = Cons.cons(Proposition.buildNetworkTree(((Proposition)(arg)), Cons.cons(prop, propList)), Stella.NIL);
                        collect000 = collect000.rest;
                      }
                    }
                  }
                }
              }
              if (((PropositionNeuralNetwork)(KeyValueList.dynamicSlotValue(fact.dynamicSlots, Logic.SYM_LOGIC_NEURAL_NETWORK, null))) != null) {
                tree = Cons.cons(Cons.cons(((PropositionNeuralNetwork)(KeyValueList.dynamicSlotValue(fact.dynamicSlots, Logic.SYM_LOGIC_NEURAL_NETWORK, null))), proofTree), tree);
              }
              else {
                tree = Cons.cons(FloatWrapper.wrapFloat(((FloatWrapper)(KeyValueList.dynamicSlotValue(prop.dynamicSlots, Logic.SYM_LOGIC_MATCH_SCORE, Stella.NULL_FLOAT_WRAPPER))).wrapperValue), tree);
              }
            }
          }
        }
        if ((tree.rest == Stella.NIL) &&
            (!Stella_Object.consP(tree.value))) {
          return (tree.value);
        }
        else {
          return (tree);
        }
      }
    }
    else if (((PropositionNeuralNetwork)(KeyValueList.dynamicSlotValue(prop.dynamicSlots, Logic.SYM_LOGIC_NEURAL_NETWORK, null))) != null) {
      { Cons tree = Stella.NIL;

        { Stella_Object arg = null;
          Vector vector001 = prop.arguments;
          int index001 = 0;
          int length001 = vector001.length();
          int i = Stella.NULL_INTEGER;
          int iter002 = 1;
          Cons collect001 = null;

          for (;index001 < length001; index001 = index001 + 1, iter002 = iter002 + 1) {
            arg = (vector001.theArray)[index001];
            i = iter002;
            KeyValueList.setDynamicSlotValue(((Proposition)(arg)).dynamicSlots, Logic.SYM_LOGIC_MATCH_SCORE, FloatWrapper.wrapFloat(((FloatWrapper)((((PropositionNeuralNetwork)(KeyValueList.dynamicSlotValue(prop.dynamicSlots, Logic.SYM_LOGIC_NEURAL_NETWORK, null))).input.theArray)[i])).wrapperValue), Stella.NULL_FLOAT_WRAPPER);
            if (collect001 == null) {
              {
                collect001 = Cons.cons(Proposition.buildNetworkTree(((Proposition)(arg)), Cons.cons(prop, propList)), Stella.NIL);
                if (tree == Stella.NIL) {
                  tree = collect001;
                }
                else {
                  Cons.addConsToEndOfConsList(tree, collect001);
                }
              }
            }
            else {
              {
                collect001.rest = Cons.cons(Proposition.buildNetworkTree(((Proposition)(arg)), Cons.cons(prop, propList)), Stella.NIL);
                collect001 = collect001.rest;
              }
            }
          }
        }
        tree = Cons.cons(((PropositionNeuralNetwork)(KeyValueList.dynamicSlotValue(prop.dynamicSlots, Logic.SYM_LOGIC_NEURAL_NETWORK, null))), tree);
        return (Cons.consList(Cons.cons(tree, Stella.NIL)));
      }
    }
    else {
      return (FloatWrapper.wrapFloat(((FloatWrapper)(KeyValueList.dynamicSlotValue(prop.dynamicSlots, Logic.SYM_LOGIC_MATCH_SCORE, Stella.NULL_FLOAT_WRAPPER))).wrapperValue));
    }
  }