public static ControlFrame createDownFrame(ControlFrame upframe, Proposition downproposition) {
    { ControlFrame downframe = ControlFrame.newControlFrame();

      upframe.down = downframe;
      downframe.up = upframe;
      downframe.reversePolarityP = upframe.reversePolarityP;
      downframe.proposition = downproposition;
      downframe.down = null;
      KeyValueList.setDynamicSlotValue(downframe.dynamicSlots, Logic.SYM_LOGIC_BACK, null, null);
      downframe.patternRecord = null;
      downframe.truthValue = null;
      downframe.justifications.clear();
      KeyValueList.setDynamicSlotValue(downframe.dynamicSlots, Logic.SYM_LOGIC_JUSTIFICATION, null, null);
      KeyValueList.setDynamicSlotValue(downframe.dynamicSlots, Logic.SYM_LOGIC_GOAL_CACHE, null, null);
      downframe.goalBindings = null;
      KeyValueList.setDynamicSlotValue(downframe.dynamicSlots, Logic.SYM_LOGIC_CACHED_BINDINGS_ITERATOR, null, null);
      if (downproposition != null) {
        downframe.state = downproposition.kind;
        if (downframe.reversePolarityP) {
          { Keyword testValue000 = downframe.state;

            if (testValue000 == Logic.KWD_AND) {
              downframe.state = Logic.KWD_OR;
            }
            else if (testValue000 == Logic.KWD_OR) {
              downframe.state = Logic.KWD_AND;
            }
            else {
            }
          }
        }
        downframe.argumentCursor = 0;
      }
      downframe.inheritedPatternRecord = ControlFrame.operativePatternRecord(upframe);
      return (downframe);
    }
  }