Search This Blog

Friday, September 27, 2013

Higher Order Universals

In this video I discuss Higher Order Universals, Powertypes and how one may interpret them while modeling in OntoUML.


The video is in portuguese. I will upload it in English, if requested in the comments of this post.

Please comment on the subject on the youtube video comments to help centralize the discussion.

Thursday, September 26, 2013

Kind, Collective and Quantity vs Agent, Object, Social and Physical

This is the second post of the issue series, which aims to validate the following fraction of the UFO-C ontology:



As we did on the previous post, lets review the definitions os each concept before we present the issue itself. We translated some definitions from Zamborlini's MSc. Thesis, entitled 'Study of Alternatives for Mapping Ontologies in OntoUML to OWL: Approaches for the Representation of Temporal Information'1, for many found her explanations "user friendly" :)

UFO-A

Substance: A general type which contains individuals whose identities are well defined.

Functional Complex Individual: General category whose instances are all individuals that instantiate a Kind universal. A functional complex is the one whose instances can be composed of other functional complexes as long as the parts have different functions regarding the whole. For example, the human body is a functional complex composed of many parts with different functions such as the heart and the brain.

Collective Individual: General category whose instances are all individuals that instantiate a Collective universal. In opposition to functional complexes, instances of Collective have parts which play the same function regarding the whole. We can exemplify the concept using Forest (a set of trees) or Book Stack (an ordered set of books).

Quantity Individual: General category whose instances are all individuals that instantiate a Quantity universal. Quantity is a type which aggregates individuals which are maximal portions of an amount of matter, like the amount of water inside a glass.

UFO-C

Social Substance: Individuals which are intangible and are the product of a social convention and exists while recognized by a community.

Physical Substance: Tangible individuals which have physical properties such as mass, volume and dimensions. 

Agent: Individuals that have agentive properties, i.e. have Intentions and are capable to act (perform Actions) in order to fulfill them, besides being capable of perceiving.

Object: Opposed to Agents, Objects are passive entities, they cannot do anything, only be used (or participate) in events.

With those concepts in mind, we can now discuss our issue!

Looking at that model, one can see that every instance of Substance must also be an instance of exactly one subtype of each generalization set, because they are all disjoint and complete. The whole set of combinations is:
  1. Functional Complex, Agent, Physical
  2. Functional Complex, Agent, Social
  3. Functional Complex, Object, Physical
  4. Functional Complex, Object, Social
  5. Quantity, Agent, Physical
  6. Quantity, Agent, Social
  7. Quantity, Object, Physical
  8. Quantity, Object, Social
  9. Collective, Agent, Physical
  10. Collective, Agent, Social
  11. Collective, Object, Physical
  12. Collective, Object, Social
The issue we would like to discuss in this post is if all these combinations are valid and should be allowed by the ontology. 

From our intuition and common sense, we are tempted to say that every quantity should be a Physical Substance and also an Object. What implies that combinations 5, 6 and 8 should be forbidden. The reasoning behind it is quite simples: Quantities represent maximal portions of amounts of matter; if something is an amount of matter, then it must be physical, so that someone could touch it, or see it... but again, if something is matter, it cannot really do anything, being really hard to picture an amount of matter with intentions or having any other agentive property.

Regarding collectives, we only raise the question regarding its tangibility, which is: can there really be physical collectives? When we think about some examples like of collections like Wolf Pack, Forest, Orchestra and Fleet, they all seem like social entities, although composed of physical ones. The Brazilian Symphony Orchestra, for example, although composed by musicians (clearly physical entities), does not have a physical reference in the world itself. What makes this position controversial is that we tend to attach physical properties to social objects. Sentences like: "Where is the orchestra playing tonight?", "The area of the Amazon forest is shrinking everyday." and "The english fleet is moving south" are totally acceptable in natural language. Summing up, we are not quite sure about this restriction, but if was enforced, combinations 9 and 11 would be forbidden. 

The remainder combinations, including all the ones with Functional Complex, seem to be acceptable for us... What do you guys think?

Cheers,
Tiago and Bernardo




1 In portuguese: 'Estudo de Alternativas de Mapeamento de Ontologias da Linguagem OntoUML para OWL: Abordagens para Representação de Informação Temporal (download) '

Wednesday, September 25, 2013

