Very nice, thank you for posting this!<p>Program slicing is especially useful when debugging and reasoning about programs in <i>declarative</i> languages, such as Prolog.<p>In Prolog, it is natural to think in terms of generalizations and specializations of programs, and you can often explain important program properties such as <i>nontermination</i> and <i>failure</i> by showing relevant <i>fragments</i> of clauses.<p>See also <i>failure slicing</i>.<p>In declarative languages, slicing is much more convenient and useful than <i>tracing</i> the execution.