next up previous

2.6.3 Instanceset Queries and Distributed Actions

In addition to the ability of rules to directly patternmatch on objects, COOL provides a useful system for determining, grouping and performing actions on sets of instances of userdefined classes that meet userdefined criteria. The query system allows you to associate instances that are either related or not. You can simply use the query system to determine if a particular association set exists, you can save the set for future reference, or you can iterate an action over the set. An example of the use of the query system might be to find the set of all pairs of boys and girls that have the same age.




next up previous