On Fri, Feb 11, 2005 at 09:42:06AM +0000, Thomas Yandell wrote:
> Is there another operator that takes the intersection of two
> junctions, such that any(2,3,4,5) *some op* any(4,5,6,7) would result
> in any(4,5)?

Yes.  In Pugs 6.0.3 (released one minute ago), that operator is
simply called "&":

    % ./pugs -e "(any(2,3,4,5) & any(4,5,6,7)).perl"
    ((2 | 3 | 4 | 5 | 6 | 7))

That is, the "&" builder now automagically collapses nested
junctions under it.  I intend to fill in the rest of the collapse
logic tomorrow, after some feedback from the list.

The question I'd like to ask is: is this kind of collapsing desired?
If yes, how far should it go?  Should it only be done when it results in
reduced dimensions (i.e. from (Junctions of Junctions) to (Junctions)),
or whenever duplicated value can be collapsed?  Consider:

    all( one(1, 2), one(2, 3) )

Should it be collapsed into:

    any( one(1, 3), 2 )

so that "2" now only occurs once?  Is it sane?

Thanks,
/Autrijus/

Attachment: pgps7EMBeq3nb.pgp
Description: PGP signature

Reply via email to