A rule or a query.
t/0 types every field. Three are not obvious:
:namenames the production, but the generated RHS function isrhs_name/1of it instead — a query owns its own name in its module.:bindcomes from the classified LHS, vialhs_bindings/1. So it excludes a negation's variables, and it is the union over a disjunction's branches. A variable only some branches bind is not in every token, so the RHS reads it defensively.:paramsis what the head of a query binds: the keys of its matches. It is always[]on a rule. Unlike:bind, it holds only guaranteed bindings, which are the keys that every match carries. It is sorted.:headis the head of a query as it was written, one string per pattern. The patterns themselves are AST, so they stay in__ast__.headfor the code generator and go no further. Only a message needs them after that, and a message needs the source rather than the AST. So this is what survivesescape/1and reaches the network.:rhsisniluntil the production is escaped. The engine logically inserts and truth-maintains its return value.nilor[]inserts nothing.