Pattern by example

Véronique Benzaken, Giuseppe Castagna, Dario Colazzo, Cédric Miachon
2008 Proceedings of the 10th international ACM SIGPLAN symposium on Principles and practice of declarative programming - PPDP '08  
We present Pattern-by-Example (PBE), a graphical language that allows users with little or no knowledge of pattern-matching and functional programming to define complex and optimized queries on XML documents. We demonstrate the key features of PBE by commenting an interactive session and then we present its semantics by formally defining a translation from PBE graphical queries into CQL ones. The advantages of the approach are twofold. First, it generates queries that are provably correct with
more » ... espect to types: the type of the result is displayed to the user and this constitutes a first and immediate visual check of the semantic correctness of the resulting query. The second advantage is that a semantics formally-thus, unambiguously-defined is an important advancement over some current approaches in which standard usage and learning methods are based on "trial and error" techniques.
doi:10.1145/1389449.1389466 dblp:conf/ppdp/BenzakenCCM08 fatcat:s5aejjhydbhrdjf75vojpmigei