Process Set Operations

You can use the following three operations on process sets:

Operation Represents Action
+ Set union Takes two sets S1 and S2 and returns a set whose elements are either in S1 or in S2.
- Difference Takes two sets S1 and S2 and returns a set whose elements are in S1 but not in S2.
unary - Negation Takes a single set S and returns the difference of [*] and S.

The following example demonstrates these operations:

 

(idb) set $set1 = [:10, 15:18, 20:]

(idb) set $set2 = [10:16, 19]

(idb) set $set3 = $set1 + $set2

(idb) print $set3

[*]

(idb) print $set3 - $set2

[:9, 17:18, 20:]

(idb) print -$set2

[:9, 17:18, 20:]