Hacker News new | ask | show | jobs
by zmonx 3096 days ago
Very nice, thank you for posting this!

Program slicing is especially useful when debugging and reasoning about programs in declarative languages, such as Prolog.

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 nontermination and failure by showing relevant fragments of clauses.

See also failure slicing.

In declarative languages, slicing is much more convenient and useful than tracing the execution.