next up previous
Next: 2.16. Finding Information using Up: 2. BUILDING AND FINDING Previous: 2.14. Describing Found Nodes

2.15. Finding Information using Paths, part 1

We can also describe nodes that we want to find by describing paths of relations (i.e., paths of arcs). E.g., another way to ask Cassie who an elephant is is to ask SNePS to find all elephants, i.e., all members of the class of elephants. To do this, we want to find all nodes that have a member arc coming into them from a node that has a class arc going out of it. This node in the middle, therefore, has a member arc going out of it and a class arc going out of it; i.e., it is a node that represents a proposition that the thing with the member arc coming into it is a member of the class with the class arc coming into it. So, to repeat, we want to find a node that (among other things) has a member arc coming into it. Now, another way to look at this is to say that that node has a converse member arc coming out of it! Such a converse relation is denoted with a `-' sign: member-. (See UM§2.5.)

But it's not enough to find nodes with member- arcs coming out of them (i.e., with member arcs coming into them). That member- arc must go into a node that has a class arc coming out of it. So we want to find a node that has a path of arcs consisting of a member- arc followed by a class arc. Furthermore, the class arc must go into the elephant node!

We can represent paths by a list of relations: (member- class) is the path we've been talking about. So, to ask Cassie who is an elephant in such a way that she will tell us who the elephants are, we ask:

(find (member- class) elephant)
Before trying this, make sure you understand what it says: It is a find command with a relation-node pair as its argument. The relation is the path (member- class) (it can be understood as the path expressing the relationship of being a member of the class of), and the node is elephant.


next up previous
Next: 2.16. Finding Information using Up: 2. BUILDING AND FINDING Previous: 2.14. Describing Found Nodes
William J. Rapaport 2003-09-22