We discuss a number of distance functions encountered in the theory of computation, including metrics, ultra-metrics, quasi-metrics, generalized ultra-metrics, partial metrics, d-ultra-metrics and generalized metrics. We consider their properties, associated fixed-point theorems and some general applications they have within the theory of computation. We consider in detail the applications of generalized distance functions in giving a uniform treatment of several important semantics for logic programs, including acceptable programs and natural generalizations of them, and also the supported model and the stable model in the context of locally stratified extended disjunctive logic programs and databases.

%B Computer Journal %V 53 %P 443–464 %G eng %U http://dx.doi.org/10.1093/comjnl/bxm108 %R 10.1093/comjnl/bxm108