Zulip Chat Archive

Stream: PR reviews

Topic: hint tactic


Scott Morrison (Nov 15 2023 at 00:00):

I think the hint tactic in #8363 is ready to go.

(History here: @Pol'tta / Miyahara Kō had already implemented this in #5363, and somehow I had missed it. They kindly merged their version into mine, producing something better than either of them.)

We will need to play around with the list of tactic we want to run register_hint on, to get the best user experience, but I think that can happen progressively.

Scott Morrison (Nov 15 2023 at 00:01):

I have a followup PR that runs all the hint tactics in parallel, and it is really speedy. It means that aesop and exact? start running, but if simp_all quickly comes back with a solution we report that immediately to the user. However it requires some import restructuring, so won't be part of the initial PR.

Scott Morrison (Nov 15 2023 at 22:49):

Anyone interested in reviewing / merging? It is meta code, but nothing particularly deep.

Scott Morrison (Nov 16 2023 at 01:10):

@Damiano Testa and @Jireh Loreaux made suggestions of tactics to register with hint (tauto, constructor, and split_ifs).

They are good suggestions, but I think the best strategy will be to ship hint initially with few tactics, and then let people try it out.

It is extremely easy to add more tactics locally: just register_hint constructor etc. I would like to see examples of the form:

example foo : X := by hint -- no suggestions

register_hint my_tactic

example foo : X := by hint -- Try these: my_tactic

to go along with additions.

If anything, perhaps we should remove register_hints from the initial PR.

Scott Morrison (Nov 16 2023 at 01:12):

(Note split_ifs is already covered by split, which also splits match statements.)

Jireh Loreaux (Nov 16 2023 at 01:14):

I'll give a more thorough look later tonight if no one merges first.

Damiano Testa (Nov 16 2023 at 01:33):

I am happy to see fewer tactics in hint and add them gradually, if/when needed!

Scott Morrison (Nov 16 2023 at 02:51):

Okay, it has been merged! Please try out hint and request further tactics to be added.

Scott Morrison (Nov 16 2023 at 02:52):

#8435 is the parallel version of hint.

Scott Morrison (Nov 19 2023 at 02:43):

I have just improved the parallel version of hint to include automatic cancellation of other tasks once one task succeeds!


Last updated: Dec 20 2023 at 11:08 UTC