A new way of crosscutting roles in set oriented programming - Saeid Masoumi; Ali Mahjur (Journal of King Saud University: Computer and Information Sciences)
In the past twenty years, dozens of collaboration-based languages have emerged. Often they have an abstraction to denote a collaboration. Most of them use a form of single inheritance to build collaboration from another one. In this model, when a collaboration uses another one, every role class in the sub collaboration inherits from a role class in the super collaboration which has the same name. This affects the reusability of roles and collaborations and makes them semi interactive.To overcome this problem, this paper uses a new collaboration-based language named Set Oriented Programming (SOP). In SOP, collaborations, instead of being inherited, are composed with each other. To improve the reusability of SOP roles and to make them interactive, events are used. Events cause interaction of roles by crosscutting them. Moreover, a new context problem is discussed and dynamic context solution is proposed by delegations. Finally, we show that events improve the reusability and delegations concur context problem.