Extending Sequence Diagrams for Better Comprehension of Program Control-flow

Extending Sequence Diagrams for Better Comprehension of Program Control-flow. Masters thesis, King Fahd University of Petroleum and Minerals.

[img]
Preview
PDF (KFUPM ID: 201106210)
Master_Thesis_-_201106210_-_Taher_Ghaleb.pdf

Download (2MB) | Preview

Arabic Abstract

الهندسة العكسية للمخططات التسلسلية من الأنظمية البرمجية هي وسيلة فعّالة لتسهيل فهم البرامج لغرض الصيانة أو التعلم. في بداية هذا العمل، قمنا بعمل مسح أدبي لكل التقنيات في هذا المجال واستكشاف ميزاتها وعيوبها. في الواقع، لاحظنا أن تلك التقنيات ترتكز على تحليل البرامج إما بشكل ساكن أو ديناميكي أو الإثنان معاً وذلك لدعم فهم البرامج. بعد استكشاف الفجوات خلالها، قررنا تطوير طريقة خاصة بنا لفهم البرامج بشكل فعّال تختلف عن تلك الموجودة سابقاً من ناحية الهدف والمضمون. نحن نسعى من خلال تقنيتنا المقترحة إلى تغطية العديد من الفجوات التى لم تُعالج من قبل وذلك بتوفير حلول موسعة ومرنة تتركز على زيادة كفاءة فهم البرامج وذلك من خلال استخدام العديد من الإضافات للمخططات التسلسلية والتي نسعى من خلالها لعرض التفاعلات والأحداث الموجودة داخل البرامج بترميزات معبرة، سهلة الفهم، وغير معقدة. تتكون التقنية المقترحة في هذه الرسالة من ثلاث عمليات رئيسية وهي (1) استخراج المعلومات عن البرامج المراد فهمها من شفرة المصدر الخاصة بها (2) تحليل هذه المعلومات لتتبع كل التفاعلات الموجودة فيها (3) عرض هذه التفاعلات بشكل مرئي على واجهة المستخدم الرسومية. تتبلور حصيلة هذه الرسالة في إنتاج نموذج للتقنية المقترحة ومبنى خصيصاً للتعامل مع البرامج المصصمة بلغة الجافا وتم اختباره والتحقق من دقة عمله بتطبيقه على بعض مشاريع البرمجية المفتوحة المصدر. إضافةً إلى ذلك، تم تقييم المنتج النهائي باستخدام تجربة محكمة تقوم بقياس مدى فهم المستخدمين للبرامج باستخدام الطريقة المقترحة مقارنة بالطريقة القياسية وذلك من خلال العديد من المهام التي صممت لهذا الغرض. بعد تحليل نتائج هذه التجربة تبين أن الإضافات التي قمنا بتوسيع المخططات التسلسلية بها كانت بسيطة وغير معقدة، فقد ساعدت المستخدمين على فهم البرامج والأكواد البرمجية بوقت أسرع وبدقة أكبر مما هي عليه في حالة استخدام المخططات التسلسلية الإعتيادية.

English Abstract

The reverse engineering of sequence diagrams from software systems is an effective approach that can facilitate the comprehension of the behavior of programs for maintenance or learning purposes. After studying the state-of-the-art techniques, we observed that less research has been conducted for investigating how to precisely reflect program control-flow in the UML sequence diagram (SD). Actually, the lack of notations in the standard UML sequence diagram makes it unable to represent most of the interactions and flow of control of any given program. This leads to either losing such information or imprecisely representing them in the produced sequence diagrams, which in turn reduces program comprehension. The main objective of the thesis is to introduce an approach that employs a static program analysis for reverse engineering of sequence diagrams extended with notations that can expressively and precisely map the program control-flow represented in the source code. Our proposed approach composes three main techniques: control-flow information extractor, interactions tracer, and trace visualizer. Gathering program control-flow has been achieved using an extensible compiler, called Polyglot, that facilitates recovering the design of Java programs represented by Abstract Syntax Trees (ASTs). The collected information are then traced using a query-based tracer to identify all entry points, branches, and calls in the program and preserve them in an extended notation of UML 2.0. Finally, the resulting traces are visualized using UML sequence diagrams extended with new expressive notations. A proof-of-concept prototype of the proposed approach has been implemented and then validated over various samples of case studies that cover all our SD extensions, in addition to a well-known open-source Java project called Greenfoot. Finally, we have conducted a controlled experiment to evaluate our proposed SD extensions The evaluation was focused on measuring the effectiveness of the extensions for program comprehension as well as their complexity and precision compared with the UML standard of sequence diagrams. The obtained results indicate that having extended notations in sequence diagrams can significantly improve the understandability of the control-flow of programs. Although they could be somewhat complicated, they still have an advantage to providing a precise representation about the program control flow. Finally, we conclude this thesis by highlighting the main characteristics and limitation of our work and the possible directions for research in the future.

Item Type: Thesis (Masters)
Subjects: Computer
Department: College of Computing and Mathematics > Information and Computer Science
Committee Advisor: Alturki, Musab
Committee Members: Ahmed, Moataz and Alshayeb, Mohammad and Niazi, Mahmood
Depositing User: TAHER GHALEB (g201106210)
Date Deposited: 18 May 2016 04:43
Last Modified: 01 Nov 2019 16:33
URI: http://eprints.kfupm.edu.sa/id/eprint/139948