Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How would you prove the resulting program is functionally still the same?


As others have commented, it would be more like deciding which optimisation passes to run and in which order. Things like loop unrolling and inlining are not always helpful. Things like polyhedral optimization can be very slow. Running every optimization pass every time it might help is certainly far too slow.


AI could be used to choose which of the valid transformations to apply and in which order.

Current compilers do not guarantee that re-running the optimization passes a second time is idempotent. Every pass just does some "useful" transformations, it's best-effort.


You don't have to go that far. A compiler contains a lot of heuristics, I could see ai being useful for that.


Those heuristics are about "when" to apply certain transformations in a situation when two options are already proven equivalent. That is different from transforming correct code into possibly incorrect code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: