solutions for semantic web (OWL ontologies, SPARQL, reasoning) and model driven development (metamodel, model design, model transformation, code generation)

TwoUse Toolkit: More than 4000 visits in 11 months.

| Saturday, October 2, 2010
As we get close to the first anniversary of the TwoUse Toolkit, we take a look at the audience interested in the tool. In the last 11 months, more than 4000 visitors from 81 countries visited our web site

Let's keep up the good work!

Templates in OWL Ontologies

| Friday, September 10, 2010

Towards Hybrid Reasoning for Verifying and Validating Multilevel Models

| Wednesday, September 8, 2010
Ontologies and its reasoning services are expected to play an important role in many application domains, as well as in software engineering in general. In model-driven engineering (MDE), models, like UML models, represent and specify software systems.

One problem with using ontologies within software engineering is that while model-driven engineering realizes a four-layer metamodelling architecture, the new version of OWL Web Ontology Language, called OWL 2, it supports only simple metamodelling. Moreover, the semantics of metamodelling in OWL 2 corresponds to the contextual semantics which leads to non-intuitive results. Another issue is that the Open World Assumption (OWA) assumes a model is incomplete. Therefore, we could not validate some constrains in OWA.

We demonstrate multilevel (meta-) modelling using ontologies described in OWL FA, which has a well defined fixed-layered architecture and semantics. As well as an approach to integrate Closed World Assumption (CWA) with OWA in order to use both assumptions for verifying and validating multilevel model.

This joint work with the University of Aberdeen will be presented
at the EKAW conference, October, Lisbon

Specialization and Validation of Statecharts in OWL

It is germane in the engineering process of knowledge bases to represent a model on different abstraction levels, developed and refined by different engineers. Hence, they are initially described at a level of coarse granularity and then refined into a more specific representation.

Given two behavior models like statecharts, it is a challenging task to decide whether one statechart is still a valid specialization of the other, more abstract model. We use OWL to model statecharts and to validate statechart specializations.

This work will be presented at the EKAW conference in October
in Lisbon.

Bridging Software Languages and Ontology Technologies

| Tuesday, September 7, 2010
Today's model-driven development approaches allow for a more productive way of developing software systems. However, building tools and languages for software development still suffer a neglect of semantics in modeling and metamodeling.

An interest to extend software languages that gained scientific and commercial attention is the integration of ontology technology and software development. Ontology formalisms for consistency validation and dynamic classification as well as ontology technologies to enable shared terminologies, automated reasoning, provide means for leveraging metamodeling and language engineering.

Check out our tutorial at SPLASH 2010 (previously OOPSLA) on Bridging Software Languages and Ontology Technologies

Extend Ecore with OWL by Ecore Annotations of OWL Axioms

| Friday, August 27, 2010
Do you want more expressiveness than Ecore can offer?

In this video we show how to use an ecore textual language for annotating ecore metamodels with OWL axioms. Afterwards, you can use the OWLizer to transform metamodel and model into OWL.

OWL Annotations for textual Ecore Metamodels

| Tuesday, August 17, 2010
Using the TwoUse Toolkit, it is possible to easily annotate text-based Ecore metamodels by (Ecore-based) textual annotations. The editor provides syntax highlighting for annotations which are based on OWL 2 Web Ontology Language in Manchester Syntax. The Ecore metamodels together with its annotations are transformed by the OWLizer into a pure OWL 2 Ontology (representing the input for reasoning tools). Figure 1 gives a screenshot of the editor which is implemented as an Eclipse plugin based on EMF Text.

In general we have extended a metamodeling language (Ecore) by constructs provided by OWL. Thus we have a much more expressiveness language to develop Ecore-based metamodels which continuously can be used in the MDD process (e.g. to define the abstract syntax of a modeling language or for code generation) and in addition are "ready" for ontology technologies.

The extended grammar for Ecore metamodels and the extended annotations is given in the following:
EPackage =
{EAnnotation} "package" name
["\"" name "\""] "{" {EClass} {EPackage} "}" ;

EClass =
["abstract"] ("interface" | "class")
["" EClass {"," EClass} ">"] name
["\"" name "\""]
["extends" EClass {"," EClass}]
{classAnnotation} "{" {EClass | EOperation} "}";

EParameter =
{("ordered" | "unique")} EClass name
["(" integer ".." integer ")"] ;

