This document proposes a unified model of subjectivity for programming called Subjectopia. It summarizes previous approaches that consider subjectivity through perspectives, roles, and context-oriented programming. The Subjectopia model represents subjectivity using three main elements: Subjects to represent programming entities, Decision Strategies to determine their behavior, and Contextual Elements that influence strategies. It illustrates how this model can represent prior work and provides examples of its implementation.
77. Subjectopia
Subject
Decision Contextual
Strategy Element
scg.unibe.ch/research/subjectopia
Notas del editor
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Perspective-layer-piece\n
Perspective-layer-piece\n
Perspective-layer-piece\n
\n
\n
\n
\n
\n
\n
\n
Although formally the approaches are equivalent in expressive power, they are not equally suitable in all circumstances. Each of these approaches imposes a particular modeling paradigm which may be appropriate for certain problem domains, but not for others.\n
Consider the use case where a user wants to send an email using a mobile device [4]. If the network is available the email should be sent immediately, otherwise the email should be saved and sent when possible. Modeling the network with either roles or perspectives does not make sense. This subjective problem is not about roles of networks or emails, or about perspectives through which they may be seen, but rather about whether the network is available in the current context. Whereas COP or SMB might be more appropriate for modeling subjectivity in this domain, perspectives or roles would be more suitable to model behavior that varies with respect to the sender of a message.\n\ngroup programming - yes: perspective, not SMB\nWhere is the decision is also important.\nmail delivery: yes SMB, not COP, list of influencers not layers\n
Smith and Ungar A Simple and Unifying Approach to Subjective Objects\n
Great for SMB but not good for Roles, or COP\n
Modeling context is really hard because is subjective to the problem domain.\nWe end up with collections.\nWe are modeling the subjectivity of subjectivity.\n
\n
\n
\n
\n
\n
\n
not all approaches solves all problems.\n
delegated to the decision strategy with decideOn: anObject\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
that it is a cool, large and open source platform for data and software analysis that is being increasingly used in industrial projects\n
We model the decision of what to do in each visualization in the decision strategy.\n
\n
\n
\n
\n
The problem is that some visualizations may require contextual information\nnot retrievable from the objects and subjects involved in the communication. Let us consider that we select a group of classes and that we want to view them as highlighted on the overall system complexity. This can be achieved by sending the message viewAsSelectionOnSystemComplexity to the group. This behavior also requires all other FamixClass entities of the model to create this visualization. However, in different analysis contexts we want to see only a sub- set of all classes as a basis for the visualization. Thus, the simple action of viewAsSelectionOnSystemComplexity requires both the receiving group and the reference group. Moose currently uses model-wise global variables to store this information. The problem is that each new instance of the graphical user inter- face of Moose can override the value of that global variable and this results in unwanted side effects.\n
width: attributes\nheight: methods\ncolor: lines of code\n
\n
\n
\n
Our solution uses contextual elements to model the additional, contextsensitive information. The context influencing the behavior of the selected FamixClass group is all FamixClass entities of that model. Therefore, each model creates and maintains its own set of contextual elements holding all of its FamixClass entities for each user interface. We use a decision strategy modeling the behavior for the message viewAsSelectionOnSystemComplexity. The decision strategy has access to the contextual elements of its model, i.e., all FamixClass entities of the model. The decision strategy determines, using the meta-information of the message, which interface has sent the message and accordingly uses that contextual element.\n
Our solution uses contextual elements to model the additional, contextsensitive information. The context influencing the behavior of the selected FamixClass group is all FamixClass entities of that model. Therefore, each model creates and maintains its own set of contextual elements holding all of its FamixClass entities for each user interface. We use a decision strategy modeling the behavior for the message viewAsSelectionOnSystemComplexity. The decision strategy has access to the contextual elements of its model, i.e., all FamixClass entities of the model. The decision strategy determines, using the meta-information of the message, which interface has sent the message and accordingly uses that contextual element.\n
The problem is that some visualizations may require contextual information\nnot retrievable from the objects and subjects involved in the communication. Let us consider that we select a group of classes and that we want to view them as highlighted on the overall system complexity. This can be achieved by sending the message viewAsSelectionOnSystemComplexity to the group. This behavior also requires all other FamixClass entities of the model to create this visualization. However, in different analysis contexts we want to see only a sub- set of all classes as a basis for the visualization. Thus, the simple action of viewAsSelectionOnSystemComplexity requires both the receiving group and the reference group. Moose currently uses model-wise global variables to store this information. The problem is that each new instance of the graphical user inter- face of Moose can override the value of that global variable and this results in unwanted side effects.\n
\n
Our solution uses contextual elements to model the additional, contextsensitive information. The context influencing the behavior of the selected FamixClass group is all FamixClass entities of that model. Therefore, each model creates and maintains its own set of contextual elements holding all of its FamixClass entities for each user interface. We use a decision strategy modeling the behavior for the message viewAsSelectionOnSystemComplexity. The decision strategy has access to the contextual elements of its model, i.e., all FamixClass entities of the model. The decision strategy determines, using the meta-information of the message, which interface has sent the message and accordingly uses that contextual element.\n
The problem is that some visualizations may require contextual information\nnot retrievable from the objects and subjects involved in the communication. Let us consider that we select a group of classes and that we want to view them as highlighted on the overall system complexity. This can be achieved by sending the message viewAsSelectionOnSystemComplexity to the group. This behavior also requires all other FamixClass entities of the model to create this visualization. However, in different analysis contexts we want to see only a sub- set of all classes as a basis for the visualization. Thus, the simple action of viewAsSelectionOnSystemComplexity requires both the receiving group and the reference group. Moose currently uses model-wise global variables to store this information. The problem is that each new instance of the graphical user inter- face of Moose can override the value of that global variable and this results in unwanted side effects.\n
The problem is that some visualizations may require contextual information\nnot retrievable from the objects and subjects involved in the communication. Let us consider that we select a group of classes and that we want to view them as highlighted on the overall system complexity. This can be achieved by sending the message viewAsSelectionOnSystemComplexity to the group. This behavior also requires all other FamixClass entities of the model to create this visualization. However, in different analysis contexts we want to see only a sub- set of all classes as a basis for the visualization. Thus, the simple action of viewAsSelectionOnSystemComplexity requires both the receiving group and the reference group. Moose currently uses model-wise global variables to store this information. The problem is that each new instance of the graphical user inter- face of Moose can override the value of that global variable and this results in unwanted side effects.\n
\n
\n
applies meta-objects to add the required behavior to the object that should be subjective, add decision strategy and so on.\n