Skip to content

Network Inference

Hal Hildebrand edited this page Apr 13, 2015 · 7 revisions

Describes the network inference and graph maintenance process. This process uses referential integrity to allow the database to maintain the inference graph.


Inference Rules

if (a R1 b AND b R2 c) -> (a R3 c)

Inference State

  • inferenceRule - the inference rule that generated the inferred edge
  • inferredFrom - the (inserted) network edge that derived (triggered) the inference
  • premise1 - the first premise of the inference, i.e. the edge that represents the premise 1 in the inference. (a R1 b)
  • premise2 - the second premise of the inference, i.e. the edge that represents the premise 2 in the inference. (b R2 c)

The inference state allows us to use cascading deletes to maintain correctness of network inferences when deleting state:

  • network inference
  • nodes
  • edges

Null Inference

There is a pinned, primitive network inference rule that represents the null inference.

On a primitive insert, the inference state is set to:

  • inferenceRule -> null inference
  • inferredFrom - the edge inserted (self)
  • premise1 - the edge inserted (self)
  • premise2 - the edge inserted (self)

Network Inference (Edge Insert)

Do a recursive query, inferring all edges from the inserted edge. Inferred edges track the inference rule, and the edge that triggered it's inference. If the edge that derived the inference is, itself derived

Node Deletion

Node deletion will trigger cascading deletes on inferred and non-inferred edges in the inference graph.

Edge Deletion

Edge deletion will trigger cascading deletes on inferred and non-inferred edges in the inference graph.

Clone this wiki locally