A STATIC TYPE SYSTEM FOR MESSAGE PASSING