Type[] types = new Type[args.length];
int i = 0;
for (IValue v : args) {
Type type = v.getType();
types[i++] = type.isSubtypeOf(Factory.Tree) ? rtf.nonTerminalType((IConstructor) v) : type;
}
if (func == null) {
throw new UndeclaredFunction(Names.fullName(qualifiedName), types, this, getCurrentAST());
}