cmd/compile: add reverse proof to prove pass? #48469
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
I dont know if there are propper terms for these. I call the current way the prove pass works forwards, as it proves from what it knows, whereas I call what I propose backwards because it goes the opposite way. (trying to find out what knowlege is needed to prove the branch).
While seeing what happens in some cases I recently reported, I found that essentially that trying to improve the
ft.update
function might be a simple solution for proving things, but its also one-way. It tries to proof things from what it already knows. However in some cases it is actually almost trivial to do this in reverse. Look at what condition you're branching on, and then see what you need to prove this.Adding more of the forward rules will grow exponentially, because each rule will trigger another etc. Adding a backwards rule would only grow the complexity linearly. Of course its affect is also smaller, but adding forward rules will eventually hit diminishing returns as maybe only 1% of the rules applied actually end up being useful.
The text was updated successfully, but these errors were encountered: