16. The non-transitory computer readable medium of claim 15 , wherein composing the main language IR and the first IR snippet further comprises: mapping the first access of the first foreign object to a first message; inserting into the main language IR, at the foreign object access site, a first message element corresponding to the first message to obtain a first intermediate IR; sending the first message to a first receiver corresponding to the first foreign object; receiving, from the first receiver in response to sending the first message, the first IR snippet; and inserting the first IR snippet into the first intermediate IR to obtain the cross-language IR, wherein the first language check element is executed before the first IR snippet.
16. The non-transitory computer readable medium of claim 15 , wherein composing the main language IR and the first IR snippet further comprises: mapping the first access of the first foreign object to a first message; inserting into the main language IR, at the foreign object access site, a first message element corresponding to the first message to obtain a first intermediate IR; sending the first message to a first receiver corresponding to the first foreign object; receiving, from the first receiver in response to sending the first message, the first IR snippet; and inserting the first IR snippet into the first intermediate IR to obtain the cross-language IR, wherein the first language check element is executed before the first IR snippet. 17. The non-transitory computer readable medium of claim 16 , wherein the first message comprises one selected from a group consisting of a read message, a write message, an execute message, and an unbox message.