CTAT 3.1 Function Reference

CTAT 3.1 Function Reference

These pages document functions that can be used within CTAT formulas—expressions you can write for steps in an example-tracing tutor that enable the tutor to accept a wider variety of student input.

See:
          Description

CTAT Functions
edu.cmu.pact.BehaviorRecorder.ProblemModel.Matcher.Functions  

 

Java Math and String Functions Usable from CTAT
java.lang  

 

These pages document functions that can be used within CTAT formulas—expressions you can write for steps in an example-tracing tutor that enable the tutor to accept a wider variety of student input. Formulas enable you to combine the values of inputs on other steps, student-entered input on the current step, and the contents of interface widgets (such as text fields) in evaluating correctness. They can also be used to accept a variety of inputs, such as a number with a comma and/or a dollar sign, or an expression that is not simplified but is otherwise correct. Formula results can be embedded in the text of hint and other feedback messages by inserting the formula expression within special brackets. And a formula result can rewrite a student input field, so that, e.g., the tutor can display 8 if the student entered 6+2.

For more information on how to write formulas and where to enter them, see the section Generalizing an example-tracing tutor with formulas in the CTAT Users Guide.

Note: When using any of the Java String or Math functions from within a CTAT formula, specify the string or number you want to manipulate as the first argument to the function. For example, to use String.replaceAll to remove any leading spaces or dollar signs in student-entered input, use the formula replaceAll(input, "^[ $]*", "")


CTAT 3.1 Function Reference