Learning Highly Recursive Input Grammars

Neil Kulkarni, Caroline Lemieux, Koushik Sen
8/30/2021
cs.SEcs.PL

Official code: neil-kulkarni/arvada (39 stars, Python, MIT, last commit 2024-05-17).

Abstract

This paper presents Arvada, an algorithm for learning context-free grammars from a set of positive examples and a Boolean-valued oracle. Arvada learns a context-free grammar by building parse trees from the positive examples.

Show full abstract

Starting from initially flat trees, Arvada builds structure to these trees with a key operation: it bubbles sequences of sibling nodes in the trees into a new node, adding a layer of indirection to the tree. Bubbling operations enable recursive generalization in the learned grammar. We evaluate Arvada against GLADE and find it achieves on average increases of 4.98x in recall and 3.13x in F1 score, while incurring only a 1.27x slowdown and requiring only 0.87x as many calls to the oracle. Arvada has a particularly marked improvement over GLADE on grammars with highly recursive structure, like those of programming languages.

View on arXivView PDF

Code Implementations(1)

MIT

Grammar synthesis algorithm using a black box oracle

395Python, EuphoriaJan 28, 20202 years agoMIT

Similar Papers

Cite this paper

@article{kulkarni2021learning,
  title  = {Learning Highly Recursive Input Grammars},
  author = {Neil Kulkarni and Caroline Lemieux and Koushik Sen},
  year   = {2021},
  eprint = {2108.13340},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.13340}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2108.13340.svg)](https://codeofpaper.com/paper/2108.13340)

Discussion