There are efforts by Microsoft Research in this direction:
http://research.microsoft.com/en-us/projects/slam/
They have developed several ___domain specific languages and specification tools for developing drivers. I think similar methods are applicable to protocols.