create constraint and its first satisfaction method from a block