AtTimeLink

From OpenCog
Jump to: navigation, search

AtTimeLink is a Link used to attach timestamps or time intervals to atoms.

DEPRECATED! The Value subsystem provides a superior mechanism for storing, recording, and working with fleeting and time-changing data. There are multiple problems with using Atoms for transient data, including: (a) it is CPU-intensive to create an Atom. Creating Values is much faster. (b) it is CPU-intensive to insert an Atom into the AtomSpace. Values are not stored in the atomsapce. There is no functional need for the indexing services that the AtomSpace provides, so its pointless to store fleeting data there, anyway. (c) it can become very difficult, sometimes impossible, to remove Atoms from the atomspace. This can happen when an Atom become a part of the outgoing set of another atom; in such a case, it would be illegal to delete the atom. For these three reasons, use Values instead. They just work better. See also SpaceServer for additional space-time management ideas.

Format

AtTimeLink
   A
   T

where T is a TimeNode or a TimeIntervalLink and A could be any atom type.

Additionally a time domain may be used. The format is as follows

AtTimeLink
   A
   T
   D

where D is a TimeDomainNode.

Semantics

AtTimeLink
   A
   T

could be seen as equivalent to

EvaluationLink
   PredicateNode "AtTime"
   ListLink
      A
      T

where the PredicateNode "AtTime" is specially used to represent timestamps.

In case T is a TimeIntervalLink, then

AtTimeLink
   A
   TimeIntervalLink
      TimeNode t1
      TimeNode t2

is equivalent to

OrLink
  AtTimeLink
     A
     TimeNode t1
  ...
  AtTimeLink
     A
     TimeNode t2 - 1

For more details, see Temporal Reasoning.

Related