emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom type tests


From: Stephen J. Turnbull
Subject: Re: custom type tests
Date: Sun, 02 Dec 2007 05:12:48 +0900

Lennart Borgman (gmail) writes:
 > Drew Adams wrote:

 > > It's really what I said before:
 > > 
 > >>>> Given a custom type, how can I find all user options that
 > >>>> have that type (or a compatible type, such as a subtype)?
 > > 
 > > By "have that type", I meant "are defined with that type", not "have values
 > > of that type".
 > 
 > 
 > Ah, sorry, I see. I think that would require some work, especially since 
 > the same type may be expressed in several ways in custom.

This seems to be an instance of the unification problem, which is a
well-known NP-complete (ie, very expensive to compute even with an
optimal algorithm) problem.  It's very probable that Emacs
customizations (at least in practice) satisfy restrictions that make
efficient (enough) computation possible, though.  Algorithms are
available, eg Aho Sethi Ullman "Compilers" (aka the Dragon Book) gives
some elementary ones.

The main problem would be figuring out all the rules for constructing
subtype implementations, since some of them would never be used by a
human writing a defcustom and are sparsely documented.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]