+ /** This method tells whether the repair needs to force the
+ * relation to be function-like. */
+
+ public boolean mayNeedFunctionEnforcement(State state) {
+ assert type==MODIFYRELATION;
+ SetDescriptor sd=getPredicate().getPredicate().inverted()?getRangeSet():getDomainSet();
+ if (ConstraintDependence.rulesensurefunction(state,(RelationDescriptor)getDescriptor(), sd, getPredicate().getPredicate().inverted(), false))
+ return false;
+ if (ConstraintDependence.constraintsensurefunction(state,(RelationDescriptor)getDescriptor(), sd, getPredicate().getPredicate().inverted()))
+ return false;
+ return true;
+ }
+