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

Phil Spiby Phil.Spiby at Eurostep.com
Wed May 18 05:22:04 EDT 2005


Lothar & Ed,

Interesting discussion!

A part of the problem here comes from EXPRESS and SDAI using the same (or
similar) terms to mean different things!
I will try to only use the EXPRESS terms here.

1. A single entity value is a member of the domain defined by an entity data
type
2. A partial complex entity value is a collection of 1 or more single entity
values from distinct entity data types (i.e. the same entity data type
cannot occur more than once)
3. A complex entity value is a valid partial complex entity value.

So from your example just changing the definition of B to:
  ENTITY B ABSTRACT SUPERTYPE SUBTYPE OF (A); b1: STRING; END_ENTITY;

  A(2)
  B("Hello")
  C(.FALSE.)
Are the single entity values

  A(2)
  B("Hello")
  C(.FALSE.)
  (A(2)B("Hello"))
  (C(.FALSE")A(2))
  (B("Hello")C(.FALSE.))
  (A(2)B("Hello")C(.FALSE"))
Are the partial complex entity values

And
  A(2)
  (A(2)B("Hello")C(.FALSE"))
Are the complex entity values (The SDAI view is that A(2) is not a complex
entity value)

I do not understand why Lothar claims partial complex entity value and
complex entity value are exclusive, infact the definition of partial complex
entity data type states that it may form part or all of a complex entity
data type. 

I do agree with Lothar on his assertions about single entity values

Given this I believe we do need to have another go at tidying up the
definitions and the meta-model is a very useful (probably necessary) way of
clarifying our understanding before we actually start re-writing the
definitions.

To add more confusion to this issue, I think we need to separate out entity
values and entity instances. To my mind, and I guess this may be
controversial, I think Entity data types only define the domains of entity
values, not of entity instances! Subtype/supertype graphs define the domains
of instances, where a graph can be just a single entity data type.

How are these issues addressed in the MOF for UML? I guess there are similar
issues since UML has similar capabilities in this area (often overlooked by
people assuming disjoint constraints between sub-classes). Perhaps we can
use a similar terminology and concepts, this would help with the
harmonization between EXPRESS and UML.

Phil


-----Original Message-----
From: wg11-bounces at steptools.com [mailto:wg11-bounces at steptools.com] On
Behalf Of Lothar Klein
Sent: 17 May 2005 19:27
To: Ed Barkmeyer
Cc: SC4 WG11
Subject: Re[2]: [wg11] SEDS for EXPRESS (10303-11:2004)


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

_______________________________________________
wg11 mailing list
wg11 at steptools.com http://lists.steptools.com/mailman/listinfo/wg11




More information about the wg11 mailing list