arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2504.14480cs.PL
收藏

基于部分轨迹的程序综合

Program Synthesis from Partial Traces

Margarida Ferreira, Victor Nicolet, Joey Dodds, Daniel Kroening

AI总结:

本文提出一种从仅含副作用函数记录的部分轨迹综合程序的方法,结合优化重写与语法引导综合,无需负例即可生成可复现轨迹的真实程序。

摘要:

我们提出了首个从仅包含副作用函数记录的部分轨迹中,综合出组合副作用函数、纯函数和控制流的程序的技术。例如,该技术可用于根据对 API 的调用日志综合出组合这些 API 的脚本,或根据工作负载产生的系统调用轨迹综合出脚本。所有提供的轨迹都是正例,即它们描述了期望的行为。我们的方法不需要负例;相反,它对这些示例进行泛化,并使用成本度量来防止过度泛化。由于该问题对传统的单体程序综合技术而言过于复杂,我们提出了将优化重写与语法引导程序综合相结合的新方法。所得程序在构造上即是正确的,因此其输出始终能够复现输入轨迹。我们在考虑各种优化度量的情况下评估了所综合程序的质量,并在真实世界基准上评估了综合器的效率。结果表明,我们的方法能够生成有用的真实世界程序。

英文摘要:

We present the first technique to synthesize programs that compose side-effecting functions, pure functions, and control flow, from partial traces containing records of only the side-effecting functions. This technique can be applied to synthesize API composing scripts from logs of calls made to those APIs, or a script from traces of system calls made by a workload, for example. All of the provided traces are positive examples, meaning that they describe desired behavior. Our approach does not require negative examples. Instead, it generalizes over the examples and uses cost metrics to prevent over-generalization. Because the problem is too complex for traditional monolithic program synthesis techniques, we propose a new combination of optimizing rewrites and syntax-guided program synthesis. The resulting program is correct by construction, so its output will always be able to reproduce the input traces. We evaluate the quality of the programs synthesized when considering various optimization metrics and the synthesizer's efficiency on real-world benchmarks. The results show that our approach can generate useful real-world programs.

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

↑