206
DARPA suggests turning old C code automatically into Rust – using AI, of course
(www.theregister.com)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
It's a promising approach worth trying, but I won't be holding my breath.
If DARPA really wanted safer languages, they could be pushing test coverage, not blindly converting stable well tested C code into untested Rust code.
This, like most AI speculation, reeks of looking for shortcuts instead of doing the boring job at hand.
It reeks of a consultant who sold upper management via a gated demo.
You would also port the tests, right?
Right... If they exist.
But that bit shouldn't be left to a hallucination prone AI.
You have tests?
Edit: guess could always use AI to auto generate tests /s
I mean the parent comment mentioned tests...
Also:
I'm thinking they also want to future proof this.
The quantity of C devs are dying. It's a really difficult language to get competent with.
That's a really valid point.
A really unfortunate one too.
Or Ada...
Ada is not strictly safer. It's not memory safe for example, unless you never free. The advantage it has is mature support for formal verification. But there's literally no way you're going to be able to automatically convert C to Ada + formal properties.
In any case Rust has about a gazillion in-progress attempts at adding various kinds of formal verification support. Kani, Prusti, Cruesot, Verus, etc. etc. It probably won't be long before it's better than Ada.
Also if your code is Ada then you only have access to the tiny Ada ecosystem, which is probably fine in some domains (e.g. embedded) but not in general.
A: "We really need this super-important and highly-technical job done."
B: "We could just hire a bunch of highly-technical people to do it."
A: "No, we would have to hire people and that would cost us millions."
B: "We could spend billions on untested technology and hope for the best."
A: "Excellent work B! Charge the government $100M for our excellent idea."