(*
$Id$
  WG12N1826 - ISO 10303-57 expression_extensions_schema
*)

SCHEMA expression_extensions_schema; 

REFERENCE FROM iso13584_expressions_schema   -- ISO 13584-20
  (defined_function,
   expression); 

REFERENCE FROM iso13584_generic_expressions_schema   -- ISO 13584-20
  (generic_literal,
   generic_variable); 

REFERENCE FROM iso13584_iec61360_dictionary_schema   -- ISO 13584-42
  (entity_instance_type); 


TYPE assignment_target_select = EXTENSIBLE SELECT;
END_TYPE; 

TYPE entity_instance_select = EXTENSIBLE SELECT;
END_TYPE; 

ENTITY entity_expression
  SUBTYPE OF (entity_instance_type, expression);
  SELF\entity_instance_type.type_name RENAMED entity_name : SET[1:1] OF STRING;
END_ENTITY;

ENTITY entity_instance
  SUBTYPE OF (generic_literal);
  entity_definition : entity_expression;
  the_instance : entity_instance_select;
END_ENTITY;

ENTITY expression_assignment;
  assigned_expression : expression;
  assigned_to_object : assignment_target_select;
  role : STRING;
END_ENTITY;

ENTITY expression_relationship;
  description : OPTIONAL STRING;
  name : OPTIONAL STRING;
  related : expression;
  relating : expression;
  role : STRING;
END_ENTITY;

ENTITY literal_assignment;
  base : expression;
  literal_value : generic_literal;
  value_context : OPTIONAL entity_instance;
END_ENTITY;

ENTITY named_function
  SUBTYPE OF (defined_function);
  name : STRING;
END_ENTITY;

ENTITY named_variable
  SUBTYPE OF (generic_variable);
  name : STRING;
END_ENTITY;

ENTITY variable_assignment;
  the_function : defined_function;
  the_variable : generic_variable;
END_ENTITY;

ENTITY variable_entity_type
  SUBTYPE OF (entity_expression, generic_variable);
END_ENTITY;

END_SCHEMA;  -- expression_extensions_schema

