public static void updateGoalCache(ControlFrame frame, boolean successP) {
    if ((!(Logic.$DUPLICATE_SUBGOAL_STRATEGY$ == Logic.KWD_DUPLICATE_GOALS_WITH_CACHING)) ||
        (!successP)) {
      return;
    }
    { GoalCache goalcache = ControlFrame.findGoalCache(frame);

      if (goalcache != null) {
        { List cachedbindings = goalcache.cachedBindings;
          Cons bindings = ControlFrame.yieldRelativeGoalBindings(frame);

          { boolean foundP000 = false;

            { Cons oldbindings = null;
              Cons iter000 = cachedbindings.theConsList;

              loop000 : for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                oldbindings = ((Cons)(iter000.value));
                { boolean alwaysP000 = true;

                  { Stella_Object v1 = null;
                    Cons iter001 = bindings;
                    Stella_Object v2 = null;
                    Cons iter002 = oldbindings;

                    loop001 : for (;(!(iter001 == Stella.NIL)) &&
                              (!(iter002 == Stella.NIL)); iter001 = iter001.rest, iter002 = iter002.rest) {
                      v1 = iter001.value;
                      v2 = iter002.value;
                      if (!Stella_Object.eqlP(v1, v2)) {
                        alwaysP000 = false;
                        break loop001;
                      }
                    }
                  }
                  if (alwaysP000) {
                    foundP000 = true;
                    break loop000;
                  }
                }
              }
            }
            if (foundP000) {
              return;
            }
          }
          if ((Stella.$TRACED_KEYWORDS$ != null) &&
              Stella.$TRACED_KEYWORDS$.membP(Logic.KWD_GOAL_CACHES)) {
            System.out.println("AUGMENT CACHE: " + bindings + "  " + frame);
          }
          cachedbindings.push(bindings);
          ((QueryIterator)(Logic.$QUERYITERATOR$.get())).augmentedGoalCacheP = true;
        }
      }
    }
  }