Deducteam / Dedukti

Implementation of the λΠ-calculus modulo rewriting

Home Page:https://deducteam.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metadata annotation of entries

Gaspi opened this issue · comments

Dedukti should allow entries (symbol declaration, rewrite rules, even commands) to be annotated with a special "meaningful" comment, similar to an OCaml doc string. This annotation should be accessible in Dedukti's API and could be used to further process Dedukti files (as done in Logipedia). It should also probably be exported as strings in the dko.
This would allow, for instance, to attach metadata to translations for further processing.

These special comments could, for instance, look something like that:

(;;
   Object: inductive type
   Translated from coq.inria.fr/library/Coq.Init.Datatypes.html#nat
   Constructors: Coq__O, Coq__S
   ...
;)
Init__Datatypes__nat : C.Term (C.type C.z) C.set.

If I remember well, some people including me were not really inclined to put semantics information into the comments. Is this something that has been discussed already? Is this a proposal?

While we all agree that pieces of information are missing while proofs are generated in Dedukti, I am not sure that the solution proposed here is appropriate. Some arguments against having semantics pieces of information in comments:

  • the syntax is not checked
  • may lead to incompatibilities between files if they have been generated by different tools
  • Each tool need to have its own "comment" parser
  • Comments need to be kept in memory
  • Hard to implement a tool for a text editor that uses this piece of information

I think there are better ways to handle these pieces of information, one which solves the issues I have raised above is to have an external file such as .dki. The .dki would contain in the Dedukti syntax or another one all these pieces of information in a format that needs to be decided.

@Gaspi It is perhaps a good idea. I don't know. But, please, stop adding new things in Dedukti.

What I suggest is to put that outside the current Dedukti format, this would be better to have compatibility with Lambdapi on the short term.

Feature will probably not be implemented.