Chulalongkorn University Theses and Dissertations (Chula ETD)

การตรวจจับแบบรูปการออกแบบเชิงพฤติกรรมด้วยแผนภาพคลาส

Other Title (Parallel Title in Other Language of ETD)

Detection of behavioral design patterns using class diagram

Year (A.D.)

2011

Document Type

Thesis

First Advisor

วิวัฒน์ วัฒนาวุฒิ

Faculty/College

Faculty of Engineering (คณะวิศวกรรมศาสตร์)

Degree Name

วิศวกรรมศาสตรมหาบัณฑิต

Degree Level

ปริญญาโท

Degree Discipline

วิศวกรรมคอมพิวเตอร์

DOI

10.58837/CHULA.THE.2011.1572

Abstract

แผนภาพคลาสยูเอ็มแอลเป็นแผนภาพที่ใช้ในการแสดงโครงสร้างและความสัมพันธ์กันของโครงสร้างต่างๆภายในระบบ ทำให้ผู้ออกแบบสามารถมองเห็นภาพรวมของระบบ โดยแผนภาพคลาสนี้สามารถนำมาประยุกต์ใช้ร่วมกับแนวทางที่ใช้ในการแก้ปัญหาในการออกแบบระบบที่เรียกว่า แบบรูปการออกแบบ ซึ่งแบบรูปการออกแบบจะถูกนำไปประยุกต์ใช้ในการออกแบบเพื่อช่วยให้การออกแบบเป็นไปในทิศทางเดียวกันกรณีที่มีผู้ออกแบบหลายคน และช่วยป้องกันการเกิดปัญหาตามมาเมื่อระบบมีการขยายขนาดให้ใหญ่มากขึ้นงานวิจัยนี้นำเสนอขั้นตอนวิธีและเครื่องมือในการการตรวจจับแบบรูปการออกแบบด้วยแผนภาพคลาสโดยเน้นที่การตรวจจับแบบรูปการออกแบบเชิงพฤติกรรม ซึ่งสามารถตรวจจับแบบรูปการออกแบบพฤติกรรมได้ทั้งสิ้น 7 รูปแบบ ซึ่งเป็นแบบรูปที่นิยมใช้ในการออกแบบระบบ โดยการตรวจจับแบบรูปการออกแบบนี้จะมีการตรวจจับแบบรูปทั้งที่เป็นแบบรูปตามแบบมาตรฐาน และแบบรูปที่ดัดแปลงจากมาตรฐานที่มีการเพิ่มเติมบางส่วนเข้าไปแต่ยังคงเป็นแบบรูปอยู่ ซึ่งข้อมูลนำเข้าของระบบที่ออกแบบนี้คือ ข้อมูลที่อยู่ในรูปแบบของแฟ้มเอ็กซ์เอ็มไอ โดยการตรวจจับจะทำการตรวจสอบหาโหนดหลัก (Anchor Node) เพื่อเป็นการหาจุดเริ่มต้นของแต่ละแบบรูปการออกแบบ และจะทำการตรวจหารายละเอียดของแบบรูปการออกแบบเฉพาะส่วนที่มีความสัมพันธ์กับโหนดหลักเท่านั้นเพื่อเป็นการลดการทำงาน การทดสอบจะทดสอบจากระบบซึ่งเป็นระบบที่ใช้งานจริง ซึ่งมีการใช้แบบรูปเชิงพฤติกรรมในการออกแบบ และจากกรณีทดสอบที่สร้างขึ้นที่มีการเพิ่มเติมบางส่วนเข้าไป ผลลัพธ์จะแสดงให้เห็นถึงชนิด และจำนวนของแบบรูปการออกแบบทั้งหมดที่พบ และระบุชุดของคลาส และความสัมพันธ์ ของแต่ละแบบรูปการออกแบบ การวัดความถูกต้องจะใช้ผู้เชี่ยวชาญทำการตรวจสอบข้อมูลผลลัพธ์ที่ได้

Other Abstract (Other language abstract of ETD)

The UML class diagram is the system design tool that helps the developer to see an overview of the system. It can be used with the design patterns to guide the direction in problem solving in the system design. The design patterns are applied to solve the difficult situations that may occur in the system development, to guide the designer to the same direction, and to prevent the problem of the system when the developer expands the system to large scale.This research proposes an alternative algorithm and a tool to detect the Behavioral design patterns using exhaustive pattern matching scheme. It can detect seven patterns that are frequently used. The input of this tool is a UML class diagram, which is expected in XMI file format, and the output is the detected behavioral patterns. The algorithm will find the anchor node, that use to be the starting class for finding the detail of the design patterns. The algorithm provides pattern matching rules for each specific pattern, not only for exact design pattern generic schema but also modified design pattern schema, which is more practical to the real world. The modified design pattern schema means the original design pattern schema polished with the cascading inheritance and multiple occurrences of implementing concrete classes. The test cases of this algorithm are the generate test case and the real system. The accuracy of the proposed tool is verified by a specialist.

Share

COinS