xWIDL: modular and deep JavaScript API misuses checking based on extended WebIDL

JavaScript is the de facto language of the Web, but is notoriously error-prone to use. 65% of common bugs like undefined/null variable usage are DOM-related. Besides DOM, JS APIs are also expected to manipulate graphic hardware and asynchronous I/O, which makes the condition even worse. Although WebIDL provides a formal contract between JS developers and platform implementation, its expressivity is too limited to support deep checking of API misuses. We propose the eXtended WebIDL (xWIDL) language and a modular API misuses checking framework based on xWIDL. We discuss how to handle the data exchange between JS analyzer and SMT-based verifier. Finally, we test our implementation in a case study manner and report our findings on its efficiency and modularity.