Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Using hint databases to partially solve a goal?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Using hint databases to partially solve a goal?


Chronological Thread 
  • From: Eddy Westbrook <westbrook AT galois.com>
  • To: "jonikelee AT gmail.com" <jonikelee AT gmail.com>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Using hint databases to partially solve a goal?
  • Date: Wed, 13 May 2020 12:44:02 -0700
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=westbrook AT galois.com; spf=PermError smtp.mailfrom=westbrook AT galois.com; spf=None smtp.helo=postmaster AT mail-pl1-f179.google.com
  • Ironport-phdr: 9a23:xu3I5R/KrOHwsP9uRHKM819IXTAuvvDOBiVQ1KB31escTK2v8tzYMVDF4r011RmVBNiduq4P0rGH+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxhIiTanZb5/Ixq6oRjfu8QSnIBvNrs/xhzVr3VSZu9Y33loJVWdnxb94se/4ptu+DlOtvwi6sBNT7z0c7w3QrJEAjsmNXs15NDwuhnYUQSP/HocXX4InRdOHgPI8Qv1Xpb1siv9q+p9xCyXNtD4QLwoRTiv6bpgRRn1gykFKjE56nnahdB/g6xGoByupRJxzYHXboGbKvRwebjQfc8DRWpEQspRVzBND4G6YoASD+QBJ+FYr4zlqlUBsBSxGAmtD/7vxTBWnX/2wbY10/4mEQHB3wwrAtUDsXrKo9XuKKcdSvq1zK7PzTXAdP5W1i3y6IzPchAguvGAR65/cc3UyUQ2EQ7Ok1qfp5D/MTyPyuQNr3aU7/BmVe+3lmIpqwV8riSgy8kjhYTEhZ4Yxk3a+Chk3os7KtK1RVJnbNOgDpZdqiGUOoRqTs8+Q29lpik3x74Jt5KlYSQHyJIqzAPcZfyfa4WE/A7vWeKLLTp7hH9pYqyziwu9/ES61+HxVM253E5IoydLiNXAqHAA2wbO5sWHTvZx5EOs1DiJ2gvO8O9LO1o0mrDeK5M5wr4/iJ4TsUPbEy/zgkr2jauWelw8+uis9ujre7vmqoKeOoJwkA3+PaMumsuwAeQ8LAcCRXSU+eO51LH7/E35RqtFjuEun6XHrJzXId4Xq625DgNPzIov9hmyAy273NkamXQLNFdFdwiGj4jtNVHOOvf4DfKnjlWijjhr3OzGMab7ApXKKXjDk6zsfbln5E5YzwozzMtf64hIBbEGJfL/QlXxu8DADh8lLwy0xP7qB8l61oMHQG6AHquZML7JvlKT/eIuI+yMZJcPtzrnKvgl4eTujX4jllMHc6mpx8hfVHftVPZhJUSabH7hj/8OFG4Lukw1S+mgwAmAVjhSZHu2Uq8U6TQyCYbgBoDGENODmruEiQq3EoweWW1dFlqWFnDrP9GbVuwQYjiVJcxJnTUAUrm6DYQm0Ef950fB17N7I7+MqWUjvpX52Y0tvryBpVQJ7TVxSv+l/SSIRmBwkHkPQmZsjq92pUt80RGI1q0q3aUER+wW3OtAV0IBDbCZ1/ZzUoqgVQvFedaSDl2hR4f+WGxjfpcK29YLJn1FNZCigxTEhXT4BrYUk/mTAMVx/PuDjj7+IMFyz3uA364k3QEr

Nope, spoke too soon. typeclasses eauto says in the documentation that it is
supposed to allow unsolved goals to remain, but I did in fact need the "Hint
Extern 999 _ => shelve : db” trick from an earlier response.

With this trick, though, it does seem to be working.

Thanks,
-Eddy

> On May 13, 2020, at 12:26 PM, Eddy Westbrook
> <westbrook AT galois.com>
> wrote:
>
> Thanks for your help, everyone.
>
> I ended up figuring out another way to do this that seems to work for me:
> typeclasses eauto, which allows unsolved goals to remain in the proof state.
>
> -Eddy
>
>> On May 11, 2020, at 4:15 PM,
>> jonikelee AT gmail.com
>> wrote:
>>
>>
>>> Jonathan, your suggestion about using autorewrite makes sense, and it
>>> actually would be nice to use rewriting anyway. However, I always
>>> find that autorewrite is very slow. Do you have any suggestions for
>>> making it faster? I only really need to apply rewrites at the top
>>> level, so maybe I could get it to not traverse the term by using
>>> rewrite_strat?
>>>
>>> Thanks,
>>> -Eddy
>>
>> Maybe. I have a similar case where the rewrites only need to be
>> applied at top level, and I have not tried rewrite_strat to see if it
>> gives a performance improvement because it was already pretty fast.
>>
>> Also, with Ltac2, it may be easy to use mutable structures to build a
>> tactic to apply an incrementally constructed collection of rules.
>>
>>>
>>>> On May 8, 2020, at 5:05 PM, Eddy Westbrook
>>>> <westbrook AT galois.com>
>>>> wrote:
>>>>
>>>> Hey coq-club list-ers,
>>>>
>>>> Is there any way to partially solve a goal using the auto hint
>>>> databases? That is, is there a way to do something like "eauto with
>>>> <my_db>” but for it to make as much progress as it can and then
>>>> leave the remaining sub-goals for me to prove manually?
>>>>
>>>> The use case here is that I have monadic programs I’m trying to
>>>> prove properties of, and I have a set of rules to prove those
>>>> properties modulo properties of the values produced in those
>>>> computations. So, for instance, I have a monadic program that
>>>> manipulates bitvectors, and my rules can reduce (in a rote and
>>>> automatable way) all the properties about my monadic program to
>>>> properties about bitvectors that I have to prove by hand. The hope
>>>> is that I could use the hint databases to define how to apply my
>>>> rules, and then I could apply these hints and end up with my goals
>>>> about bitvectors to prove by hand. The only other option is to
>>>> write a monolithic tactic that pattern-matches on the form of the
>>>> goal to apply my rules, and that isn’t as nice and extensible.
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks,
>>>> -Eddy
>>>
>>
>




Archive powered by MHonArc 2.6.18.

Top of Page