public static Stella_Object accessControlFrameSlotValue(ControlFrame self, Symbol slotname, Stella_Object value, boolean setvalueP) {
    if (slotname == Logic.SYM_STELLA_STATE) {
      if (setvalueP) {
        self.state = ((Keyword)(value));
      }
      else {
        value = self.state;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_PROPOSITION) {
      if (setvalueP) {
        self.proposition = ((Proposition)(value));
      }
      else {
        value = self.proposition;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_TRUTH_VALUE) {
      if (setvalueP) {
        self.truthValue = ((TruthValue)(value));
      }
      else {
        value = self.truthValue;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_REVERSE_POLARITYp) {
      if (setvalueP) {
        self.reversePolarityP = BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper)(value)));
      }
      else {
        value = (self.reversePolarityP ? Stella.TRUE_WRAPPER : Stella.FALSE_WRAPPER);
      }
    }
    else if (slotname == Logic.SYM_LOGIC_STARTING_CLOCK_TICKS) {
      if (setvalueP) {
        self.startingClockTicks = ((IntegerWrapper)(value)).wrapperValue;
      }
      else {
        value = IntegerWrapper.wrapInteger(self.startingClockTicks);
      }
    }
    else if (slotname == Logic.SYM_LOGIC_ALLOTTED_CLOCK_TICKS) {
      if (setvalueP) {
        self.allottedClockTicks = ((IntegerWrapper)(value)).wrapperValue;
      }
      else {
        value = IntegerWrapper.wrapInteger(self.allottedClockTicks);
      }
    }
    else if (slotname == Logic.SYM_LOGIC_UP) {
      if (setvalueP) {
        self.up = ((ControlFrame)(value));
      }
      else {
        value = self.up;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_DOWN) {
      if (setvalueP) {
        self.down = ((ControlFrame)(value));
      }
      else {
        value = self.down;
      }
    }
    else if (slotname == Logic.SYM_STELLA_RESULT) {
      if (setvalueP) {
        self.result = ((ControlFrame)(value));
      }
      else {
        value = self.result;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_ARGUMENT_CURSOR) {
      if (setvalueP) {
        self.argumentCursor = ((IntegerWrapper)(value)).wrapperValue;
      }
      else {
        value = IntegerWrapper.wrapInteger(self.argumentCursor);
      }
    }
    else if (slotname == Logic.SYM_LOGIC_PATTERN_RECORD) {
      if (setvalueP) {
        self.patternRecord = ((PatternRecord)(value));
      }
      else {
        value = self.patternRecord;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_INHERITED_PATTERN_RECORD) {
      if (setvalueP) {
        self.inheritedPatternRecord = ((PatternRecord)(value));
      }
      else {
        value = self.inheritedPatternRecord;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_CHOICE_POINT_UNBINDING_OFFSET) {
      if (setvalueP) {
        self.choicePointUnbindingOffset = ((IntegerWrapper)(value)).wrapperValue;
      }
      else {
        value = IntegerWrapper.wrapInteger(self.choicePointUnbindingOffset);
      }
    }
    else if (slotname == Logic.SYM_LOGIC_CURRENT_STRATEGY) {
      if (setvalueP) {
        self.currentStrategy = ((Keyword)(value));
      }
      else {
        value = self.currentStrategy;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_NEXT_STRATEGIES) {
      if (setvalueP) {
        self.nextStrategies = ((Cons)(value));
      }
      else {
        value = self.nextStrategies;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_PARTIAL_MATCH_FRAME) {
      if (setvalueP) {
        self.partialMatchFrame = ((PartialMatchFrame)(value));
      }
      else {
        value = self.partialMatchFrame;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_JUSTIFICATIONS) {
      if (setvalueP) {
        self.justifications = ((List)(value));
      }
      else {
        value = self.justifications;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_GOAL_BINDINGS) {
      if (setvalueP) {
        self.goalBindings = ((Cons)(value));
      }
      else {
        value = self.goalBindings;
      }
    }
    else if (slotname == Logic.SYM_LOGIC_CACHED_GOAL_RESULTp) {
      if (setvalueP) {
        self.cachedGoalResultP = BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper)(value)));
      }
      else {
        value = (self.cachedGoalResultP ? Stella.TRUE_WRAPPER : Stella.FALSE_WRAPPER);
      }
    }
    else if (slotname == Logic.SYM_LOGIC_DONT_CACHE_GOAL_FAILUREp) {
      if (setvalueP) {
        self.dontCacheGoalFailureP = BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper)(value)));
      }
      else {
        value = (self.dontCacheGoalFailureP ? Stella.TRUE_WRAPPER : Stella.FALSE_WRAPPER);
      }
    }
    else {
      if (setvalueP) {
        KeyValueList.setDynamicSlotValue(self.dynamicSlots, slotname, value, null);
      }
      else {
        value = self.dynamicSlots.lookup(slotname);
      }
    }
    return (value);
  }