Skip to Main content Skip to Navigation
Conference papers

Implementing the WebSocket Protocol Based on Formal Modelling and Automated Code Generation

Abstract : Model-based software engineering offers several attractive benefits for the implementation of protocols, including automated code generation for different platforms from design-level models. In earlier work, we have proposed a template-based approach using Coloured Petri Net formal models with pragmatic annotations for automated code generation of protocol software. The contribution of this paper is an application of the approach as implemented in the PetriCode tool to obtain protocol software implementing the IETF WebSocket protocol. This demonstrates the scalability of our approach to real protocols. Furthermore, we perform formal verification of the CPN model prior to code generation, and test the implementation for interoperability against the Autobahn WebSocket test-suite resulting in 97% and 99% success rate for the client and server implementation, respectively. The tests show that the cause of test failures were mostly due to local and trivial errors in newly written code-generation templates, and not related to the overall logical operation of the protocol as specified by the CPN model.
Complete list of metadata

Cited literature [15 references]  Display  Hide  Download
Contributor : Hal Ifip Connect in order to contact the contributor
Submitted on : Monday, March 14, 2016 - 10:50:39 AM
Last modification on : Friday, August 5, 2022 - 12:38:14 PM
Long-term archiving on: : Sunday, November 13, 2016 - 6:01:53 PM


Files produced by the author(s)


Distributed under a Creative Commons Attribution 4.0 International License



Kent Fagerland Simonsen, Lars Michael Kristensen. Implementing the WebSocket Protocol Based on Formal Modelling and Automated Code Generation. 4th International Conference on Distributed Applications and Interoperable Systems (DAIS), Jun 2014, Berlin, Germany. pp.104-118, ⟨10.1007/978-3-662-43352-2_9⟩. ⟨hal-01287735⟩



Record views


Files downloads