I suspect attempting to debug it would be a nightmare though. Given the LLM could hallucinate anything anywhere you’d likely waste a ton of time.
I suspect it would be faster to just try and write a new implementation based on the spec and debug that against the test suite. You’d likely be closer.
In fact, since they used c2rust, they had a perfectly working version from the start. From there they just had to clean up the Rust code and make sure it didn’t break anything. Clearly the best of the three options.
https://trifectatech.org/blog/translating-bzip2-with-c2rust/
I suspect attempting to debug it would be a nightmare though. Given the LLM could hallucinate anything anywhere you’d likely waste a ton of time.
I suspect it would be faster to just try and write a new implementation based on the spec and debug that against the test suite. You’d likely be closer.
In fact, since they used c2rust, they had a perfectly working version from the start. From there they just had to clean up the Rust code and make sure it didn’t break anything. Clearly the best of the three options.