The val_lib function is finished except the handling of cyclic dependency error and the debug...