A Type Discipline for Message Passing Parallel Programs