AI生成代码时消解了传统可变性,新方法通过重生成实现定制化软件族。
Where Did the Variability Go? From Vibe Coding to Product Lines by Regeneration
- 用大模型作为生成引擎,按声明式规格每次重生成专用二进制
- 编译与运行时几乎无可变性,所有决策在生成时刻确定
- 适合需要高定制化、低冗余的AI驱动软件产品线
在新兴的vibe coding范式中,大语言模型(LLM)从自然语言提示生成完整程序,但传统软件工程精心构建的可变性去了哪里?我们对10个vibe coding的C/C++项目进行探索性分析,发现编译和运行时的可变性几乎为零,所有可变性决策均在单一新的绑定时间——生成时刻——一次性确定。我们不将此视为缺陷,而是提出‘可变性重生成’(Variability by Regeneration, VbR),据我们所知,这是首个由大模型作为推导引擎的软件产品线方法:根据声明式规格,为每个变体生成无死代码的专用二进制,由变体调度器透明路由用户请求至匹配二进制。我们形式化了VbR,对比其与经典SPL推导的区别,并在wc产品族上完整演示了其流程。对SPL工程而言,AI生成软件中的可变性应存在于规格中,而非代码中。
原文摘要 · Abstract (English)
In vibe coding, an emerging AI-driven paradigm, an LLM generates an entire program from a natural language prompt, but what happens to the variability that traditional software engineering carefully builds into code? To answer this question, we conducted an exploratory analysis on 10 vibe coded C/C++ projects, which suggests that there is near zero in-artifact variability, i.e., at compile- and runtime. All variability decisions are resolved at a single new binding time, generation time, the moment the LLM produces the source code. Rather than treating this as a defect to fix, we propose Variability by Regeneration (VbR), to our knowledge the first product line approach in which the LLM acts as the derivation engine, generating a dedicated, free of dead code binary for each variant from a declarative specification, while a variant dispatcher transparently routes user requests to the matching binary. We formalise VbR, contrast it with classical SPL derivation, and demonstrate its full pipeline on a wc product family. For SPL engineering, variability in AI-generated software belongs in the specification, not in the code.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。