following is mentioned in the exercise question...
1) What does "you can insert them together in one step"In this exercise, you have
to specify them in the linearization, but you can insert them together in one step.
Provide the linearization, including all intermediate steps of the algorithm, even for the resolution of the » operator,
for trait D, and the classes E, F, G.
Does it means that
Code: Alles auswählen
Lin("G", Lin("C")) ===
Lin("G", LinResult("X", "X", "X"))
Code: Alles auswählen
Lin("G", LinResult("X", "X", "X"))
for example I would do something like this
Code: Alles auswählen
class A { print("A") }
trait H { print("H") }
trait S extends H { print("S") }
trait R { print("R ") }
trait T extends R with H { print("T") }
class B extends A with T with S { print("B") }
new B // A R H T S B
// lin(B) = B >> lin(S) >> lin(T) >> lin(A)
// = B >> (S >> H) >> (T >> H >> R) >> A
// = B >> S >> T >> H >> R >> A
The problem is not what to do it but since there is no documentation or example how to use those methods provided in DSL, I have no idea as how to do it. Please provide example usage of your methods as there are also no test cases so how do I know if I have done something right or wrong?
Thanks,