6.3 Error messages during template loading

If there are any template loading problems during the corpus loading process, all error messages are stored for inspection. These messages can be inspected by clicking on the warning symbol in the corpus information tab (cf. also subsection 2.2):

Please click to enlarge!

Figure: Inspection of template loading errors

The handling of file access errors has already been explained in subsection 6.1.

If a template call does not match the head of any template definition with respect to template name and number of parameters, an undefined template error message is caused if the template is called. Therefore, you should

verify the template name and the number of argument parameters, both in the template call and in the corresponding template definition. Correct the template call according to your template definitions, or vice versa.

check whether the corresponding template definition has been compiled properly. If the compilation process has failed for a template definition, e.g. due to syntax errors or read/write access errors, obviously, the definition is not available in the internal template store.

Variable-related error messages, e.g. 'undefined type of variable' or 'variable type clash' will be produced in the following situations:

The type of an argument parameter in a template call cannot be determined from the context of the template call.

The type of an argument parameter of a template head cannot be determined from the template body.

An argument parameter of a template call and the corresponding parameter in a template head have disjoint types.

For example, the type of variable #n5 cannot be derived from the other constraints in the body of the following template definition:

VerbPhrase(#n0) <-
   #n0:[cat="VP"] > #n1:[pos="VVFIN"]
   & #n0 > #n2
   & #n1.#n2
   & arity(#n0,2)
   & PrepPhrase(#n5) ;

This problem is solved by either correcting the name of the variable, or by inserting the same variable name somewhere else in the graph description, so that the type of the variable becomes clear (node variable vs. feature constraint variable vs. feature value variable).

A cyclic template definition error will be issued if a template definition embeds a call to itself, either directly or indirectly. The error message lists the 'ancestors' of the cyclic call in order to give you a hint how the cycle could have been created. Currently, the ancestors are listed in arbitrary order - which may be somewhat confusing.