Efficient divide-and-conquer parsing of practical context-free languages
Paper in proceeding, 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(n3) in the worst case, it improves to O(log3 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.

Divide-and-conquer

Context-free languages

Iteration

Parsing

Complexity

Author

Jean-Philippe Bernardy

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

Koen Lindström Claessen

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP

111-122
978-145032326-0 (ISBN)

Subject Categories

Computer Systems

DOI

10.1145/2500365.2500576

ISBN

978-145032326-0

More information

Created

10/8/2017