[Omake] Going back to "relaxed" sensitivity.

Jason Hickey jyh at cs.caltech.edu
Mon May 14 16:18:52 PDT 2007


On May 14, 2007, at 4:06 PM, Aleksey Nogin wrote:

> On 14.05.2007 14:54, Jason Hickey wrote:
>
>> 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
>
> This is not quite right:
>   - The Node_preserve also needs the preserve version of the parent
>   - The only "external" type that we care about is Node_preserve //  
> canon_equality, so we still need to quotient (even if the quotient  
> is simpler in this case).

Sorry, I wrote it down too fast.  The whole point of the Node_canon  
inside the Node_preserve is to avoid the quotient, and preserve O(1)  
comparison time.  This mirrors the way the vertical split is done in  
HashMarshalEq.

(* Both types are hash-consed *)
type Node_canon = unit + S_canon * Node_canon
type Node_preserve = (unit + S_preserve * Node_preserve) * Node_canon

let compare_preserve p1 p2 =
    compare_canon (snd p1) (snd p2)

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