EReference =
{ ("containment" | "derived" | "transient" | "volatile" | "unique" |
"ordered" | "unsettable" | "changeable" | "resolveProxies") }
"reference" (EClass | EGenericType) name
["=" "\"" name "\""]
["(" integer ".." integer ")"]
["opposite" EReference] {endReferenceAnnotation} ";" ;

EOperation =
{("ordered" | "unique")} "operation" ("void" | EClass)
["(" integer ".." integer ")"]
["" ETypeParameter {"," ETypeParameter} ">"] name "(" [EParameter {"," EParameter}] ")"
["throws" EClass {"," EClass}] ";" ;

EEnumLiteral = {EAnnotation} EDataType ":" name "=" "\"" EEnumLiteral "\"" ";" ;
EAnnotation = "[" {
"eAnnotations" ":" EAnnotation |
"source" ":" "\"" name "\"" |
"details" ":" "\"" name "\"" "=" "\"" name "\"" |
"contents" ":" EObject |
"references" ":" EReference |
"eModelElement" ":" EObject } "]";
EObject = "EObject";
EDataType = {EAnnotation} ["serializable"] "datatype" name "\"" name "\"";
ETypeParameter = {EAnnotation} name ;
EGenericType =
"typed" ["" (ETypeParameter | "?" "extends" EGenericType | "?" "super" EGenericType) ">"]
EClass ["" (EGenericType | "?" ) {"," (EGenericType | "?")} ">"] ;

frontReferenceAnnotation = "(" (
"functional" |
"inversefunctional" |
"symmetric" |
"asymmetric" |
"reflexive" |
"irreflexive" |
) ")";

endReferenceAnnotation = "(" (
"equivalentTo" OPE |
"subPropertyOf" OPE |
"domain" CE |
"range" CE |
"disjointWith" OPE |
"inverseOf" name |
"subPropertyChain" OPE "o" OPE {"o" OPE}
) ")";

classAnnotation = "(" (
("equivalentTo" | "disjointWith") CE {CE} |
"subClassOf" CE |
"disjointUnionOf" CE CE {CE}
) ")";

CE = "(" (
["not"] name |
"not" CE |
CE "and" CE { "and" CE } |
CE "or" CE {"or" CE} |
OPE ("some" | "only") CE |
OPE "Self" |
OPE ("min" | "max" | "exactly") "cardinality" nonnegativeinteger CE
) ")" ;

OPE = name | "(" "inverse" name ")" ;

digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9";
nonnulldigit = "1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9";
integer = ["-"] nonnulldigit {digit} | "0";
nonnegativeinteger = "0" | nonnulldigit {digit};
name = ( letter | "_" ) { letter | digit | "_" } ;
letter = "a".."z" | "A".."Z" ;

OWL, UML, SPARQL, templates: TwoUse examples

| Friday, August 6, 2010
This video shows how to start using the twouse toolkit by examples:
  • SPARQL Querying
  • OWL Ontology Template
  • OWL Graphical Notation
  • OWL Functional Syntax
  • SWRL Rule Graphical Notation
  • SWRL Rule with UML Profile for SWRL
  • SPARQLAS Query
  • OWL Ontology with UML Profile for OWL

OWL + Metamodel: Model Bridge

| Wednesday, August 4, 2010
Model bridges connect software models and ontologies on the modeling layer M1. They are de fined in the metamodeling layer M2 between diff erent metamodels. The figure below exemplifies a model bridge.

Model Bridge

Integration bridges merge information of the models from the software modeling and from the ontology space. This allows the building of integrated models (on modeling layer M1) using constructs of both modeling languages in a combined way, e.g. to integrate UML class diagrams and OWL.

A transformation bridge describes a (physical) transformation between models in layer M1. The models are kept separately in both modeling spaces. The information is moved from one model to the model in the other modeling space according to the transformation bridge.

OWL + Ecore: Language Bridges

The figure below depicts the general architecture of a language bridge, combining software languages and ontology technologies. The bridge itself is de fined at the M3 layer, where a metametamodel like Ecore is considered and bridged with the OWL metamodel. Here we diff er between two kinds of bridges: M3 Integration Bridge and M3 Transformation Bridge.

Language Bridge
The design of an M3 integration bridge consists mainly of identifying concepts in the Ecore metametamodel and the OWL metamodel which are combined.

The M3 Transformation Bridge allows language designers and language users to achieve representations of software languages (Metamodel/Model) in OWL. It provides the transformation of software language constructs like classes and properties into corresponding OWL constructs.

