Rete.IR.Gate (Rete v0.1.0)

Copy Markdown View Source

An unnormalized logical gate, {gate, [condition, ...]}.

A parser placeholder. Rete.DSL.Normalize rewrites gates into plain conditions, Rete.IR.Negation nodes and {:or, [[condition, ...], ...]} disjunctions.

:gate is one of :and, :or, :not, :nand, :nor, :xor, :xnor. n-ary :xor means exactly one argument holds, :xnor is its negation, and :not with several arguments negates their conjunction. :code identifies the gate by structure.

Summary

Types

t()

@type t() :: %Rete.IR.Gate{
  args: [Rete.IR.condition()],
  code: [atom() | list()],
  gate: :and | :or | :not | :nand | :nor | :xor | :xnor
}