A Language-Based Approach for Improving the Robustness of Network Application Protocol Implementations