Up | Next | Prev | PrevTail | Tail |
The command trrl initiates tracing when they fire of individual rules or rule lists that have been activated using let.
trrl <rl1>, <rl2>, ..., <rln>;
where each of the \(<rl_i>\) is:
a rule or rule list;
the name of a rule or rule list (that is, a non-indexed variable which is bound to a rule or rule list);
an operator name, representing the rules assigned to this operator.
The specified rules are (re-) activated in REDUCE such that each of them prints a report every time it fires. The report is composed of the name of the rule or the name of the rule list together with the number of the rule in the list, the form matching the left side (“input”) and the resulting right side (“output”). For an explicitly given rule or rule list, trrl assigns a unique generated name.
Note, however, that trrl does not trace rules with constant expressions on the left, on the assumption that they are not particularly interesting. [This behaviour may be made user-controllable in a future version.]
The command untrrl removes the tracing from rules:
untrrl <rl1>, <rl2>, ..., <rln>;
where each of the \(<rl_i>\) is:
a rule or rule list;
the name of a rule or rule list (that is, a non-indexed variable which is bound to a rule or rule list or a unique name generated by trrl);
an operator name, representing the rules assigned to this operator.
The rules are reactivated in their original form. Alternatively you can use the command clearrules to remove the rules totally from the system. Please do not modify the rules between trrl and untrrl – the result may be unpredictable.
Here are two simple examples that show tracing via the rule name and via the operator name:
trigrules := {sin(~x)^2 => 1 - cos(x)^2}; 2 2 trigrules := {sin(~x) => 1 - cos(x) } let trigrules; trrl trigrules; 1 - sin(x)^2; Rule trigrules.1: sin(x)**2 => 1 - cos(x)**2$ 2 cos(x) untrrl trigrules; trrl sin; 1 - sin(x)^2; Rule sin.23: sin(x)**2 => 1 - cos(x)**2$ 2 cos(x) untrrl sin; clearrules trigrules;
Up | Next | Prev | PrevTail | Front |