Efficient parallel and incremental parsing of practical context-free languages
Journal article, 2015

We present a divide-and-conquer algorithm for parsing context-free languages efficiently. Our algorithm is an instance of Valiant's (1975; General context-free recognition in less than cubic time. J. Comput. Syst. Sci. 10(2), 308-314), who reduced the problem of parsing to matrix multiplications. We show that, while the conquer step of Valiant's is O(n(3)), it improves to O(log(2) n) under certain conditions satisfied by many useful inputs that occur in practice, and if one uses a sparse representation of matrices. The improvement happens because the multiplications involve an overwhelming majority of empty matrices. This result is relevant to modern computing: divide-and-conquer algorithms with a polylogarithmic conquer step can be parallelized relatively easily.

Author

Jean-Philippe Bernardy

University of Gothenburg

Koen Lindström Claessen

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

Journal of Functional Programming

0956-7968 (ISSN) 1469-7653 (eISSN)

Vol. 25 Article Number: UNSP e10- e10

Subject Categories

Language Technology (Computational Linguistics)

Computer and Information Science

Computer Science

DOI

10.1017/s0956796815000131

More information

Latest update

7/19/2023