Научная статья на тему 'HP-ГРАФ КАК ОСНОВА ДЛЯ РАЗРАБОТКИ РЕДАКТОРА ВИЗУАЛЬНЫХ МОДЕЛЕЙ DSM-ПЛАТФОРМЫ'

HP-ГРАФ КАК ОСНОВА ДЛЯ РАЗРАБОТКИ РЕДАКТОРА ВИЗУАЛЬНЫХ МОДЕЛЕЙ DSM-ПЛАТФОРМЫ Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
68
21
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
DOMAIN-SPECIFIC LANGUAGE / DSM PLATFORM / VISUAL MODEL / GRAPH MODEL / HP-GRAPH / ALGORITHMS ON GRAPHS / ПРЕДМЕТНО-ОРИЕНТИРОВАННЫЙ ЯЗЫК / DSM ПЛАТФОРМА / ВИЗУАЛЬНАЯ МОДЕЛЬ / ГРАФОВАЯ МОДЕЛЬ / HP-ГРАФ / АЛГОРИТМЫ НА ГРАФАХ

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Суворов Н. М., Лядова Л. Н.

Языково-ориентированный подход становится все более популярным при разработке информационных систем, однако существующие DSM -платформы, реализующие эту парадигму, имеют существенные ограничения, включающие недостаточные выразительные возможности моделей, используемых для реализации редакторов визуальных моделей для сложных предметных областей, и ограниченные возможности для трансформации визуальных моделей. Визуальные языки обычно основаны на графовых моделях, однако используемые типы графов имеют определенные ограничения, такие как недостаточная выразительность, сложность представления моделей большой размерности, а также трудоёмкость выполнения операций. Для создания инструмента, не имеющего описанных выше ограничений, необходима разработка новой формальной модели. HP -графы могут стать решением данной проблемы. Имеется не только возможность создавать новые визуальные языки для различных предметных областей на их основе, но и разработать эффективные алгоритмы для выполнения различных операций над моделями, построенными с использованием этих языков. В статье дано определение HP -графа, а также приведено обоснование выразительной мощности предложенной модели, описаны основные операции для HP -графов. Выбранный графовый формализм объединяет возможности различных типов графов для представления визуальных моделей и позволяет создать на его основе гибкий редактор моделей для DSM -платформы, реализовать эффективные алгоритмы выполнения операций, в частности, трансформации моделей.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

HP-GRAPH AS A BASIS OF A DSM PLATFORM VISUAL MODEL EDITOR

The language-oriented approach is becoming more and more popular in the development of information systems, but the existing DSM platforms that implement this paradigm have significant limitations, including insufficient expressive capabilities of the models used to implement visual model editors for complex subject areas and limited abilities to transform visual models. Visual languages are usually based on graph models, but the types of graphs used have certain limitations, such as insufficient expressiveness, the complexity of representing large-dimensional models and operation executions. For creating a tool that does not have the described constraints, development of a new formal model is needed. HP -graphs can become a solution for this problem. It is not only possible to create new visual languages for diverse domains based on them, but also to develop efficient algorithms to perform different operations on models constructed using these languages. The HP -graph definition is given and the justification of the expressive power of the proposed model is presented, the main operations for HP-graphs are described. The chosen graph formalism combines the capabilities of different types of graphs to represent visual models and allows creating a flexible model editor for the DSM platform, to implement effective algorithms of performing operations, in particular, model transformations.

Текст научной работы на тему «HP-ГРАФ КАК ОСНОВА ДЛЯ РАЗРАБОТКИ РЕДАКТОРА ВИЗУАЛЬНЫХ МОДЕЛЕЙ DSM-ПЛАТФОРМЫ»

DOI: 10.15514/ISPRAS-2020-32(2)-12

HP-Graph as a Basis of a DSM Platform Visual Model Editor

N.M. Suvorov, ORCID: 0000-0003-2871-9757 <[email protected]>

L.N. Lyadova, ORCID: 0000-0001-5643-747X <[email protected]> National Research University Higher School of Economics, 38 Studencheskaya Ulitsa, Perm, 614070, Russia

Abstract. The language-oriented approach is becoming more and more popular in the development of information systems, but the existing DSM platforms that implement this paradigm have significant limitations, including insufficient expressive capabilities of the models used to implement visual model editors for complex subject areas and limited abilities to transform visual models. Visual languages are usually based on graph models, but the types of graphs used have certain limitations, such as insufficient expressiveness, the complexity of representing large-dimensional models and operation executions. For creating a tool that does not have the described constraints, development of a new formal model is needed. HP-graphs can become a solution for this problem. It is not only possible to create new visual languages for diverse domains based on them, but also to develop efficient algorithms to perform different operations on models constructed using these languages. The HP-graph definition is given and the justification of the expressive power of the proposed model is presented, the main operations for HP-graphs are described. The chosen graph formalism combines the capabilities of different types of graphs to represent visual models and allows creating a flexible model editor for the DSM platform, to implement effective algorithms of performing operations, in particular, model transformations.

