DWIM

Fare Rideau rideau@ens.fr
Wed, 7 May 1997 12:06:42 +0200 (MET DST)


Dear LispOS hackers, [Blind Copy to tunes@ens.fr]

   there's been some non-negligible talk about *heuristics*,
on the LispOs mailing-list, and how to synthetize information
that the system can only guess.

My belief is that the use of heuristics ("DWIM", Do What I Mean),
is a Good Thing(tm), ___PROVIDED___ we have

I- Customizability
 all the heuristics are split into individual tactics
 that the user can fully control and reorganize;
 because what *I* mean is not what the other guy on the same system means,
 and certainly not what the original maker of the LispOS distribution means.

II- Reversibility
 no irreversible operation should *ever ever* be executed
 if there anything in it is that was DWIMed,
 and not explicitly approved by the user (and better twice than once),
 or found correct by further (non-DWIM) verification.
 [I suggest a taintperl approach to propagating DWIM tagging].


The debated example was guessing the meaning of a file
on a filesystem from a foreign OS.
My DWIM heuristics would go:

* see if there is some information in the POS about that file
* see if there is some associated description/resource in a repository
 associated to the filesystem/location of the file.
* see if there is some other description/resource file near to it
[Note that information could be any heuristic to try,
rather than forcibly an exact result]
* see if there the file name matches some recognized pattern

Then, you'd lazily sort the tactics
from the most specific one to the least specific one,
and for every guessed file format,
you'd look if the file seems to match the heuristic
if it does, tag it so, and stop;
for instance, if the file stat info hasn't changed
since the resource was created, don't go further.
   When parsing the file,
failure to match the guessed format would cause an exception,
that would backtrack on next heuristic,
unless the user had committed the choice.

Regards,

== Fare' -- rideau@ens.fr -- Franc,ois-Rene' Rideau -- DDa(.ng-Vu~ Ba^n ==
Join the TUNES project for a computing system based on computing freedom !
                TUNES is a Useful, Not Expedient System
URL: "http://www.eleves.ens.fr:8080/home/rideau/Tunes/"