论文标题
从复杂规格中合成换能器
Synthesizing Transducers from Complex Specifications
论文作者
论文摘要
自动化字符串转换一直是程序合成的杀手应用之一。解决此问题的现有合成器以域特异性语言(DSL)生产旨在帮助合成器的程序,因此缺乏正式属性。此限制可防止合成程序用于验证应用程序中(例如,检查复杂的验证前条件),并使合成器由于依赖给定的DSL而难以修改。我们提出了一种基于约束的方法来合成换能器,这是一个良好的闭合且可确定性的良好模型。我们的方法处理三种类型的规格:(i)输入输出示例,(ii)以常规语言表示的输入输出类型,以及(iii)输入/输出距离,这些输入/输出距离绑定了传感器在处理输入字符串时可以修改多少个字符。我们的工作是第一个支持此类复杂规范的工作,它通过使用传感器的算法属性来生成可以使用现成的SMT求解器来解决的约束。我们的合成方法可以扩展到许多换能器模型,并且可以使用换能器的封闭属性来计算部分正确正确的传感器的维修。
Automating string transformations has been one of the killer applications of program synthesis. Existing synthesizers that solve this problem produce programs in domain-specific languages (DSL) that are engineered to help the synthesizer, and therefore lack nice formal properties. This limitation prevents the synthesized programs from being used in verification applications (e.g., to check complex pre-post conditions) and makes the synthesizers hard to modify due to their reliance on the given DSL. We present a constraint-based approach to synthesizing transducers, a well-studied model with strong closure and decidability properties. Our approach handles three types of specifications: (i) input-output examples, (ii) input-output types expressed as regular languages, and (iii) input/output distances that bound how many characters the transducer can modify when processing an input string. Our work is the first to support such complex specifications and it does so by using the algorithmic properties of transducers to generate constraints that can be solved using off-the-shelf SMT solvers. Our synthesis approach can be extended to many transducer models and it can be used, thanks to closure properties of transducers, to compute repairs for partially correct transducers.