Graphical design component

r5 - 04 May 2006 - 11:26:30 - GregorHagedornYou are here: TWiki >  SDD Web > ClosedTopicSchemaDiscussionSDD09 > ConstraintsAndTypeSafety

ConstraintsAndTypeSafety

(Not sure if this is the right expression of the issue). (This discussion references SDD 0.9beta16). To prevent proliferation of types, we tend to use a single base type of key and of keyref. But often the identity constraints on the uses of keyrefs are in the place where the keyrefs are used and may (a) escape notice and (b)it is confusing that this is actually enforcing that uniqueness of the keys is only up to the place where the keyref constraints are defined. For example, among the three kinds of Frequency modifiers, and the GeneralModifier and the CertaintyModifier that can be on a State, there can be overlap in the keys because each has different constraints expressed in the keyrefs. One clarifying approach might be to make each key/keyref pair in use in these contexts have a different type name showing the context, even though the constraint itself determines it and it will be impossible, say, ato have a keyref where an CertaintyModifier reference is required accidentally reference a Frequency key even should the keys be the same as strings (or, more properly, as integers)

Related(?) question: HowDoCodeGeneratorsEnforceIdentityConstraints??

-- BobMorris - 01 Nov 2003

Edit | Attach | Printable | Backlinks: Web, All Webs | History: r5 < r4 < r3 < r2 < r1 | More topic actions
SDD.ConstraintsAndTypeSafety moved from SDD.DerivationsFromTypesWhereTheDerivationsHaveDifferentConstraints on 01 Nov 2003 - 23:03 by BobMorris - put it back
 
Back to TDWG Homepage TDWG Wiki > SDD
This site is powered by the TWiki collaboration platform

Valid XHTML 1.0 Transitional
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback