NodeMOP: runtime verification for Node.js applications
Node.js has become one of the most popular frameworks for general-purpose and server-side application development in JavaScript. However, due to its dynamic, asynchronous, event-driven programming model, Node.js applications are considered error-prone, and their correctness is hard to verify. Monitoring-Oriented Programming (MOP) is a Runtime Verification (RV) paradigm that aims at improving the safety and reliability of a software system. To the best of our knowledge, no practical RV framework targets JavaScript and Node.js applications.
 In this paper, we introduce NodeMOP, a novel RV framework for JavaScript that allows one to apply RV to Node.js applications. Using NodeMOP, we have formalized two properties related to popular asynchronous APIs based on the Node.js documentation, one from the file-system module and the other from the HTTP module. NodeMOP also supports error recovery by allowing developers to define custom handlers in case of property violations. We showcase NodeMOP with our specified properties on examples of Node.js API misuse. We also evaluate the overhead of NodeMOP with benchmarks based on the introduced examples.