Textual: These verses demonstrate that this soliloquy is triggered by the return of the sons of Mosiah. There are two possibilities for the original of this heartfelt exclamation. Alma might have written it as a personal testimony after hearing the stories of the sons of Mosiah, or it was publicly delivered and then written down. While the text itself gives no indication, I prefer the idea that this was a publicly delivered speech.
The nature of the text, and these references suggest that it is so closely tied to the events of the mission of the sons of Mosiah that it would appear most likely that it was triggered by the meeting and the exchange of information, and then written later. This is the pattern of the vast majority of known public discourse, where the discourse was given, and then recorded. It appears most logical to accept this soliloquy as similar to the rest of the recorded sermons in Mormon’s work.