Closed term

From OpenCog

In OpenCog, closed term and open term refer to hypergraphs that have no (unbound) VariableNodes in them (closed) or have one or more (free) VariableNodes (open). This is analogous to the concept of an open sentence in mathematical logic.

The distinction is important for the following cases:

  • A DeleteLink that is closed cannot be created; attempting to do so causes the corresponding closed term to be deleted from the AtomSpace.
  • The StateLink allows only one closed term to be defined at a time. This is in contrast to the DefineLink, which allows only one term, open or closed.
  • Only open terms are grounded during pattern matching; terms without variables in them are already grounded or are self-grounded.

The FreeLink provides the mechanics/implementation for finding all of the free variables in an atom and working with them.