• 検索結果がありません。

A Study of Translation from OCL to SQL Taking Consistency into Consideration

N/A
N/A
Protected

Academic year: 2021

シェア "A Study of Translation from OCL to SQL Taking Consistency into Consideration"

Copied!
3
0
0

読み込み中.... (全文を見る)

全文

(1)

Japan Advanced Institute of Science and Technology

JAIST Repository

https://dspace.jaist.ac.jp/

Title 整合性を考慮したOCLからSQLへの変換に関する研究

Author(s) 吉積, 邦浩

Citation

Issue Date 2002‑03

Type Thesis or Dissertation Text version author

URL http://hdl.handle.net/10119/1544 Rights

Description Supervisor:片山 卓也, 情報科学研究科, 修士

(2)

A Study of Translation from OCL to SQL Taking Consistency into Consideration

Kunihiro Yoshidumi (010123) School of Information Science,

Japan Advanced Institute of Science and Technology February 15, 2002

Keywords: object-oriented, model consistency, UML, OCL, SQL.

Object-oriented methodologies are effective for software developments. In such method- ologies, software is considered as a collection of objects that incorporate both data struc- ture and behavior. A lot of object-oriented methodologies such as OMT, OOSE, Cataly- sis have been proposed. UML was proposed by unifying these methodologies. Currently, UML is widely used as standard notation for object-oriented developments, and standard- ized by OMG(Object Management Group).

There are nine diagrams in UML. We can describe the various views of a target system.

In designing the system, we construct multiple models using them. At that time, the mod- els may contain inconsistencies among diagrams. It is important to provide consistency among diagrams as such inconsistencies make the system unreliable. The models for a large systems, tend to be very complex. Therefore, it is difficult to detect inconsistencies of such models by hand. In this paper, we propose a method to support how to detect inconsistencies of the model.

In this paper, our concern is to consider consistency of the description. Inconsistencies of the description can be automatically detected with a computer system using a compar- atively shallow inference. Consistencies of the description have effectiveness; for example, consistency condition concerning appearance of model element.

Constraint of the model is described with OCL(Object Constraint Language) which is the standard language for constraint notation of UML. Constraint is described on class diagram and defines consistency condition of object diagram. We managed UML models with the RDB(Relational Data-Base). Some advantages are obtained by using the RDB.

The introduction is comparatively easy.

A development cost can be reduced.

Reliability improves.

Consistency conditions are translated to SQL query. Inconsistencies of the UML model can be detected by issuing SQL query to RDB. Then, the translation method from a part of OCL to SQL query was defined. t First of all, we must define the specification

Copyright c2002 by Kunihiro Yoshidumi

1

(3)

of tables. We generate tables for each classes in model. The object made from the class must be identified. Therefore, id which is an identifier to each object is introduced into the proposed table as an attribute. Besides, the table has the operation and the attribute of the class as an attribute of table. Moreover, starting from a specific object, we can navigate an association on the class diagram to refer to other objects and their attribute and operation. This reference is called a navigation. Navigation properties are introduced into the table as attribute. Because, to achieve the function of the navigation in RDB. A navigation property identified the class of association end. The function of the navigation of OCL is achieved by doing the join operation and this attribute in RDB.

We define the translation method from the subset of OCL to SQL query. A value of Boolean type returns When a OCL expression is evaluated. A return value of SQL query is always a table. Therefore, it is necessary to associate some meanings with the table. If a table of a return value is empty, it is “True”. And if it is not empty, it is “False”.

And, I implement the translator. Implement of the translator used C language. Bison was used for the part of parsing. And the part of lexical analysis used flex.

Moreover, a suitable model was set, some consistency conditions described with OCL was translated by using the translator for SQL query, and the example of the inconsistency detection was shown.

2

参照

関連したドキュメント

Standard domino tableaux have already been considered by many authors [33], [6], [34], [8], [1], but, to the best of our knowledge, the expression of the

The purpose of this study was to examine the invariance of a quality man- agement model (Yavas & Marcoulides, 1996) across managers from two countries: the United States

A knowledge of the basic definitions and results concerning locally compact Hausdorff spaces and continuous function spaces on them is required as well as some basic properties

The input specification of the process of generating db schema of one appli- cation system, supported by IIS*Case, is the union of sets of form types of a chosen application system

Note that these consistency conditions are not on the entire jet of a given order (as was the case for lines), just on the direction given by the common tangent.. The two

The goal of this work is to study the performance of the estimates produced by the EM algorithm, taking into account the method of moments and a random initialization method to

It is suggested by our method that most of the quadratic algebras for all St¨ ackel equivalence classes of 3D second order quantum superintegrable systems on conformally flat

В данной работе приводится алгоритм решения обратной динамической задачи сейсмики в частотной области для горизонтально-слоистой среды