arXiv:2510.09726cs.PLcs.AI2025-10被引 1

用Julia打造统一代码生成库,让编程自动化的实现更简单。

Herb.jl: A Unifying Program Synthesis Library

  • 将代码生成算法拆解为可复用组件,提升开发效率。
  • 仅用几行代码即可实现简单问题的求解。
  • 适合想快速实验代码生成的新手或研究者。

程序合成——根据规范自动生成代码——是人工智能的核心任务之一,也是许多程序员的梦想。尽管已有多种先进的合成工具,但它们的复用与适配仍繁琐耗时。本文提出 Herb.jl,一个基于 Julia 的统一程序合成库,旨在解决这一问题。由于现有方法共享相似的构建模块,我们将其底层算法分解为可扩展、可重用的子组件。通过演示一个简单问题和语法规则的实现,仅需几行代码即可完成求解,充分展示了 Herb.jl 的易用性与灵活性。

原文摘要 · Abstract (English)

Program synthesis -- the automatic generation of code given a specification -- is one of the most fundamental tasks in artificial intelligence (AI) and the dream of many programmers. Numerous synthesizers have been developed for program synthesis, offering different approaches to the exponentially growing program space. Although such state-of-the-art tools exist, reusing and adapting them remains tedious and time-consuming. We propose Herb.jl, a unifying program synthesis library written in Julia, to address these issues. Since current methods share similar building blocks, we aim to break down the underlying algorithms into extendable, reusable subcomponents. To demonstrate the benefits of using Herb.jl, we show how to implement a simple problem and grammar, and how to solve it with just a few lines of code.

程序合成Julia代码生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。