Issue 10969: Usage of initialization and derivation constraints on the same property (ocl2-rtf) Source: International Business Machines (Mr. Andreas Maier, maiera(at)de.ibm.com) Nature: Clarification Severity: Minor Summary: The OCL 2.0 spec seems to allow usage of initialization constraints and derivation constraints on the same property. For example in 7.3.7, it says "Initial and derivation expressions may be mixed together after one context.", which is a string indication that it is not precluded. Having both initialization and derivation constraints is an overspecification of the initial value of the property, since the derivation constraint must be satisfied at any time, which probably includes the initialization time. Also, the spec does not seem to contain a statement about how many initialization and derivation constraints are allowed on a property. By the nature of these constraints, it seems sensible to have at most one of them. The following clarifications are suggested to address this issue: (1) clarify whether "at any time" for derivation constraints includes the initialization. Suggestion: Derivation should include initialization. (2) clarify whether both kinds of constraints are allowed on the same property. Suggestion: Both are allowed but must not be contradictory. (3) clarify how many initialization and derivation constraints are allowed on a property. Suggestion: At most one initialization constraint and at most one derivation constraint. Resolution: Revised Text: At the end of Section 7.3.7, add the following paragraph: "The derivation constraint must be satisfied at any time, hence the derivation includes the initialization. Both are allowed on the same property but they must not be contradictory. For each property there should be at most one initialization constraint and at most one derivation constraint. Actions taken: April 25, 2007: received issue October 16, 2009: closed issue Discussion: The suggested clarifications make sense. Added in section 7.3.7. Revised Text: End of Annotations:===== ubject: OCL issue: Usage of initialization and derivation constraints on the same property To: issues@omg.org Cc: Branislav Selic , Pete Rivett , Christian Damus , Jos Warmer X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 From: Andreas Maier Date: Wed, 25 Apr 2007 08:14:45 +0200 X-MIMETrack: Serialize by Router on D12ML066/12/M/IBM(Release 7.0.2HF71 | November 3, 2006) at 25/04/2007 08:16:25 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at omg.org Hi, after short discussion on the Eclipse OCL news group, we found the following issue. Could you please add this to the issues list ? Issue: Usage of initialization and derivation constraints on the same property Nature: Clarification Severity: Minor Summary: The OCL 2.0 spec seems to allow usage of initialization constraints and derivation constraints on the same property. For example in 7.3.7, it says "Initial and derivation expressions may be mixed together after one context.", which is a string indication that it is not precluded. Having both initialization and derivation constraints is an overspecification of the initial value of the property, since the derivation constraint must be satisfied at any time, which probably includes the initialization time. Also, the spec does not seem to contain a statement about how many initialization and derivation constraints are allowed on a property. By the nature of these constraints, it seems sensible to have at most one of them. The following clarifications are suggested to address this issue: (1) clarify whether "at any time" for derivation constraints includes the initialization. Suggestion: Derivation should include initialization. (2) clarify whether both kinds of constraints are allowed on the same property. Suggestion: Both are allowed but must not be contradictory. (3) clarify how many initialization and derivation constraints are allowed on a property. Suggestion: At most one initialization constraint and at most one derivation constraint. Andy Andreas Maier IBM Senior Technical Staff Member, Systems Management Architecture & Design IBM Development Laboratory Boeblingen, Germany maiera@de.ibm.com, +49-7031-16-3654 ________________________________________________________________________________________________ IBM Deutschland Entwicklung GmbH; Vorsitzender des Aufsichtsrats: Johann Weihen, Geschaeftsfuehrung: Herbert Kircher; Sitz der Gesellschaft: Boeblingen, Registergericht: Amtsgericht Stuttgart, HRB 243294