Keywords: Domain-specific language; DSM platform; visual model; graph model; HP-graph; algorithms on graphs.

For citation: Suvorov N.M., Lyadova L.N. HP-Graph as a Basis of a DSM Platform Visual Model Editor. Trudy ISP RAN/Proc. ISP RAS, vol. 32, issue 2, 2020. pp. 149-160. DOI: 10.15514/ISPRAS-2020-32(2)-12

HP-граф как основа для разработки редактора визуальных моделей DSM-платформы

Н.М. Суворов, ORCID: 0000-0003-2871-9757 <[email protected]>

Л.Н. Лядова, ORCID: 0000-0001-5643-747X <[email protected]> Национальный исследовательский университет «Высшая школа экономики», 614070, Россия, г. Пермь, ул. Студенческая, д. 38.

Аннотация. Языково-ориентированный подход становится все более популярным при разработке информационных систем, однако существующие DSM-платформы, реализующие эту парадигму, имеют существенные ограничения, включающие недостаточные выразительные возможности моделей, используемых для реализации редакторов визуальных моделей для сложных предметных областей, и ограниченные возможности для трансформации визуальных моделей. Визуальные языки обычно основаны на графовых моделях, однако используемые типы графов имеют определенные ограничения, такие как недостаточная выразительность, сложность представления моделей большой размерности, а также трудоёмкость выполнения операций. Для создания инструмента, не имеющего описанных выше ограничений, необходима разработка новой формальной модели. HP-графы могут стать решением данной проблемы. Имеется не только возможность создавать новые визуальные языки для различных предметных областей на их основе, но и разработать эффективные алгоритмы для выполнения

149

различных операций над моделями, построенными с использованием этих языков. В статье дано определение HP-графа, а также приведено обоснование выразительной мощности предложенной модели, описаны основные операции для HP-графов. Выбранный графовый формализм объединяет возможности различных типов графов для представления визуальных моделей и позволяет создать на его основе гибкий редактор моделей для DSM-платформы, реализовать эффективные алгоритмы выполнения операций, в частности, трансформации моделей.

Ключевые слова: предметно-ориентированный язык; DSM платформа; визуальная модель; графовая модель; HP-граф; алгоритмы на графах.

Для цитирования: Суворов Н.М., Лядова Л.Н. HP-граф как основа для разработки редактора визуальных моделей DSM-платформы. Труды ИСП РАН, том 32, вып. 2, 2020 г., стр. 149-160 (на английском языке). DOI: 10.15514/ISPRAS-2020-32(2)-12

1. Introduction

The study of any objects and processes, as well as their design, can barely be done without modeling, that is why software tools that allow non-IT specialists to build various models and formalize descriptions of objects and processes, or use modeling as a method of analysis for the study of objects are becoming more popular. Among the subject areas where modeling is particularly important, the development of information systems stands out. Currently the main approach to creating large information systems is a model-oriented approach [1]. Using it, developers usually deal only with models, which helps to ensure high quality of programs and prevent errors. CASE tools [2], which automate the system development process as much as possible due to the capabilities of visual modeling, model interpretation, and code generation based on the created models, are used especially for these purposes.

However, the traditional model-oriented approach to developing systems has its drawbacks, among which are:

• universality of the languages used for system development as languages operate not in terms of the subject area, but in constructs of the means by which the system is created;

• immutability of modeling languages, which does not allow all the subtleties, pitfalls, and limitations of the subject area to be displayed and taken into account;

• complexity of modification of the created systems as making changes to the system is possible only if there are development tools, source codes and a professional IT specialist;

• the impossibility of transitioning from one modeling language to another, but, creating large systems usually involves building several models describing the system from different points of view, with different granularity, so in such cases, there is a need to harmonize the models created by different professionals at different stages of development, which requires the ability to perform a transition from one modeling language to another.

These problems are solved by a paradigm called language-oriented programming [3]. This paradigm at the initial stage of development implies the creation of a metamodel of a subject area represented by one or more languages for solving various project tasks. These languages are used to build the necessary models for implementing the system. For implementing this approach DSM-platforms [4], language tools, and Meta-CASE systems, such as MetaEdit+ [5], which facilitate the development of domain-specific languages (DSL), are usually used. These languages operate in terms of the subject area and reflect the specifics of the tasks they solve. Moreover, subject-oriented languages can also consider the qualifications of users who will use them [6]. Nevertheless, existing tools only partially solve the problems of the traditional approach to modeling. To solve all the problems described above, a language tool must meet the particular requirements [4], [7], [8]. It should

