Program synthesis methods, whether formal or neural-based, lack fine-grained control and flexible modularity, which limits their adaptation to complex software development. These limitations stem from rigid Domain-Specific Language (DSL) frameworks and neural network incorrect predictions. To this end, we propose the Chain of Logic (CoL), which organizes the synthesis process into an activity flow and provides heuristic control to guide the process. Furthermore, by integrating neural networks with libraries and introducing a Neural Network Feedback Control (NNFC) mechanism, our approach modularizes synthesis and mitigates the impact of neural network mispredictions. Experiments on relational and symbolic synthesis tasks show that CoL significantly enhances the efficiency and reliability of DSL program synthesis across multiple metrics. Specifically, CoL improves accuracy by 70% while reducing tree operations by 91% and time by 95%. Additionally, NNFC further boosts accuracy by 6%, with a 64% reduction in tree operations under challenging conditions such as insufficient training data, increased difficulty, and multidomain synthesis. These improvements confirm COOL as a highly efficient and reliable program synthesis framework.
翻译:程序合成方法,无论是基于形式化方法还是神经网络,均缺乏细粒度控制和灵活模块化,这限制了其在复杂软件开发中的适应性。这些局限性源于僵化的领域特定语言框架和神经网络的不正确预测。为此,我们提出逻辑链,将合成过程组织为活动流并提供启发式控制以引导该过程。此外,通过将神经网络与库集成并引入神经网络反馈控制机制,我们的方法实现了合成的模块化,并减轻了神经网络误预测的影响。在关系和符号合成任务上的实验表明,逻辑链在多项指标上显著提升了领域特定语言程序合成的效率和可靠性。具体而言,逻辑链将准确率提高了70%,同时将树操作减少了91%,时间减少了95%。此外,在训练数据不足、难度增加和多领域合成等挑战性条件下,神经网络反馈控制进一步将准确率提升了6%,并将树操作减少了64%。这些改进证实了COOL作为一个高效可靠程序合成框架的有效性。