Reference. From dirt to shovels: fully automatic tool generation from ad hoc data
Cite
Cited by (2)
Saggitarius: A DSL for Specifying Grammatical Domains miltner-2023-saggitarius
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.
Synthesizing symmetric lenses miltner-2019-synthesizing
Lenses are programs that can be run both “front to back” and “back to front,” allowing updates to either their source or their target data to be transferred in both directions. Since their introduction by Foster et al., lenses have been extensively studied, extended, and applied. Recent work has also demonstrated how techniques from type-directed program synthesis can be used to efficiently synthesize a simple class of lenses—so-called bijective lenses over string data—given a pair of types (regular expressions) and a small number of examples. We extend this synthesis algorithm to a much broader class of lenses, called simple symmetric lenses, including all bijective lenses, all of the popular category of “asymmetric” lenses, and a rich subset of the more powerful “symmetric lenses” proposed by Hofmann et al. Intuitively, simple symmetric lenses allow some information to be present on one side but not the other and vice versa. They are of independent theoretical interest, being the largest class of symmetric lenses that do not rely on persistent internal state. Synthesizing simple symmetric lenses is substantially more challenging than synthesizing bijective lenses: Since some of the information on each side can be “disconnected” from the other side, there will, in general, be many lenses that agree with a given example. To guide the search process, we use stochastic regular expressions and ideas from information theory to estimate the amount of information propagated by a candidate lens, generally preferring lenses that propagate more information, as well as user annotations marking parts of the source and target data structures as either irrelevant or essential. We describe an implementation of simple symmetric lenses and our synthesis procedure as extensions to the Boomerang language. We evaluate its performance on 48 benchmark examples drawn from Flash Fill, Augeas, the bidirectional programming literature, and electronic file format synchronization tasks. Our implementation can synthesize each of these lenses in under 30 seconds.
Cites 33 works (2 here)
With notes (2)
The next 700 data description languages fisher-2006-the
PADS: a domain-specific language for processing ad hoc data fisher-2005-pads
External (31)
- PADS/ML (2007)
- Inferring XML schema definitions from XML data (2007)
- Towards 1-click tool generation with PADS (2007)
- PADS project (website, http://www.padsproj.org/) (2007)
- Expressiveness and complexity of XML Schema (2006)
- Inference of concise DTDs from XML data (2006)
- PADX: Querying large-scale ad hoc data with XQuery (2006)
- Learning (k,l)-Contextual Tree Languages for Information Extraction (2005)
- Learning regular languages using RFSAs (2004)
- Using the structure of Web sites for automatic segmentation of tables (2004)
- Extracting structured data from Web pages (2003)
- Table extraction using conditional random fields (2003)
- Active learning with strong and weak views: a case study on wrapper induction (2003)
- Automatic segmentation of text into structured records (2001)
- RoadRunner: Towards automatic data extraction from large web sites (2001)
- Potter's wheel: An interactive data cleaning system (2001)
- XTRACT (2000)
- Tane: An Efficient Algorithm for Discovering Functional and Approximate Dependencies (1999)
- Learning to recognize tables in free text (1999)
- Learning Information Extraction Rules for Semi-Structured and Free Text (1999)
- Finding structure via compression (1998)
- Wrapper induction for information extraction (1997)
- The TSIMMIS project: Integration of heterogeneous information sources (1994)
- Inducing probabilistic grammars by Bayesian model merging (1994)
- Grammatical inference: An introductory survey (1994)
- The Rufus system: Information organization for semi-structured data (1993)
- Inferring regular languages in polynomial updated time (1992)
- Divergence measures based on the Shannon entropy (1991)
- Inference of Reversible Languages (1982)
- Approximate language identification (1974)
- Language identification in the limit (1967)