Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Exporting interesting AST information

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Exporting interesting AST information


Chronological Thread 
  • From: Valentin Robert <valentin.robert.42 AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Exporting interesting AST information
  • Date: Wed, 26 Aug 2015 17:12:06 +0000
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=valentin.robert.42 AT gmail.com; spf=Pass smtp.mailfrom=valentin.robert.42 AT gmail.com; spf=None smtp.helo=postmaster AT mail-ig0-f176.google.com
  • Ironport-phdr: 9a23:+ldAhBFNfZ8hYEG86u+1zZ1GYnF86YWxBRYc798ds5kLTJ75o8WwAkXT6L1XgUPTWs2DsrQf27GQ7fmrADVZqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7v0pcSYOlwRzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IAu3GePEzSqUdBzA7OUg04tfqvF/NV1ih/HwZB1sflhdOHwnDpCv9VJrrrmOuqON51S+GPMuwV7c+VC6+qfsxYBDtgSYDcTU+9TeE2YRLkKtHrUf59FREyInObdTNOQ==

Unfortunately, it seems no information is exported to XML after rich pretty-printing:


First, the annotation type is quite restricted. Second, the annotation attributes are never exported, as of now.

- Valentin

On Fri, Aug 14, 2015 at 11:21 PM Enrico Tassi <enrico.tassi AT inria.fr> wrote:
On Sat, Aug 15, 2015 at 01:58:16AM +0000, Valentin Robert wrote:
> To the extent of my investigation, I believe that:
> - the PrintAST command of the new XML protocol prints AST information for
> Vernacular commands that were sent to the interpreter, but cannot give
> information about the current Gallina context ;

Right.

I did not try myself for lack of time, but with the new pretty printer
infrastructure it should be possible to enrich the output with extra
information collected during the constr->glob_constr->constr_expr chain.
I think the only example is the new color-thing in error messages, so
I'd start looking at it.

> It seems though that the only way to recover the "notation to low-level"
> mapping is to use the glob_constr type, and recursively query for possible
> notations using Notation.uninterp_notations and pattern matching the
> interpretation term (a notation_constr term) with the glob_constr I have to
> figure out which notation matches and how much of the glob_constr is part
> of the notation.

Note that the transformation chain above does roughly what you say, so
ideally you just have to record some metadata during the transformation.

Best
--
Enrico Tassi



Archive powered by MHonArc 2.6.18.

Top of Page