create constraint from variables found within a block