interface I { in void e(); out void f(); out void g(); behaviour { bool b = true; bool c = true; on e: { [b] {b = !b; f;} [otherwise] { [c] {c = !c; g;} [otherwise] { b = false; c = false; } } } } } component otherwiseNested { provides I p; behaviour { bool b = true; bool c = true; on p.e(): { [b] {b = !b; p.f();} [otherwise] { [c] {c = !c; p.g();} [otherwise] { b = false; c = false; } } } } }