Re: [Bro-Dev] more set operators? (equality/subset)

2018-06-29 Thread Vern Paxson
> Oh, neat. If that actually works in all cases (so also with records of > records, etc) Well, it almost does. I tried it with records that contain records and that's fine. For records that contain sets, it often works in my testing, but not always, evidently due to the randomized hash keying,

Re: [Bro-Dev] more set operators? (equality/subset)

2018-06-29 Thread Johanna Amann
On Fri, Jun 29, 2018 at 08:58:25AM -0700, Vern Paxson wrote: > This in fact suggests we could implement record equality by converting the > records to hash indices and then comparing those. Oh, neat. If that actually works in all cases (so also with records of records, etc) I would be totally on

Re: [Bro-Dev] more set operators? (equality/subset)

2018-06-29 Thread Vern Paxson
> I assume what will at the moment happen with sets is that the pointers of > records are checked for equality Specifically, in my branch they are checked for whether the composite hash index matches. Happily, this works: type A: record { a: string; };

Re: [Bro-Dev] more set operators? (equality/subset)

2018-06-29 Thread Johanna Amann
On Sun, Jun 24, 2018 at 07:07:06PM -0700, Vern Paxson wrote: > s1 == s2 iff both sets have exactly the same members > > s1 < s2 iff every element in s1 is in s2, but s2 has some > elements not in s1 [...] > Any concerns with adding these too? I actually

[Bro-Dev] more set operators? (equality/subset)

2018-06-24 Thread Vern Paxson
I've implemented the set operators we discussed, and am now developing test cases. In the process, I'm finding that it would be handy to have set equality and subset/superset testing. These would be (for type equivalence sets): s1 == s2 iff both sets have exactly the same members