public static void recordGoalJustification(ControlFrame goal, Justification justification) {
    if (justification.proposition == null) {
      justification.proposition = goal.proposition;
    }
    justification.reversePolarityP = goal.reversePolarityP;
    justification.truthValue = goal.truthValue;
    if ((((QueryIterator)(Logic.$QUERYITERATOR$.get())) != null) &&
        (((QueryIterator)(Logic.$QUERYITERATOR$.get())).partialMatchStrategy != null)) {
      goal.setJustificationPartialTruth(justification);
    }
    KeyValueList.setDynamicSlotValue(goal.dynamicSlots, Logic.SYM_LOGIC_JUSTIFICATION, justification, null);
  }