Lay-it-out:布局敏感语法的交互设计
Lay-it-out: Interactive Design of Layout-Sensitive Grammars
摘要:
布局敏感语法已被许多现代程序设计语言采用。然而,对这种语法的工具支持仍然有限和不成熟。在本文中,我们提出了布局,布局敏感的语法设计的交互式框架。从一个用户定义的歧义语法开始,我们的框架通过用户交互合成布局约束来完善它。为了便于交互,一个最短的非空歧义句(如果存在)是自动生成的有界歧义检查通过SMT解决。我们的SMT编码的健全性和完整性在Coq证明助手中被机械化。案例研究真正的语法,包括一个完整的语法,证明了我们的方法的实用性和可扩展性。
英文摘要:
Layout-sensitive grammars have been adopted in many modern programming languages. However, tool support for this kind of grammars still remains limited and immature. In this paper, we present Lay-it-out, an interactive framework for layout-sensitive grammar design. Beginning with a user-defined ambiguous grammar, our framework refines it by synthesizing layout constraints through user interaction. For ease of interaction, a shortest nonempty ambiguous sentence (if exists) is automatically generated by our bounded ambiguity checker via SMT solving. The soundness and completeness of our SMT encoding are mechanized in the Coq proof assistant. Case studies on real grammars, including a full grammar, demonstrate the practicality and scalability of our approach.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。