org.eclipse.viatra.query.runtime.rete.index

## Class ExistenceNode

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.network.BaseNode
  - - org.eclipse.viatra.query.runtime.rete.network.StandardNode
    - - org.eclipse.viatra.query.runtime.rete.index.DualInputNode
      - - org.eclipse.viatra.query.runtime.rete.index.ExistenceNode

- All Implemented Interfaces:
    NetworkStructureChangeSensitiveNode, Node, Supplier

      public class ExistenceNode
      extends DualInputNode

  Propagates all substitutions arriving at the PRIMARY slot if and only if (a matching substitution on the SECONDARY is present) xor (NEGATIVE). The negative parameter specifies whether this node checks for existence or non-existence.

  It is mandatory in differential dataflow evaluation that the secondary parent is in an upstream dependency component (so that every secondary tuple comes with zero timestamp).

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.eclipse.viatra.query.runtime.rete.index.DualInputNode

      `DualInputNode.NetworkStructureChangeSensitiveLogic, DualInputNode.Side`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `negative`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.index.DualInputNode

      `coincidence, complementerSecondaryMask, indexerGroupCache, logic, primarySlot, secondarySlot`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.StandardNode

      `childMailboxes, children`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode

      `nodeId, reteContainer, tag, traceInfos`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExistenceNode(ReteContainer reteContainer, boolean negative)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Tuple` | `calibrate(Tuple primary, Tuple secondary)` Simulates the behavior of the node for calibration purposes only.
    `protected DualInputNode.NetworkStructureChangeSensitiveLogic` | `createTimelessLogic()`
    `protected DualInputNode.NetworkStructureChangeSensitiveLogic` | `createTimelyLogic()`
    `void` | `networkStructureChanged()` At the time of the invocation, the dependency graph has already been updated.

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.index.DualInputNode

      `assignTraceInfo, connectToIndexers, createLogic, getPrimarySlot, getSecondarySlot, getSlot, getTimeline, pullInto, pullIntoWithTimeline, refreshIndexerGroupCache, retrieveOpposites, setComplementerSecondaryMask, unify, unify`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.StandardNode

      `appendChild, constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, propagateUpdate, removeChild`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode

      `acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Node

      `acceptPropagatedTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Supplier

      `getPulledContents`

- - ### Field Detail

    - #### negative

          protected boolean negative

  - ### Constructor Detail

    - #### ExistenceNode

          public ExistenceNode(ReteContainer reteContainer,
                               boolean negative)

      Parameters:
        `reteContainer` -
        `negative` - if false, act as existence checker, otherwise a nonexistence-checker

  - ### Method Detail

    - #### calibrate

          public Tuple calibrate(Tuple primary,
                                 Tuple secondary)

      Description copied from class: `DualInputNode`
      Simulates the behavior of the node for calibration purposes only.
      Specified by:
        `calibrate` in class `DualInputNode`

    - #### networkStructureChanged

          public void networkStructureChanged()

      Description copied from interface: `NetworkStructureChangeSensitiveNode`
      At the time of the invocation, the dependency graph has already been updated.
      Specified by:
        `networkStructureChanged` in interface `NetworkStructureChangeSensitiveNode`
      Overrides:
        `networkStructureChanged` in class `DualInputNode`

    - #### createTimelessLogic

          protected DualInputNode.NetworkStructureChangeSensitiveLogic createTimelessLogic()

      Specified by:
        `createTimelessLogic` in class `DualInputNode`

    - #### createTimelyLogic

          protected DualInputNode.NetworkStructureChangeSensitiveLogic createTimelyLogic()

      Specified by:
        `createTimelyLogic` in class `DualInputNode`