{becomes | ceases to be} relation-name item
Logical Expressions
This expression tests for the existence of a relation and produces a truth-value that indicates whether one item participates in a relation of the specified kind with another item:
item is [not] relation-name item
->truth-value
if my-item is not aligned-with my-message then
conclude that the status of my-item is unaligned
Relation Participation Expressions
Two expressions return information about relation participation as:
relationships. When you refer to the this attribute, G2 returns a sequence of structures describing the relations in which the given item is participating.
To refer to the relationships of an item:
the relationships of item-of-interest -> relationships: sequence
relation-name-reference
related-items
none. For a complete description of this expression, see Referring to The Relationships of an Item.
Obtaining Items Participating in a Relation
You can refer to a relation's items-in-this-relation hidden attribute. G2 returns a sequence of the items participating in the relation.
To refer to the items participating in a relation:
the items-in-this-relation of relation-of-interest -> participating-items: sequence
| Argument | Description |
|---|---|
relation-of-interest
|
The name of the relation in which items are participating.
|
| Return Value | Description |
|---|---|
particpating-items
|
A sequence of symbols, each naming an item participating in the relation-of-interest.
|
none. As an example of using this expression, in a KB with a
married-to relation definition, you could create relations between four objects with this conclude action:
conclude that bill is married-to edna and conclude that george is married-to janet
married-to relation:
bill
edna
george
janet
the items-in-this-relation of married-to
![]() |
Generic Item References
This generic reference returns the class of items that is related to any item or class:
the class-name [local-name] that is relation-name item
->item
the quantifier, this generic reference expression produces the one and only item of the specified class (or any of its subclasses) that participates in a relation of the specified kind with the specified item. With the any quantifier, this expression produces the set of items of the specified class (or any of its subclasses) that participate in relations of the specified kind with the specified item. For example:
if the status of any mixing-vat that is controlled-by vat-controller-1 is hot
then ...