FUNCTION factor1
(tspace : tuple_space) : maths_space;
LOCAL typenames : SET OF STRING := TYPEOF (tspace); END_LOCAL; IF (schema_prefix + 'UNIFORM_PRODUCT_SPACE') IN typenames THEN RETURN (tspace\uniform_product_space.base); END_IF; IF (schema_prefix + 'LISTED_PRODUCT_SPACE') IN typenames THEN RETURN (tspace\listed_product_space.factors[1]); -- This path could RETURN the indeterminate VALUE IF the LIST is empty. -- This is the correct result FOR this case. END_IF; IF (schema_prefix + 'EXTENDED_TUPLE_SPACE') IN typenames THEN RETURN (factor1 (tspace\extended_tuple_space.base)); END_IF; -- Should NOT be reachable. RETURN (?); END_FUNCTION; -- factor1
|