Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Term classification in ltac: has_var / is_constr / term complexity measure

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Term classification in ltac: has_var / is_constr / term complexity measure


Chronological Thread 
  • From: "Soegtrop, Michael" <michael.soegtrop AT intel.com>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: [Coq-Club] Term classification in ltac: has_var / is_constr / term complexity measure
  • Date: Thu, 26 Mar 2015 08:56:53 +0000
  • Accept-language: de-DE, en-US

Dear Coq users

for guiding automation heuristics I sometimes need to classify terms. For
this I am missing an ltac function has_var, similar to has_evar. Is there a
way to implement this in ltac?

Also I wonder if there is a good way to check if a term is a literal, in the
sense that it consists entirely of constructors, e.g. a literal number or
boolean value or more complex term, but without vars, evars, matches or
function applications. On a simplified term I guess checking not has_var and
not has_evar would work.

Another useful thing would be an ltac function, which evaluates some sort of
complexity measure of a term. I have some idea how this could be done, but
before I try it, I wanted to ask if someone has something ready I could use.

Thanks and best regards,

Michael



Archive powered by MHonArc 2.6.18.

Top of Page