quickspec icon indicating copy to clipboard operation
quickspec copied to clipboard

Feature request: "what does this equal?" mode

Open isovector opened this issue 4 years ago • 1 comments

I'm looking for optimizations for a certain expensive term in my program. It'd be great if I could ask QuickSpec to generate terms as usual and tell me if any of them are equal to this thing.

Eg, my expensive term is both (gate ef1 g1) (gate ef2 g2), so I'd like to be able to add something to the signature like:

searchFor $ \ef1 g1 ef2 g2 -> both (gate ef1 g1) (gate ef2 g2)

such that the only things QS reports are equivalent expressions.

isovector avatar Jun 27 '20 05:06 isovector

Right now I approximate this by putting everything in series, and then afterwards add an equivalent constructor for this. This has a few problems; one of which is that it spends most of its time finding laws in the background that I don't care about, and then usually such equivalent terms are not small.

isovector avatar Jun 27 '20 05:06 isovector