• have an ability to define modeling languages for most subject areas;

• have an ability to dynamically change the modeling language;

• have an ability to alienate the created modeling language from the system where it has been developed;

• have an ability to modify the visual model of the system, rather than the source code, when a modeled process or system undergoes changes;

• unify representation and description of both models and metamodels, which allows a person to work with models and metamodels using the same tools, as well as, for example, provides the opportunity to perform vertical and horizontal transformations of visual models.

To create a tool that has all these features, the development of a new formal model is needed. Visual languages are usually based on graph models [1], but the types of graphs used have limitations, such as insufficient expressiveness of the created models, inefficiency, and complexity of operations. However, there is a more powerful formal model that solves these problems, but has not been used by developers yet, which is called a hypergraph with poles (HP-graph) [9], which connects the expressive capabilities of various types of graph models.

2. Related works

Many different tools have been created that allow people to develop modeling languages and build models based on these languages. These tools are Microsoft DSL Tools [10], Eclipse Sirius [11], MetaEdit+ [5], Microsoft Visio [12], QReal [13], etc. Detailed description and comparison of these platforms is given in [4]. All these platforms have some limitations and do not fully meet the requirements described above. Consideration of main constraints of the platforms is given below. Microsoft DSL Tools uses templates based on UML diagrams to create a new DSL, which leads to complexity and confusion when building model hierarchies and leads to appearance of limitations and inaccuracies in the resulting modeling language [8]. Moreover, this platform is characterized by the lack of the ability to dynamically change metamodels and transform models, as well as the inability to use DSLs outside of MS Visual Studio.

Eclipse Sirius offers a solution for rapid development of a graphical tool for DSM, but certain complex tasks may require changes to the EMF and GMF code. There is also a need for interpreted expressions which will be evaluated at runtime to provide a behavior specific to domain and representations and which can only be written in Acceleo, OCL or Java [11]. Sirius allows a user to perform horizontal transformations, but the knowledge of special addons is needed. MetaEdit+ contains only limited possibilities for transforming visual models. Models exported from the platform have their own format, which makes it difficult to use models created in this platform in other software tools.

The main drawbacks of Microsoft Visio are the inability to change the modeling language while the system is running, and the need to purchase MS Visio to use the tools developed on its basis. Also, a language metamodel can only be built using a UML class diagram, which significantly limits the platform's capabilities and complicates the process of creating languages.

The QReal platform does not have the ability to change the metalanguage, the ability to transform models, and this platform is characterized by the complexity of modifying the created modeling language.

As it seems from the Table 1, there is no platform that meets all the previously given requirements. Nevertheless, it should be noted that at least some of the requirements for tools are met by each of the platforms listed.

Table 1. The comparison of the tools

Requirements MS DSL Tools Eclipse Sirius Meta Edit+ MS Visio QReal

Ability to define modeling languages for most subject areas + + + + +

Ability to dynamically change the modeling language - - + - -

Ability to alienate the created language from the system - + - - -

Ability to modify the visual model + + + + +

Ability to perform a horizontal transformation - + - - -

Modeling and designing information systems tend to be done using special methodological approaches which can be divided to structural and object-oriented approaches. Despite the difference in the approaches and the division of all tools into two large groups depending on the approach underlying them (UML and "No-UML"), there are general modeling principles that the model should be aimed to implement.

The essence of the structural approach is to decompose a process into automated functions - the function of the upper level is decomposed and divided into subfunctions, refining properties of the functions at the upper levels of the hierarchy. Each subfunction, in turn, is decomposed into elements of the next level, and this happens until the obtained structure becomes trivial enough. Among the diagrams of this approach are Structural Analysis and Design Technique (SADT), a Data-Flow Diagram (DFD) and an Entity-Relation Diagram (ERD). The structural approach is used in simulation systems [15], as well as for functional and information modeling [16]. DSL can also be developed as part of this approach [17].

The essence of the object-oriented approach is an object decomposition, when the system is represented as a set of objects that exchange messages during the interaction. Moreover, the object itself in this case is an independent entity characterized by its state, behavior, and semantics [18]. Based on this approach, a set of DSLs [19],[20] is developed, but this approach is characterized by certain disadvantages, among which the complexity of building a hierarchy of models is highlighted. Using this approach does not always allow a person to properly express the concepts of the subject area, so the resulting language may have some limitations and inaccuracies. However, using it we can significantly reduce the language development time [21]. With all this in mind, the formalism underlying the visual model editor for a DSM-platform must meet the following requirements:

• to allow multi-level and multi-aspect modeling, which makes the decomposition of models from different points of view possible;

• to unify the description of models at different levels of the hierarchy, which means that the same formalism should be used to describe both models and metamodels;

• to allow development of modeling languages for a wide range of subject areas;

• to allow a user to discard constructions that are not details of the subject area, which will simplify the study of the developed language by end users;

• to perform both horizontal and vertical transformations.

Various types of graph formalisms are used for constructing and visualizing models, including oriented graphs, multigraphs [22], hypergraphs [23], hi-graphs [24], [25], meta-graphs [7], [26], P-graphs [27], [28]. Nevertheless, all these formalisms cannot meet all the mentioned requirements due to their certain limitations, therefore, development of a new graph model is needed.

3. Description of the graph model

Hypergraph with poles (HP-graph) is a graph model which meets the given requirements and can

be used as a base for a visual model editor.

HP-graph is an ordered triple G = (P, V, W), where P = {rci,...,rcB} is a set of external poles,

V = {vi,...,vm} is a non-empty set of vertices, W = {wi,...,wi} is a set of edges [9]. Let Pol be an

abstract set of all poles of the graph. Thus, 2P°l is a powerset of all poles of the graph. Then:

• Every vertex v e V is a subset of the set of all subsets of poles (v c 2P°l) but VvteV,VvjeV [i ± j^vtf^vj =0], which means that V is a set of mutually disjoint subsets of Pol.

• A set of external poles P is also a subset of the powerset of poles (P c 2P°l). This set consists of input and output poles of the graph (P = I(G)uO(G)). Each vertex of the graph v e V is also represented by a set of input (I(v)) and output (O(v)) poles Pv = {pn,...pv,} (VveV 3I(v) c Pv, 3O(v) c Pv[I(v)tuO(v) = v]). Sets of input and output poles can also intersect. If no poles are specified for a vertex, it is assumed that the vertex consists of a single pole, which is both input and output (I(v) = O(v)).

• Each edge w e W defines connections between vertices and is represented as a subset of the powerset of poles (w = Pw = {pWt,...,pWk} c 2P°l). An edge cannot be represented as an empty set (VweW: [Pw#0]). The edge can allow a vertex to be even linked to itself. Each edge must contain at least one input pole and one output pole, so for VveV(G), Vwe W(G) the following condition must be met: [3pewn(I(v)uI(G)) and3rewn(I(v)uI(G))].

An example of the hypergraph with poles is demonstrated in fig. i.

In this figure, external poles are represented by a set P = {ni,.,ns}, edges are represented by a set W = {wi,...,w6} and vertices are represented by a set V = {vi, v2, v3}. Every vertex contains a certain number of poles p, which are connected to other poles by means of hyperedges from the set W. In the HP-graph, edges and vertices are represented as sets of inputs and outputs, while the actual structure of these elements is hidden. Thus, it can be assumed that these elements are represented as a «Black box».

3.1 Main operations

To describe main operations on the HP-graph, let us define G = (P, V, W) as an original HP-graph, G = (P, V, W) as a resulting HP-graph, v as a vertex, pi as an inner pole, p2 as an outer pole and w as an edge.

The following operations add elements to an HP-graph:

• v + p1 is the addition of the inner pole to the node. The pole is added to both the vertex itself and the set of all poles of the graph:

Pol(G') = Pol(G)u{p1}, v' = vu{p1}.

• G + v is the addition of the node to the graph. If a cardinality of v is more than 0 (|v|>0), a vertex is added to the set of vertices V(G), and all poles of this vertex are added to the set of all poles of the graph:

Pol(G') = Pol(G)uv, V(G') = { V(G)u{v}| |v|>0}.

• G + w is the addition of the edge to the graph. An edge is formed from the already existing poles of the graph by combining them into a single set. Let I(w) be the set of input poles of an edge w, and O(w) be the set of output poles of w, then the operation is represented as:

W(G') = { W(G)u{w}| |I(w)|>0 and |O(w)|>0}.

• w + p1 is the addition of the inner pole to the edge. An existing pole belonging to one of the vertexes is added to the edge (3ve V(G) [p1 evj), which is represented as:

w' = w u{p1}.

• w + p2 is the addition of the outer pole to the edge. An existing pole belonging to the set of outer poles (p2eP(G)) of the graph is added to the edge:

w' = w u{p2}.

• G + p2 is the addition of the outer pole to the graph. A pole is added to both the set of outer poles of the graph G and the set of all poles:

Pol(G') = Pol(G) u{p2}, P(G') = P(G) u{p2}.

The following operations remove elements from an HP-graph:

• v - p1 is the removal of the inner pole from the node. When a pole is removed from a vertex, all its occurrences in the edges are cut off and it is removed from the set of all poles of the graph:

VweW(G) [w = {w\{p1} | {p1}ew}],

Pol(G') = Pol(G)\{p1}, v' = {v \{p1} | |v|>1}.

• G - v is the removal of the node from the graph. In addition to deleting a vertex, all occurrences of the poles of this vertex in the edges are cut off, and all poles of the vertex are removed from the set of poles of the graph:

Vwe W(G) Vpev [w = {w \{p}| pew}], Pol(G') = Pol(G) \{v}, V(G') = V(G) \{v}.

• G - w is the removal of the edge from the graph. Performing this operation only removes an edge from the set of all edges of the graph, leaving the external poles and vertex poles unchanged:

W(G') = W(G) \{w}.

• w - p1 is the removal of the inner pole from the edge. A pole is removed only from an edge w, without changing the set of all poles of the graph and the set of poles of the vertex to which it belongs, but if the resulting edge w' does not contain at least one input and one output pole, then the edge is removed:

w' = w \{p1}, W(G') = { W(G) \{w}| |I(w)| = 0 or |O(w)| = 0}.

• w - p2 is the removal of the external pole from the edge, which is equal to the previous operation.

• G - p2 is the removal of the outer pole from the graph, which also includes removing this pole from all edges that contain this pole:

VweW(G) [w = {w \{p2} | {p2}ew}], P(G') = P(G) \{p2}, Pol(G') = Pol(G) \{p2}.

3.2 Operations of Decomposition

A hypergraph with poles allows vertices and edges to be decomposed during the decryption operation. This feature makes multilevel representation possible. This possibility is achieved by correctly correlating the poles of the source and received graph which is done by implementing a mapping function.

The mapping f: v ^ P, which is a decoding function for a vertex v, must be concordant with the sets I(v) and O(v), so that VpeI(v): fp)eI(G)], VreO(v): fr)eO(G)]. Thus, the mapping of the pole pev to the next level of the hierarchy is represented as fp) = n, where neP(G), which means that a pole p becomes the external pole n for a resulting graph. Fig. 2 illustrates decomposition of the vertex v3 by a new HP-graph.

p5[I,O]

p6[I,O]

V3

p7[I]

p8[I]

p9[O]

G v3

Q n5[I,O]

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Open = (V3, G_v3)

-O

n6[I,O]

n9[O] О

n7[I]

n8[I]

-o-

Fig. 2. Example of vertex decomposition by a new HP-graph An edge can be decomposed similarly but with the help of mapping f: w ^ P which also must be concordant with sets of input (I(w)) and output (O(w)) poles, so that VpeI(w): [fp)eI(G)], VreO(w): [fr)eO(G)]. Thus, the mapping of the pole pew to the next level of the hierarchy is also represented as fp) = n, where n e P(G). Example of decomposition of the edge w6 is demonstrated in Fig. 3.

G_w6

n5[I,O] О

Fig. 3. Example of edge decomposition by a new HP-graph

As is seen, the decomposition of edges and vertices is almost equal, therefore, it is possible to define a common decryption algorithm for these structures.

To do it, let us define a set of structures Str = V u W. Hence, str e Str is a structure which can be either a vertex or an edge. The algorithm of the structure decomposition by a new HP-graph can be described as follows (Listing 1):

Procedure DecomposeStructure: G = new HPGraph() ; foreach pestr: if (pel(str) ) :

I(G) = I (G) u p; if (peO(str) ) : O(G) = O(G) u p; Openstr = Openstr u (str, G)

Listing 1. Pseudocode of the algorithm of structure decomposition by a new HP-graph As is seen from the algorithm, for every structure str several decoding operations can be defined. Generally, they can be presented as Openstr c str x Gail, where Gail is the set of all HP-graphs determined on the set Pol.

An edge of an HP-graph can also be decrypted by ordinary links between the poles. To implement this operation, it is necessary to define the set Ew = {ei,...,en} cI(w) x O(w) for each edge w e W, so that every link (e e Ew) is represented by a pair (p, r) provided thatp e I(w), r e O(w). Thus, the decoding of the edge w e W can be represented by the mapping functionf w ^ Ew, which replaces the hyperedge with normal connections between the input and output poles. Fig. 4 illustrates the example of hyperedge decoding by ordinary links. As Ew c I(w) x O(w), some input and output poles can be unconnected such as poles p9[O] and p11[I] in fig. 4.

3.3 Operations of Transformation

Many different approaches are used to transform visual models, but from the point of view of some scientists and developers [8], [29] the most promising one is the algebraic approach [30], which allows parsing graphs and checking graph models for consistency. This approach and its modifications are implemented in such tools as MetaLanguage [8], AGG [31] and VIATRA [32]. It is worth mentioning that there are also toolsets, such as ATL [14], that implement technologies from other areas of software engineering, but most of them have considerable restrictions. To determine transformation operations, it is necessary to give a definition to a subgraph of a HP-graph. A subgraph of the HP graph G = (P, V, W) is an HP-graph G = (P', V, W) that is a part of

- -y

Fig. 4. Example of edge decomposition by ordinary links

the graph G (P с P & (Vv'eV 3v e V: [V с v]) & W с W) and fulfills the condition Open' с Open. The subgraph must also meet the condition (1) to make transformation operations possible.

(Vv e V \ Vpartial [pev] & 3weW[pew]) ^ weW (1)

The set Vpartial is a set of the incomplete vertices in the graph, where Vpartial с V. A subgraph can contain vertices called incomplete whose sets of poles can only be a part of the sets of poles of the vertices of the original graph.

To perform a transformation, it is needed to select the source and the target graph and set production rules that describe the transformation. A production rule is represented as p = (Gl, Gr), where Gl is a pattern-graph and Gr is a replacement graph. Nevertheless, there is a restriction which is represented in (1) and must be satisfied to perform a transformation. It can be explained by the fact that it is unknown how certain hyperedges should change during the transformation while this restriction obliges to redefine all edges which are incident to poles involved in the transformation. To display all hyperedges, all the poles that are included in them must be displayed, so it is needed to add such auxiliary (incomplete) vertexes that store only those poles that belong to the displayed hyperedges.

An algorithm for the transformation can be divided into two functions. The first one removes a subgraph isomorphic to the pattern and the second one adds a replacement graph to the original graph.

The first step can be described as follows (listing 2):

Procedure Function DeleteGraph(HostG, GL) :

G' = Find_Isomorphic_Subgraph(HostG, GL); partials = {} foreach w'eW(G') : W(HostG) = W(HostG) \ {w'}; foreach v'eV(G'): if (v'eV(HostG)):

V(HostG) = V(HostG) \ {v'}; else:

partials = partials и {v'}; foreach p'eP(G'):

if (-3weW(HostG)[p' ew] ) : P(HostG) = P(HostG)\p'; return partials;

Listing 2. Pseudocode of the algorithm that removes a subgraph isomorphic to the pattern

The second step of the algorithm will be following (listing 3):

Procedure AddGraph(HostG, GR, partials): foreach peP(GR): if pt P (HostG):

P(HostG) = P(HostG) и {p}; foreach ve V(GR) : if (vtPartials):

V(HostG) = V(HostG) и {v}; foreach weW(GR):

W(HostG) = W(HostG) и {w};

Листинг 3. Псевдокод алгоритма добавления графа замены в исходный граф

These algorithms can be repeated several times as the set of transformation rules may not be limited to just one rule.

4. Justification of expressive power of formalism

It is possible to justify the transcending expressive power of the HP-graph by proving that the graph formalisms generally used for building and visualizing models can be represented as an HP-graph. Previously, it was mentioned that oriented graphs, hypergraphs, ^/-graphs, meta-graphs and P-graphs are most frequently used for such purposes. Table 2 describes formulas which represent these graph structures as an HP-graph.

Table 2. Representation of graphs as an HP-graph

Graph model Representation in the HP-graph G = (P, V, W)

Oriented Graph G = (V, E) V = P = V, where Vv'eV: [|v'| = 1] E = W, where We W: [|w'| = 2])

Hypergraph G = (X, E) X = P = V, where Vv'eV: [|v'| = 1] E = W

Hi-graph G = (X, E) {x | xeX & |x| = 1} = P' = V, where Vv'eV: [|v'| = 1] E u {x | x e X & |x| > 1} = W

Metagraph G = (V, MV, E) V = P = V, where Vv'eV: [|v'| = 1] E u MV = W

P-graph G = (P, V, W) P = P V = V W = W, where Vw'e W: [|w'| = 2]

From the table it can be concluded that the HP-graph has more expressive power than the previously described graph models. These graph models are special cases of the HP-graph; thus, the HP-graph is a generalization of all of these graph formalisms.

5. Conclusion

The definition of the mathematical apparatus underlying the visual model editor was given above, including a detailed description of the graph structure itself, as well as the operations that can be performed on it. For the selected graph formalism, algorithms for decoding vertices and edges, as well as algorithms for performing transformations, were described.

The HP-graph combines expressive possibilities of various types of graphs, therefore, algorithms that are designed for these types of graphs (particularly model transformation algorithms [33], [34]) can also be implemented for HP-graphs. The time complexity of model transformation algorithms can be reduced. The paper proves that HP-graph allows the creation of a flexible visual model editor based on this graph formalism for a DSM platform. Representing both vertices and links as sets of poles simplifies the object model of DSM editor and visual model editing algorithms. It is planned to develop a program that will demonstrate the practical significance of the selected graph formalism.

References / Список литературы

[1]. Koznov D.V. Basics of visual modeling. Knowledge laboratory, Internet University of information technologies; BINOM, 2008, 280 p. (in Russian) / Кознов Д. В. Основы визуального моделирования. Лаборатория знаний, Интернет-университет информационных технологий; БИНОМ, 2008 г., 280 стр.

[2]. Fugetta A.A classification of CASE technology. Computer, vol. 26, no. 12, 1993, pp. 25-38.

[3]. Ward M.P. Language Oriented Programming. Software - Concepts & Tools, vol. 15, no. 4, 1994, pp. 47-161.

[4]. Sukhov A.O. Comparison of visual object-oriented language development systems. Mathematics of software systems: Intercollegiate collection of scientific articles, 2012, issue 9, pp. 84-111 (in Russian) / Сухов А.О. Сравнение систем разработки визуальных предметно-ориентированных языков.

Математика программных систем: межвузовский сборник научных статей, 2012, вып. 9, стр. 84111.

[5]. Kelly S., Lyytinen K., Rossi. M. MetaEdit+: A Fully Configurable Multi-User and Multi-Tool CASE Environment. Lecture Notes in Computer Science, vol. 1080, 1996, pp. 1-21.

[6]. Lyadova L.N., Sukhov A.O., Zamyatina E.B. An Integration of Modeling Systems Based on DSM-Platform. In Proc. of the 18th International Conference on Computers, 2014, pp. 421-425.

[7]. Sukhov A.O., Lyadova L.N. MetaLanguage: a Tool for Creating Visual Domain-Specific Modeling Languages. In Proc. of the 6th Spring/Summer Young Researchers' Colloquium on Software Engineering,

2012, pp. 42-53.

[8]. Sukhov A.O. Development of tools for creating visual subject-oriented languages. PhD thesis, Moscow,

2013, 256 p. (in Russian) Сухов А.О. Разработка инструментальных средств создания визуальных предметно-ориентированных языков. Диссертация на соискание ученой степени кандидата физ.-мат. наук, М., 2013. 256 стр.

[9]. Sukhov A.O., Lyadova L.N., Poryazov S.A. Hypergraphs with poles as the basis for creating visual language editors. Mathematics of software systems, no. 15, 2018, pp. 97-104 (in Russian) / Сухов А.О. Лядова Л.Н., Порязов С.А. Гиперграфы с полюсами как основа для создания редакторов визуальных языков. Математика программных систем, вып. 15, 2018, стр. 97-104.

[10]. Microsoft. Visual Studio Docs. Overview of Domain-Specific Language Tools. Available at: https://docs.microsoft.com/en-us/visualstudio/modeling/overview-of-domain-specific-language-tools?view=vs-2019, accessed 10.01.2020.

[11]. Vujovic V., Maksimovic M., Perisic B. Comparative analysis of DSM Graphical Editor frameworks: Graphiti vs. Sinus. In Proc. of the 23rd International Electrotechnical and Computer Science Conference ERK, 2014, pp. 7-10.

[12]. Pavlinov A.A. A set of tools for developing problem-oriented visual languages. Bulletin of Saint Petersburg University, vol. 10, no. 1, 2007, pp. 86-96 (in Russian) / Павлинов А. А. Комплекс средств разработки проблемно-ориентированных визуальных языков. Вестник Санкт-Петербургского университета, том 10, вып. 1, 2007, стр. 86-96.

[13]. Terekhov A.N. Architecture of the visual modeling environment QReal. System programming, no. 4, 2009, pp. 172-197 (in Russian) / Терехов А.Н. Архитектура среды визуального моделирования QReal. Системное программирование, вып. 4, 2009, стр. 172-197.

[14]. Bezivin J., Jouault F., Touzet D. An Introduction to the ATLAS Model Management Architecture, Laboratoire d'Informatique de Nantes-Atlantique, Research Report No. 05.01, 2005, 24 p.

[15]. Jeong K., Wu L., Hong J. IDEF method-based simulation model design and development. Journal of Industrial Engineering and Management, vol. 2, no. 2, 2009, pp. 337-359.

[16]. Serifi V., Dasic P., Jecmenica R., Labovic D. Functional and Information Modeling of Production Using IDEF Methods. Strojniski vestnik - Journal of Mechanical Engineering, vol. 55, no. 2, 2009, pp. 131-140.

[17]. Imran S., Foping F., Feehan J., Dokas I. Domain Specific Modeling Language for Early Warning System: Using IDEF0 for Domain Analysis. International Journal of Computer Science Issues, 2010, vol. 7, no. 5, pp. 10-17.

[18]. OMG. Unified Modeling Language Specification. Available at: https://www.omg.org/spec/UML/2.5.1/PDF, accessed 15.02.2020.

[19]. James P., Knapp A., Mossakowski T., Roggenbach M. Designing Domain Specific Languages - A Craftsman's Approach for the Railway Domain Using CASL. Lecture Notes in Computer Science, vol. 7841, 2012, pp. 178-194.

[20]. Wise R., Brimhall E. A Systems Engineering Approach to the Development of a Domain-Specific Language for Functional Reference Architectures. In Proc. of the 16th Annual Conference on Systems Engineering Research, 2019, pp. 241-254.

[21]. Velter M. MD*/DSL Best Practices Update March 2011. Version 2.0. Available at: http://www.voelter.de/data/pub/DSLBestPractices-2011Update.pdf, accessed 20.03.2020.

[22]. Struchkov I.V. A formalism for describing software systems and computational processes for cyclic parallel processing of real time data. Information and control systems, issue 2, 2006, pp.8-13 (in Russian) / Стручков И.В. Формализм для описания программных систем и вычислительных процессов циклической параллельной обработки данных реального времени. Информационно-управляющие системы, вып. 2, 2006, стр. 8-13.

[23]. Courcelle B. Recognizable Sets of Graphs, Hypergraphs and Relational Structures: A Survey. Lecture Notes in Computer Science, vol. 3340, 2005, pp. 1-11.

[24]. Grosu R., Stefanescu Gh., Broy M. Visual Formalisms Revisited. In Proc. of the 1998 International Conference on Application of Concurrency to System Design, 1998, pp. 41-51.

[25]. Power J., Tourlas K. Abstraction in Reasoning about Higraph-Based Systems. Lecture Notes in Computer Science, vol. 2620, 2003, pp. 392-408.

[26]. Basu A., Blanning R. Graphs, Hypergraphs, and Metagraphs. In Metagraphs and Their Applications. Integrated Series in Information Systems, vol. 15, 2007, pp. 1-12.

[27]. Mikov A.I. Performance evaluation: textbook, Kuban State University, Krasnodar, 2013, 99 p.

[28]. Filatov D.Ju., Lyadova L.N. Development of P-graph based visual model editor. In Proc. of the VIII International Scientific and Technical Conference on Information Systems Development Technologies, 2017, pp. 113-118 (in Russian) / Филатов. Д.Ю., Лядова Л.Н. Разработка редактора визуальных моделей, основанного на P-графах. Материалы VIII Международной научно-технической конференции «Технологии разработки информационных систем», 2017, стр. 113-118.

[29]. Parra F. Dean T. Survey of Graph Rewriting applied to Model Transformations. In Proc. of the 2nd International Conference on Model-Driven Engineering and Software Development, 2014, pp. 431-441.

[30]. Ehrig H., Ehrig K., Prange U., Taentzer G. Fundamentals of Algebraic Graph Transformation, Springer, 2006, 388 p.

[31]. AGG. The Homebase. A brief Description of AGG. Available at: https://www.user.tu-berlin.de//o.runge/agg/agg-docu.html, accessed 12.03.2020.

[32]. Eclipse Modeling Project. Eclipse VIATRA. Available at: https://www.eclipse.org/viatra/, accessed 12.03.2020.

[33]. Seriy A.P., Lyadova L.N. An Approach to Graph Matching in the Component of Model Transformations. In Proc. of the 7th Spring/Summer Young Researchers' Colloquium on Software Engineering, 2013, pp. 41-46.

[34]. Sukhov A., Lyadova L.N. Horizontal Transformations of Visual Models in MetaLanguage System. In Proc. of the 7th Spring/Summer Young Researchers' Colloquium on Software Engineering, 2013, pp. 3140.

Information about authors Информация об авторах

Nikolai Mikhailovich SUVOROV - undergraduate student of the HSE (Perm). His research interests include language-oriented programming, modeling, language toolkits.

Николай Михайлович СУВОРОВ - студент бакалавриата НИУ ВШЭ (Пермь). Научные интересы включают языково-ориентированное программирование, моделирование, языковые инструментарии.

Lyudmila Nickolaevna LYADOVA - Candidate of Physical and Mathematical Sciences, associate professor of the Department of Information Technology in Business of the HSE (Perm). Research interests: modeling languages, modeling tools, domain specific modeling, language toolkits, semantic modeling.

Людмила Николаевна ЛЯДОВА - кандидат физико-математических наук, доцент, доцент кафедры информационных технологий в бизнесе НИУ ВШЭ (Пермь). Сфера научных интересов: языки моделирования, средства моделирования, предметно-ориентированное моделирование, языковые инструментарии, семантическое моделирование.

i Надоели баннеры? Вы всегда можете отключить рекламу.