美国国防部意见将C代码转换为Rust——况且是用AI
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">为了加快向内存安全编程语言的过渡,美国国防部高级<span style="color: black;">科研</span>计划局(DARPA)正在推动程序代码转换工具 TRACTOR 的<span style="color: black;">研发</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">TRACTOR 是 TRanslating All C TO Rust 的缩写,该项目旨在<span style="color: black;">研发</span><span style="color: black;">设备</span>学习工具,自动将旧 C 代码转换为 Rust 代码。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DARPA <span style="color: black;">暗示</span><span style="color: black;">期盼</span>能够<span style="color: black;">经过</span> AI 模型推动编程语言的转换,从而使软件更加安全。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">TRACTOR 的 DARPA 项目经理 Dan Wallach 在一份声明中<span style="color: black;">暗示</span>:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">“你<span style="color: black;">能够</span><span style="color: black;">拜访</span>任何一个 LLM 网站,<span style="color: black;">起始</span>与其中一个 AI 聊天<span style="color: black;">设备</span>人聊天,你只<span style="color: black;">必须</span>说 <span style="color: black;">这儿</span>有<span style="color: black;">有些</span> C 代码,请把它翻译成安全的惯用 Rust 代码 ,<span style="color: black;">而后</span>剪切、粘贴,就会有结果,<span style="color: black;">况且</span><span style="color: black;">一般</span>效果很好......</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">科研</span>的挑战在于大幅<span style="color: black;">加强</span>从 C 到 Rust 的自动转换能力,<span style="color: black;">尤其</span>是<span style="color: black;">针对</span>最<span style="color: black;">关联</span>的程序构造。”</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://q9.itc.cn/q_70/images03/20240805/7ae6b5eac14e4b15bc75f44788ad4d51.png" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">过去几年来,<span style="color: black;">包含</span>谷歌和微软在内的科技巨头<span style="color: black;">始终</span>在宣传内存安全漏洞带来的问题,并推广<span style="color: black;">运用</span> C 和 C++ 以外不<span style="color: black;">必须</span>手动内存管理的语言</span></strong><span style="color: black;">。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">这些<span style="color: black;">信息</span><span style="color: black;">亦</span><span style="color: black;">导致</span>了<span style="color: black;">持有</span><span style="color: black;">海量</span>遗留代码的美国政府公共<span style="color: black;">分部</span>的<span style="color: black;">重视</span>,并<span style="color: black;">促进</span>白宫和美国网络安全和<span style="color: black;">基本</span><span style="color: black;">设备</span>安全局(CISA)鼓励<span style="color: black;">运用</span>内存安全编程语言 -- <span style="color: black;">重点</span>是 Rust,还有 C#、Go、Java、Python 和 Swift。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">尽管有 C/C++ <span style="color: black;">研发</span>人员反驳说,只要正确遵守 ISO 标准并认真应用测试工具,就<span style="color: black;">能够</span>取得类似的结果。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">但 DARPA 最新的表态指出,<strong style="color: blue;">经过二十<span style="color: black;">数年</span>的<span style="color: black;">奋斗</span>,<span style="color: black;">处理</span> C 和 C++ 的内存安全问题后,软件工程界<span style="color: black;">已然</span>达成共识</strong>;国家网络总监办公室呼吁采取<span style="color: black;">更加多</span><span style="color: black;">办法</span>,使软件更加安全,"仅仅依靠错误<span style="color: black;">查询</span>工具是<span style="color: black;">不足</span>的"。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">Wallach 向 The Register <span style="color: black;">暗示</span>,TRACTOR 项目的<span style="color: black;">目的</span>是实现高度自动化,<span style="color: black;">因此呢</span><span style="color: black;">必须</span>克服<span style="color: black;">有些</span>棘手的技术挑战。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">“例如,当你<span style="color: black;">需求</span> LLM 翻译代码时,LLM <span style="color: black;">能够</span>给出出人意料的好答案,但它们<span style="color: black;">亦</span>会幻化出错误的答案。另一个挑战是,C 语言<span style="color: black;">准许</span>代码<span style="color: black;">运用</span>指针(<span style="color: black;">包含</span>算术),而 Rust 禁止<span style="color: black;">运用</span>指针。要弥合这一差距,<span style="color: black;">必须</span>的<span style="color: black;">不仅</span>是从 C 到 Rust 的转换。”</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">当被问及 DARPA <span style="color: black;">是不是</span><span style="color: black;">思虑</span>过转换任何特定的代码库时。Wallach 则<span style="color: black;">暗示</span><span style="color: black;">无</span>任何<span style="color: black;">详细</span>的计划,但 Linux 内核是<span style="color: black;">知道</span>不在范围内的,“<span style="color: black;">由于</span>它们有 Rust <span style="color: black;">没法</span><span style="color: black;">处理</span>的技术问题”。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">延伸阅读:</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">程序员应该<span style="color: black;">把握</span>的三种编程语言——有Zig无Rust? </p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">从C++切换到Rust,<span style="color: black;">研发</span>效率<span style="color: black;">提高</span>两倍不止 </p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">微软组建新团队,<span style="color: black;">帮忙</span>用Rust重写核心Windows库</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">Reference</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">https://www.theregister.com/2024/08/03/darpa_c_to_rust/</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">活动<span style="color: black;">举荐</span></strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">END</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">热门<span style="color: black;">文案</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">-“不可变”发行版Vanilla OS 2发布稳定版:彻底重写、改变<span style="color: black;">运用</span>Linux的方式</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">-前端又叠buff!<span style="color: black;">持有</span>近4万star的超级HTML<span style="color: black;">加强</span>工具:HTMX</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">-瑞士进入next level——<span style="color: black;">需求</span>所有政府软件开源</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">-VirtualBox重大更新:采用现代化UI、更换Logo</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">-我用十条优化<span style="color: black;">办法</span>,将Redis<span style="color: black;">花费</span>降本46万/月</span><a style="color: black;"><span style="color: black;">返回<span style="color: black;">外链论坛:www.fok120.com</span>,查看<span style="color: black;">更加多</span></span></a></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">责任编辑:网友投稿</span></p>
回顾历史,我们感慨万千;放眼未来,我们信心百倍。
页:
[1]