Protocol State Machines and Session Languages