18 January 2017

DIKU researchers win Best Paper Award at PEPM 2017

Best Paper Award

At the Workshop on Partial Evaluation and Program Manipulation (PEPM) held on 16-17 January 2017, Ulrik Terp Rasmussen, PhD student at DIKU, and his supervisor professor Fritz Henglein from the research project Kleene Meets Church, won a Best Paper Award for the paper PEG Parsing in Less Space Using Progressive Tabling and Dynamic Analysis.

PEPM is the premier forum for discussion of semantics-based program manipulation. It has been held for more than 25 years and originates from the pioneer work with partial evaluation which to a great extent occurred at DIKU. The PEPM series aims at bringing together researchers and practitioners working in the areas of program manipulation, partial evaluation, and program generation and focuses on techniques, theory, tools, and applications of analysis and manipulation of programs.


PEG Parsing in Less Space Using Progressive Tabling and Dynamic Analysis
Tabular top-down parsing and its lazy variant, Packrat, are linear-time execution models for the TDPL family of recursive descent parsers with limited backtracking. Exponential work due to backtracking is avoided by tabulating the result of each (nonterminal, offset)-pair at the expense of always using space proportional to the product of the input length and grammar size. Current methods for limiting the space usage relies either on manual annotations or on static analyses which are sensitive to the syntactic structure of the grammar. 

We present progressive tabular parsing (PTP), a new execution model which progressively computes parse tables for longer prefixes of the input and simultaneously generates a leftmost expansion of the parts of the parse tree that can be resolved. Table columns can be discarded on-the-fly as the expansion progresses through the input string, providing best-case constant and worst-case linear memory use. Furthermore, semantic actions are scheduled before the parser has seen the end of the input. The scheduling is conservative in the sense that no action has to be ``undone’’ in the case of backtracking.

The time complexity is O(dmn) where m is the size of the parser specification, n is the size of the input string, and d is either a configured constant or the maximum parser stack depth.

For common data exchange formats such as JSON, we demonstrate practically constant space usage.