Despite the advantages of the availability of this appropriate infrastructure, the definition of situation types, which is a non-trivial task, can still present problems that are hardly detected by modelers by manual model inspection. To take advantage of the concept of situation at the time of design, Costa et. 2012) have proposed a model-driven approach to the specification of situation types (and ultimately the model-driven realization of situation detection).
A PPROACH
In terms of verification, it is possible to locate inconsistent and redundant types of situations, guaranteeing the validity of the situation models for the scope we define. In addition, we also contribute the approach to the simulation and validation of the situation types represented by (3), given that visual simulation already exists as part of the Alloy Analyzer tool.
S TRUCTURE
We describe the new features to be included in the language, show examples of the types of situations with these features, and present the resulting revised metamodel;. The examples shown can be used as guidelines and replicated for many other types of situations and domains;
C ONTEXT , C ONTEXT A WARENESS AND C ONTEXT - AWARE A PPLICATIONS
Thus, a context-aware application can be understood as an application that, in order to offer relevant information and services to the user, captures and makes use of context. Intuitive vision of a context-aware application that interacts with the user and his context (COSTA; ALMEIDA, 2007).
S ITUATIONS
When the property no longer meets the constraints of the situation type, the situation is deactivated, reverting to a past situation (white area of S1). In case the property is returned to meet the requirements of the situation type, a new instance is created.
S ITUATION M ODELING L ANGUAGE (SML)
The Incompatible Treatments situation type is defined here with two cases of the Being Treated situation that overlap in time. If a third fever starts, the situation of intermittent fever is maintained with a new pair of fever cases, thanks to the existential quantifier in the situation type rule.
C ONTEXT M ODELING , THE U NIFIED F OUNDATIONAL O NTOLOGY (UFO) AND
The Ontologically Well-Founded UML Profile
Conversely of rigid classes, an anti-rigid instance can stop instantiating its class at some point. Relatives are moments that represent objectifications of relational properties (eg the treatment is an entity that . . . connects a patient and a hospital through the relation "is treated in"), while modes and qualities stand for moments that are intrinsic properties of the carrier objectify and are also called intrinsic moments.
The OntoUML Infrastructure and Validation Framework
C ONCLUDING R EMARKS
Due to the difference in expressiveness, we need to rethink the SML metamodel to achieve the intended integration, by adapting or incorporating new concepts for the purpose of conforming to an OntoUML context model. In addition to changing the SML metamodel to align with OntoUML concepts, we are also addressing other issues that we have identified as opportunities for improvement for the language. Those other changes are not directly related to the inclusion of the OntoUML model, but emerged in modeling scenarios considered after the language was created.
In any case, the list of improvements we describe below is the result of a number of examples and simulations of situation types, as well as studying the intersections between the old and new (OntoUML-based) context metamodel concepts.
E XTENSIONS R EGARDING A M ORE E XPRESSIVE C ONTEXT M ODEL
Addressing Modal Properties
In the example given, the cardinality of the previous fever situation is one to many. An attribute reference is a reference to a quality (can also be a reference to an attribute) defined in the context model. Listing 4 binds that a MediationLink connects only the elements (the RelatorParticipant and EntityParticipant) that do its respective Mediation relation (respectively Relator and Class) in the context model.
The context model used in this approach is the same healthcare model from Figure 14, and the types of situations will be introduced during the simulation presentation.
Addressing Qualities and Modes
O THER E XTENSIONS /M ODIFICATIONS
Cardinality of Participants
Essentially, a set is used in the same way as multiple instances of the participant in question in the situation type, meaning that participant [2.2] represents essentially the same thing as two participants [1.1]. Therefore, we propose a presentation of the same type of situation that would not involve explicit entities and does not require the presence of entities in the time frame of the composite situation. Not every relationship between elements in an SML model is necessarily established in a contextual model.
We have also defined operations to facilitate the navigation of the model; these operations are used in the transformation of SML models. The SML metamodel presented here refers directly to the concepts of the OntoUML metamodel and binds the situation elements to those previously defined in the context model. Listing 2 binds that a CharacterizationLink only connects the elements (ModeReference and EntityParticipant) that its respective characterization relation does (respectively Mode and Class) in the context model.
The first column represents the SML elements and the second column the corresponding model it generates in the alloy specification. This means that we are mostly concerned with how faithful a formalization is to the conception in the mind of the modeler.
Mutability of Participants
Attribute Links
The owning participant is in turn a reference to the owner of the respective attribute in the context model and can be an entity participant or a relator participant. To establish the distance constraint, two new entity devices are exposed and linked by the equals relationship to the respective devices of the logged in participants so that the attribute location can be referenced. Furthermore, the specific devices on which the logins occurred are not relevant to the defined situation, as only their location matters.
This allows us to refer only to the attributes relevant to the situation type, at the time they are relevant (in the previous example, the previous reported location may be incorrect with the actual device location, as, for example, a cell phone's location change frequently), which allows the designer to abstract from all other properties besides those.
Primitive, Formal and Allen Comparative Relations
Hereby we avoid making changes to the OntoUML metamodel and also exclude the previous formal comparative relations and guarantee that they are exclusively references to the domain-specific formal relations defined in the context model. An equal or other comparative relation could still be defined in the context model and used in SML as a "context-defined" reference. Furthermore, the distinction that existed between comparative and qualitative formal relations disappears, since OntoUML does not distinguish one from the other.
However, we have decided to maintain references to this concept as it represents an important element in SML models.
Functions
Self-Reference Node
Listing 3 shows that a ContextFormalLink links only elements that the corresponding Formal Association does in the context model. To simulate situational type models in Alloy, the modeler must be able to represent the axioms of the situation in the language, requiring knowledge of the logic and the peculiarities of the tool. There world structure and ontological properties such as hardness are already included in the alloy specification.
So, the binding is a statement that says the participation end representing the participant (also an Alloy function {FUN}) and the elements used in the quantification are the same. Additionally, in the validation, modelers can also "demand" the generation of specific model instances that are expected to hold or not. For this reason, studies can be realized to include ways to express the subtleties of obtaining context information (including quality of context) in the language.
Ontologies for probabilistic maritime situational assessment. Cognitive methods in situational awareness and decision-making. In the extension variability scenario, instead of setting the nature of the variability of the entire world population, it is set only to the class extension.
C ONSTRAINTS
W ORLD S TRUCTURE
S TRUCTURAL C HARACTERISTICS OF S ITUATIONS
Before creating the situation type rules in Alloy, we first need to represent the structural aspects of these situations. A situation definition in Alloy is a composition of patterns that together represent what we call the situation axiom. However, Table 2 shows the remaining patterns created from the situation type elements and applied to the structural module of the Alloy specification.
The first and second lines represent the situation type declaration and the usual situation predicates of uniqueness, continuity, and rigidity, respectively.
T HE S ITUATION M ODULE
In Alloy, a situation axiom is constructed by quantifying elements of the world, applying constraints to them, and then binding them to the situation in question. The [
Finally,
Q UALITY C RITERIA AND P ROBLEMATIC S ITUATION T YPES
To evaluate situational models for accuracy and coverage, we use a lightweight formal approach that involves simulating and validating these models in Alloy (JACKSON, 2006). An inconsistent definition of a situation type specifies an impossible combination of conditions for context elements and would likely result from a design error. A trivial example of an inconsistent type of situation in a healthcare setting would be the complex situation of hypothermia and fever at the same time.
A redundant situation type can arise from different forms of specification that actually involve the same context conditions.
V ALIDATION /S IMULATION S CENARIOS
- The Alloy Analyzer
- Inconsistency
- Redundancy
- Unintended states
In the above example, we manipulated the performance so that at least one instance of heat occurs. When the user presses next in the instance window, the analyzer will offer other instances, usually growing in complexity, allowing random model checks. The situation of possible infection states that two people were treated in the same hospital during the same period of time, one was healthy and the other was infected.
This situation arises for a number of reasons: the same patient can undergo different treatments at the same time in the same hospital (defined by our context model, which is reasonable) and thus can be the patient of both situations being treated;
C ONTRIBUTIONS AND C ONCLUSIONS
R ELATED W ORKS
Ontology-based Situation Specification
In a situation-aware application engineering process, we argue that expressivity should first be addressed at the highest level, when modeling the system, so that the details of the elements are captured. In addition, OntoUML can be automatically transformed into OWL (BARCELOS et al., 2013), so that designers can take advantage of the inference and processability inherent in the latter language. Finally, (COSTA et al., 2012) and (MIELKE, 2013) proposed a specification of the type of situation that served as the basis for this thesis.
By using OntoUML, we were able to improve the quality of the context specification, also extend and increase the expressiveness of the situation type models.
Situation Validation
L IMITATIONS AND F UTURE W ORK
Addressing quality of context in the modeling phase poses a challenge that is dealing with uncertainty at a higher level. Furthermore, the extension of the language created a gap in the concrete syntax of the language and in the runtime support of SML, namely in the SCENE platform. Conversely, in descending branches, we reverse this restriction: if an individual does not exist in the initial world of the branch (the one that has no predecessor), it will never come to life.
For example, one might require that the Person class always have exactly three objects instantiating it in every world in the created branch.