Add predicates to (some) nodes, with lots of plumbing to enable that.