Local Termination: theory and practice (Logical Methods in Computer Science, 2010)