All of these definitions are parameterized by n, the number of input labels
supplied for a rule. This permits us to check statically that the rule
doesn't use an undefined label.
apply_rule evaluates the allow-modify r to the given parameters.
Returns the result PC label and result value label,
or nothing when the Allow condition fails.