designing constraint framework