Set Operators

As you might expect from a language that deals with set expressions, BBQ uses set operators: union, intersection, deintersection, without. You can use these operators to combine two set expressions. An equivalent expression to the previous example could be written ( public methods in class "java.util.ArrayList" ) union ( private methods in class "java.util.ArrayList" ).

What may be less obvious is that set expressions can also be used to combine transforms. A commonly used transform that can be applied to classes is ( calls to methods in ) union ( references to fields in ). The union of two transforms applied to a set expression Foo is equivalent to the union of the two set expressions that would be obtained by applying each transform to Foo; the same goes for the other set operators. As you become experienced with BBQ, you will much more commonly use the set operators with transforms than with set expressions, because the resulting set expressions are more compact with less duplication: You would prefer ( calls to methods in ) union ( references to fields in ) class "java.util.ArrayList" to ( calls to methods in class "java.util.ArrayList" ) union ( references to fields in class "java.util.ArrayList" )

browse-by-query home antlersoft free software sourceforge project page