Uploaded image for project: 'Specifications - Archetype model'
  1. SPECAM-7

Make existence, occurrences and cardinality optional in AOM

    Details

    • Type: Change Request
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: ADL 1.4
    • Fix Version/s: ADL 2.0
    • Component/s: AOM
    • Labels:
      None
    • Impact Analysis:
      Hide
      Existing ADL based tools will need to relax the current requirement for these constraints to be mandatory. Existing archetypes will parse fine, but should be flagged with warnings if cardinality or existences don't change the RM values, or with errors if they violate them.
      Show
      Existing ADL based tools will need to relax the current requirement for these constraints to be mandatory. Existing archetypes will parse fine, but should be flagged with warnings if cardinality or existences don't change the RM values, or with errors if they violate them.
    • Change Description:
      Hide
      The theoretical basis of the changes is that existence, cardinality and occurrences are normal constraints, like anything else in an archetype, and should only occur in a 'source' archetype when actively overriding either a specialisation parent constraint or the relevant reference model constraint. In flat archetypes, generated by a flattening process involving specialisation parents (if relevant) and the RM, existence, cardinality and occurrences would be mandatory, assuming that the relevant RM constraints are included in the flattening process (this is not 100% necessary, since a archetype-processing engine might use the RM at runtime to determine the base constraints, rather than relying on a completely flat form of a source archetype).

      The changes to the AOM are as follows:

      In the class C_OBJECT
      - occurrences becomes optional
      - changed invariant: Occurrences_validity: (occurrences /= Void and parent /= Void and parent.is_single) implies occurrences.upper <= 1

      In the class C_ATTRIBUTE
      - existence becomes optional
      - changed invariant - Existence_valid: existence /= Void implies (existence.lower >= 0 and existence.upper <= 1)

      In the class C_MULTIPLE_ATTRIBUTE
      - cardinality becomes optional
      - change invariant: Children_occurrences_validity: cardinality /= Void implies cardinality.interval.contains (occurrences_total_range)


      In the ADL specification, change the relevant paragraphs to indicate optionality of existence, cardinality and occurrences in source form archetypes.
      Show
      The theoretical basis of the changes is that existence, cardinality and occurrences are normal constraints, like anything else in an archetype, and should only occur in a 'source' archetype when actively overriding either a specialisation parent constraint or the relevant reference model constraint. In flat archetypes, generated by a flattening process involving specialisation parents (if relevant) and the RM, existence, cardinality and occurrences would be mandatory, assuming that the relevant RM constraints are included in the flattening process (this is not 100% necessary, since a archetype-processing engine might use the RM at runtime to determine the base constraints, rather than relying on a completely flat form of a source archetype). The changes to the AOM are as follows: In the class C_OBJECT - occurrences becomes optional - changed invariant: Occurrences_validity: (occurrences /= Void and parent /= Void and parent.is_single) implies occurrences.upper <= 1 In the class C_ATTRIBUTE - existence becomes optional - changed invariant - Existence_valid: existence /= Void implies (existence.lower >= 0 and existence.upper <= 1) In the class C_MULTIPLE_ATTRIBUTE - cardinality becomes optional - change invariant: Children_occurrences_validity: cardinality /= Void implies cardinality.interval.contains (occurrences_total_range) In the ADL specification, change the relevant paragraphs to indicate optionality of existence, cardinality and occurrences in source form archetypes.

      Description

      Currently existence, occurrences and cardinality are all mandatory in the AOM. However, with reference model checking, this is not required. Existence and cardinality should only be stated when they override, i.e. narrow the reference model value. Occurrences should only be stated when it overrides the RM cardinality for multiply-valued attributes, or existence, for single-valued attributes. E.g. if the cardinality for a multuply-valued attribute is 0..*, then the occurrences will be assumed to be 0..* on each member Object in an archetype unless otherwise stated.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                thomas.beale Thomas Beale
                Reporter:
                thomas.beale Thomas Beale
                Raised By:
                Sam Heard
                Analyst:
                Thomas Beale
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: