Connector

From OpenCog
Jump to: navigation, search

The Connector is a type of EvaluatableLink used to group together a set of specifications that describe something that can be connected to something else. It derives from Evaluatable, since, in general, connectors may or may not be connectable to other connectors. The result of an attempted mating is a TruthValue, indicating whether the attachment may go forwards, or not.

See Connectors and Sections for details.

Examples

A few examples illustrate the idea.

TypedVariableLink

An example of a Connector is the TypedVariableLink: it couples together a variable name (in the VariableNode) with a type specification. For example, a variable that can only be a ConceptNode is written as

TypedVariable 
   Variable X
   TypeNode 'ConceptNode

indicates that X can only eve be a ConceptNode. When used in a LambdaLink, for example

Lambda
   TypedVariable 
      Variable X
      TypeNode 'ConceptNode
   <body>

it indicates that the Lambda can only "connect to" some ConceptNode.

SignatureLink

The SignatureLink is a Connector that is used do write down the specification of a complex type. For example, most EvaluationLinks have the form

Signature
   EvaluationLink
      Type 'PredicateNode
      ListLink
         Type 'ConceptNode
         Type 'ConceptNode

Anything having this signature can only "connect" to EvaluationLinks of this particular form; all other connections are rejected.

Grammatical connector

A lexical entry in a grammar may have the form

Section
   LexicalNode "the"
   Connector
      Bond  "determiner"
      ConnectorDir "+"

which indicates that the English word "the" is a determiner, and that it can connect to nouns from the left (the ConnectorDir shows the left/right connection direction).

Formal definition

The connector has the general form

Connector
   <optional identifier>
   <constraints>

where <optional identifier> is an optional name for the connector (such as the VariableNode in the examples above), and the <constraints> determine the kind of connector that it is.