An infinite loop doesn’t mean that you can’t prove whatever property you want to prove about your program, if you’ve designed it for that. The limitations coming from undecidability don’t really affect our everyday applications. Unless your application is exactly to determine whether another arbitrary program will halt, that is. But that’s not what the vast majority of software whose bugs we might be concerned about is about.
“We can’t write bug-free software due to the halting problem anyway” is an incorrect argument.
“We can’t write bug-free software due to the halting problem anyway” is an incorrect argument.