Functional Programs That Explain Their Work. Perera, R., Acar, U. A., Cheney, J., & Levy, P. B. In Proceedings of the 17th ACM SIGPLAN International Conference on Functional Programming, of ICFP '12, pages 365–376, New York, NY, USA, 2012. ACM. ZSCC: 0000040 event-place: Copenhagen, Denmark
Functional Programs That Explain Their Work [link]Paper  doi  abstract   bibtex   
We present techniques that enable higher-order functional computations to "explain" their work by answering questions about how parts of their output were calculated. As explanations, we consider the traditional notion of program slices, which we show can be inadequate, and propose a new notion: trace slices. We present techniques for specifying flexible and rich slicing criteria based on partial expressions, parts of which have been replaced by holes. We characterise program slices in an algorithm-independent fashion and show that a least slice for a given criterion exists. We then present an algorithm, called unevaluation, for computing least program slices from computations reified as traces. Observing a limitation of program slices, we develop a notion of trace slice as another form of explanation and present an algorithm for computing them. The unevaluation algorithm can be applied to any subtrace of a trace slice to compute a program slice whose evaluation generates that subtrace. This close correspondence between programs, traces, and their slices can enable the programmer to understand a computation interactively, in terms of the programming language in which the computation is expressed. We present an implementation in the form of a tool, discuss some important practical implementation concerns and present some techniques for addressing them.
@inproceedings{perera_functional_2012,
	address = {New York, NY, USA},
	series = {{ICFP} '12},
	title = {Functional {Programs} {That} {Explain} {Their} {Work}},
	isbn = {978-1-4503-1054-3},
	url = {http://doi.acm.org/10.1145/2364527.2364579},
	doi = {10/ggb9gg},
	abstract = {We present techniques that enable higher-order functional computations to "explain" their work by answering questions about how parts of their output were calculated. As explanations, we consider the traditional notion of program slices, which we show can be inadequate, and propose a new notion: trace slices. We present techniques for specifying flexible and rich slicing criteria based on partial expressions, parts of which have been replaced by holes. We characterise program slices in an algorithm-independent fashion and show that a least slice for a given criterion exists. We then present an algorithm, called unevaluation, for computing least program slices from computations reified as traces. Observing a limitation of program slices, we develop a notion of trace slice as another form of explanation and present an algorithm for computing them. The unevaluation algorithm can be applied to any subtrace of a trace slice to compute a program slice whose evaluation generates that subtrace. This close correspondence between programs, traces, and their slices can enable the programmer to understand a computation interactively, in terms of the programming language in which the computation is expressed. We present an implementation in the form of a tool, discuss some important practical implementation concerns and present some techniques for addressing them.},
	urldate = {2019-11-01},
	booktitle = {Proceedings of the 17th {ACM} {SIGPLAN} {International} {Conference} on {Functional} {Programming}},
	publisher = {ACM},
	author = {Perera, Roly and Acar, Umut A. and Cheney, James and Levy, Paul Blain},
	year = {2012},
	note = {ZSCC: 0000040 
event-place: Copenhagen, Denmark},
	keywords = {debugging, program slicing, provenance},
	pages = {365--376}
}

Downloads: 0