Efficient Divide-and-Conquer Parsing of Practical Context-Free Languages
Artikel i vetenskaplig tidskrift, 2013

We present a divide-and-conquer algorithm for parsing context-free languages efficiently. Our algorithm is an instance of Valiant's (1975), who reduced the problem of parsing to matrix multiplications. We show that, while the conquer step of Valiant's is O(n(3)) in the worst case, it improves to O(log (3) n), under certain conditions satisfied by many useful inputs. These conditions occur for example in program texts written by humans. The improvement happens because the multiplications involve an overwhelming majority of empty matrices. This result is relevant to modern computing: divide-and-conquer algorithms can be parallelized relatively easily.

Complexity

Iteration

Parsing

Divide-and-Conquer

Context-Free Languages

Författare

Jean-Philippe Bernardy

Chalmers, Data- och informationsteknik, Programvaruteknik

Koen Lindström Claessen

Chalmers, Data- och informationsteknik, Programvaruteknik

SIGPLAN Notices (ACM Special Interest Group on Programming Languages)

07308566 (ISSN)

Vol. 48 9 111-122

Ämneskategorier

Datorsystem

DOI

10.1145/2544174.2500576

Mer information

Skapat

2017-10-07