Publication | Closed Access
PHOG: probabilistic model for code
114
Citations
20
References
2016
Year
Syntactic ParsingEngineeringSoftware EngineeringSoftware AnalysisFormal VerificationNatural Language ProcessingSyntaxComputational LinguisticsGrammarLanguage StudiesProbabilistic ModelMachine TranslationCode GenerationComputer ScienceGrammar InductionCode RepresentationSemantic ParsingNew Generative ModelAutomated ReasoningProgram AnalysisSoftware TestingProduction RuleFormal MethodsPhog ModelProbabilistic ProgrammingLinguistics
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.
| Year | Citations | |
|---|---|---|
Page 1
Page 1