Lune

OOPSLA2023顶会

Saggitarius: A DSL for Specifying Grammatical Domains

Anders Miltner, Devon Loehr, Arnold Mong, Kathleen Fisher, David Walker

摘要

Common data types like dates, addresses, phone numbers and tables can have multiple textual representations, and many heavily-used languages, such as SQL, come in several dialects. These variations can cause data to be misinterpreted, leading to silent data corruption, failure of data processing systems, or even security vulnerabilities. Saggitarius is a new language and system designed to help programmers reason about the format of data, by describing grammatical domains---that is, sets of context-free grammars that describe the many possible representations of a datatype. We describe the design of Saggitarius via example and provide a relational semantics. We show how Saggitarius may be used to analyze a data set: given example data, it uses an algorithm based on semi-ring parsing and MaxSAT to infer which grammar in a given domain best matches that data. We evaluate the effectiveness of the algorithm on a benchmark suite of 110 example problems, and we demonstrate that our system typically returns a satisfying grammar within a few seconds with only a small number of examples. We also delve deeper into a more extensive case study on using Saggitarius for CSV dialect detection. Despite being general-purpose, we find that Saggitarius offers comparable results to hand-tuned, specialized tools; in the case of CSV, it infers grammars for 84% of benchmarks within 60 seconds, and has comparable accuracy to custom-built dialect detection tools.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Synthesizing DSLs for Few-Shot LearningPaul Krogmeier, P. MadhusudanOOPSLA 2025 · 1 次引用

它引用的 Paper4

  1. Multi-modal synthesis of regular expressionsQiaochu Chen, Xinyu Wang, Xi Ye, Greg Durrett 等PLDI 2020 · 81 次引用
  2. Extract Me If You Can: Abusing PDF Parsers in Malware DetectorsCurtis Carmony, Xunchao Hu, Heng Yin, Abhishek Vasisht Bhaskar 等NDSS 2016 · 61 次引用
  3. Provenance-guided synthesis of Datalog programsMukund Raghothaman, Jonathan Mendelson, David Zhao, Mayur Naik 等POPL 2020 · 49 次引用
  4. Faster general parsing through context-free memoizationGrzegorz HermanPLDI 2020 · 4 次引用

相关 Paper

  1. Static Inference of Regular Grammars for Ad Hoc ParsersMichael Schröder, Jürgen CitoOOPSLA 2025 · 1 次引用
  2. Interval Parsing Grammars for File Format ParsingJialun Zhang, Greg Morrisett, Gang TanPLDI 2023 · 6 次引用
  3. Grammar-Constrained Neural Semantic Parsing with LR ParsersArtur Baranowski, Nico HochgeschwenderACL Findings 2021 · 6 次引用
  4. Automated Ambiguity Detection in Layout-Sensitive GrammarsJiangyi Liu, Fengmin Zhu, Fei HeOOPSLA 2023 · 2 次引用
  5. Diagramming Program Values by Spatial RefinementSiddhartha Prasad, Michael Tu, Karan Kashyap, Tim Nelson 等PLDI 2026
黄昏的海面,两侧是细线勾勒的悬崖