To determine if a formula matches a student's input on a step, you can do a few things from the Edit Student Input Matching dialog:
Check your formula against the input that you demonstrated when creating the graph.
Enter input in the student interface, then see how the formula was evaluated (Last Evaluation)
To test your formula against the input that you demonstrated:
Open the Edit Student Input Matching dialog on the step for which you've written your formula.
Click . Diagnostic text appears in the space above the button (see Figure 2.21, “Results of checking a formula against demonstrated input”).
![]() | Note |
|---|---|
Pressing both checks the formula's syntax and, if it's valid, compares it against the demonstrated value. |
To test your formula against input you enter in the student interface:
Switch CTAT's Author Mode to .
Perform a step in the student interface that you'd expect to be matched by your formula. As with other matchers, green outlining and text signifies a match on a correct action link, while red outlining and text signifies either a match on an incorrect action link, a suboptimal action link, or no match at all.
![]() | Tip |
|---|---|
You can see which link matched by looking for a bold link label, although this is difficult if not impossible on larger graphs or steps that occur late in a sequence. |
Open the Edit Student Input Matching dialog on the step for which you've written your formula.
Click . Diagnostic text will appear in the space above the button, describing how CTAT interpreted the formula (see Figure 2.22, “Results of testing a formula against input entered in the student interface”).
On any step, the result of a formula will be one of the following:
The formula was not evaluated/used for the step
The formula was evaluated but didn't match the student's step.
The formula was evaluated and matched the student's step.
If the formula was not used to evaluate the step, the following message should appear:
This expression has not been evaluated.
Possible reasons for no evaluation are generally the same for any non-formula-match link in an example-tracing tutor: the selection or action might not have matched, so input was not evaluated; or a constraint such as ordering or min/max traversals precluded a comparison with the formula-match link.
If the formula was evaluated but didn't match, you might see something like the following:
Last evaluation (3:14:18 PM): Observed input (student): 2 Expected input (formula): 1.0 No match!
If the formula was evaluated and matched successfully, you might see something like the following:
Last evaluation (3:15:10 PM): Observed input (student): 2 Expected input (formula): 2.0 Match!
During an attempt at evaluating a formula, Java errors can occur. Some possible errors are:
java.lang.IllegalStateException
-- can occur for a variety of reasons. Review the logic of the
formula, and the argument and return types. If you're referencing a
function you created, see Section 5.6, “Writing your own function” for a description of valid
argument and return types.
java.lang.ClassNotFoundException
-- CTAT was unable to find a function you named in the formula. The
function might be spelled incorrectly, or the arguments might be of
the wrong type.
Try testing your formula with varied input. Before testing the formula again, remember to click on the start state or the state preceding the step you're testing,