public static Proposition extractProposition(Description self, KeyValueMap mapping) {
    { Proposition proposition = self.proposition;
      Cons existentials = (self.internalVariables.nonEmptyP() ? Description.topLevelExistentialVariables(self) : Stella.NIL);
      Proposition existsproposition = ((!(existentials == Stella.NIL)) ? Logic.createProposition(Logic.SYM_STELLA_EXISTS, 1) : ((Proposition)(null)));

      if (existsproposition != null) {
        KeyValueList.setDynamicSlotValue(existsproposition.dynamicSlots, Logic.SYM_LOGIC_IO_VARIABLES, Logic.copyVariablesVector(Logic.copyConsListToVariablesVector(existentials), mapping), null);
      }
      proposition = Proposition.copyProposition(proposition, mapping);
      mapping.removeAt(self.proposition);
      if (existsproposition != null) {
        (existsproposition.arguments.theArray)[0] = proposition;
        proposition = existsproposition;
      }
      return (proposition);
    }
  }