Visitors: Fundamentals of protocol engineering