arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1710.09208cs.FL
收藏

基于实例的串到串函数的最小综合

Minimal Synthesis of String To String Functions From Examples

Jad Hamza, Viktor Kunčak

摘要:

我们研究的问题,从一组输入/输出的例子合成字符串到字符串的转换。我们考虑的转换是使用确定性有限自动机(DFA)表示的,该自动机读取成对的字母,一个字母来自输入,另一个来自输出。对应于这些转换的DFA有额外的约束,确保每个输入字符串都映射到一个输出字符串。我们建议,给定一组输入/输出示例,与示例一致的最小DFA是用户期望的转换的良好候选者。因此,我们研究的问题,给定一组的例子,找到一个最小的DFA符合的例子,并满足上述的功能和总体约束。我们证明,在一般情况下,这个问题(相应的决策问题)是NP-完全的。这与标准DFA最小化问题不同,标准DFA最小化问题可以在多项式时间内求解。我们提供了几个NP-硬度证明,显示了多个(独立)变量的问题的硬度。最后,我们提出了一个算法,找到最小的DFA一致的输入/输出的例子,使用减少SMT求解器。我们实现了该算法,并使用它来评估最小DFA确实对应于用户期望的DFA的可能性。

英文摘要:

We study the problem of synthesizing string to string transformations from a set of input/output examples. The transformations we consider are expressed using deterministic finite automata (DFA) that read pairs of letters, one letter from the input and one from the output. The DFA corresponding to these transformations have additional constraints, ensuring that each input string is mapped to exactly one output string. We suggest that, given a set of input/output examples, the smallest DFA consistent with the examples is a good candidate for the transformation the user was expecting. We therefore study the problem of, given a set of examples, finding a minimal DFA consistent with the examples and satisfying the functionality and totality constraints mentioned above. We prove that, in general, this problem (the corresponding decision problem) is NP-complete. This is unlike the standard DFA minimization problem which can be solved in polynomial time. We provide several NP-hardness proofs that show the hardness of multiple (independent) variants of the problem. Finally, we propose an algorithm for finding the minimal DFA consistent with input/output examples, that uses a reduction to SMT solvers. We implemented the algorithm, and used it to evaluate the likelihood that the minimal DFA indeed corresponds to the DFA expected by the user.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