Indeed. In fact, most of the interesting algorithms come with a proof of correctness and termination. The problem is, traditional programming languages are not expressive enough to specify and prove termination within the language itself. But there are many ways to achieve this : either annotate the program with logical assertions, allowing an external automated demonstration program to *try* to check soundness and completness; or program directly with Coq or PVS. Some links : http://why.lri.fr/ & http://coq.inria.fr/.