try to add io functions for partial constraints, but there are some bugs.