|
FUNCTION local_vars_aux (thing : GENERIC, accum : SET [0:?] OF scalar_variable_armx) : SET [0:?] OF scalar_variable_armx; LOCAL i , j , k : INTEGER ; END_LOCAL ; IF ( ( 'production_rule_xim.abstract_variable_armx' IN TYPEOF ( thing ) ) AND ( 'production_rule_xim.rule_definition' IN ( TYPEOF ( thing . scope ) ) ) ) THEN accum := accum + thing ; ELSE IF ( 'production_rule_xim.rule_condition_armx' IN TYPEOF ( thing ) ) THEN REPEAT i := 1 TO HIINDEX ( thing \ atomic_formula_armx . terms ) ; accum := local_vars_aux ( thing \ atomic_formula_armx . terms [ i ] , accum ) ; END_REPEAT ; ELSE IF ( 'production_rule_xim.simple_clause_armx' IN TYPEOF ( thing ) ) THEN REPEAT j := 1 TO HIINDEX ( thing . formulas ) ; accum := local_vars_aux ( thing . formulas [ j ] , accum ) ; END_REPEAT ; ELSE IF ( 'production_rule_xim.complex_clause_armx' IN TYPEOF ( thing ) ) THEN REPEAT k := 1 TO HIINDEX ( thing . clauses ) ; accum := local_vars_aux ( thing . clauses [ k ] , accum ) ; END_REPEAT ; END_IF ; END_IF ; END_IF ; END_IF ; RETURN ( accum ) ; END_FUNCTION; -- local_vars_aux |
|
public class FLocal_vars_aux public static Value run(SdaiContext _context, Value thing, Value accum) |