Forester 4.2 › New query language › Relational queries › Query modes and polarities [00WZ]

Given an address x and a relation symbol r, there are several useful queries that we might wish to make:

  1. We might wish to find all incoming edges to x in r, or we may wish to find all outgoing edges from x in r. We shall refer to the differenec between incoming and outgoing edges is referred to as a polarity.
  2. Rather than searching for edges, we may wish to search for paths — which corresponds to passing from a relation to its preorder reflection. We will refer to this distinction as a mode.

Forester supports both polarities and modes for relational queries via the following built-in constants:

  1. \query/incoming and \query/outgoing denote the two polarities.
  2. \query/edges and \query/paths represent the two modes.