/***************************************************************** Followed is typechecking of the renaming classage None of the expressions, unless noted otherwise, typecheck ******************************************************************/ // V does not exist // classage B = V rename X >> M // T is not an interface in A // classage C = A rename T >> M // the resulting classage would have interfaces of the same name // classage D = A rename Y >> X // cyclic dependency // classage E = F rename X >> M // classage F = E rename X >> N /***************************************************************** Followed is typechecking of rename classage constructors None of the expressions, unless noted otherwise, typecheck ******************************************************************/ // a constructor must have the same name as the classage name // classage URem1 = U rename E >> F { // URem2() { :U(); } // } // can not find F as a participant classage classage URem2 = U rename E >> F { URem2() { :F(); } } // can not find Atomic1 as a participant classage. Atomic1 does exist // but is not a participant classage URem21 = U rename E >> F { URem21() { :A(); } } // participant classsage constructor: // can not find appropriate constructor, does not exist at all classage URem3 = U rename E >> F { URem3() { :U(true); } } // participant classsage constructor: // can not find appropriate constructor, subtyping violation classage URem4 = U rename E >> F { URem4() { :U(create Sub2()); } } // self constructor: // can not find appropriate constructor, does not exist at all classage URem5 = U rename E >> F { URem5() { this(true); } } // self constructor: // can not find appropriate constructor, subtyping violation classage URem6 = U rename E >> F { URem6() { this(create Sub2()); } URem6(Sub1 x) { } } /***************************************************************** Some definition used by above ******************************************************************/ classage A { mixer X { } plugger Y { } connector Z { } } classage U { mixer E { export void a(int x) {} } U() { } U(Sub1 x) {} } classage Sub1 { connector E { export void a() { return; } } } classage Sub2 { connector E { export void a() { return; } import void c() } }