PHOG: Probabilistic Model for Code

Abstract

We introduce a new generative model for code called probabilistic higher order grammar (PHOG). PHOG generalizes probabilistic context free grammars (PCFGs) by allowing conditioning of a production rule beyond the parent non-terminal, thus capturing rich contexts relevant to programs. Even though PHOG is more powerful than a PCFG, it can be learned from data just as efficiently. We trained a PHOG model on a large JavaScript code corpus and show that it is more precise than existing models, while similarly fast. As a result, PHOG can immediately benefit existing programming tools based on probabilistic models of code.

Cite

Text

Bielik et al. "PHOG: Probabilistic Model for Code." International Conference on Machine Learning, 2016.

Markdown

[Bielik et al. "PHOG: Probabilistic Model for Code." International Conference on Machine Learning, 2016.](https://mlanthology.org/icml/2016/bielik2016icml-phog/)

BibTeX

@inproceedings{bielik2016icml-phog,
  title     = {{PHOG: Probabilistic Model for Code}},
  author    = {Bielik, Pavol and Raychev, Veselin and Vechev, Martin},
  booktitle = {International Conference on Machine Learning},
  year      = {2016},
  pages     = {2933-2942},
  volume    = {48},
  url       = {https://mlanthology.org/icml/2016/bielik2016icml-phog/}
}