The trace() function turns on or off an internal trace() function that traces how the code is parsing the passed parameters. You can turn on the function at a specific point in the code to validate that line. This function is useful when creating a rule and validating what is being matched.

The trace() function gives you access, from within ASL, to command line options available with the sm_adapter command with the following exceptions:

  • There is no analog of sm_adapter - -traceRules because all rules have already been compiled by the time you could turn on tracing of rule compilation.

  • Calling the trace() function as trace(“input”,TRUE), turns on tracing at the front end, and has no command line equivalent under sm_adapter.

    The syntax is as follows:

    trace(<string>, <BOOLEAN>)

    The <BOOLEAN> argument determines whether tracing is turned on or off.

    Valid values for string lists valid values for <string>.

Table 1. Valid values for string




Matches the input stream against the rule.


Traces input from the front end.


Traces the interaction of the remote wire protocol with the server.

For example:

 x:rep(word) eol
 do {
 trace ("parser", TRUE);
 trace ("input", TRUE);
 trace ("server", TRUE);