Products > Programming

DARPA suggests turning old C code automatically into Rust

(1/28) > >>

SiliconWizard:
This one is pretty good:

https://www.theregister.com/2024/08/03/darpa_c_to_rust/

xrunner:
TRACTOR: TRanslating All C TO Rust

I knew it involved AI as soon as I saw your post.  :-+

mfro:

--- Quote ---"You can go to any of the LLM websites, start chatting with one of the AI chatbots, and all you need to say is 'here's some C code, please translate it to safe idiomatic Rust code,' cut, paste, and something comes out, and it's often very good, but not always,"
--- End quote ---

Uhh. Not sure if I'd trust the result more than man-made C code...

Kleinstein:
The idea is getting away from C with it's often unsafe use of pointers and memory handling. A translation of code that uses such features would be tricky.

Translating C code automaticly likely makes the code unreadable for humans, even more than the original C. It would than be essentially impossible to find and fix other errors.
A manual translation to a new language may actually be a good idea. Sometime a new start / rewirte can make the code clearer and even detect old errors.

tggzzz:
This sounds like one of those concepts which can make simple things easy and difficult things impossible.

Determining the intention of a lump of code is non-trivial.

Spotting examples of the standard C/C++ problems that cause security and other failures is non-trivial.

If those things were easy, they would be in compilers (+ lint, naturally  >:D ).

Waving magic pixie dust (i.e. AI) around won't solve anything interesting.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod