Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

A Unified View Approach To Software Development Automation
PREMIUM
Số trang
193
Kích thước
6.4 MB
Định dạng
PDF
Lượt xem
1965

A Unified View Approach To Software Development Automation

Nội dung xem thử

Mô tả chi tiết

Vietnam National University, Hanoi

VNU University of Engineering and Technology

LE MINH DUC

A Unified View Approach to

Software Development Automation

Doctor of Philosophy Dissertation

in Information Technology

Hanoi - 2020

ĐẠI HỌC QUỐC GIA HÀ NỘI

TRƯỜNG ĐẠI HỌC CÔNG NGHỆ

LÊ MINH ĐỨC

PHƯƠNG PHÁP TIẾP CẬN

KHUNG NHÌN HỢP NHẤT CHO

TỰ ĐỘNG HÓA PHÁT TRIỂN PHẦN MỀM

LUẬN ÁN TIẾN SĨ NGÀNH CÔNG NGHỆ THÔNG TIN

Hà Nội - 2020

Vietnam National University, Hanoi

VNU University of Engineering and Technology

LE MINH DUC

A Unified View Approach to

Software Development Automation

Specialisation: Software Engineering

Code: 9480103.01

Doctor of Philosophy Dissertation

in Information Technology

Supervisors:

1. Assoc. Prof., Dr. Nguyen Viet Ha

2. Dr. Dang Duc Hanh

Hanoi – 2020

ĐẠI HỌC QUỐC GIA HÀ NỘI

TRƯỜNG ĐẠI HỌC CÔNG NGHỆ

LÊ MINH ĐỨC

PHƯƠNG PHÁP TIẾP CẬN

KHUNG NHÌN HỢP NHẤT CHO

TỰ ĐỘNG HÓA PHÁT TRIỂN PHẦN MỀM

Chuyên ngành: Kỹ thuật Phần mềm

Mã số: 9480103.01

LUẬN ÁN TIẾN SĨ NGÀNH CÔNG NGHỆ THÔNG TIN

NGƯỜI HƯỚNG DẪN KHOA HỌC:

1. PGS. TS. Nguyễn Việt Hà

2. TS. Đặng Đức Hạnh

Hà Nội – 2020

Declaration

I hereby declare that the materials presented in this dissertation are my own work, conducted

under the supervision of Assoc. Prof., Dr. Nguyen Viet Ha and Dr. Dang Duc Hanh, at

the Faculty of Information Technology, University of Engineering and Technology, Vietnam

National University, Hanoi. All the research data and results presented in this dissertation

are authentic and (to the best of my knowledge) have not previously been published in any

academic publications by other authors.

Le Minh Duc

Abstract

An important software engineering methodology that has emerged over the past twenty

years is model-based software development. At the heart of this methodology lies two

complementary methods: model-driven software engineering (MDSE) and domain-driven

design (DDD). While the aim of MDSE is ambitiously broad, DDD’s goal is more modest

and direct but not less important – to apply model-based engineering techniques to tackle the

complexity inherent in the domain requirements. The state-of-the-art DDD method includes

a set of principles for constructing a domain model that is feasible for implementation in a

target programming language. However, this method lacks the solutions needed to address

the following important design questions facing a technical team when applying DDD in

object oriented programming language (OOPL) platforms: (i) what constitues an essentially

expressive domain model and (ii) how to effectively construct a software from this model.

The dissertation aims to address these limitations by using annotation-based domain-specific

language (aDSL), which is internal to OOPL, to not only express an essential and unified

domain model but generatively construct modular software from this model.

First, we propose an aDSL, named domain class specification language (DCSL), which

consists in a set of annotations that express the essential structural constraints and the essential

behaviour of a domain class. We carefully select the design features from a number of

authoritative software and system engineering resources and reason that they form a minimum

design space of the domain class.

Second, we propose a unified domain (UD) modelling approach, which uses DCSL to

express both the structural and behavioural modelling elements. We choose UML activity

diagram language for behavioural modelling and discuss how the domain-specific constructs

of this language are expressed in DCSL. To demonstrate the applicability of the approach we

define the UD modelling patterns for tackling the design problems posed by five core UML

activity flows.

Third, we propose a 4-property characterisation for the software that are constructed

directly from the domain model. These properties are defined based on a conceptual layered

software model that includes the domain model at the core, an intermediate module layer

surrounding this core and an outer software layer.

Fourth, we propose a second aDSL, named module configuration class language (MCCL),

that is used for designing module configuration classes (MCCs) in a module-based software

architecture. An MCC provides an explicit class-based definition of a set of module con￾figurations of a given class of software modules. The MCCs can easily be reused to create

different variants of the same module class, without having to change the module class design.

Fifth, we develop a set of software tools for DCSL, MCCL and the generators associated

with these aDSLs. We implement these tools as components in a software framework, named

jDomainApp, which we have developed in our research.

To evaluate the contributions, we first demonstrate the practicality of our method by

applying it to a relatively complex, real-world software construction case study, concerning

organisational process management. We then evaluate DCSL as a design specification lan￾guage and evaluate the effectiveness of using MCCL in module-based software construction.

We focus the latter evaluation on module generativity.

We contend that our contributions help make the DDD method more concrete and more

complete for software development. On the one hand, the method becomes more concrete

with solutions that help effectively apply the method in OOPL platforms. On the other hand,

the method is more complete with solutions for the design aspects that were not originally

included.

Tóm tắt

Trong vòng hai thập kỷ gần đây, phương pháp luận phát triển phần mềm dựa trên mô

hình nổi lên là một phương pháp luận quan trọng trong kỹ nghệ phần mềm. Ở trung

tâm của phương pháp luận này có hai phương pháp có tính bổ trợ nhau là: kỹ nghệ

phần mềm hướng mô hình (model-driven software engineering (MDSE)) và thiết kế

hướng miền (domain-driven design (DDD)). Trong khi MDSE mang một mục tiêu

rộng và khá tham vọng thì mục tiêu của DDD lại khiêm tốn và thực tế hơn, đó là

tập trung vào cách áp dụng các kỹ thuật của kỹ nghệ dựa trên mô hình để giải quyết

sự phức tạp vốn có trong yêu cầu miền. Phương pháp DDD hiện tại bao gồm một

tập các nguyên lý để xây dựng một mô hình miền ở dạng khả thi cho triển khai viết

mã trên một ngôn ngữ lập trình đích. Tuy nhiên phương pháp này còn thiếu các giải

pháp cần thiết giúp giải đáp hai câu hỏi quan trọng mà người phát triển phần mềm

thường gặp phải khi áp dụng DDD vào các nền tảng ngôn ngữ lập trình hướng đối

tượng (object oriented programming language (OOPL)): (i) những thành phần nào

cấu tạo nên một mô hình miền có mức độ diễn đạt thiết yếu? và (ii) xây dựng một

cách hiệu quả phần mềm từ mô hình miền như thế nào? Luận án này đặt mục đích

khắc phục hạn chế trên của DDD bằng cách sử dụng ngôn ngữ chuyên biệt miền dựa

trên ghi chú (annotation-based domain-specific language (aDSL)), được phát triển

trong OOPL, để không chỉ biểu diễn một mô hình miền hợp nhất thiết yếu mà còn để

xây dựng phần mềm có tính mô-đun từ mô hình miền này.

Thứ nhất, luận án đề xuất một aDSL, tên là ngôn ngữ đặc tả lớp miền (domain

class specification language (DCSL)), bao gồm một tập các ghi chú để biểu diễn các

ràng buộc cấu trúc thiết yếu và các hành vi thiết yếu của lớp miền. Tác giả đã cẩn

thận lựa chọn các đặc trưng thiết kế từ một số nguồn tài liệu học thuật có uy tín về

kỹ nghệ phần mềm và kỹ nghệ hệ thống và lập luận rằng các đặc trưng này tạo thành

một không gian thiết kế tối giản cho lớp miền.

Thứ hai, luận án đề xuất một phương thức tiếp cận mô hình hóa miền hợp nhất,

trong đó sử dụng DCSL để biểu diễn các thành phần mô hình hóa cấu trúc và hành

vi. Luận án đã chọn ngôn ngữ biểu đồ hoạt động UML cho mô hình hóa hành vi và

trình bày cách biểu diễn các đặc trưng chuyên biệt trạng thái của ngôn ngữ này bằng

DCSL. Để chứng tỏ tính thực tiễn của cách tiếp cận, luận án định nghĩa một tập mẫu

mô hình hóa miền hợp nhất cho các bài toán thiết kế liên quan trực tiếp đến năm

luồng hoạt động UML cơ bản.

Thứ ba, luận án đề xuất một mô tả đặc điểm gồm bốn tính chất cho phần mềm

được xây dựng trực tiếp từ mô hình miền. Bốn tính chất này được định nghĩa dựa trên

mô hình khái niệm phần mềm dạng phân lớp, bao gồm mô hình miền ở lớp lõi, một

lớp mô-đun trực tiếp bao quanh lớp lõi và một lớp phần mềm ở ngoài.

Thứ tư, luận án đề xuất một aDSL thứ hai, tên là ngôn ngữ lớp cấu hình mô-đun

(module configuration class language (MCCL)), dùng để thiết kế các lớp cấu hình

mô-đun (module configuration classes (MCCs)) trong một kiến trúc phần mềm dựa

trên mô-đun. Mỗi MCC cung cấp một định nghĩa dạng lớp cho một tập các cấu hình

mô-đun của một lớp mô-đun. Các MCC có thể dễ dàng sử dụng lại để tạo ra các biến

thể của một lớp mô-đun mà không cần sửa thiết kế bên trong của mô-đun.

Thứ năm, luận án phát triển một bộ công cụ dành cho DCSL, MCCL và các bộ

sinh mã của các ngôn ngữ này, dưới dạng các thành phần của một phần mềm khung,

tên là JDOMAINAPP. Để đánh giá các kết quả trên, luận án trước hết trình diễn tính

thực tiễn của phương pháp bằng cách áp dụng vào một trường hợp nghiên cứu tương

đối phức tạp về phát triển phần mềm, liên quan đến quản lý quy trình tổ chức. Tiếp

theo, luận án đánh giá DCSL từ khía cạnh một ngôn ngữ đặc tả và đánh giá hiệu quả

việc sử dụng MCCL trong xây dựng mô-đun phần mềm một cách tự động. Chúng tôi

cho rằng, các đóng góp của luận án giúp phương pháp DDD trở nên cụ thể và đầy đủ

hơn. Một mặt, phương pháp trở nên cụ thể hơn với các giải pháp giúp áp dụng một

cách hiệu quả vào các nền tảng OOPL. Mặt khác, phương pháp trở nên đầy đủ hơn

với các giải pháp cho các khía cạnh thiết kế chưa được xem xét tới.

Acknowledgement

I would first like to thank my supervisors, Assoc. Prof. Nguyen Viet Ha and Dr. Dang

Duc Hanh, for their instructions and guidance throughout my research and the development

of this dissertation. I would also like to thank all the teachers at the Faculty of Information

Technology (University of Engineering and Technology, Hanoi) for the very kind support

that I have received throughout my research study at the department.

I am deeply grateful for my home university (Hanoi University) for providing the PhD

studentship and a gracious teaching arrangement, that has enabled me to have the time to

complete the required course works and research. I am also very grateful for the financial

support that I have additionally received from the MOET’s 911 fund and the NAFOSTED

project (grant number 102.03-2015.25), led by Assoc. Prof. Nguyen Viet Ha.

I would also like to thank all of my colleagues and fellow PhD students for the many

meaningful and entertaining discussions. Last but not least, I wish to thank my family for the

sacrifices that they have made and for all the love and encouragement that they have given

me during my PhD study.

Contents

Glossary v

List of Figures vii

List of Tables ix

1 Introduction 1

1.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1.1 Motivating Example . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1.2 Domain-Driven Design Challenges . . . . . . . . . . . . . . . . . 5

1.1.3 Research Statement . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.2 Research Aim and Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.3 Research Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.4 Dissertation Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2 State of the Art 13

2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.1.1 Model-Driven Software Engineering . . . . . . . . . . . . . . . . . 13

2.1.2 Domain-Specific Language . . . . . . . . . . . . . . . . . . . . . . 15

2.1.3 Meta-Modelling with UML/OCL . . . . . . . . . . . . . . . . . . 17

2.1.4 Domain-Driven Design . . . . . . . . . . . . . . . . . . . . . . . . 22

2.1.5 Model-View-Controller Architecture . . . . . . . . . . . . . . . . . 27

2.1.6 Comparing and Integrating MDSE with DDD . . . . . . . . . . . . 28

2.1.7 A Core Meta-Model of Object-Oriented Programming Language . . 29

2.1.8 Using Annotation in MBSD . . . . . . . . . . . . . . . . . . . . . 33

i

2.2 Domain-Driven Software Development with aDSL . . . . . . . . . . . . . 35

2.2.1 DDD with aDSL . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

2.2.2 Behavioural Modelling with UML Activity Diagram . . . . . . . . 36

2.2.3 Software Module Design . . . . . . . . . . . . . . . . . . . . . . . 40

2.2.4 Module-Based Software Architecture . . . . . . . . . . . . . . . . 41

2.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

3 Unified Domain Modelling with aDSL 46

3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

3.2 DCSL Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

3.2.1 Essential State Space Constraints . . . . . . . . . . . . . . . . . . 47

3.2.2 Essential Behaviour Types . . . . . . . . . . . . . . . . . . . . . . 48

3.3 DCSL Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

3.3.1 Expressing the Pre- and Post-conditions of Method . . . . . . . . . 56

3.3.2 Domain Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

3.4 Static Semantics of DCSL . . . . . . . . . . . . . . . . . . . . . . . . . . 57

3.4.1 State Space Semantics . . . . . . . . . . . . . . . . . . . . . . . . 58

3.4.2 Behaviour Space Semantics . . . . . . . . . . . . . . . . . . . . . 64

3.4.3 Behaviour Generation for DCSL Model . . . . . . . . . . . . . . . 68

3.5 Dynamic Semantics of DCSL . . . . . . . . . . . . . . . . . . . . . . . . 71

3.6 Unified Domain Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

3.6.1 Expressing UDM in DCSL . . . . . . . . . . . . . . . . . . . . . . 73

3.6.2 UD Modelling Patterns . . . . . . . . . . . . . . . . . . . . . . . . 76

3.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

4 Module-Based Software Construction with aDSL 88

4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

4.2 Software Characterisation . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

4.2.1 An Abstract Software Model . . . . . . . . . . . . . . . . . . . . . 90

4.2.2 Instance-based GUI . . . . . . . . . . . . . . . . . . . . . . . . . . 91

4.2.3 Model reflectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

4.2.4 Modularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

4.2.5 Generativity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

ii

4.3 Module Configuration Domain . . . . . . . . . . . . . . . . . . . . . . . . 95

4.3.1 One Master Module Configuration . . . . . . . . . . . . . . . . . . 95

4.3.2 The ‘Configured’ Containment Tree . . . . . . . . . . . . . . . . . 95

4.3.3 Customising Descendant Module Configuration . . . . . . . . . . . 96

4.4 MCCL Language Specification . . . . . . . . . . . . . . . . . . . . . . . . 97

4.4.1 Specification Approach . . . . . . . . . . . . . . . . . . . . . . . . 97

4.4.2 Conceptual Model . . . . . . . . . . . . . . . . . . . . . . . . . . 98

4.4.3 Abstract Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

4.4.4 Concrete Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

4.4.5 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

4.5 MCC Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

4.5.1 Structural Consistency between MCC and Domain Class . . . . . . 114

4.5.2 MCCGEN Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 116

4.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

5 Evaluation 119

5.1 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

5.1.1 UD Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

5.1.2 Module-Based Software Construction . . . . . . . . . . . . . . . . 121

5.2 Case Study: ProcessMan . . . . . . . . . . . . . . . . . . . . . . . . . . 122

5.2.1 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

5.2.2 Case and Subject Selection . . . . . . . . . . . . . . . . . . . . . . 122

5.2.3 Data Collection and Analysis . . . . . . . . . . . . . . . . . . . . . 123

5.2.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

5.3 DCSL Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

5.3.1 Evaluation Approach . . . . . . . . . . . . . . . . . . . . . . . . . 127

5.3.2 Expressiveness . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

5.3.3 Required Coding Level . . . . . . . . . . . . . . . . . . . . . . . . 132

5.3.4 Behaviour Generation . . . . . . . . . . . . . . . . . . . . . . . . 133

5.3.5 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . 134

5.3.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

5.4 Evaluation of Module-Based Software Construction . . . . . . . . . . . . . 135

5.4.1 Module Generativity Framework . . . . . . . . . . . . . . . . . . . 135

iii

5.4.2 MP1: Total Generativity . . . . . . . . . . . . . . . . . . . . . . . 137

5.4.3 MP2–MP4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

5.4.4 Analysis of MCCGen . . . . . . . . . . . . . . . . . . . . . . . . 143

5.4.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

5.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

6 Conclusion 145

6.1 Key Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

6.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

Bibliography 150

Appendices

A Helper OCL Functions for DCSL’s ASM 158

B MCCL Specification 164

B.1 Library Rules of the MCCL’s ASM . . . . . . . . . . . . . . . . . . . . . 164

B.2 Two MCCs of ModuleEnrolmentMgmt . . . . . . . . . . . . . . . . . . . . 167

C DCSL Evaluation Data 171

C.1 Expressiveness Comparison Between DCSL and the DDD Frameworks . . 171

C.2 Level of Coding Comparison Between DCSL and the DDD Frameworks . . 173

iv

Glossary

aDSL Annotation-Based DSL, page 36

ASM Abstract Syntax Meta-model, page 17

AtOP Attribute-Oriented Programming, page 35

BISL Behaviour Interface Specification Language, page 35

CSM Concrete Syntax Meta-model, page 17

DCSL Domain Class Specification Language, page 51

DDD Domain-Driven Design, page 22

DDDAL DDD with aDSLs, page 8

DSL Domain-Specific Language, page 15

JML Java Modelling Language, page 36

MCC Module Configuration Class, page 99

MCCL Module Configuration Class Language, page 99

MDA Model-Driven Architecture, page 13

MDD Model-Driven Development, page 13

MDE Model-Driven Engineering, page 13

MDSE Model-Driven Software Engineering, page 13

v

Tải ngay đi em, còn do dự, trời tối mất!