[wg11] SEDS for EXPRESS (10303-11:2004)

Lothar Klein lothar.klein at lksoft.com
Tue May 17 14:26:51 EDT 2005


Ed,

In my understanding of Express a "partial complex entity value"
is a collection of one or more "single entity value".

For clarification let me extend the example you gave:
  ENTITY A; a1: INTEGER; END_ENTITY;
  ENTITY B SUBTYPE OF (A); b1: STRING; END_ENTITY;
  ENTITY C SUBTYPE OF (B); c1: BOOLEAN; END_ENTITY;

The entity data types are A, B and C.

Some examples, using a kind of p21 notation with external mapping:
Examples of "single entity values"
  A(2)
  B("Hello")
  C(.FALSE.)

Examples of "partial complex entity values" are
  (B("Hello"))
  (B("Hello")C(.FALSE.))

Examples of "complex entity values are
   A(2)  -- would be better to write this with additional "( )"
  (A(2)B("Hello"))
  (A(2)B("Hello")C(.FALSE"))

Example of a single entity instance
  #1=A(2)

Example of complex entity instances
  #2=(A(2)B("Hello"));
  #3=(A(2)B("Hello")C(.FALSE"));

I think it is essential to clearly separate these concepts out when
going to a meta-model.

Now to what you wrote:

>> - 3.3.9
>>   (single) entity (data type) value

> "a unit of data which represents a unit of information within the class
> defined by an entity data type. It is a member of the domain established
> by this entity data type."

> The last sentence is the definition: It is a value of ("a member of the
> domain established by") an entity data type.  The first part says it is
> the representation of an individual in the corresponding entity (class).
>   I'm not so sure about that; I think that is what an entity instance
> is, but I won't argue the point.

I agree that the definition could be better. Hope the example about
make it clear what it should be (in my opinion, see more below on this).

> ...
> I don't know what the purpose of "(single)" in 3.3.9 is.  Text 
> references to "single entity value" mean "one entity value".  And 3.3.9
> is not the definition of "simple entity value", or of the partial 
> complex entity value produced by the implied entity constructor.

Don't mix up "single" with "simple".
Under simple I would only understand A(2).
Single is also B("Hello") and C(.FALSE.)

>> So instead of writing
>> "a) In the resulting partial complex entity value, the attribute group
>>     corresponding to a given entity declaration shall occur at most
>>     once."
>> I propose to write
>> "a) The resulting partial complex entity value shall consists of
>>     single entity values of different entity data types."

> But that is not at all correct.

> First, the proposed replacement is a different rule: it says that a 
> partial complex entity value has to involve attributes from more than
> one entity declaration.

It does not say this. Can't understand how you can read this out of
the text.

> That is not true.  The partial complex entity
> value A(2) does not involve different entity data types.

Sorry, but from the definitions A(2) is clearly not a "complex" -
I would call it a "simple entity value".
Also "partial complex entity value" and "complex entity value" are
exclusive (unfortunately).

Express is simplifying several details and this makes things at the
end more complicated. For our JSDAI implementation we have changed
things slightly to have clear concepts:

EntityValue is the result of a single constructor or group operator
(on entity). An EntityValue knows about the single entity data type it
belongs to and the value of the attributes (if any).
Examples are A(2), B("Hello"), C(.FALSE.).

A ComplexEntityValue is a collector of one or several EntityValues.
The || always produces a ComplexEntityValue. It may be either complete
or partial.

An EntityInstances can only be generated out of an ComplexEntityValue.
So an express line such as
  "i = A(2)"
first create an EntityValue, then this is converted into a
ComplexEntityValue and this is finally turned into an EntityInstance.

I whish Express would also follow this simplicity (it doesn't !).

> Second, the proposed replacement doesn't capture the 'at most once'
> constraint:  A(2)|| B("Hello" || A(5) is not a valid partial complex
> entity value, but it does consist of two different entity data types.

The term "different entity data types" is doing exactly this. If you
have more than one of the same type then the types are no longer
different.

> Third, a partial complex entity value cannot possibly consist of more
> than one entity value.

I'm speaking of one or more *single* entity values.

>...
> And last, a partial complex entity value is not necessarily an "entity
> value" of any "entity data type".

According to Express it is never since it is not complete by
definition.

> That is, it may not be the entire
> collection of attribute values that constitutes a member of any domain.
>   Per 3.3.15, "it has no meaning on its own".  For example, given
>   ENTITY A; a1: INTEGER; END_ENTITY;
>   ENTITY B SUBTYPE OF (A); b1: STRING; END_ENTITY;
> the partial complex entity value B("hello")

To make things clear I'm speaking on (B("hello"))

> is not a member of any entity data type domain.
> A member of the domain B has the form: A(nnn) || B(sss).

Correct

> I agree that EXPRESS needs a term for the group of (explicit) attributes
> that is declared in a single entity declaration, exclusive of attributes
> inherited from supertypes.  (Indeed, that concept is an explicit 
> class/entity in the EXPRESS meta-model.)

When you define things along the attributes you miss the cases when
entities have no attributes. This is why I propose to use "single
entity values" in the wording, whether there are attributes or not.
But don't mix up "single" with "simple".

> ...

Lothar



More information about the wg11 mailing list