NL2OCL Project
Simplifying the process of software modelling with improved accuracy to generate robust models
NL2OCLviaSBVR (A Natural Language to OCL Transformation via SBVR) |
The project NL2OCL intends to develop a
tool NL2OCLviaSBVR that generates OCL (Object
Constraint Language) constraints from
English text and UML (Unified Modeling
Language) model via SBVR (Semantic Business Vocabulary and Rules)
by performing a series of transformations such as transform English to SBVR and
then transform SBVR to OCL.
Start date: 12-Oct-2009
Abstract:
NL2OCL project is based on a novel approach to address the OCL (Object Constraint Language) usability problem by automatically producing OCL from English text. The main aspects of OCL usability problem are attributed as hard syntax of language, ambiguous nature of OCL expressions, and difficult interpretation of large OCL expressions. Our contribution is a novel approach that aims to present a method involving using Natural Language expressions and Model Transformation technology to improve OCL usability. The aim of the method is to produce a framework so that the user of UML (Unified Modeling Language) tools can write constraints and pre/post conditions in English and the framework converts such English expressions to the equivalent OCL statements. The proposed approach is implemented in a software tool NL2OCLviaSBVR that generates OCL constraints from English text via SBVR (Semantic Business Vocabulary and Rules). Our tool allows software modellers and developers to generate well-formed OCL expressions that results in valid and precise models.
Used Approach:
The NL2OCLviaSBVR is a modular NL-based software tool that generates OCL (Object Constraint Language) constraints from NL (English) text with respect to a target UML (Unified Modeling Language) model. It takes two inputs: a single English statement and a UML (Unified Modeling Language) model. The output of the tool is a complete OCL expression. SBVR is used as an intermediate representation in NL to OCL transformation. Following steps are performed in NL to OCL transformation.
1.
Obtain a text document that is Natural Language (English) description of a constraint and a target UML model.2.
Use a NLP module to syntactically and semantically analyse the informal constraint text and keep all the intermediate analyses result for further analysis.4.
Use the UML (Unified Modeling Language) (.ecore or .xmi) model to extract the SBVR (Semantic Business Vocabulary and Rules) vocabulary. Use the results produced by NLP module to extract SBVR elements e.g. noun concept, object type, Individual concept, verb concept, etc.5. Map the SBVR elements and SBVR vocabulary to ensure that the target SBVR business rule will be from the defined business model (UML Model).
5.
Use the SBVR vocabulary and SBVR elements to generate SBVR (Semantic Business Vocabulary and Rules) business rule.6.
From the SBVR business rules generate OCL (Object Constraint Language) expressions 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 rules and OCL constraints have been shown in the following figures:
Figure 1- NL to Alloy Generator via OCL
Figure 2- Input UML model parsed by NL2OCLviaSBVR
Figure 3- Input natural language (English) text
Figure 4- SBVR business vocabulary generated by NL2OCLviaSBVR
Figure 5- SBVR business rule generated by NL2OCLviaSBVR
Figure 6- OCL invariant generated from SBVR business rule