inc-lc / ilc-scala

Scala implementation of ILC, with benchmarks
http://inc-lc.github.io/
Other
25 stars 0 forks source link

Support A-normalization, CSE & cleanups #1

Closed Blaisorblade closed 10 years ago

Blaisorblade commented 10 years ago

Proper tests now in & API cleaned up.

Blaisorblade commented 10 years ago

Next goal: integration testing — applying this on the existing examples, for instance. But that should be in a separate branch. Hence, merging this.

Blaisorblade commented 10 years ago

This saves partial applications as intermediate results, and I've just realized this is not just strange but actively wasteful.

EDIT: in some cases, that does save work (when the partial application can in fact reduce), but if so wants the programmer, maybe he should manually share the result. I think the issue is complicated and for GHC there's some work on handling this.

Blaisorblade commented 10 years ago

This saves partial applications as intermediate results, and I've just realized this is not just strange but actively wasteful.

In fact, this part is easy to change, see aa839fde565453f8e6f06c88018058ec6290d4da and #2. The current behavior is "wasteful" if we also save all variables bound in A-normal form, as needed for static incrementalization. However, in that case it's less clear what one should do, as discussed in the past.