{ * File: E9.sml.txt * Author: Michael Schrefl, Bernd Neumayr, Manfred Jeusfeld * Created: 1-Jul-2013/M.Jeusfeld (1-Jul-2013/M.Jeusfeld) * ------------------------------------------------------ * E9: DDI Multi Range * from slides DualDeepInstantiation.ppt (M.S.), slide 9 * } Mileage in ALABEL end LinearMeasure in OBJECT end MetricLinearMeasure in OBJECT with IN c1: LinearMeasure end ImperialLinearMeasure in OBJECT with IN c1: LinearMeasure end km in OBJECT with IN c1: MetricLinearMeasure end "12km" in OBJECT with IN c1: km end {* Since VolvoV50 has two Mileage attributes, we need to define at an upper level a more abstract version of Mileage from which the two Mileages of VolvoV50 are instantiated (or specialized) *} CarModel in OBJECT with linkDR m1: LinearMeasure end CarModel!m1 with sourcelevel s: 2 targetlevel t: 3 label l: Mileage end VolvoV50 in OBJECT with IN c1: CarModel linkDR m1: MetricLinearMeasure linkDR m2: ImperialLinearMeasure end VolvoV50!m1 with sourcelevel s: 1 targetlevel t: 2 label l: Mileage end VolvoV50!m2 with sourcelevel s: 1 targetlevel t: 2 label l: Mileage end myV50 in OBJECT with IN c1: VolvoV50 linkDR m1: "12km" end myV50!m1 with sourcelevel s: 0 targetlevel t: 0 label l: Mileage end