Using Templates in OWL Ontologies

Integrating model-driven development and semantic web resulted in metamodels
and model-driven tools for the semantic web. However, these metamodels or tools
do not provide dedicated support for dealing with templates in ontology

Using Templates with OWL and UML Notation
Templates are useful for encapsulating knowledge and modeling
recurrent sets of axioms like ontology design patterns. We propose an extension
of existing metamodels and tools to support ontology engineers in modeling
OWL ontology templates. Our approach allows ontology engineers to keep template
specifications as first-class citizens, reducing complexity and increasing
reusability in ontology engineering.

Bridging Software Languages and Ontology Technologies: Tutorial at SPLASH 2010

Current model-driven development approaches allow for a more productive way of developing software systems. However, building tools and languages for software development still suffer a neglect of semantics in modeling and metamodeling.

An interest to strengthen semantics in modeling and metamodeling that gained scientific and commercial attention is the integration of ontology technology and software development. Ontology formalisms for consistency validation and dynamic classification as well as semantic web technologies for enabling shared terminologies and automated reasoning provide means for leveraging metamodeling and language engineering.

This tutorial on Bridging Software Languages and Ontology Technologies  at SPLASH 2010 enlightens the potential of ontology and semantic web technology for modeling and metamodeling in software development, positioning it among modeling standards like UML, and MOF; and (2) illustrates ontology-enabled software development with real application scenarios in areas like software design patterns, domain-specific languages and variability management.

Model Driven Engineering with Ontology Technologies

Ontologies constitute formal models of some aspect of the world that may be used for drawing interesting logical conclusions even for large models. Software models capture relevant characteristics of a software artifact to be developed, yet, most often these software models have no formal semantics, or the underlying (often graphical) software language varies from case to case in a way that makes it hard if not impossible to fix its semantics.

At the Reasoning Web Summer School 2010: Semantic Technologies for Software Engineering we present a lecture on the use of ontology technologies for software modeling in order to carry over advantages from ontology technologies to the software modeling domain. It will turn out that ontology-based metamodels constitute a core means for exploiting expressive ontology reasoning in the software modeling domain while remaining flexible enough to accommodate varying needs of software modelers.

Ecore Models | Metamodels -> OWL Ontologies = OWLizer

| Wednesday, July 28, 2010
We show how to use TwoUse's OWLizer to transform Ecore Models and Metamodels into OWL ontologies. In this example, the UML class diagram model elements are transformed into OWL individuals of the UML ontology and the UML metamodel classes are transformed into OWL classes.

UML + OWL Ontology and SPARQL

This demo of the TwoUse Toolkit shows UML class diagram, OWL ontology and SPARQL to dynamically classify instances at runtime. We model the variations of the class SalesOrder with the web ontology language, namely USSalesOrder and GermanSalesOrder. Later, we write a query operation that asks for the most specific type of the contextual object.

BPMN process model -> OWL ontology = Validating Process Refinements

| Monday, July 19, 2010
"A crucial task in business process management is the validation of business process refinements. A business process refinement is a process description in a more fine-grained representation. The refinement is either with respect to an abstract model or with respect to component's principle behavior model. This video shows a process refinement based on the execution set semantics. Predecessor and successor relations of the activities are described in an OWL ontology in which the refinement is represented and validated by concept satisfiability checking."

More information on this paper

OWL ontology with UML Class Diagram Profile for OWL

| Sunday, July 11, 2010
How to create a simple OWL ontology using the OMG UML Profile for OWL with the TwoUse Toolkit.

Improving Software Design Patterns with UML, OWL and SPARQL

We deal with problems in common design patterns and proposes OWL to remedy these issues. We exploit the TwoUse approach, which integrates OWL and UML class diagrams to overcome drawbacks of the Strategy Pattern, that are also extensible to the Abstract Factory Pattern.

UML, OWL and SPARQL with TwoUse Toolkit - Demo

| Friday, June 25, 2010

Since MDE and OWL provide complementary benefits, contemporary software development should make use of both approaches. This demo presented at the Sixth European Conference on Modeling Foundations and Applications enlightens the improvements from an integrated approach.

The Camtasia Studio video content presented here requires a more recent version of the Adobe Flash Player. If you are using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

OWLizer = Software Languages -> OWL Ontologies Part II

