Modified the constraint solver as an abstract type