OntoUML model V&V tutorial: using OLED tools

Verification and Validation (V&V) are independent procedures that are used together for checking that a product, service, or system meets requirements and specifications and that it fulfills its intended purpose. Research done at NEMO has amounted to a set of tools called OLED (OntoUML Lightweight Editor). OLED offers a modeling environment that allows V&V and is available at google code. In this post we will focus on OLED but other tool support for OntoUML are available at the NEMO website.

You may download OLED as an executable .jar file and start using it straight away or you can checkout the code using svn and compile it yourself. Having any trouble with the tool please report to the issues page so that the problem may be tracked and fixed, which is more efficient than emailing the developers. Do feel free to approach us with any questions in the comments of this post or via e-mail.

Besides the modeling interface to model using OntoUML's stereotypes, OLED offers a range of tools to Verify, Validate and Transform models. Model transformation is done in an MDD approach which is traditional in NEMO research. The following tools are offered on OLED:
  • Transform to Alloy
  • Transform to OWL 
  • Transform to SVBR
  • Transform to text description
  • Auto completion of forgotten model elements
  • Infer relations
  • Model syntax verification
  • Anti-Pattern detection
  • OCL writing and parsing

The tool support bar. Each icon is explained below
Next we will give a tutorial to contextualize how one may go about using these tools.


  1. Click on "New project". This creates a blank diagram to edit.
  2. Create a model by clicking on the proper class on the left toolbox ("Elements") and then click on the diagram to place the new class. Relationships are available on the same toolbox as the classes, you have to click on "Relationships" to unveil the relations you may use. Try a model such as the one below. To edit cardinalities, double click the relationship.

  3. This model should show no warningsor errors, but you may delete one of the generalization relations to experiment and generate a warning. You may also test the syntactic verification which will instruct you about the rules you violated.
    OCL writing and checking and the "auto complete" option
    are useful for larger models and we will refrain from addressing them now. OCL is used for defining rules and auto-complete is used for correctly transforming fractions of the model.
  4. You may also "Detect anti-patterns" , these are based on diagram structure and are the source of errors found in many OntoUML diagrams. Refer to Sales, Barcelos and Guizzardi on "Identification of Semantic Anti-Patterns in Ontology-Driven Conceptual Modeling via Visual Simulation", 2012 for more information on Anti-Patterns. If you test the tool you will see that, even on this very simple example model, an anti-pattern occurs. While this does not mean that the model is wrong, it does call for close investigation as it is a recurring problem.
  5. The last tool before we talk about transformations is the Infer Relation tool . This tool generates relationships that can be derived from the language's rules. In the model presented previously, a material relationship between student and school can be derived, as the derivation relationship between the relationship and the enrollment relator is established.
  6. Last but not least, there is the Alloy transformation and the OWL, SVBR and text transformations. These are part of the MDD approach carried by NEMO. There are many flavours of OWL transformations, each of which presume one or another design decision. The SVBR and text transformations are aids to understand ("read") the model. While OWL transformations are useful for a number of reasons, the Alloy transformation is particularly useful for model quality as it may be used for validation activities. The transformed Alloy model performs as a simulation of the OntoUML model. By observing the creation, change and destruction of model instances, one may understand what is implied by the model specification and be confronted with the consequences of modelling decisions.


Rigidity: Rigid, Anti-Rigid and Semi-Rigid types

For those who are not familiar with the rigidity notion, we will now briefly review it, heavily based on Prof. Guizzardi's PhD Thesis, 'Ontological Foundations of Structural Conceptual Models':

Types in OntoUML may be either rigid, anti-rigid or semi-rigid. That is, they may have their rigidity meta-property "set" in three different ways:
  • If an individual is an instance of a rigid type in a given point of time, it must necessarily be so during its whole existence, either in the past or in the future. The concept of Person is rigid because every person, e.g. John, is always a person while he exists. Other examples of rigid types are: Organization, Forest and Ship. The opposite of rigid is non-rigid, and describes types that do not necessarily characterize all their instances throughout their lifecycle. 
  • Non-rigid types can also be anti-rigid, which means that individuals instantiate them contingently, i.e., if an individual instantiates the type in a given situation, there is at least one other situation in which the individual does not instantiate it. The classical example for anti-rigid types is Student. According to common sense, people may become a student during a part of their life and later on cease to be one. Other examples of anti-rigid concepts are husband, employee and child. 
  • Semi-rigid types are non-rigid but are not anti-rigid. These types can be seen as a "mix" rigidiy and anti-rigidity. For some types, they function as rigid types, for others, as anti-rigid. Prof. Guizzardi's example for a semi-rigid type is Seatable. For some individuals, it is a necessary for them to be seatable, like chair. On the other hand, crates may be "seatable" only while their structure is steady.

