Overview Schemas Index

MATHEMATICAL_FUNCTIONS_SCHEMA (jsdai.SMathematical_functions_schema)


FUNCTION no_cyclic_space_reference
          (spc : maths_space, refs : SET [0:?] OF maths_space) : BOOLEAN;

 LOCAL types : SET  OF  STRING ; refs_plus : SET OF maths_space ; END_LOCAL ; IF  ( spc IN  refs ) THEN  RETURN  ( FALSE ) ; END_IF  ; types := TYPEOF  ( spc ) ; refs_plus := refs + spc ; IF  ( schema_prefix + 'finite_space' ) IN  types THEN  RETURN  ( bool ( SIZEOF  ( QUERY  ( sp <* QUERY  ( mem <* spc \ finite_space . members | ( schema_prefix + 'maths_space' ) IN  TYPEOF ( mem ) ) | NOT  no_cyclic_space_reference ( sp , refs_plus ) ) ) = 0 ) ) ; END_IF  ; IF  ( schema_prefix + 'uniform_product_space' ) IN  types THEN  RETURN  ( no_cyclic_space_reference ( spc \ uniform_product_space . base , refs_plus ) ) ; END_IF  ; IF  ( schema_prefix + 'listed_product_space' ) IN  types THEN  RETURN  ( bool ( SIZEOF ( QUERY ( fac <* spc \ listed_product_space . factors | NOT no_cyclic_space_reference ( fac , refs_plus ) ) ) = 0 ) ) ; END_IF  ; IF ( schema_prefix + 'extended_tuple_space' ) IN types THEN RETURN  ( no_cyclic_space_reference ( spc \ extended_tuple_space . base , refs_plus ) AND no_cyclic_space_reference ( spc \ extended_tuple_space . extender , refs_plus ) ) ; END_IF ; RETURN ( TRUE ) ; 

END_FUNCTION; -- no_cyclic_space_reference

public class FNo_cyclic_space_reference
          public static Value run(SdaiContext _context, Value spc, Value refs)