Your constraints abstraction looks very promising. Now all you need is to package it up. The examples are excellent.