Program slicing is one of those software technologies where there is much more activity in the research community than in the industry community. Does anybody outside of the research community using slicing tools on production code to help with debugging or other tasks? If so, what tools did you use?
closed as too broad by MichaelT, Matthew Flynn, gnat Nov 10 '15 at 19:56
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.
The following Chrome screenshot shows the trace output from an XSLT 2.0 processor running in the browser:
The XSLT program is 'sliced' so every instruction records in the trace output when it was executed. The nesting of the output XML explains the execution hierarchy.
The above sample helps show the actual template that was executed as a result of the xsl:apply-templates instruction. Thus the trace shows the same information that you would get from an IDE debugger - but without having to step through each line of code.
If an exception is thrown within the executing code, then the trace terminates at that point, showing exactly where the code failed, providing more information that a typical call-stack.
Also, additional trace instructions can be embedded in the XSLT (in the form of a fn:trace function call) to provide extra diagnostics for a specific part of the code.
An online XPath Tracer performs slicing, but it might not meet your definition because it's for an expression language, XPath 2.0, rather than a full-blown programming language.
Currently, this permits specific parts of the expression to be selected; the 'path' for that part of the expression is then resolved and displayed. In this case, XSLT 2.0 is being used to perform a partial parse of the expression.
This tracer has 2 objectives for when it's complete: