private Graph createGraphForUnbound(InterpretationContext context, Expression expression, Function function,
List<Parameter> unbound, ExplanationPart explain)
{
Graph retVal;
if (unbound.Count == 0)
{
if (function != null && function.FormalParameters.Count > 0)
{
retVal = function.CreateGraph(context, (Parameter) function.FormalParameters[0], explain);
}
else
{
retVal = Graph.createGraph(expression.GetValue(context, explain), null, explain);
}
}
else
{
if (function == null)
{
retVal = expression.CreateGraph(context, unbound[0], explain);
}
else
{
retVal = function.CreateGraph(context, unbound[0], explain);
}
}
return retVal;
}