Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf ·...

15
Development of Soſtware Decision-Making Modules Based on a Model-Driven Approach Aleksandr Yu. Yurin a , Nikita O. Dorodnykh a a Matrosov Institute for System Dynamics and Control Theory, Siberian Branch of the Russian Academy of Sciences, Irkutsk, Russia Abstract The computer-aided engineering software modules for decision-making intelligent systems requires the development of specialized methods, algorithms and software. The use of a model-driven approach that implements the principles of generative and visual programming as well as model transformations, is promising. In this paper, we propose an approach for the development of rule-based intelligent system software components in the form of decision-making modules by specializing and using main principles of a model-driven development. The proposed specialization includes using a step-by-step development scheme (chain of model transformations) from information models to source codes and specifications; a method for the automated creation of computation-independent models based on the transformation of spreadsheets; domain-specific tools for formalization, visualization and generation of codes. The de- veloped approach was applied for creating decision-making modules for rule-based intelligent systems. 1. Introduction The development of intelligent systems and their components (software modules) continues to be a complex and time-consuming task. One of the ways to increase the efficiency of creating such systems is to use the principles of generative and visual programming, as well as the con- cept of model transformations for conceptualization, formalization and automatic codification. These principles are implemented in various techniques and tools. However, in most cases, existing solutions are focused on certain software platforms and have high qualification re- quirements for developers. The integrated use of these principles is also implemented within approaches based on model transformations. Currently they are known as Model-Driven En- gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this paper, we propose a modified standardised MDE approach for computer-aided engi- neering of software components in the form of decision-making modules for intelligent sys- tems. Our approach includes: • A step-by-step development scheme in the form of a chain of model transformations (more abstract models are transformed to less abstract models, and source codes and specifications are generated at the end of this chain). Russian Advances in Artificial Intelligence: selected contributions to the Russian Conference on Artificial intelligence (RCAI 2020), October 10-16, 2020, Moscow, Russia [email protected] (A.Yu. Yurin); [email protected] (N.O. Dorodnykh) © 2020 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 CEUR Workshop Proceedings (CEUR-WS.org)

Transcript of Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf ·...

Page 1: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

Development of Software Decision-Making ModulesBased on a Model-Driven ApproachAleksandr Yu. Yurina, Nikita O. Dorodnykha

aMatrosov Institute for System Dynamics and Control Theory, Siberian Branch of the Russian Academy of Sciences,Irkutsk, Russia

AbstractThe computer-aided engineering software modules for decision-making intelligent systems requires thedevelopment of specialized methods, algorithms and software. The use of a model-driven approach thatimplements the principles of generative and visual programming as well as model transformations, ispromising. In this paper, we propose an approach for the development of rule-based intelligent systemsoftware components in the form of decision-making modules by specializing and using main principlesof a model-driven development. The proposed specialization includes using a step-by-step developmentscheme (chain of model transformations) from information models to source codes and specifications;a method for the automated creation of computation-independent models based on the transformationof spreadsheets; domain-specific tools for formalization, visualization and generation of codes. The de-veloped approach was applied for creating decision-making modules for rule-based intelligent systems.

1. Introduction

The development of intelligent systems and their components (software modules) continues tobe a complex and time-consuming task. One of the ways to increase the efficiency of creatingsuch systems is to use the principles of generative and visual programming, as well as the con-cept of model transformations for conceptualization, formalization and automatic codification.

These principles are implemented in various techniques and tools. However, in most cases,existing solutions are focused on certain software platforms and have high qualification re-quirements for developers. The integrated use of these principles is also implemented withinapproaches based on model transformations. Currently they are known as Model-Driven En-gineering (MDE) or Model-Driven Development (MDD)[Sil15].

In this paper, we propose a modified standardised MDE approach for computer-aided engi-neering of software components in the form of decision-making modules for intelligent sys-tems. Our approach includes:

• A step-by-step development scheme in the form of a chain of model transformations(more abstract models are transformed to less abstract models, and source codes andspecifications are generated at the end of this chain).

Russian Advances in Artificial Intelligence: selected contributions to the Russian Conference on Artificial intelligence(RCAI 2020), October 10-16, 2020, Moscow, Russia" [email protected] (A.Yu. Yurin); [email protected] (N.O. Dorodnykh)�

© 2020 Copyright for this paper by its authors.Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).

CEURWorkshopProceedings

http://ceur-ws.orgISSN 1613-0073 CEUR Workshop Proceedings (CEUR-WS.org)

Page 2: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

• A method for the automated creation of computation-independent models in the form ofdomain models, this method based on the transformation of spreadsheets with arbitrarylayouts and styles.

• Specialized domain-specific tools for formalization, visualization and generation of codes.

Our approach is focused on non-programmers (end-users) and provides algorithms, lan-guages and software for creating rule-based knowledge bases and decision-making modules ofintelligent systems. We tested the approach when created the following software prototypesof:

• A module for definition causes of damages and destruction of technical system elements(a part of the “IS Expertise” decision support system[Ber15]).

• A “Detector” module1 for detection of banned messages and clients who com-promise aSMS mailing service (a part of the “SMS Organizer” platform2).

• A module for facial features interpretation and detection of emotions (a part of the “HRRobot” project3).

Our approach was also used in educational process at the Institute of Information Technolo-gies and Data Analysis of the Irkutsk National Research Technical University (IrNITU).

2. State-of-Art

2.1. Model-Driven Engineering and Model Transformations

Model transformations, generative and visual programming are widely used practices in soft-ware engineering especially in model-driven approaches (MDE, as well as Model-Driven De-velopment (MDD))[Sil15]. The main idea of such approaches is using the transformation andinterpretation of information models, in particular, conceptual models, for software develop-ment.

Of course, researches related to the model transformations and meta-programming havebeen conducted since the origin of programming theory and expert systems, including by Rus-sian and Belarusian researchers. In particular, we can highlight the AT-Technology and OpenSemantic Technologies for Intelligent Systems (OSTIS) projects. However, they are weaklyintegrated with international software development standards (for example, UML, XMI, etc.),while some MDE implementations are based on them.

There are some implementations of MDE: Eclipse Modelling Framework (EMF), Model-IntegratedComputing (MIC) and Model-Driven Architecture (MDA). MDA4 is the most standardized onesand suggests the integrated use of OMG (Object Management Group) standards, including:

1Yurin, A.Yu.: Detector. Certificate of software registration, № 2020614257, 27.03.20202SMS-Organizer Home: http://centrasib.ru/index.php?p=smso3Personnel Evaluation Home: http://www.ocenkakadrov.ru4MDA: https://www.omg.org/mda/

Page 3: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

• Unified Modeling Language (UML) as a main language for formalizing and visualizingmodels.

• Meta Object Facility (MOF) as a language for describing metamodels.

• Query/View/Transformation (QVT) as a set of model transformation languages.

• XML Metadata Interchange (XMI) as the standard for textual representation of models.

The MDA approach generates three viewpoints on the software, which are present-ed inthe form of corresponding models: a Computation-Independent Model (CIM), a Platform-Independent Model (PIM) and a Platform-Specific Model (PSM). The software developmentprocess represents a sequential transformation of these models from the most abstract CIM toa specific PSM. Program codes or specifications are generated at the last step. A model trans-formation is the automatic generation of a target model from a source model, according to aset of transformation rules that together describe how a model in the source language can betransformed into a model in the target language. The MDA approach implements a four-levelmetamodel architecture to support this process[Spr10]. According to this architecture thereare following types of model transformations[Men06]: horizontal and vertical, endogenousand exogenous, unidirectional and bidirectional. Metamodels are the part of this architectureand the way to define abstract syntax of languages used in the development process.

2.1.1. Intelligent System and Knowledge Base Engineering Based on ModelTransformations

There are several recent studies dealing with knowledge base and intelligent system engineer-ing based on principles of model-driven approaches. Moreover, they can be classified accordingto the following criteria:

• Used models and transformation chains: approaches using their own methodologicalprinciples without a clear classification of models and transformation chains[Dun08,Nof15, Rui11, Shu09, Kad13]; approaches that implement the model transformation withinstandards[Yur18, Cab09, Can09].

• Target platforms: approaches using general-purpose languages such as Perl, C#, .NET[Dun08,Cab09]; approaches using specialized knowledge representation languages, for example,Jess, Drools, CLIPS and others[Shu09, Yur18, Can09, Cha04]; approaches using own orig-inal languages and means, for example, PRISMA[Cab09].

• Sources of domain information: ontology-based approaches[Nof15, Shu09, Can09]; UML-based approaches[Yur18]; semantic trees-based approaches[Rui11] and approaches basedon XML-like structures[Dun08].

• End users: programmers-oriented approaches[Dun08, Shu09, Can09, Cha04] or non-programmers-oriented approaches[Nof15, Kad13, Yur18, Cab09].

Page 4: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

The analysis of these studies showed that they are focused primarily on users with high pro-gramming and metamodeling skills. So, as a rule, existing solutions do not clearly correspondto the MDA methodology, for example, skipping the CIM construction stage, going directly tothe PIM development stage. However, CIM plays an important role, it bridging the gap thatusually exists between domain experts and information technology specialists. This stage isvery important when developing intelligent systems; it results to a conceptual domain modeland knowledge bases represented by certain formalisms, for example, rules.

2.2. Background

In our previous work[Yur18] we have proposed an approach for the rule-based expert systemsand knowledge bases engineering based on MDA principles and model trans-formations. Thisapproach partly eliminated the disadvantages described above and used the TransformationModel Representation Language (TMRL)[Dor18] to describe transformation rules.

The following main stages of model transformations were defined:Stage 1. Creating domain models. Domain modeling and description of main architectural

elements of expert systems are carried out at this stage. The resulting models are considered asa CIM and can be represented in the form of OWL ontology, UML models (e.g. class diagrams),concept maps, etc.

Stage 2. Forming rule-based models in the RVML notation. Domain models created at theprevious stage are automatically transformed into rule-based models. In this case, conceptsfrom the domain model are matched with fact templates and elements of logical rules (con-ditions and actions). Causal relationships are transformed into rules. In fact, an automatedformalization of the domain model is carried out. The resulting rule-based models are con-sidered as a PIM and can be represented using a special graphic notation called Rule VisualModeling Language (RVML)[Yur18].

Stage 3. Modifying rule-based models in accordance with the knowledge representationlanguage. At this stage, the resulting rule-based models are modified in RVML notation takinginto account the characteristics of the selected target platforms (knowledge representation orprogramming languages). For example, when using CLIPS (C Language Integrated ProductionSystem), rule priorities and “by default” values of slots are specified. The resulting revised rules(modified RVML models) are considered as a PSM.

Stage 4. Generating program codes and specifications by specialized tools, in particular:

• Web-oriented software called Knowledge Base development System (KBDS)[Dor17] thatprovides development of converters for transformation domain models to rule-basedmodels.

• Desktop application called Personal Knowledge Base Designer (PKBD)[Yur20] that pro-vides generation of source codes and specifications based on the received rule-basedmodels in the RVML notation.

Stage 5. Testing obtained program codes both in special software (in the PKBD interpreter),and in the application.

Page 5: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

Generally, this approach allows experts to prototype rule-based knowledge bases and expertsystems on the basis of existing conceptual models (for example, UML class diagrams). Despitea significant reduction of time of the implementation stage and the elimination of programmingerrors through automatic code generation, the proposed approach has some disadvantages, inparticular:

• The long time of the stage of creating domain models by experts: at this stage additionalinformation sources that can reduce the development time and improve the quality ofresulted models are not used.

• A limited set of means when creating rule-based models: the RVML notation only used,which is not effective when designing large knowledge bases (more than 50 rules).

• A limited set of supported platforms: CLIPS only supported, which has low integrationability with existing software (including those based on web technologies) in terms ofexpanding their functionality.

Thus, in this paper, we propose a modified approach to the development of rule-based intel-ligent systems in the form of embedded web-based decision-making mod-ules, and this mod-ification taking into account the above mentioned factors. So, the main our contributions arethe followings:

• A new method for the automated formation of a conceptual domain model (a CIM) basedon data extracted from spreadsheets with arbitrary layouts and styles.

• The combined use of a tabular (in the form of a decision table) and a graphical approaches(in the form of RVML schemes) to formalize and visualize the trans-formed models as aPIM.

• Extension of a set of supported platforms by Drools and PHP (Hypertext Preprocessor).

3. Modified Approach

We modify the first four stages of our previous approach. Thus, our modified ap-proach in-cludes the following chain of model transformations:

𝑇 = ⟨𝑇𝐼 𝑆−𝐶𝐼𝑀 , 𝑇𝐶𝐼𝑀−𝑃𝐼𝑀 , 𝑇𝑃𝐼𝑁−𝑃𝑆𝑀 , 𝑇𝑃𝑆𝑀−𝐶𝑂𝐷𝐸⟩ , (1)

when 𝑇𝐼 𝑆−𝐶𝐼𝑀 is a set of transformation rules of information source (e.g., databases, spread-sheets, texts, etc.) into a conceptual domain model; 𝑇𝐶𝐼𝑀−𝑃𝐼𝑀 is a set of transformation rules ofa conceptual domain model into a rule-based model; 𝑇𝑃𝐼𝑀−𝑃𝑆𝑀 is a set of transformation rulesof a rule-based model in general form into a modified rule-based model corresponding to aspecific target knowledge representation language; 𝑇𝑃𝑆𝑀−𝐶𝑂𝐷𝐸 is a set of transformation ruesof a modified rule-based model into a program code on the target knowledge representationlanguage.

Next, we consider main stages in detail:

Page 6: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

Stage 1: Creating domain models. The effectiveness of this stage can be improved byreusing existing information sources. In this paper, we propose to use spreadsheets in the Exceland CSV format. Spreadsheets are a fairly popular means of structuring and storing varioustypes of information. Spreadsheets are commonly used in various domains and can containa large number of facts. We have developed a special method for the automated constructionof a conceptual domain model by transforming data extracted from arbitrary spreadsheets.The method is based on the use of a specific canonicalized (relational) form for the sourcespreadsheet and rules for its transformation. The method includes the following main steps:

1. Recognizing spreadsheets with arbitrary layouts and styles, and its transfor-mation to acanonicalized (relational) form:

𝐶𝑆 = {𝐷, 𝑅𝐻 , 𝐶𝐻} , (2)

when 𝐷 is a data block; 𝑅𝐻 is a set of row labels of the category; 𝐶𝐻 is a set of column labelsof the category. The values in cells for heading blocks can be separated by the “ | ” symbol todivide categories into subcategories. Thus, the canonical table denotes hierarchical relation-ships between categories (headings). This step results in tables in the unified (canonicalized)form prepared for their further automated processing. A detailed description of this step isgiven in[Shi17].

2. Generating conceptual model fragments based on the transformation of canonical spread-sheets. In this case, UML class diagrams or concept maps can be used to represent modelfragments. According to the MDA approach, transformation is carried out at the metamodellevel (abstract level “M2” of a four-level metamodel architecture[Spr10]). For this reason, wehave defined metamodels describing the source canonical spreadsheets (Fig. 1), the target UMLclass diagrams and concept maps[Dor19]. At the same time, transformation rules describingthe correspondence between the elements of these metamodels were created on TMRL.

Figure 1: A metamodel of canonical spreadsheets

3. Aggregating conceptual model fragments into one general domain model. This step in-cludes operations for clarifying the names of classes, their attributes and relationships (e.g.,

Page 7: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

associations), and also their possible merging and separation. The following main rules usedfor aggregation of conceptual models fragments:

• Classes with equal names are merged (a common list of attributes is formed).

• When the names of a class and attribute are equal, the attribute of the same name isremoved; the corresponding relationship between classes is created.

Manual merging and separation operations are performed by the user using PKBD.Thus, let’s clarify the operator 𝑇𝐼 𝑆−𝐶𝐼𝑀 from (1):

𝑇𝐼 𝑆−𝐶𝐼𝑀 ∶ 𝐶𝑆 → 𝐶𝑀, (3)

when 𝐶𝑆 is a spreadsheet in a canonicalized (relational) form; 𝐶𝑀 is a conceptual domainmodel. 𝐶𝑀 = ⟨𝐶𝑀𝑈𝑀𝐿, 𝐶𝑀𝑋𝑇𝑀⟩, when 𝐶𝑀𝑈𝑀𝐿 is a conceptual model in the form of a UMLclass diagram; 𝐶𝑀𝑋𝑇𝑀 is a conceptual model in the form of a concept map (XML Topic Maps).

Stage 2: Forming decision tables as platform-independent models. At this stage, wepro-pose using the formalism of decision tables containing all properties of concepts of a con-ceptual domain model (a CIM) with the ability to represent them in RVML for visualizationand subsequent modification.

Decision tables are a popular way to describe logical dependencies[Ere16]. Moreover, bothspecialized tools and general-purpose office suites, in particular, Microsoft Excel, can be usedto create them. The main advantage of decision tables is its visibility, especially in the case oflarge knowledge bases, when the use of graphic schemes leads to clutter or fragmentation ofthe representation, and the use of programming languages leads to excess information in theform of service operators and symbols.

Thus, let’s clarify the operator 𝑇𝐶𝐼𝑀−𝑃𝐼𝑀 from (1):

𝑇𝐶𝐼𝑀−𝑃𝐼𝑀 ∶ 𝐶𝑀 → 𝑅𝑀, (4)

when 𝐶𝑀 is a conceptual domain model; 𝑅𝑀 is a rule-based model which is a universal high-level abstraction of knowledge representation in the form of logical rules that is independent ofa target knowledge representation language (e.g., CLIPS, Jess, Drools, RuleML, etc.). Wherein:𝑅𝑀 = ⟨𝑅𝑀𝐷𝑇 , 𝑅𝑀𝑅𝑉𝑀𝐿⟩, when 𝑅𝑀𝐷𝑇 is a rule-based model in the form of a decision table;𝑅𝑀𝑅𝑉𝑀𝐿 is a rule-based model in the form of RVML diagram.

Stage 3: Modifying rule-based models as platform-dependent models in accordancewith the selected knowledge representation language. Automatic conversion of decision tablesto RVML models is carried out at this stage. In accordance with our approach, the developershould clarify the resulting RVML models taking into account the characteristics of the targetsoftware platform. In addition to CLIPS, we proposed to use:

• Drools, it is a business rule management system that uses an enhanced implementationof the Rete algorithm and supports standard of API Java Rules Engine. The obtainedrules can be integrated into existing Java codes.

Page 8: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

• PHP (Hypertext Preprocessor), it is a general-purpose scripting language widely used inweb applications. PHP modules (units) are easily to integrate, while they do not requirethe use of additional rule engine or any extensions.

The use of this software platforms (languages) use allows one to integrate the de-velopeddecision-making modules (components) into existing web-based intelligent systems.

Thus, let’s clarify the operator 𝑇𝑃𝐼𝑀−𝑃𝑆𝑀 from (1):

𝑇𝑃𝐼𝑀−𝑃𝑆𝑀 ∶ 𝑅𝑀 → 𝑅𝑀 ∗, (5)

when 𝑅𝑀 is a rule-based model (rules); 𝑅∗ is a modified rule-based model for a specific platform(a knowledge representation language).

Stage 4: Generating program codes and specifications using the extended PKBD toolkitthat supports new platforms (Drools and PHP) and implements a method for the automatedformation of conceptual domain models based on the transformation of spreadsheets.

Thus, let’s clarify the operator 𝑇𝑃𝑆𝑀−𝐶𝑂𝐷𝐸 from (1):

𝑇𝑃𝑆𝑀−𝐶𝑂𝐷𝐸 ∶ 𝑅𝑀 ∗ → 𝐾𝐵, (6)

when 𝑅∗ is a modified rule-based model for a specific platform; 𝐾𝐵 is source codes of a knowl-edge base on a target language (e.g., CLIPS, Drools or PHP).

Note that the integration process of the obtained modules requires programming skills.

4. Case Studies

Our modified approach was used to solve practical problems. In our case studies we use variousways for representing domain concepts and its relationships, and also different metamodelsand platforms. In particular, we developed prototypes of decision-making modules for thefollowing intelligent systems:

• “IS Expertise”[Ber15] designed to define causes of damages and destructions of technicalsystem elements.

• “SMS Organizer“ designed to provide detection of banned messages and clients who com-promise a SMS mailing service (“Detector” module).

• “HR Robot” designed to interpret facial features for detection of emotions.

Further, we briefly consider these case studies.

4.1. IS Expertise Software Module

“IS Expertise” (Industrial Safety Expertise) decision support system[Ber15] is intended to auto-mate the process of an industrial safety inspection of chemical and petrochemical equipment.This system automates collecting, storing and processing information for preparing and con-ducting the expertise and forming conclusions and reports. “IS Expertise” is a client-server

Page 9: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

application, which includes the subsystems: data storage (contains information about the in-spected objects, experts and other information for the inspection); previewing and enteringinformation; analytical processing that provides decision support on the basis of case-basedand rule-based expert system modules.

Let’s consider the application of the proposed approach for developing a prototype of rule-based expert system:

Stage 1: Creating domain models. The creation of domain models was carried out basedon a model of the dynamics of technical states[Ber07]. This model describes the main conceptsin the field of equipment degradation in the petrochemical industry, and includes a descriptionand relationships of the following main concepts: mechanical stresses (properties: magnitude,cycle, amplitude, etc.); materials (properties: name, type, resistance temperature, etc.); contactmedium (properties: form, pressure, temperature, chlorine ions, dissolved oxygen, etc.); degra-dation process (properties: mechanism name, kinetics, etc.). All models designed in the formof concept maps (Fig. 2, block 1).

Figure 2: The scheme of developing a prototype of rule-based expert system for “IS Expertise”

In addition to this model, we used information from a database of petrochemical equipmentfailures[Ber93], as well as the results of an industrial safety inspection in the form of reportscontaining spreadsheets (we extracted them in the CSV format). As a result, a conceptualdomain model was obtained. This model was further considered as a CIM (Fig. 2, block 1).

Stage 2: Forming decision tables as platform-independent models. The formation ofplatform-independent models was carried out using KBDS, which provided the import of theCIM from the format of concept maps (XML Topic Maps) and its transformation. As a result ofthis transformation, the concepts and relationships of a conceptual domain model were mapped

Page 10: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

with templates for facts and rules represented in the form of RVML schemes (Fig. 2, block 2-3).Stage 3: The formation of platform-specific models. Target platforms in this case were

CLIPS (for describing knowledge base codes) and PKBD (for interpreting expert system speci-fications). Therefore, a minor modification of the PIM in the form of RVML was required.

Stage 4: Generating program codes and specifications. The generation of programcodes and specifications was performed automatically. CLIPS code (Fig. 2, block 4) and spec-ifications for the PKBD interpreter have been obtained. These specifications provide the gen-eration of a user interface for creating, reading, updating and deleting (CRUD) elements of theknowledge base.

Thus, knowledge base was created, including 14 fact templates, 12 rule templates, 4 initialfacts and 20 specific rules (for one degradation process).

4.2. Detector Module

Banned messages fall into the category of SPAM messages, the sending of which violates theRussian Federal Law #38 “On Advertising”. The specialized web-based software module called“Detector” [4] was developed for a SMS mailing service. The “Detector” aim is to detect SPAMmessages and clients who sending them. This module includes an intelligent decision supportblock with a rule-based knowledge base.

Let’s consider the application of the proposed approach for developing this module:Stage 1: Creating domain models. The creation of domain models allowed us to identify

key abstractions and their relationships (Fig. 3, block 1). At the conceptual level, the mainconcepts are the followings: “SMS message”, “Keywords” aka “markers” of SPAM messages andthe “Sender”. Subsequently, the model was simplified in order to better match the structure oflogical rules during formalization.

An analysis of database containing 1 366 490 messages was performed to highlight combina-tions of markers (keywords). 829 SPAM messages of detected and blocked earlier clients wereselected as a training corpus.

As results of the training corpus analysis we identified five main groups of SPAM messages:propaganda of prohibited substances; unfair advertising; fraud; threats and insults; not bearingsigns of SPAM. For each group, a possible reaction of the decision support system was deter-mined, in particular: blocking the sending of a message (changing its status) and blocking theclient.

Stage 2: Forming decision tables as platform-independent models. The formation ofplatform-independent models was carried out in the form of a decision table containing infor-mation about 487 unique sets of keywords (Fig. 3, block 2). This decision table was developedby automated analysis of a message database. The table structure is formed by listing the prop-erties of all concepts, where each property is a column of this table.

Stage 3: The formation of platform-specific models. The formation of platform-specificmodels was carried out using PKBD, which provided the import of the developed decision tablewith subsequent modification of the obtained rules in the form of RVML, including the priorityof the rules and “by-default” values (Fig. 3, block 3).

Stage 4: Generating program codes and specifications. The generation of programcodes and specifications was performed automatically. Using the PKBD generator, 6 871 lines

Page 11: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

Figure 3: The scheme of developing a prototype of “Detector”

of PHP code were synthesized that describe 487 specific rules (Fig. 3, block 4).The priorities for rules were taken into account by sorting the atomic conditional operators

within the computational block (function). Thus, if the rule was fired than the inference wasstopped. In this case, the result of the last fired rule was returned.

Subsequently, the generated code was integrated to the “SMS Organizer” platform. Testingthe developed “Detector” module was carried out on the training corpus. In particular, themodified knowledge base contained 498 specific rules, which detected 653 banned messages.Thus the accuracy was 0.83. The average runtime was 0,00026 sec. Checking the database of 1366 490 messages by the “Detector” module resulted to detection of 1 145 SPAM messages and25 clients who compromised a SMS mailing service (but who were not previously blocked).

4.3. Emotion Features Interpretation Module

“HR Robot” is a project of a decision support system for selecting candidates for vacancies andchecking staff for motivation (study of the psychological situation in the team). “HR Robot”conceptually provides video interview processing, identifica-tion of facial features of emotionsand their interpretation. Interpretation of facial features is based on the rule-based knowledgebase.

Let’s consider the application of the proposed approach for developing this knowledge baseprototype:

Stage 1: Creating domain models. The creation of domain models. The obtained modelsdescribe face parts and its main elements that will be tracked in detecting emotions. A fragmentof one of the models is shown in Fig. 4, block 1.

Page 12: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

Face

+Form

Eye

+Width

+Heigth

+Movement

Nose

NoseWing

+Movement

NasolabialFold

+Form

Mouth

+Width

+Length

+Width

+Form

Figure 4: The scheme of developing a prototype of rule-based knowledge base for facial features in-terpretation

Stage 2: Forming decision tables as platform-independent models. The formationof platform-independent models. On this stage we developed decision tables on the basis ofthe constructed conceptual domain models and the knowledge of expert psychologists. Thesetables contain information about combinations of concept values, which can be used for emo-tions detection, for example, fear (Fig. 4, block 2). In fact, each row in the table is a logicaldecision-making rule.

Next, PKBD was used. PKBD imported decision tables and transformed them to rule-basedknowledge base structures. In the test example, this knowledge base seg-ment for the fearemotion includes: 5 fact templates, 1 rule template, and 11 specific rules.

Stage 3: The formation of platform-specific models. The formation of platform-specificmodels was also carried out using PKBD. The imported decision tables were refined in the formof RVML diagrams (Fig. 4, block 3).

Stage 4: Generating program codes and specifications. The generation of programcodes and specifications was performed automatically for PHP and Drools (Fig. 4, block 4). PHPcode in 250 lines and Drools code in 453 lines was generated for this segment of knowledgebase.

5. Evaluation

The evaluation of complexity of the proposed approach and tools carried out by the time cri-terion, using the corpus of test tasks and some results obtained earlier[Yur18, Dor18]. Duringtesting we calculated the time spent for tasks connected with rule-based knowledge bases en-

Page 13: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

gineering by the following ways:

• Using PKBD and KBDS in terms of importing conceptual models and decision tables (theMS Excel format is used), as well as automated transformation of tables to knowledgebase elements and automatic code generation.

• Manual programming (hand coding) of knowledge base elements in a specialized editor(e.g., Programmers Notepad).

The comparison of these methods showed that the use of the proposed approach can signif-icantly reduce the time spent in comparison with manual coding up to 60%[Dor19]. It shouldbe noted that in this experiment, decision tables were created manually and the test knowledgebases contain 10-12 rules. However, the efficiency can be even higher with the automated gen-eration of decision tables containing a large number of records (487, as in the above example).

The use of decision tables for rule-based knowledge base engineering is a good practice[Ere16],especially with a large number of rules. The use of model transfor-mations and specialized toolsreduces the complexity of codification of rules on this context.

6. Conclusion

In this paper, we propose a modified approach for the development of components of rule-based intelligent systems in the form of software decision-making modules. This approach isbased on the principles of the standardised model-driven methodology (MDE/MDA) and modeltransformations.

In our approach we can use spreadsheets as a source of information for creation of computation-independent models (CIM), and reduce the development time for these models. Decision tablesare used as an additional formalism for knowledge description that increases the efficiency ofprocessing a large number of rules. The proposed approach supports two additional platforms:Drools and PHP, which simplify the integration of developed decision-making modules withexisting web-based intelligent systems.

Our approach is implemented in the form of interacting tools: Personal Knowledge BaseDesigner (PKBD)[Yur20] and Knowledge Base Development System (KBDS)[Dor17].

Case studies and educational tasks demonstrated the applicability of our proposals.

Acknowledgments

The present study was partially supported by the Russian Foundation for Basic Re-search(Grant no. 19-07-00927). The contribution related to the use of spreadsheets for generatingcomputational-independent models (Sections 2 and 3.1) was supported by the Russian ScienceFoundation (Grant no. 18-71-10001).

Page 14: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

References

[Sil15] A. R. D. Silva. Model-driven engineering: A survey supported by the unified concep-tual model. Computer Languages, Systems & Structures, 43:139–155, Oct. 2015.

[Ber15] B. F. Berman, O. A. Nikolaichuk, A. Yu. Yurin, K. A., Kuznetsov. Support of Decision-Making Based on a Production Approach in the Performance of an Industrial SafetyReview. Chemical and Petroleum Engineering, 50(1-2):730–738, Mar. 1979.

