Re: Junctive collapsing?

2005-02-12 Thread Eirik Berg Hanssen
Autrijus Tang <[EMAIL PROTECTED]> writes: > On Sat, Feb 12, 2005 at 11:10:13AM -0600, Patrick R. Michaud wrote: >> No, consider >> >> $a = 1; >> $b = 2; >> >> one($a, $a, $b) # false >> one($b) # true > > Right. Evidently I need to sleep real soon. :-) > > However, is

Re: Junctive collapsing?

2005-02-12 Thread Autrijus Tang
On Sat, Feb 12, 2005 at 06:34:05PM +0100, Eirik Berg Hanssen wrote: > I think one([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) is > equivalent to all(none([EMAIL PROTECTED]),one([EMAIL PROTECTED])), > which should permit an implementation using Sets without duplicate > elements. Whe

Re: Junctive collapsing?

2005-02-12 Thread Patrick R. Michaud
On Sun, Feb 13, 2005 at 01:01:15AM +0800, Autrijus Tang wrote: > On Sat, Feb 12, 2005 at 10:55:05AM -0600, Patrick R. Michaud wrote: > > On Sat, Feb 12, 2005 at 12:09:37PM +0800, Autrijus Tang wrote: > > > [...] > > > - one() checks its operands for duplicates; if found, it collapses > > >

Re: Junctive collapsing?

2005-02-12 Thread Patrick R. Michaud
On Sat, Feb 12, 2005 at 12:09:37PM +0800, Autrijus Tang wrote: > [...] > - one() checks its operands for duplicates; if found, it collapses > itself into an empty one() junction, thus failing all tests. > Is this somewhat saner? :-) Depends on when it's checking its operands for duplicat

Re: Junctive collapsing?

2005-02-12 Thread Autrijus Tang
On Sat, Feb 12, 2005 at 11:10:13AM -0600, Patrick R. Michaud wrote: > No, consider > > $a = 1; > $b = 2; > > one($a, $a, $b) # false > one($b) # true Right. Evidently I need to sleep real soon. :-) However, is there a way to remove the $a from the equation? I'd like

Re: Junctive collapsing?

2005-02-12 Thread Autrijus Tang
On Sat, Feb 12, 2005 at 10:55:05AM -0600, Patrick R. Michaud wrote: > On Sat, Feb 12, 2005 at 12:09:37PM +0800, Autrijus Tang wrote: > > [...] > > - one() checks its operands for duplicates; if found, it collapses > > itself into an empty one() junction, thus failing all tests. > > Is thi

Re: Junctive collapsing?

2005-02-11 Thread Autrijus Tang
On Sat, Feb 12, 2005 at 03:28:15AM +0800, Autrijus Tang wrote: > Yes. In Pugs 6.0.3 (released one minute ago), that operator is > simply called "&": I satnd corrected. The implementation is incorrect. Pugs 6.0.4 has just been released (now with the "eval" primitive!), it has cleaned up the coll

Re: Junctive collapsing?

2005-02-11 Thread Autrijus Tang
On Fri, Feb 11, 2005 at 01:42:42PM -0600, Patrick R. Michaud wrote: > This collapse is probably wrong. In particular, >any($a, $b) & any($b, $c) > is not the same as >any($a, $b, $c) Right. Teaches me that implementing nontrivial features on 3am just-before-sleep is probably a bad id

Re: Junctive collapsing?

2005-02-11 Thread Patrick R. Michaud
On Sat, Feb 12, 2005 at 03:28:15AM +0800, Autrijus Tang wrote: > On Fri, Feb 11, 2005 at 09:42:06AM +, 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

Junctive collapsing?

2005-02-11 Thread Autrijus Tang
On Fri, Feb 11, 2005 at 09:42:06AM +, 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 "&":