Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Phase control #107

Open
ayazhafiz opened this issue Jun 10, 2020 · 0 comments
Open

Phase control #107

ayazhafiz opened this issue Jun 10, 2020 · 0 comments
Labels
c:rules Relating to slide rules e:1 Takes a little bit of effort e:2 Takes effort RFC Request for comments!
Milestone

Comments

@ayazhafiz
Copy link
Collaborator

It would be cool if our rules also supported phase control, like ghc does (https://downloads.haskell.org/~ghc/7.0.1/docs/html/users_guide/rewrite-rules.html). The idea is we provide some pragma for string rules specifying what phase they run in. For example

{2} a + b -> b + a

would only be run in the second "phase" of term rewriting. How this fits in with more powerful optimization and how we decide which internal rules are in which phase I haven't quite figured out yet.

An extension of this is auto-placement of rules. If a rule has no phase pragma, some heuristic or lightweight pass is run on it to figure out which other rules it most directly affects. Not sure if this even works, but could be something for the ML ideas we were thinking about @luke-bhan.

@ayazhafiz ayazhafiz added e:1 Takes a little bit of effort e:2 Takes effort RFC Request for comments! c:rules Relating to slide rules labels Jun 10, 2020
@ayazhafiz ayazhafiz added this to the Backlog milestone Jun 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c:rules Relating to slide rules e:1 Takes a little bit of effort e:2 Takes effort RFC Request for comments!
Projects
None yet
Development

No branches or pull requests

1 participant