jstolarek / slicer

Companion code for paper "Imperative Functional Programs that Explain their Work", Wilmer Ricciotti, Jan Stolarek, Roly Perera and James Cheney, ICFP 2017, Oxford, UK
http://dl.acm.org/citation.cfm?id=3110258
GNU General Public License v3.0
6 stars 0 forks source link

Resugar traces #27

Closed jstolarek closed 7 years ago

jstolarek commented 7 years ago

This might be useful to display results of slicing. It might be useful to have a type-class for things that can be resugared:

class Resugarable a where
   resugar :: a -> DesugarM RExp

See also #24

jstolarek commented 7 years ago

I have no idea how to resugar call traces:

| TCall Trace Trace (Maybe Lab) (Code Trace)

Resugar both arguments to application and ignore the body? Resugar the body and ignore application arguments?

jstolarek commented 7 years ago

Ok, I think I got this.

Fixed on branch js-slicing-h4x

jstolarek commented 7 years ago

Reopening.

I just realized that Resugarable instance for Trace duplicates logic of uneval from Slice module. So I guess that it would be easier if resugarM definition for Trace called uneval and then we can piggyback on the fact that we already have an instance of Resugarable for Exp.