A Survey of Parser Differential Anti-Patterns

No ratings

Presented at LangSec Workshop 2023 by

Parser differentials emerge when two (or more) parsers interpret the same input in different ways. Differences in parsing behavior is difficult to detect due to (1) challenges in abstracting out the parser from complex code-bases and (2) proving the equivalence of parsers. Parser differentials remain understudied as they are a novel unexpected bug resulting from the interaction of software components—sometimes even independent modules— which may individually appear bug-free. We present a survey of many known parser differentials and conduct a root-cause analysis of them. We, do so with an aim to uncover insights on how we can best conceptualize the underlying causes of their emergence. In studying these differentials, we have isolated certain design anti-patterns that give rise to parser differentials in software systems. We show how these differentials do not fit nicely into the state-of-the-art model of parser differentials and thus propose improvements to it. Additionally, we provide suggestions to help prevent parser differentials in software systems.