Next: Target code lines
Up: Predicates in rules
Previous: Calls to external functions
It is possible to specify target code as predicate (a target
predicate).
This code is copied unchanged to the generated file.
Target predicates always succeed.
Target predicates normally are attached to their preceeding
predicates.
They are copied after the code that was generated for their preceeding
predicate, i.e. normally in a loop which was caused by that
predicate.
There are some special cases:
- 1.
- If a target predicate appears as first predicate of a rule test part,
it is copied to the generated file as last action of the rule test
part, but before join conditions are evaluated.3.4
- 2.
- If a target code predicate appears in the rule transformation of a
rule it is printed after the addition/deletion of the preceeding edge
in the innermost rule test loop.
- 3.
- If it appears as first predicate in a rule transformation, it is
printed before the addition of the edges and the rule transformation.
- 4.
- If it appears as last predicate in a rule transformation, it is
printed before the addition of the edges and the rule transformation.
- 5.
- FIRST and LAST target predicates are copied to places before and
after the execution of a rule (section 3.6.2)
Next: Target code lines
Up: Predicates in rules
Previous: Calls to external functions
Uwe Assmann
1998-12-22