OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xmile message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [xmile] 1.5.2 Non-Apply-to-All Array


Hello,

I think this section needs work, I would not like to see the current specification approved with two distinct ways to create arrays.

To review, arrays with a singe equation for all dimensions (apply to all) is created like this:

<aux name="distance">
  <dimensions>
    <dim name="X"/>
    <dim name="Y"/>
  </dimensions>
  <eqn>SQRT(X^2 + Y^2)</eqn>
  <units>kilometers</units>
</aux>

And one with different equations for different dimensions is created like this:

<array name="not_apply_to_all">
  <dimensions>
    <dim name="X"/>
    <dim name="X"/>
  </dimensions>
  <aux subscript="1,1">
    <eqn>TIME</eqn>
  </aux>
  <aux subscript="1,2">
    <eqn>2*TIME</eqn>
  </aux>
  <aux subscript="2,1">
    <eqn>TIME^2</eqn>
  </aux>
  <aux subscript="2,2">
    <eqn>2*TIME^2</eqn>
  </aux>
  <units>Euros</units>
</array>

Having a top-level array tag is unintuitive to me.  Apply-to-all gets it right - the most important piece of information about a variable is its type <aux>, not that it is an array.  Changing the outermost tag from <aux> to <array> when changing the variable from an apply-to-all array to a non-apply-to-all array doesn't make sense from a spec standpoint - you don't have multiple variables, you have multiple equations for the same variable.

I suggest changing this to simply allowing the subscript attribute on the <eqn> tag:

<aux name="not_apply_to_all">
  <dimensions>
    <dim name="X"/>
    <dim name="Y"/>
  </dimensions>
  <eqn subscript="1,1">TIME</eqn>
  <eqn subscript="1,2">2*TIME</eqn>
  <eqn subscript="2,1">TIME^2</eqn>
  <eqn subscript="2,2">2*TIME^2</eqn>
  <units>Euros</units>
</aux>

A sidenote - the above example from the spec is not dimensionally consistent - it has a variable with equation TIME and units Euros.  Do we want/need to edit the spec for dimensional consistency in examples?

yours,
Bobby


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]