[Omake] Going back to "relaxed" sensitivity.

Jason Hickey jyh at cs.caltech.edu
Mon May 14 14:54:45 PDT 2007


On May 14, 2007, at 2:05 PM, Aleksey Nogin wrote:

> On 14.05.2007 13:54, Jason Hickey wrote:
>
>> The layered approach is simply a matter of cleanliness.  The  
>> problem with the interleaved implementation is that the code is  
>> all mixed together.  This means canonical nodes include case- 
>> preserving junk that is supposed to be quotiented away.  So today  
>> the junk might be A/b/C, and next time you run omake it will be a/ 
>> B/C (it is supposed to be ignored, so this should not matter).
>
> Note that I am not advocating the canonical names, but rather case- 
> insensitive case-preserving ones. There, the "junk" affects the  
> string representation of the node, so it is relevant. If we chose  
> to go the "canonical" route (using realnames for nodes that do  
> exist, or somthing of sorts), then, indeed, there would not be a  
> point in keeping the "junk" around. In that case, however, it is  
> not clear whether we'd want to keep the sensitive names anywhere,  
> so, again, it is not clear why we'd want to keep two different  
> types...

To be clear, comparisons must be based on some hash-consed canonical  
representation--could be lowercase, or realnames, or whatever.  Call  
it Node_canon.  Then we need case-preserving names Node_preserve.

The old implementation uses a mutually-recursive interleaved  
definition, where S_{preserve,canon} are the strings.  I'm  
simplifying the types (by ignoring directories), but here is the  
essential construction.

    type Node_preserve = (unit + S_preserve * S_canon *  
parent:Node_preserve) * self:Node_canon
    and Node_canon = Node_preserve // canonical-equality  # hash-consed

What I am saying is that layered approach is better.  There is no  
quotienting.

    type Node_canon = unit + S_canon * parent:Node_canon
    type Node_preserve = S_preserve * Node_canon

IMO, it must be done cleanly like this in the long run.  But for  
0.9.8.2 we can do something expedient.

Jason

--
Jason Hickey                  http://www.cs.caltech.edu/~jyh
Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257





More information about the OMake-Devel mailing list