paperbot · PL 论文追踪

全部论文 待读 收藏

P2 MTP: A Meaning-Typed Language Abstraction for AI-Integrated Programming

MTP:面向 AI 集成编程的意义类型化语言抽象
OOPSLA 9(OOPSLA2)2025匹配度 4/10 · 该论文属于 PL 与 LLM 交叉,提出语言级抽象简化 LLM 集成,但核心是语言设计与运行时,而非用户重点关注的静态分析/形式化验证、浮点或贝叶斯程序分析;对 Agentic 程序分析仅有间接参考价值。引用 0 inbox
Jayanaka L. Dantanarayana, Yiping Kang, Kugesan Sivasothynathan, Christopher Clarke, Baichuan Li, Savini Kashmira, Krisztian Flautner, Lingjia Tang, Jason Mars
crossref: 2026-09-10

AI 速览

一句话:提出 MTP 范式,用语言级构造从代码语义自动生成提示并处理 LLM 输出,大幅降低开发复杂度。

随着生成式 AI 与大语言模型(LLM)在运行时被广泛使用,软件开发正从传统编程转向 AI 集成应用。然而在程序中集成 LLM 仍很复杂:开发者需手工编写提示词并解析模型输出,现有提示工程工具又往往引入额外复杂度。本文提出 Meaning-Typed Programming(MTP),一种通过直观语言级构造抽象 LLM 集成的新范式:它利用代码本身蕴含的语义信息,自动完成提示生成与响应处理,无需开发者额外投入。MTP 包含三部分:(1) 用于无缝调用 LLM 的 by 操作符;(2) MT-IR,一种基于语义抽取的中间表示;(3) MT-Runtime,自动化管理 LLM 交互的运行时系统。作者在 Python 超集语言 Jac 中实现了 MTP,并开发为 Jaseci 开源项目的一部分(模块名 byLLM)。评估表明,MTP 显著降低开发复杂度、代码修改行数与成本,同时提升运行时性能,并保持或超越现有方法的准确率;用户研究显示开发者使用 MTP 完成任务的速度快 3.2 倍、代码行数减少 45%,而且在多达 50% 命名规范退化的情况下仍保持鲁棒性。

问题
在 AI 集成应用中调用 LLM 需要开发者手工编写提示词并处理输出,流程复杂且易出错,现有提示工程工具反而增加了额外复杂度。
方法
提出 Meaning-Typed Programming(MTP)范式,通过语言级构造(by 操作符)、基于语义抽取的中间表示 MT-IR 与自动管理 LLM 交互的 MT-Runtime,从代码语义自动生成提示并解析响应;在 Python 超集语言 Jac 中实现。
评估
通过用户研究与实践对比评估:开发者使用 MTP 完成任务快 3.2 倍、代码行数减少 45%,同时降低成本、提升运行时性能,准确率持平或更高;并在多达 50% 命名规范退化时仍保持鲁棒。
原文摘要(Abstract)

Software development is shifting from traditional programming to AI-integrated applications that leverage generative AI and large language models (LLMs) during runtime. However, integrating LLMs remains complex, requiring developers to manually craft prompts and process outputs. Existing tools attempt to assist with prompt engineering, but often introduce additional complexity. This paper presents Meaning-Typed Programming (MTP) , a novel paradigm that abstracts LLM integration through intuitive language-level constructs. By leveraging the inherent semantic richness of code, MTP automates prompt generation and response handling without additional developer effort. We introduce the (1) by operator for seamless LLM invocation, (2) MT-IR , a meaning-based intermediate representation for semantic extraction, and (3) MT-Runtime , an automated system for managing LLM interactions. We implement MTP in Jac , a programming language that supersets Python, and find that MTP significantly reduces coding complexity while maintaining accuracy and efficiency. MTP significantly reduces development complexity, lines of code modifications needed, and costs while improving run-time performance and maintaining or exceeding the accuracy of existing approaches. Our user study shows that developers using MTP completed tasks 3.2× faster with 45% fewer lines of code compared to existing frameworks. Moreover, MTP demonstrates resilience even when up to 50% of naming conventions are degraded, demonstrating robustness to suboptimal code. MTP is developed as part of the Jaseci open-source project, and is available under the module byLLM .

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2976,
  title = {MTP: A Meaning-Typed Language Abstraction for AI-Integrated Programming},
  author = {Jayanaka L. Dantanarayana and Yiping Kang and Kugesan Sivasothynathan and Christopher Clarke and Baichuan Li and Savini Kashmira and Krisztian Flautner and Lingjia Tang and Jason Mars},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763092}
}