coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Guillaume Melquiond <guillaume.melquiond AT inria.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] How to evaluate reflexive tactics? (in a robust way)
- Date: Thu, 8 Nov 2018 11:31:52 +0100
Le 08/11/2018 à 11:24, Armaël Guéneau a écrit :
Dear Coq-club,
I'm writing a reflexive tactic that (roughly speaking) simplifies
arithmetic expressions. It first reifies the goal into something like:
Inductive expr :=
| EAdd : expr -> expr -> expr
| EMul : expr -> expr -> expr
| ECst : Z -> expr.
ECst is a catch-all case: it may store arbitrary-looking terms, not only
numerical constants. These should be treated as abstract by the tactic.
A good idea is generally not to store the constants directly as an argument of the constructor. It is better to store them in a map and use an index in the constructor. There are two advantages. First, you no longer care about it being evaluated. Second, your simplification code can now be made aware that two constants are equal.
Still, you might later on still have some evaluation issues, especially when inverting the reification process. In that case, I suggest taking a look at the "Strategy" vernacular.
Best regards,
Guillaume
- [Coq-Club] How to evaluate reflexive tactics? (in a robust way), Armaël Guéneau, 11/08/2018
- Re: [Coq-Club] How to evaluate reflexive tactics? (in a robust way), Guillaume Melquiond, 11/08/2018
- Re: [Coq-Club] How to evaluate reflexive tactics? (in a robust way), Armaël Guéneau, 11/08/2018
- Re: [Coq-Club] How to evaluate reflexive tactics? (in a robust way), Guillaume Melquiond, 11/08/2018
- Re: [Coq-Club] How to evaluate reflexive tactics? (in a robust way), Guillaume Melquiond, 11/08/2018
- Re: [Coq-Club] How to evaluate reflexive tactics? (in a robust way), Armaël Guéneau, 11/08/2018
- Re: [Coq-Club] How to evaluate reflexive tactics? (in a robust way), Gabriel Scherer, 11/08/2018
- Re: [Coq-Club] How to evaluate reflexive tactics? (in a robust way), Sylvain Boulmé, 11/08/2018
- Re: [Coq-Club] How to evaluate reflexive tactics? (in a robust way), Guillaume Melquiond, 11/08/2018
Archive powered by MHonArc 2.6.18.