UML Generalization::isSubstitutable()

On page 180 of the UML 2.5.1 specification under section 9.9.7.4 “Attributes” for Generalization, the default for the Boolean return value doesn’t make any sense to me if a null Boolean can be returned. Here is the description:

isSubstitutable : Boolean [0..1] = true

Indicates whether the specific Classifier can be used wherever the general Classifier can be used. If true, the
execution traces of the specific Classifier shall be a superset of the execution traces of the general Classifier. If
false, there is no such constraint on execution traces. If unset, the modeler has not stated whether there is such
a constraint or not.

Default values are meant to be used if there is no other value given; however, this is already the case if a null Boolean value is returned, indicating that “the modeler has not specified whether there is such a constraint or not.” Clients querying this attribute would never see the null Boolean if a default is returned and thus could not determine the intent, or lack of it, on the modeler’s part, so why the extra default value?

I would think that the declaration of this attribute should either be without any default value, or with multiplicity 1..1 and some default value … whether or not true makes more sense here than false is also debatable. If it were up to me, I would leave off the default value entirely and just set the multiplicity to 1..1.

Would be nice if someone could explain this to me?

8

About the default value:

I think true is a good default value, given the concept of generalization. Normally, if an instance of X plays a role in some algorithm, then an instance of Y, where X is a generalization of Y, can also play a role in that algorithm. For example, if I have a webshop selling bicycles, where Bicycle is a generalization of MountainBike, TouringBike etc, then the sales process for Bicycle also applies to MountainBike and TouringBike.

In other cases, the modeler may wish to set it to false. For example, if I have class Polygon with method AddVertex(), then the generalization of classes Triangle and Square are not substitutable.

About the multiplicity:

I think [0..1] is a good multiplicity. True means substitutable, false means not substitutable, unset means substitutability not guaranteed. If the multipliticy were [1..1], the modeler would not have the option to indicate the latter. For example, the modeler may not have enough information to decide whether all functionality offered for Bicycle also applies to the newly introduced SuperBike.

About the combination of a default value and multiplicity [0..1]:

This is perfectly allright. The default value is the value you most probably want and the multiplicity [0..1] gives you the option to clear the value.

You may disagree with the above and you may wish to discuss improving the UML specs, but that’s not something StackOverflow is for.

9

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật