SemCheck - Script for the Case Studies
Manfred A. Jeusfeld
University of Skövde, Sweden
manfred.jeusfeld@acm.org
February 2017
last change: 2017-03-27
Contents
1. Introduction and context
2. Software installation
3. Case 1: ArchiMate
4. Case 2: 4EM
5. ADOxx coupling
6. References
This work was supported in part by the Erasmus+ project Open Model Initiative (OMI).
Project 2014-1-AT01-KA203-000942 (OeAD Austria)
Copyright (c) 2017 Manfred Jeusfeld
This document is made available under a CC-BY-SA 4.0 license.
https://creativecommons.org/licenses/by-sa/4.0/
All trademarks used in this text are property of there respective owners.
1. Introduction and context
The Erasmus+ OMI initiative aims to facilitate academic education in enterprise modeling by create a shared and open modeling environment, in which various domain-specific modeling languages (DSML) are being integrated. The DSML form modeling perspectives, e.g. for data modeling, process modeling, goal modeling, and so forth.
This document describes a tool that is designed to support the open modeling environment by providing semantic integrity checking services (SemCheck [1]), which can be used to analyze interrelated models formulated to find errors and to extract information from the models.
Homepage of SemCheck: http://austria.omilab.org/psm/content/semcheck/info
We describe first the software that is needed to use the SemCheck services. Then, a first case study shows how the constructs of the ArchiMate [5] enterprise architecture language can be supported, in particular to implement traceability services for ArchiMate implementations. The next chapter presents services for the 4EM [6] suite of enterprise modeling languages. The focus here is to support integrity and query services for cross-notational links.
The last chapter reports on the current state of integration of SemCheck into the open ADOxx modeling toolkit.
The examples source files referred to by this document come with the own Creative Commons licenses. They allow in any case the non-commercial use, in particular the use in academic context.
2. Software installation
You need a computer with one of the following operation systems:
- Linux, e.g. Ubuntu 16.04 (needed in particular for the ADOxx case study)
- Windows XP or higher (Windows 7 and 10 are fine)
- Apple MacOS
Further you need a Java SE Runtime Environment (JRE) 7 (recommended) or higher. If not already installed on your computer, then download and install it following the instructions at
http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html
Note that Java comes with its own license conditions.
2.1 Download and install ConceptBase.cc
Download from http://conceptbase.sourceforge.net/CB-Download.html
ConceptBase (short for ConceptBase.cc) comes under a free and open software license allowing private, academic and commercial use: http://conceptbase.sourceforge.net/CB-FreeBSD-License.txt
Latest stable version for Linux, Windows, and Mac OS-X
-
Read the ConceptBase.cc Copyright. Only proceed to the download step if you agree.
-
Download CBinstaller.jar from Sourceforge. It contains the latest ConceptBase binaries plus the installation program.
-
Open a command window (terminal), change to the directory where you downloaded CBinstaller.jar.
-
Execute in the command window: java -jar CBinstaller.jar. Under Windows, you can also directly execute CBinstaller.jar from the web browser.
-
The CBinstaller window shall pop up. If the button "Install" is activated (green color), then just press it to install ConceptBase. You can also adapt the installation directory before pressing "Install" but we recommend to use the default.
If the "Install" button is not activated, then Download/Select buttons are activated to download and select an installation archive. After download, you can continue with "Install".
If the above download links fail, then download CBinstaller.jar from the CB-Forum.
Some behavioral anti-virus tools could block CBinstaller from installing ConceptBase on your computer. You need to temporarily disable these tools or install ConceptBase manually as described in the installation guide.
The sample source files referred by this document are either downloadable via the URLs provided in this document or as tool download “Modelling Toolkit - SemCheck-Demo” at
http://austria.omilab.org/psm/content/semcheck/download?view=download
that has all material in a ZIP archive.
Starting ConceptBase
Linux, Mac OS-X: Add the ConceptBase installation directory to your search path, e.g.
export CB_HOME=$HOME/conceptbase export PATH=$CB_HOME:$PATH
These two lines should also be added to your init file of your Unix shell, for example .bashrc if you are using bash. Start the ConceptBase user interface CBIva via the command
cbiva
in a command window. Then start the ConceptBase.cc server via the menu item File/Start CBserver. You can also start the CBserver in another command window via the command 'cbserver [options]'. Consult the user manual for instructions on how to interact with the system. The tutorial on metamodeling is a good starting exercise as well.
Windows: You can start the ConceptBase user interface CBIva by double-clicking the batch file
cbiva.bat in the ConceptBase installation directory (usually c:\conceptbase). You can also use a Windows command window or PowerShell to start it. It will automatically connect the user interface to a public ConceptBase server. Add the path ' c:\conceptbase' to your Windows environment variable PATH. You can find instructions for example in https://javatutorial.net/set-java-home-windows-10
Associate CBGraph to graph files in your Web browser
A graph file (a.k.a. GEL file) stores a graph displaying some Telos model. The Telos models are included in the graph file as well and will be passed to the ConceptBase server (CBserver) when you open the GEL file with CBGraph.
-
Use your Web browser (e.g. Firefox) to click on the link telos.gel. The browser shall ask you whether to download the file or associate an application. Choose to associate an application. Then, browse to the installation directory of ConceptBase.cc. Type for Windows "cbgraph.bat" and for other platforms "cbgraph" in the filename field and press OK. Afterwards, a click on a link to a graph file shall directly start CBGraph. Our web servers of ConceptBase use as Mime type for graph files application/cbgraphfile or application/x-cbgraphfile. The latter is preferred.
Windows, Mac OS-X: We currently do not ship binaries of the CBserver for Windows and Mac OS-X. However, ConceptBase.cc is fully functional on these platforms by connecting to a public CBserver hosted at University of Skövde. This public CBserver is pre-configured to be used for Windows and Mac OS-X installations. You can also configure your ConceptBase installation to use another public CBserver, e.g. installed and running on a Linux server in your local network.
3. Case 1: ArchiMate
ArchiMate is an open enterprise architecture modeling language published as a standard from The Open Group. The current version is V2.1 but we primarily focus here on Version 1.0.
https://www2.opengroup.org/ogsys/catalog/c091
Goal of the case study: Provide traceability services for ArchiMate. The services shall allow to trace elements from the business layer down to the technology layer and vice versa.
Approach: Represent the ArchiMate constructs in a meta model (here: directly in ConceptBase) and defines deductive rules that realize the traceability services.
Acknowledgements: This case study is based on the group work by Sander van Arendonk, Niels Colijn, Dirk Janssen, Jeffrey Kramer in the Method Engineering course 2008 at Tilburg University. Sample code used with permission under a CC BY-NC 3.0 license.
3.1 The Meta Model of ArchiMate in ConceptBase
The main goal of this case study is to support traceability between any ArchiMate concepts at any of the three ArchiMate layers (business, application, technology). Hence the meta model both has to represent the ArchiMate constructs plus the provisions for traceability.
The complete specification is at
http://merkur.informatik.rwth-aachen.de/pub/bscw.cgi/d3827407/Pt1-NDL-and-NL.sml.txt
Consider the following parts of the file for understanding the specification:
Layer end
BusinessLayer in Layer end
ApplicationLayer in Layer end
TechnologyLayer in Layer end
Aspect end
InformationAspect in Aspect end
BehaviourAspect in Aspect end
StructureAspect in Aspect end
The three layer meta classes BusinessLayer, ApplicationLayer, and TechnologyLayer form a matrix with the three aspect meta classes InformationAspect, BehaviourAspect, and StructureAspect. ArchiMate model concept are typically classified into both one of the layer and one of the aspects.
Next, consider the generic meta class AnyNode:
AnyNode with
transitive
dependsOn: AnyNode
end
It defines a relation 'dependsOn' to be transitive. Transitivity is implemented by a deductive rule defined in the same meta model:
forall x,z,y,M/VAR AC/Proposition!transitive C/Proposition P(AC,C,M,C) and (x in C) and (y in C) and (z in C) and (x M y) and (y M z) ==> (x M z)
The ArchiMate concepts are then defined in ConceptBase based on the ArchiMate meta model:
AM_Product in AM_GenericNode, InformationAspect, BusinessLayer isA AnyNode with aggregation aggregatesBService: AM_BusService; aggregatesAService: AM_AppService; aggregatesIService: AM_InfService; aggregatesContract: AM_Contract end
Note that the constructs are instantiated both into an aspect (here: InformationAspect) and into a layer (here: BusinessLayer). Further, they are defined as subclasses of AnyNode. This makes their instances (here: any ArchiMate Product) also an instance of AnyNode. They are then subject to have dependencies to other ArchiMate constructs. The links between ArchiMate model concepts induce depencies. For example, if a product aggregates a BusinessService, then it dependes on that service. We model this by stating that any such link is also a dependency:
AM_Product!aggregatesBService isA AnyNode!dependsOn end
ArchiMate has some dedicated link types to relate concepts from different layers. One of them is the 'realises' link. We use a deductive rule to map such links to dependencies:
forall b/AM_Behaviour s/AM_BusService (b realises s) ==> (s dependsOn b) forall i/AM_BusInteraction s/AM_BusService (i realises s) ==> (s dependsOn i)
The ConceptBase representation has a relative large number of such rules.
The derived dependency links can be used in queries to extract information from an enterprise architecture model. For example consider the following query:
AM_Service3 in GenericQueryClass isA AM_AppService with constraint c1: $ exists os1,os2/AM_OperatingSystem (~this dependsOn os1) and (~this dependsOn os2) and (os1 \= os2) $ end
The query returns all application services that depend on two different operating systems. This query relies on the transitivity of 'dependsOn': The two operating systems os1 and os2 are part of the infrastructure layer. Some server nodes may depend on them. Further, system software like a DBMS may depend on the server node. Finally, the returned application services (application layer) indirectly depend on the DBMS.
More example analysis queries can be found at
http://merkur.informatik.rwth-aachen.de/pub/bscw.cgi/d3827411/Pt2-Analysis.sml.txt
3.2 Textual analysis of the ArchiMate model
It is assumed that you downloaded and installed ConceptBase.cc. Also make sure that the installation directory of ConceptBase is in the search path (see section 2: Starting ConceptBase).
Step 1: Download the the file ARCHIMATE.zip from http://merkur.informatik.rwth-aachen.de/pub/bscw.cgi/3822537 and extract it into a directory 'ARCHIMATE' on your local computer. It contails the following files:
Pt1-NDL-and-NL.sml.txt (ArchiMate notation) Pt2-Analysis.sml.txt (example queries) Pt3-Example.sml.txt (ArchiSurance example enterprise model) Pt4-GraphTypes.sml.txt (graphical types for graphical analysis) runall.cbs (CBShell script for textual analysis) archisurance.gel (graph file for graphical analysis)
The files *.sml.txt are the Telos source files for the ArchiMate case study. The CBShell file runall.cbs shall pass these source files to a ConceptBase server and run some sample analysis queries on them. The file 'archisurance.gel' shall be used later for a graphical analysis.
Step 2: Open a command window. Under Linux, this is a plain terminal window running 'bash' as shell. Under Windows, you should use PowerShell. Then enter the following commands:
cd ARCHIMATE cbshell runall.cbs
The text file runall.cbs is a so-called CBShell script. It contains commands that interact with a ConceptBase server. In this case it connects to a ConceptBase server, defines the ArchiMate language in ConceptBase, defines some analysis queries, and an example ArchiMate enterprise model ('ArchiSurance'). Then, four example queries are executed to extract dependency information from the enterprise model. The output of the script looks like following:
cbshell runall.cbs
Connecting to a ConceptBase server
Defining the ArchiMate language (part) in ConceptBase ...
Finds all infrastructure Nodes that are used by business behaviour that is performed by a given actor
=====================================================================
DellServer1 in AM_Service1 with
actor
COMPUTED_actor_id_2653: ArchiSurance;
COMPUTED_actor_id_2664: ValuationExpert;
COMPUTED_actor_id_2668: Client
end
...
WindowsServer2008 in AM_Service1 with
actor
COMPUTED_actor_id_2653: ArchiSurance;
COMPUTED_actor_id_2664: ValuationExpert;
COMPUTED_actor_id_2668: Client
end
Finds all business services that rely on WindowsServer2008
=====================================================================
ClaimPaymentService
Finds all business services that rely on DebianLinux
=====================================================================
ClaimPaymentService,ClaimValuationService,ClaimAcceptService
Finds all application services that rely on more than one different operating system
=====================================================================
PaymentService
The first query 'AM_Service1' returns all node elements (part of the network infrastructure) elements such that a behaviour element 'b' depends on them and an actor depends on the behaviour element b. All such actors are returned together with the respective node element. So, essentially it shows which actors depend on an infrastructure node via some behaviour element.
The second query 'AM_Service2' has a parameter 'WindowsServer2008'. It returns all business servives that depend on this system software. The third query does the same for the system software 'DebianLinux'. Finally, the last query returns all application services that depend on two or more different operating systems.
All queries heavily depend on the transitivity of the 'dependsOn' relation. It realizes the traceability of all model elements in an ArchiMate enterprise model.
3.3 Graphical analysis of the ArchiMate model
ConceptBase has a graphical browser that allows to navigate and display attributes and relations between objects. The ArchiMate [5] case study includes excerpts of the ArchiSurance example enterprise model. The previous section showed how to create textual analysis reports. In this section, we show how to graphically navigate the transitive 'dependsOn' relation that was superimposed on ArchiMate via the definition of the class 'AnyNode'.
Step 1: To start the demo, open a terminal/command window and enter
cd ARCHIMATE cbgraph archisurance.gel
The file 'archisurance.gel' contains all Telos sources of the ArhciMate case study plus a graphical view on it. By starting it with cbgraph, the Telos sources will be sent to a ConceptBase server and the graphical view will be displayed in a window.
The graphical view displays some elements of the ArchiSurance enterprise model. They are grouped into the layers 'Busness', 'Application', and 'Infrastructure' (=technology). The graphical notation is mimicking the ArchiMate standard but is not quite the same due to limitations of the graphical browser of ConceptBase. The elements are linked by relations like 'assignedTo' and 'realises'. These are standard relations used in ArchiMate. The grey links, e.g. between 'Classify' and 'Accept' are precedence links between processes (called triggers in ArchiMate). They also constitute dependencies since a process depends on its preceding processes. The graphical view also shows a dependency link between 'ClaimAcceptService' (business layer) and 'DebianLinux' (infrastructure layer. The dotted line indicates that this relation was derived from the rules defined in ConceptBase, in particular the transitivity rules. The chain of explicit links that lead to this dependency ios also shown in the graphical view:
ClaimAcceptService, AutomatedAccept, ClaimSupportService,ClaimSupportInterface, ClaimSupportSystem, BusinessIntelligenceInterface, BusinessIntelligenceService, DellServer1, DebianLinux.
Both directions of 'dependsOn' can be followed, i.e. to elements that a given element is depending on (e.g. ClaimAcceptService to DebianLinux) and vice versa.
Step 2: To show the reverse direction, right-click on 'DebianLinux', follow menu to 'incoming attributes' (=reverse direction). Then follow 'dependsOn' and 'all'. It will onfold a sub-menu from where you can select specific elements. Take the first one and then 'Accept' as example. The result is shown below:
Step 3: Next, we like to display all elements that depend on DebianLinux. To display them, a new graphical is appropriate to avoid clutter of links. Right-click on 'DebianLinux' and select 'Show in New Frame'. Enlarge the frame and move the 'DebianLinux' node with the left mouse button to its center.
Select the menu path incoming attributes/dependsOn/all/Show all. It will display all elements of the ArchiSurance case that directly or indirectly depend on 'DebianLinux'. This is quite a number. You can re-arrange the nodes to display them. The result may look like below.
This finalizes the ArchiMate case study. Check out the queries defined in Pt2-Analysis.sml.txt and use them as starting point to define your own analysis queries. You may also want to use the functions of the ConceptBase answer formatting to produce reports in the (textual) format that suits your needs. Details are in the ConceptBase user manual at
http://conceptbase.sourceforge.net/userManual80/cbm004.html
4. Case 2: 4EM
4EM is a set of interrelated modeling perspectives for enterprise modeling [6]. This case study is about (partially) representing the meta models of the perspectives in ConceptBase and analyze their interrelationships. This shows how ConceptBase can be used to query also meta models, not just models. Such a meta model-based query could for example return all interface concepts that are bridging between two modeling perspectives.
Goal of the case study: Analyze the completeness of the meta model of 4EM, in particular by which interface constructs they are interrelated.
Approach: Represent the 4EM constructs in a specialized meta² model and realize the analysis functions by queries on the meta² model.
Acknowledgements: Janis Stirna provided an early draft of the 4EM meta models. They were the bsis for the 4EM meta models coded in ConceptBase.
4EM was derived from the EKD enterprise modeling method. Certain terms in the ConceptBase representation thus use the acronym EKD due to this heritage. We do however always refer to 4EM [6].
4.1 The Meta Model of 4EM in ConceptBase
4EM comprises the following six modeling perspectives: the goal perspective, the process perspective, the actors and resources perspective, the concepts perspective (a.k.a. the data model), the technical components and requirements perspective, and the business rule perspective.
All six perspectives have their own concepts but are also strongly interrelated to each other. To represent the perspectives in ConceptBase, we first look at the meta² model (the meta meta model) that is used to facilitate their representation. The source code of the definitions can be found at
http://merkur.informatik.rwth-aachen.de/pub/bscw.cgi/d3827471/00-ekd-ndl.sml.txt
The definition provide some generic constructs for multiplicities ('necessary', 'single') of attributes and relations. Further, relations can be defines to be transitive and to be inverse to each other.
The first new addistion is a meta² class 'Notation'. It lists the constructs of a modeling notation. A rule derives that all links inside a notation (between two contructs 'x' and 'y' of the same notation) are also part of the notation.
Notation in Class isA Node with attribute includes: NodeOrLink rule addLinks: $ forall N/Notation x,y/NodeOrLink link/NodeOrLink!connectedTo (N includes x) and (N includes y) and From(link,x) and To(link,y) ==> (N includes link) $ end
The next new contructs are for 'Model' and 'ModelElement':
Model in Node with attribute contains: ModelElement end
Since we want to analyze the perspectives, we introduce a construct 'Model'. It is just a container of model elements. Model elements are defined by a rule:
ModelElement in NodeOrLink,Class with rule me1 : $ forall x/VAR (x [in] NodeOrLink) ==> (x in ModelElement) $ end
The predicate (x [in] mc) expresses that 'x' is an instance of some class 'c', which itself is an instance of the meta class 'mc'. Here, 'NodeOrLink' is a meta² class. Its instances are the constructs of 4EM, e.g. 'GM_Goal' (the construct for goals). Hence, any instance of a class like 'GM_Goal' is also an instance of 'ModelElement'.
The full translation of 4EM to ConceptBase is available from the archive
http://merkur.informatik.rwth-aachen.de/pub/bscw.cgi/d4167283/4EM.zip
4.1 Analysis queries for meta models
Comprehensive meta models of enterprise modeling methods can have many constructs. It may then be a challenge to find out whether all constructs are well-related to each other, in particular when the modeling perspectives are developed by different teams.
We therefore provide some analysis queries that target this situation. Their definitions are in the file
http://merkur.informatik.rwth-aachen.de/pub/bscw.cgi/d3827503/20-ekd-analyze.sml.txt
To facilitate the analysis queries, we first map all relations between modeling constructs to 'links':
NodeOrLink in Class with attribute link: NodeOrLink symmetric link_sym: NodeOrLink transitive linkTo: NodeOrLink rule conn2link: $ forall n1,n2/NodeOrLink (n1 connectedTo n2) ==> (n1 link n2) $; isa2link: $ forall n1,n2/NodeOrLink :(n1 isA n2): ==> (n1 link n2) $; link2sym: $ forall n1,n2/NodeOrLink (n1 link n2) ==> (n1 link_sym n2) $; sym2tr: $ forall n1,n2/NodeOrLink (n1 link_sym n2) ==> (n1 linkTo n2) $ end
Each connection between node or links (meta² class!) is a 'link'. The relation 'link_sym' is the symmetric closure of 'link' (i.e. if n1 is linked to n2, then n2 also to n1 in the symmetric closure), and 'linkTo' is the transitive closure of 'link_sym', hence, 'linkTo' can be used to analyze connections regardless of their direction and regardless whether they are direct or indirect.
The first analysis query returns all constructs
ImportedConstruct in GenericQueryClass isA NodeOrLink with computed_attribute,parameter notation : Notation constraint isOutside: $ exists n/NodeOrLink (notation includes n) and (n link_sym this) and not (notation includes this) $ end
Hence, an imported construct is any construct that is connect to some modeling construct 'n' of the given notation (provided as parameter of the query). Note that 'link_sym' is symmetric but not transitive. Further note that the query makes no reference at all to 4EM. It is generic for any modeling notation using the facilities of the meta² model discussed in this chapter.
The next analysis query returns those constructs of an 'exporting' notation (given as parameter) that is an improted construct for the 'importing' notation (also given as parameter):
InterfaceConstruct in GenericQueryClass isA NodeOrLink with computed_attribute,parameter importing: Notation; exporting: Notation constraint isInBetween: $ (this in ImportedConstruct[importing/notation]) and (exporting includes this) $ end
Hence, the analyst provides the names of the two notations and gets as result the interface between them. The final query is to detect constructs that are not assigned to any notation bur well used:
UnAssignedConstruct in QueryClass isA Node with constraint noMT : $ exists nota1/Notation (this in ImportedConstruct[nota1]) and not exists nota2/Notation (nota2 includes this) $ end
Thus, a notation 'nota1' uses a construct 'this' (answer variable) but no notation 'nota2' defines it.
[...]
Full text available from
http://merkur.informatik.rwth-aachen.de/pub/bscw.cgi/d4168889/SemCheck-Script-for-Case-Studies.pdf
General Tutorials for ConceptBase.cc
Meta modeling with ConceptBase