Add type of constrained rules.
Add more tracing to KBC.
todo