Overview Schemas Index

MATHEMATICAL_FUNCTIONS_SCHEMA (jsdai.SMathematical_functions_schema)


FUNCTION all_members_of_es
          (sv : SET [0:?] OF maths_value, es : elementary_space_enumerators) : LOGICAL;

 CONSTANT base_types : SET  OF  STRING  := [ 'number' , 'complex_number_literal' , 'real' , 'integer' , 'logical' , 'boolean' , 'string' , 'binary' , 'maths_space' , 'maths_function' , 'list' , 'elementary_space_enumerators' , 'ordering_type' , 'lower_upper' , 'symmetry_type' , 'elementary_function_enumerators' , 'open_closed' , 'space_constraint_type' , 'repackage_options' , 'extension_options' ] ; END_CONSTANT ; LOCAL v : maths_value ; key_type : STRING  := '' ; types : SET OF  STRING ; ge : generic_expression ; cum : LOGICAL := TRUE  ; vspc : maths_space ; END_LOCAL ; IF  NOT  EXISTS  ( sv ) OR NOT  EXISTS  ( es ) THEN  RETURN  ( FALSE  ) ; END_IF  ; CASE es OF es_numbers : key_type := 'number' ; es_complex_numbers : key_type := 'complex_number_literal' ; es_reals : key_type := 'real' ; es_integers : key_type := 'integer' ; es_logicals : key_type := 'logical' ; es_booleans : key_type := 'boolean' ; es_strings : key_type := 'string' ; es_binarys : key_type := 'binary' ; es_maths_spaces : key_type := 'maths_space' ; es_maths_functions : key_type := 'maths_function' ; es_generics : RETURN  ( TRUE ) ; END_CASE ; REPEAT i := 1 TO SIZEOF  ( sv ) ; IF  NOT  EXISTS ( sv [ i ] ) THEN  RETURN  ( FALSE  ) ; END_IF  ; v := simplify_maths_value ( sv [ i ] ) ; types := stripped_typeof ( v ) ; IF  key_type IN  types THEN  SKIP  ; END_IF  ; IF  ( es = es_numbers ) AND ( 'complex_number_literal' IN types ) THEN  SKIP ; END_IF  ; IF  SIZEOF ( base_types * types ) > 0 THEN  RETURN  ( FALSE  ) ; END_IF  ; ge := v ; IF  has_values_space ( ge ) THEN  vspc := values_space_of ( ge ) ; IF  NOT  subspace_of_es ( vspc , es ) THEN  IF  NOT compatible_spaces ( vspc , make_elementary_space ( es ) ) THEN  RETURN  ( FALSE  ) ; END_IF  ; cum := UNKNOWN  ; END_IF  ; ELSE cum := UNKNOWN ; END_IF  ; IF cum = FALSE  THEN RETURN  ( FALSE ) ; END_IF ; END_REPEAT ; RETURN ( cum ) ; 

END_FUNCTION; -- all_members_of_es

public class FAll_members_of_es
          public static Value run(SdaiContext _context, Value sv, Value es)