Are Agent and Object types Rigid?


This is the first post of a series discussing issues we identified during the refactoring of the UFO-C ontology into an OntoUML model. 

The first issue concerns the rigidity meta-property of two very important concepts of the ontology: Object and Agent. For those who are not familiar with the rigidity notion, please refer to our previous post about rigidity.

What we understood from the definition of Agent in the ontology is that it is something (or someone) that has Intentions and is capable to act (perform Actions) in order to fulfill them, besides being capable of perceiving Events. We refer to these two characteristics as the agentive properties of a Substance. Opposed to Agents, Objects are passive entities, they cannot do anything, only be used (or participate) in events (a more detailed description of Agent and Object can be found here). 

All that being said, let's go back to our open issue: How to classify the Agent and Object types according to the rigidity meta-property? Our first intuition was to represent them as rigid types (using the «category» stereotype). After a while, we were not so sure anymore...

Consider the following thought experiment that ilustrates why:

Lets create a domain ontology which uses UFO-C and that has the concept of Person. We decide to model it as a «kind», a rigid type which provides the identity principle for its instances. Now we have to classify it as an Agent or an Object. Considering that people have intentions (e.g. becoming a PhD) and can do (e.g. enroll in a graduate program) and perceive events and actions (e.g. understanding the acceptance of a paper), we intuitively choose to represent that the «kind» Person is a subtype of «category» Agent. Now, consider we also want to include in the ontology that people can die, so we create two anti-rigid subtypes of «kind» Person: «phase» Living Person and «phase» Deceased Person. Now think: Is it still true that every person, alive or deceased, has all agentive characteristics?

Our intuition "screamed" no!!! People are agents while they live, and cease to be so when they die, and thus become social objects. In other to allow the representation of the described conceptualization, we cannot say that Agent and Objects are rigid types. From that conclusion, two possibilities remain: semi-rigidity or anti-rigity. Since it is possible to conceive so many situations in which we want to express rigid subtypes of agents, semi-rigidity is the most suitable choice. 

Our final conclusion is that, in OntoUML, the types Agent and Object are semi-rigid, and thus Mixins!

How do you guys feel about that? 

Cheers,
Tiago e Bernardo


Wednesday, September 18, 2013

The problem of Universals

One of the toughest problems we faced in this project was defining Higher Order Universals. Understanding them is relevant, among other things, to model what would be grosso modo Powertypes from UML. These still do not have an ontological interpretation on ontoUML, e.g. to model both "action" and "action type", how would one stereotype "action type"?

Discussing the subject lead us back to analysing "The problem of Universals" . Check Joey B.'s discussion on the subject in three episodes: 1 2 3

Wednesday, September 11, 2013

this is how I feel when...


...I validate my model for the first time


Seriously, people who start using OLED and the Alloy model simulation at first are shocked at how terrible flawed and naïve their carefully thought out models truly are. Slowly, users develop a deep humility towards modeling and realize how deeply difficult the task is. OLED offers a range of tools for better defining models, once the simulation reveals the flaw.

I can't stress enough the importance of model validation. This is a quote from USA DoD Recomended Practices Guide on Validation:
The validation process establishes the faithfulness of the model or simulation to the thing being represented, the simuland.  Validation provides a crucial piece of evidence to support model or simulation credibility for a particular application.  The validity of a model or simulation also helps reduce the risk. (...) The introductory section of the reference document, A Practitioner’s Perspective on Simulation Validation, adds further insight into the link between model or simulation validity and credibility.
Validation helps you fail gracefully, in the intimacy of your lab or company. It gives you confidence over the produced artifact and credibility with the stakeholders. Without validation such inescapable human error will inevitably be revealed in prime time, at your client's hands. And you may only hope that such flaw does not cause any losses.