if X exists...
if the class-name X that is relation-name Y exists..., given object Y
for Obj = each class-name do if the attribute-name of Obj = value ...
if there exists a class-name X such that (the attribute-name of X = value) ...
if there exists a test-object T1 connected to T...
if there exists a test-object T1 connected at the output of T...
if there exists a test-object T1 connected at the port-1 of T...
test-object class. You assign an integer attribute running serially from 1 to 1000 to each object. You name the last item created (for the first test) and relate it to a permanent object (for the second test). The attribute value tests look for the test object whose integer attribute has the value 500.
Explicit searches for an object with a particular attribute value carry a very large cost, and implicit searches on non-indexed attributes via the
if there exists ... such that statement. Indexed attribute value searches, on the other hand, are only a factor of 2.7 slower than searches based on relations. The time for the indexed attribute search is virtually unchanged when you increase the number of instances to 10,000. Searches based on connections are only between 1.7 and 2.6 times slower than searches based on relations.