跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 软件工程

arXiv:2604.02399 (cs)
[提交于 2026年4月2日]

标题:A Synthesis Method of Safe Rust Code Based on Pushdown Colored Petri Nets

作者:Kaiwen Zhang, Guanjun Liu
查看论文《A Synthesis Method of Safe Rust Code Based on Pushdown Colored Petri Nets》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Safe Rust guarantees memory safety through strict compile-time constraints: ownership can be transferred, borrowing can temporarily guarantee either shared read-only or exclusive write access, and ownership and borrowing are scoped by lifetime. Automatically synthesizing correct and safe Rust code is challenging, as the generated code must not only satisfy ownership, borrowing, and lifetime constraints, but also meet type and interface requirements at compile time. This work proposes a synthesis method based on our newly defined Pushdown Colored Petri Net (PCPN) that models these compilation constraints directly from public API signatures to synthesize valid call sequences. Token colors encode dynamic resource states together with a scope level indicating the lifetime region in which a borrow is valid. The pushdown stack tracks the entering or leaving of lifetime parameter via pushing and popping tokens. A transition is enabled only when type matching and interface obligations both hold and the required resource states are available. Based on the bisimulation theory, we prove that the enabling and firing rules of PCPN are consistent with the compile-time check of these three constraints. We develop an automatic synthesis tool based on PCPN and the experimental results show that the synthesized codes are all correct.
评论: 20 pages
主题: 软件工程 (cs.SE); 人工智能 (cs.AI); 形式语言与自动机理论 (cs.FL); 程序设计语言 (cs.PL)
引用方式: arXiv:2604.02399 [cs.SE]
  (或者 arXiv:2604.02399v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2604.02399

提交历史

来自:Zhang Kaiwen
[v1] 2026年4月2日 星期四 15:25:12 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.SE
< 上一篇   |   下一篇 >
最新 | 近期 | 2026-04
切换浏览方式为:
cs
cs.AI
cs.FL
cs.PL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站