| Thursday, May 27, 2010
The OWLizer transforms software language (Ecore Metamodel/Model) into OWL ontologies. In the following we present an extension of this simple model transformation approach. It is extended by transforming specific EAnnotations to specific OWL constructs. For example by annotating elements in the metamodel with „#Class“- as well as „#ObjectProperty“, EClassifiers and EReferences can be marked as appropriate OWL -Entities. Starting at the „#Class“-EAnnotation, further OWL-Classaxioms can be annotated, that means, by creating further nested EAnnotations.
An example is given in the following:

Here the OWLizer transforming the metamodel (depicted in figure 1) would result the following OWL ontology axioms and class expressions. EquivalentClasses(Cisco7603 ObjectMinCardinality(1 hasConfiguration. Configuration7603)).
Here the OWLizer is able to interpret the annotations and creates corresponding axioms in ontology (e.g. #ObjectMinCardinality means the creation of the corresponding class expressions in the ontology; #EquivalentClasses means the creation of the corresponding axiom).
In general we have built an annotation profile for annotating Ecore-based metamodels. The metamodel itself and in addition its annotations are transformed to a pure ontology by the OWLizer . Thus we extended the expressivity of the Ecore metamodeling language to a new comprehensive approach that combines standard metamodeling with using ontology-based expressions and axioms in an integrated manner.

Filling the Gap between Semantic Web and Model Driven Engineering

| Wednesday, March 31, 2010
Since model driven engineering and semantic web provide complementary benefits, contemporary software development and code generation should make use of both approaches. This talk enlightens the improvements on both fields from an integrated approach: the TwoUse approach.

OWLizer: Software Languages -> OWL ontologies Part I

| Monday, March 29, 2010
Software development consists of multiple phases, from inception to production. During each software development phase, developers and other actors generate many artifacts, eg. documents, models, diagrams, code, tests and bug reports. Although some of these artifacts are integrated, they are usually handled as islands inside the software development process.

Many of these artifacts (graphical or textual) are written using a structured language, which has a defined grammar. In a model-driven environment, concepts of software languages are represented by metamodels, whereas the artifacts written in those software languages are represented by models, which are described by the language metamodel. Thus, by transforming software metamodels and models into OWL and by aligning the OWL ontologies corresponding to software languages, we are able to link multiple data sources of a software development process, creating a linked-data repository for software development.

Let us consider an example of integrating two data sources: UML diagrams and Java Code. Regardless of generating Java code from UML diagrams, developers would like to have a consistent view of corresponding classes and methods in UML and Java, i.e., developers might want to consult UML diagrams looking for a corresponding Java class. In this scenario, OWL and ontology technologies play an important role.

Fig. 1 depicts the usage of M3 transformations together with ontology technologies [1]. UML metamodel and model as well as Java grammar (metamodel) and java code (model) are transformed into OWL ontologies. Ontology alignment techniques [] might identify some concepts in common between the two ontologies (UML and Java), e.g., package, class, method. Moreover, individuals with the same name in these two ontologies are likely the same.

Once the two ontologies are aligned, queries against the Java ontology also retrieve elements defined in UML diagrams. Now it is possible to retrieve sequence diagrams including a given Java class, since the two artifacts (UML diagrams and Java code) are now linked. This is only one example of the great potential provided by linking software engineering artifacts using OWL technologies.

[1] Gröner, G., Silva Parreiras, F., Staab, S., Walter, T.: Software Modeling Using Ontology Technologies. In: Rudi Studer - A Review on Semantic Web Research. Springer Verlag (2011)

Using Templates in OWL Ontologies with the OWL Editor

| Tuesday, March 16, 2010
The OWL Editor allows to create UML-like Templates for OWL Ontologies. Templates are parameterised elements which identify the pattern for a group of model elements of a particular type. You can generate new classes or elements with the same characteristics as the Template by binding classes or other elements to the Template.

The OWL Editor allows to bind Classes, ClassExpressions, ObjectProperties, DataProperties and Individuals.


This example shows an Ontology using Templates

In this example 2 Classes and 1 ObjectProperty are bound to a Template. The Template (on the right site) named AgentRole has 3 Elements (Role, Agent, hasRole) needing a binding. The Pattern (on the left site) named Music binds elements to the Template.
After the generation the Class "Agent" is transformed to "Musician", "Role" is transformed to "Position" and the ObjectProperty "hasRole" is transformed to "plays". All other elements are not changed so that the generated Ontology looks like this.

By using more patterns and bindings to the Template, the Template is used to generate more than one instance.

Creating SWRL Rules with OWL Editor

| Monday, March 15, 2010
SWRL Rules could also be created with the OWL Editor. This Editor allows a graphical creation of Ontologies and their SWRL Rules.


The image shows an Example of a SWRL Rule in the OWL Editor. The Example is the Uncle Rule.

The Uncle Rule in the Syntax Protege is using looks like this:
Person(?x1), Person(?x2), Person(?x3), hasBrother(?x2, ?x3), hasParent(?x1, ?x2) -> Person(?x1), Person(?x3), hasUncle(?x1, ?x3)

For further information using the OWL Editor visit:

Creating SWRL Rules with UML Class Diagram Profile for SWRL

| Thursday, March 11, 2010
Since it's already possible to create ontologies using the UML Profile for OWL , a new UML Profile for SWRL was developed to enhance ontologies with SWRL Rules. SWRL combines OWL (DL and Lite) and RuleML, so therefore the set of OWL Axioms will be extended to include Horn-like rules. It thus enables Horn-like rules to be combined with an OWL knowledge base, so that reasoning against those rules will be possible.


This image depicts a sample UML diagram using the UML Profile for OWL .

This image depicts a sample UML diagram using both the UML Profile for OWL and UML Profile for SWRL .

This sample file is part of the offered examples when using the TwoUse Toolkit. More information on

TwoUse Discussion Group

| Saturday, February 20, 2010
If you are interested in the TwoUse toolkit, join the Discussion Group on

The TwoUse developers are ready to help you out!

New Version of TwoUse Toolkit is there

| Friday, February 19, 2010
A new version of the TwoUse Toolkit is now available for download.

The new version was rewritten to improve performance and compatibility with linux systems. Moreover, it is more friendly and includes the latest version of SPARQLAS.

Try it today! Get the latest version of Eclipse and install the TwoUse toolkit via update site using the following link:


Querying OWL Ontologies with OWL Syntax

| Sunday, February 14, 2010
Writing SPARQL queries for OWL ontologies can be time-consuming for those who do not do it everyday. Therefore, Mark Schneider has built a handy language, allowing users querying using OWL syntax -- SPARQLAS. These queries are translated into SPARQL queries that can be executed in a SPARQL engine that supports the OWL DL entailment regime, e.g., pellet.

The syntax is simple: You use the OWL Functional Syntax or a shortened version of it, and you can use variables wherever you have an entity (Class, Datatype, ObjectProperty, DataProperty, NamedIndividual) or a literal. You can construct nested expressions that use these variables.


All subclasses of pizza that have as topping some topping with spiciness hot.

In SPARQLAS OWL Functional Syntax:
Namespace ( = <> )
Query (
  SubClassOf ( ?x ObjectIntersectionOf ( Pizza ObjectSomeValuesFrom ( hasTopping ObjectIntersectionOf ( PizzaTopping ObjectSomeValuesFrom ( hasSpiciness Hot ) ) ) ) )

In SPARQLAS Shortened Functional Syntax:
Namespace ( = <> )
Query (
  SubClassOf ( ?x And ( Pizza Some ( hasTopping And ( PizzaTopping Some (hasSpiciness Hot ) ) ) ) )

You can try it in two different ways:

Integrate it in your application

Filling the Gap between Semantic Web and Model Driven Engineering: The TwoUse Toolkit

TwoUse Toolkit is an implementation of current OMG and W3C standards for developing ontology-based
software models and model-based OWL2 ontologies.

For Model Driven Developers
  • Describe your UML Classes using OWL2 class descriptions.
  • Semantically search for classes, properties and instances in your UML model.
  • Extent software design patterns with OWL2 class descriptions
  • Transform your graphical UML models to OWL2 functional syntax
  • Make sense of your modeling by inference explanations
  • Browse classes, subclasses, properties and individuals using the Class Hierarchy Viewer and the Entity Browser.
For OWL Ontology Engineers
  • Graphically model OWL2 ontologies and OWL2 safe rules using OMG UML Profile for OWL and UML Profile for SWRL.
  • Graphically model OWL2 ontologies and OWL2 Safe Rules using the OWL2 Graphical Editor.
  • Graphically model and store ontology design patterns as templates.
  • Transform your graphical models to OWL2 functional syntax
  • Write and safe SPARQL queries using the SPARQL Editor with syntax highlight.
  • Specify and safe OWL2 ontologies using the OWL2 functional syntax with syntax highlight.
Examples, Documentation and More Information