Ask any question about EPFL courses, lectures, exercises, research, news, etc. or try the example questions below.
DISCLAIMER: The Graph Chatbot is not programmed to provide explicit or categorical answers to your questions. Rather, it transforms your questions into API requests that are distributed across the various IT services officially administered by EPFL. Its purpose is solely to collect and recommend relevant references to content that you can explore to help you answer your questions.
Modern regex languages have evolved significantly from traditional regular expressions, incorporating features that complicate the matching process. Many modern regex engines, including JavaScript’s, use a backtracking algorithm that can exhibit exponential complexity, leading to vulnerabilities such as Regular Expression Denial of Service (ReDoS) attacks. While some approaches demonstrate that a large subset of these regex patterns can be executed in linear time, existing linear-time engines for JavaScript are generally two orders of magnitude slower on average compared to their backtracking counterparts. This performance gap hinders widespread adoption, highlighting the need for fasteron average solutions. This report introduces Rawr, an optimizing compiler that translates a subset of JavaScript’s regular expressions into WebAssembly (Wasm). The resulting Wasm code executes in linear time and outperforms the current linear engine of V8.