NL2OCL Project

Simplifying the process of software modelling with improved accuracy to generate robust models

SBVR2OCL
SBVR2OCL (A SBVR to OCL Transformation)


SBVR2OCL is another sub-component of the NL2OCL project. SBVR2OCL is a tool that transforms SBVR (Semantic Business Vocabulary and Rules) business rules to OCL (Object Constraint Language) constraints with respect to a UML (Unified Modelling Language) class model using the MDA (Model Driven Architecture) technology. 

Start date:
12-Oct-2009


Abstract:

SBVR2OCL tool is based on model transformation technology to employ the OCL (Object Constraint Language) constraints in business models by automatically producing OCL from SBVR (Semantic Business Vocabulary and Rules) rules. In business modelling, the business analyst writes hundreds of business rules and represents them in SBVR notation. Business rules represented in OCL can not only improve the precision of the business model but also can be helpful in automated business process modelling.  The aim of the project is to produce a framework so that the user of business modelling can generate constraints (such as invariants and pre/post conditions) in SBVR rules and the SBVR2OCL framework converts such SBVR rules to the equivalent OCL statements. The proposed approach is implemented in a software tool SBVR2OCL that generates OCL constraints from SBVR business rules and target UML (Unified Modelling Language) model. Our tool allows software modellers and developers to generate well-formed OCL expressions that results in valid and precise business models.


Used Approach:

The SBVR2OCL a modular model transformation based software tool that generates OCL (Object Constraint Language) constraints from SBVR (Semantic Business Vocabulary and Rules) with respect to a target UML (Unified Modelling Language) model. It takes two inputs: a single English statement and a UML model. To process the input English text first it is linguistically analyzed. In linguistic analysis of the English text, the English text is Parts-Of-Speech (POS) tagged. Then a rule-based parser is used to further process the POS tagged information to extract basic SBVR (Semantic Business Vocabulary and Rules) elements e.g. noun concept, fact type, etc. Here, the SBVR vocabulary is mapped to a SBVR business rule. Finally, to generate an OCL expression, the SBVR vocabulary is mapped to OCL syntax using the model transformation approach.

1.   Obtain a set of SBVR (Semantic Business Vocabulary and Rules) business rules and a target UML (Unified Modelling Language) model.

2.   Use a SBVR module to syntactically and semantically analyse the SBVR rules and keep all the intermediate analyses result for further analysis.

3.   Use a UML module to parse UML (.ecore or .xmi) model and extract the SBVR business vocabulary. 

4.   Use the results produced by SBVR module to map with the output of UML module to make it sure that the output OCL (Object Constraint Language) constraints are related to the target UML model.

5.   Use the OCL module to transform SBVR business rules to OCL constraints using model transformation based on SiTra library.

The following Figure illustrates the main steps of the OCL-Builder approach. These steps can be summarized as follows:

Screen-shots:

The screen shots of output windows for SBVR vocabulary and SBVR rules have been shown in the following figures:

Figure 1-  NL to Alloy Generator via OCL

 

Figure 2-  Input SBVR business rule

 

Figure 3-  Input UML model parsed by SBVR2OCL

 

Figure 4-  SBVR business vocabulary generated by SBVR2OCL

 

Figure 5-  OCL invariant generated from SBVR business rule by SBVR2OCL