Grammar Repair with Examples and Tree Automata
This program is tentative and subject to change.
Context-free grammars (CFGs) are the de-facto formalism for declaratively describing concrete syntax for programming languages and generating parsers. One of the major challenges in defining a desired syntax is ruling out all possible ambiguities in the CFG productions that determine scoping rules as well as operator precedence and associativity. Practical tools for parser generation typically apply ad-hoc approaches for resolving such ambiguities, which might result in a parser's behaviour that contradicts the intents of the language designer. In this work, we present a user-friendly approach to soundly repair grammars with ambiguities, which is inspired by the programming by example line of research in automated program synthesis. At the heart of our approach is the interpretation of both the initial CFG and additional examples that define the desired restrictions in precedence and associativity, as tree automata (TAs). The technical novelties of our approach are (1) a new TA learning algorithm that constructs an automaton based on the original grammar and examples that encode the user's preferred ways of resolving ambiguities all in a single TA, and (2) an efficient algorithm for TA intersection that utilises reachability analysis and optimizations that significantly reduce the size of the resulting automaton, which results in idiomatic CFGs amenable to parser generators. We have proven the soundness of the algorithms, and implemented our approach in a tool called Greta, demonstrating its effectiveness on a series of case studies.
This program is tentative and subject to change.
Mon 5 OctDisplayed time zone: Pacific Time (US & Canada) change
10:30 - 12:00 | Synthesis and SpecificationOOPSLA at Junior Ballroom 1&2 Chair(s): Jocelyn Qiaochu Chen University of Alberta | ||
10:30 18mTalk | Grammar Repair with Examples and Tree Automata OOPSLA Yunjeong Lee National University of Singapore, Gokul Rajiv National University of Singapore, Ilya Sergey National University of Singapore DOI | ||
10:48 18mTalk | Hybrid Game Control Envelope Synthesis OOPSLA Aditi Kabra Carnegie Mellon University, Jonathan Laurent KIT, Stefan Mitsch DePaul University, André Platzer KIT DOI | ||
11:06 18mTalk | P4-SpecTec: Integrating a Language Mechanization Framework into the Real-World P4 Specification OOPSLA DOI | ||
11:24 18mTalk | Commit-Window Observation Contracts for Reactive Entity-Component Systems OOPSLA DOI | ||
11:42 18mTalk | Incremental Program Synthesis from Event Logs OOPSLA Jinwoo Kim University of California at San Diego, Victor Nicolet Amazon, Joey Dodds Amazon, Loris D'Antoni University of California at San Diego DOI | ||