[Spr10] J. Sprinkle, B. Rumpe, H. Vangheluwe, G. Karsai. Metamodelling: State of the Artand Research Challenges. Model-Based Engineering of Embedded Real-Time Systems,57–76, Oct. 2010.

[Men06] T. Mens, P. V. Gorp. A Taxonomy of Model Transformations. Electronic Notes inTheoretical Computer Science, 152:125–142, Mar. 2006.

[Dun08] N. Dunstan. Generating domain-specific web-based expert systems. Expert Systemswith Applications, 35:686–690, Oct. 2008.

[Nof15] M. A.Nofal, K. M., Fouad. Developing web-based Semantic and fuzzy expert systemsusing proposed tool. International Journal of Computer Applications, 112:38–45, Feb.2015.

[Rui11] B. Ruiz-Mezcua, A. Garcia-Crespo, J. Lopez-Cuadrado, I. Gonzalez-Carrasco. An ex-pert system development tool for non AI experts. Expert Systems with Applications,38:597–609, Jan. 2011.

[Shu09] L. Shue, C. Chen, W. Shiue. The development of an ontology-based expert systemfor corporate financial rating. Expert Systems with Applications, 36:2130–2142, Mar.2009.

[Kad13] M. A. Kadhim, M. A. Alam, H. Kaur. Design and implementation of intelligent agentand diagnosis domain tool for rule-based expert system. Proceedings of the Inter-national Conference on Machine Intelligence Research and Advancement. IEEE XplorePress, Katra, India, 619–622, Dec. 2013.

[Yur18] A. Yu. Yurin, N. O. Dorodnykh, O. A. Nikolaychuk, M. A. Grishenko. Designing rule-based expert systems with the aid of the model-driven development approach. ExpertSystems, 35(5):1–23, June 2018.

[Cab09] M. E. Cabello, I. Ramos, A. Gomez, R. Limon. Baseline-oriented modeling: An MDAapproach based on software product lines for the expert systems development. Pro-ceedings of the 1st Asian Conference on Intelligent Information and Database Systems.IEEE Xplore Press, Dong Hoi, Vietnam, 208–213, Apr. 2009.

[Can09] J. Canadas, J. Palma, S. Tunez. InSCo-Gen: A MDD Tool for Web Rule-Based Appli-cations. Web Engineering, 5648:523–526, June 2009.

[Cha04] G. W. Chaur. Modeling rule-based systems with EMF. Eclipse Corner articles.http://www.eclipse.org/articles/Article-Rule%20Modeling%20With%20EMF/article.html,Nov. 2004.

[Dor18] N. O. Dorodnykh, A. Yu. Yurin. A domain-specific language for transformation mod-els. Proceedings of the 1st Scientific-practical Workshop Information Technologies: Al-gorithms, Models, Systems, Irkutsk, Russia, 70–75, Sep. 2018.

[Dor17] N. O. Dorodnykh. Web-based software for automating development of knowledgebases on the basis of transformation of conceptual models. Open Semantic Technolo-

Page 15: Development of Software Decision-Making Modules Based on a …ceur-ws.org/Vol-2648/paper23.pdf · 2020. 8. 7. · gineering (MDE) or Model-Driven Development (MDD)[Sil15]. In this

gies for Intelligent Systems, 7:145–150, Feb. 2017.[Yur20] A. Yu. Yurin, N. O. Dorodnykh. Personal knowledge base designer: Software for

expert systems prototyping. SoftwareX, 11:100411, Jan. 2020.[Shi17] A. O. Shigarov, A. A. Mikhailov. Rule-based spreadsheet data transformation from

arbitrary to relational tables. Information Systems, 71:123–136, Nov. 2017.[Dor19] N. O. Dorodnykh, A. Yu. Yurin. Technology for rule-based expert system engineering

based on model transformations. Novosibirsk, SB RAS, 2019. (in Russian).[Ere16] A. P. Eremeev. Development of the apparatus of decision tables in the context of

creating hybrid intelligent systems. Proceedings of the 3rd All-Russian PospelovskyConference with International Participation – Hybrid and Synergetic Intelligent Sys-tems, 121–132, 2016. (in Russian).

[Ber07] A. F. Berman, O. .A. Nikolaychuk. Technical state space of unique mechanical sys-tems. Journal of Machinery Manufacture and Reliability, 36(1):10–16, Jan. 2007.

[Ber93] A. F. Berman, V L. Khramova. Automated data base for failures in pipelines andtubular high-pressure apparatus. Chemical and Petroleum Engineering, 29(2):63–66,Feb. 1993.