In this paper we introduce a new view on roles in Object Oriented programming languages, based on an ontological analysis of roles. A role is always associated with an object instance playing the role and also to an object instance (its institution) which represents its context. The definition of a role depends on the definition of the institution. This property allows to endow role-players with powers that can modify the state of the institution and of the other roles defined in it. As an example, we introduce a role construct in Java, where the abolve features are interpreted as follows. Roles are implemented as classes, which can be instantiated only in presence of an instance of the player and of an instance of an institution. The definition of a class implementing a role is included in the class of the institution, the role belongs to. Powers are methods which can access private fields and methods of the institution they belong to, and of the other roles of the same institution.

powerjava: Ontologically Founded Roles in Object Oriented Programming Languages

BALDONI, Matteo;BOELLA, Guido;
2006-01-01

Abstract

In this paper we introduce a new view on roles in Object Oriented programming languages, based on an ontological analysis of roles. A role is always associated with an object instance playing the role and also to an object instance (its institution) which represents its context. The definition of a role depends on the definition of the institution. This property allows to endow role-players with powers that can modify the state of the institution and of the other roles defined in it. As an example, we introduce a role construct in Java, where the abolve features are interpreted as follows. Roles are implemented as classes, which can be instantiated only in presence of an instance of the player and of an instance of an institution. The definition of a class implementing a role is included in the class of the institution, the role belongs to. Powers are methods which can access private fields and methods of the institution they belong to, and of the other roles of the same institution.
ACM Symposium on Applied Computing, SAC 2006, Special Track on Object-Oriented Programming Languages and Systems (OOPS 2006
Dijon, France
27-4-2006
Proc. of 21st ACM Symposium on Applied Computing, SAC 2006, Special Track on Object-Oriented Programming Languages and Systems (OOPS 2006)
ACM Press
1414
1418
9781595931085
M. BALDONI; G. BOELLA; L. VAN DER TORRE
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2318/1835
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 17
  • ???jsp.display-item.citation.isi??? ND
social impact