Subject: Ssreflect Users Discussion List
List archive
- From: Enrico Tassi <>
- To:
- Subject: Re: [ssreflect] Using ssreflect's pattern match for custom tactics
- Date: Wed, 24 Feb 2016 14:10:15 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:fZv1yxeH5y5Kz7Bnz12tfKollGMj4u6mDksu8pMizoh2WeGdxc6+bB7h7PlgxGXEQZ/co6odzbGG7Oa9CSdcsd6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDtvcCDKFkYzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IAu3GePEjVqZVAjArOHwd4dbx8BjFVwqGoHoaSGQf1BRSUCbf6xSvc5HrsyD9/tZ0wzKbdZn7S6o1UjPk865wUx7AiSEdNjd//nuB2Z84t75SvB/0/083+IXTeozAbPc=
On Wed, Feb 24, 2016 at 01:35:01PM +0100, Ralf Jung wrote:
> Is there a way to use the pattern matcher that is also used by
> ssreflect's rewrite, which seems to be "smarter" than [unify], in my own
> tactics?
The pattern matching machinery of Ssr is exported to ML with a
documented API:
https://github.com/math-comp/math-comp/blob/master/mathcomp/ssreflect/plugin/v8.5/ssrmatching.mli
I did a long ago hoping it would be merged in Coq.
Given that I've very little experience with Ltac I did not advertise
that it is also somewhat exported to Ltac.
The ltac symbol is called "ssrpattern [pattern]"
https://github.com/math-comp/math-comp/blob/master/mathcomp/ssreflect/plugin/v8.5/ssrmatching.ml4#L1292
What it does is to turn your goal "G" intro "let selected_term := t in G'".
This API is clearly incomplete (wrt the ML one) that lets one call an
arbitrary continuation on the terms selected by the pattern in order to
produce G' (and is well tested, since Ssr's rewrite is based on it).
So I'm happy to receive feedback and suggestions, pull requests...
Best,
--
Enrico Tassi
- [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Laurent Thery, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/25/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Assia Mahboubi, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Enrico Tassi, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Enrico Tassi, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Enrico Tassi, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Enrico Tassi, 02/25/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/25/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Enrico Tassi, 02/25/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Enrico Tassi, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Ralf Jung, 02/24/2016
- Re: [ssreflect] Using ssreflect's pattern match for custom tactics, Laurent Thery, 02/24/2016
Archive powered by MHonArc 2.6.18.