4.8 Trace formats

up next previous
[ Guide contents | Chapter contents | Next section: 4.9 Algorithms | Previous section: 4.7 File Formats ]

4.8.1 Generator trace

4.8.2 Recognizer trace

Figure 4.16 Level 1 generator trace

Figure 4.17 Level 2 generator trace

Figure 4.18 Level 3 generator trace

Figure 4.19 Level 1 recognizer trace

Figure 4.20 Level 2 recognizer trace

Figure 4.21 Level 3 recognizer trace


This section explains how to read the output of the generator and recognizer traces. Traces are produced by the set tracing command described in section 4.5.6.1. The amount of detail shown in the trace display is set by the tracing level. The level argument to the set tracing command can range from 0 to 3, where 0 is no tracing at all and 3 is the most detailed level of tracing.

4.8.1 Generator trace

The purpose of the generator trace is to allow the user to see how a lexical form is processed through multiple recursive calls to the generator. The generator algorithm used to process the form is described in section 4.9.1.

There are three levels of tracing differing in the amount of detail they display: Level 1 gives the least amount of detail, level 2 (the default) gives a moderate amount of detail, and level 3 gives the most detail. Figure 4.16 is a level 1 generator trace of the lexical form `fox+s (taken from the English example). The only difference from no tracing at all is that the RESULT line is displayed. This line differs from the normal result that is returned because it prints all NULL symbols in the output surface form.

Figure 4.16 Level 1 generator trace

Figure 4.17 is from a level 2 generator trace for the form `fox+s. To limit the size of the trace, the Gemination rules (14 and 15) were turned off. Line numbers and column numbers are printed here for reference in the description that follows. Each description refers to an element beginning at the line and column indicated.

Figure 4.17 Level 2 generator trace

There is one other tracing message not exemplified in the above display. This is the END OF INPUT message. It indicates that the end of the input form has been reached but the generator function has failed on the rule specified because it was not in a final state. For example,

END OF INPUT, FAILED RULE 4: Palatalization
would indicate that when the end of the input form was reached, rule 4 was not left in a final state.

Figure 4.18 Level 3 generator trace

Figure 4.18 is part of a level 3 trace for the same form. The level 3 trace differs from the level 2 trace in how it displays rule failures that block the generator. Compare line 10 in the level 2 trace with lines 10 and 11 of the level 3 trace. The level 3 trace explicitly shows what state the automata are in after stepping them. In line 10 of the level 3 trace we can see that the proposed input pair puts rule 3 in state 0, which means that it fails. Notice that the rest of the state array is filled with question marks. This is because if one rule fails the whole configuration fails, so the rest of the rules are not even tried. (This shows that even though conceptually the automata operate in parallel they must still be stepped one at a time).

4.8.2 Recognizer trace

The purpose of the recognizer trace is to allow the user to see how a surface form is processed through multiple recursive calls to the recognizer. The recognizer algorithm used to process the form is described in section 4.9.1.

There are three levels of tracing differing in the amount of detail they display: level 1 gives the least amount of detail, level 2 (the default) gives a moderate amount of detail, and level 3 gives the most detail.

Figure 4.19 Level 1 recognizer trace

Figure 4.19 is a level 1 recognizer trace of the surface form foxes (taken from the English example). Like the level 1 generator trace, the level 1 recognizer trace displays the RESULT line but does not show the feasible pairs as they are tried or the states of the rules. However, it does display a record of how the recognizer moves through the lexicon, either with an ENTERING} or a BACKING UP message.

Figure 4.20 is from a level 2 recognizer trace of the form foxes. To limit the size of the trace, the Gemination rules (14 and 15) were turned off. Line numbers and column numbers are printed here for reference in the description that follows. Each description refers to an element beginning at the line and column indicated.

Figure 4.20 Level 2 recognizer trace

The END OF INPUT message may also occur in a recognizer trace. See section 4.8.1 on the generator trace for an explanation of it.

Figure 4.21 Level 3 recognizer trace

Figure 4.21 is part of a level 3 trace for the same form. Like level 3 of the generator trace, level 3 of the recognizer trace explicitly shows the state array when a rule fails. Compare line 8 of the level 2 trace with lines 18 and 19 of the level 3 trace. In addition, the level 3 recognizer trace shows pairs that are weeded out by the lexicon even before they are tried with the rules. Compare lines 3-4 of the level 2 trace with lines 3-10 of the level 3 trace. In lines 4-9 the level 3 trace shows explicitly several pairs that are tried but immediately fail. Since the recognizer is at the beginning of the input form, the only possible feasible pairs to try are those whose surface character is 0 (the NULL symbol) or f (the first character of the input form foxes). Rather than trying each of these pairs with the rules, the recognizer first looks to see if the lexical character of each pair matches any lexical character available in the sublexicon it is currently searching. In each case the match fails, indicated by the message LEXICAL CHARACTER NOT MATCHED. After trying all the pairs, the lexicon accepts the null entry and enters a new sublexicon. This exhaustive process takes place at each point in the recognition process where the recognizer is trying a new pair.


up next previous
[ Guide contents | Chapter contents | Next section: 4.9 Algorithms | Previous section: 4.7 File Formats ]