Resolvable Ambiguity
Viktor Palmkvist, Elias Castegren, Philipp Haller, David Broman

TL;DR
This paper challenges traditional unambiguous grammar design by introducing a method to detect and resolve ambiguities at parse time, enabling flexible language disambiguation and improving language design processes.
Contribution
It formalizes the resolvable ambiguity problem, providing solutions for static and dynamic cases, and demonstrates practical applicability through case studies.
Findings
Solutions for static resolvability in restricted languages
Sound and complete dynamic resolvability solution for less restricted languages
Successful case studies on existing languages and DSLs
Abstract
A common standpoint when designing the syntax of programming languages is that the grammar definition has to be unambiguous. However, requiring up front unambiguous grammars can force language designers to make more or less arbitrary choices to disambiguate the language. In this paper, we depart from the traditional view of unambiguous grammar design, and enable the detection of ambiguities to be delayed until parse time, allowing the user of the language to perform the disambiguation. A natural decision problem follows: given a language definition, can a user always disambiguate an ambiguous program? We introduce and formalize this fundamental problem - called the resolvable ambiguity problem - and divide it into separate static and dynamic resolvability problems. We provide solutions to the static problem for a restricted language class and sketch proofs of soundness and completeness.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Model-Driven Software Engineering Techniques · Formal Methods in Verification
