• شماره ركورد
    22947
  • پديد آورنده

    رعنا صاحب نسق

  • عنوان
    ارائه‌ي روشي به‌منظور شناسايي و بازسازي خودكار ضدالگوهاي كد بر پايه‌ي مدل‌هاي گرافي احتمالي
  • مقطع تحصيلي
    كارشناسي ارشد
  • رشته تحصيلي
    هوش مصنوعي و رباتيكز
  • سال تحصيل
    1399
  • تاريخ دفاع
    1399/6/26
  • استاد راهنما
    دكتر بهروز مينايي
  • استاد مشاور
    دكتر مهرداد آشتياني
  • دانشكده
    كامپيوتر
  • چكيده
    روزانه برنامه‌هاي نرم‌افزاري فراواني توسعه داده مي‌شوند و به مرحله توليد مي‌رسند. توليد برنامه‌اي انعطاف‌پذير با قابليت به‌روزرساني سريع و ساده، يكي از اهداف اصلي برنامه نويسان است. متأسفانه دلايل گوناگوني همچون كمبود وقت، هزينه‌هاي زياد، فشار كاري و همچنين سهل‌انگاري خود برنامه نويسان منجر به توليد نرم‌افزارهايي با ساختارهاي نامناسب، پيچيده و غيرقابل تغيير مي‌شود. اين ساختارهاي پيچيده، فرايند گسترش و توسعه دادن نرم‌افزارها را معمولاً غيرممكن مي‌كند و درنهايت باعث نابودي كل سيستم مي‌شود. برنامه نويسان در پي آن هستند تا اين ساختارهاي سخت را - كه به ضدالگوهاي نرم‌افزاري معروف هستند - در سيستم‌ها شناسايي و در اولين فرصت آن‌ها را تصحيح يا به عبارتي بازسازي كنند. جهت شناسايي و بازسازي ضدالگوهاي نرم‌افزاري، تحقيقات فراواني به كمك هوش مصنوعي مخصوصاً در زمينه يادگيري ماشين شده است تا اين فرايند دقيق‌تر، سريع‌تر و همچنين به‌صورت خودكار انجام گيرد. در حال حاضر هنوز روشي جامع ارائه نشده است تا بتواند تمامي ضدالگوها را شناسايي و بازسازي كند. همچنين در بسياري از روش‌ها مسئله شناسايي به‌صورت يك مسئله رده‌بندي در نظر گرفته مي‌شود و با استخراج ويژگي‌هاي فراواني همراه است. باوجوداينكه برخي از كارهاي پيشين دقت خوبي در شناسايي ضدالگوها به دست آوردند، نياز به روشي است كه علاوه بر ويژگي‌هاي سيستم، روابط موجود بين ساختارهاي مختلف را نمايان كند. همچنين نياز به روشي كاربردي است كه مطابق با ويژگي‌هاي هر برنامه آموزش داده شود. در اين پايان‌نامه چارچوبي بر مبناي مدل‌هاي گرافي احتمالي هم براي شناسايي و هم‌جهت بازسازي ضدالگوها پيشنهادشده است. در اين مدل ابتدا كلاس‌هاي برنامه‌نويسي، روابط بينشان و ويژگي هر كلاس از كد برنامه استخراج‌شده است و سپس به مدلي گرافي احتمالي نگاشت شده است. اين نگاشت بر اساس روابط علت معلولي موجود به‌صورت ساختارهاي مختلفي پياده‌سازي شده است. درنهايت با داشتن ضدالگوهاي كد، شبكه بيزي متناسبي آموزش داده‌شده است كه بر اساس ويژگي‌هاي كلاس‌هاي همسايه، احتمال وجود يا عدم وجود ضدالگو را تعيين مي‌كند. جهت ارزيابي؛ مدل موردنظر روي شش ضدالگو مختلف و شش برنامه جاوا آموزش داده‌شده است. مدل پيشنهادي به‌طور ميانگين با دقت 85.16% و بازخواني 79% به شناسايي اين ضدالگوها پرداخته است. همچنين به كمك همين مدل روش‌هايي جهت بازسازي معرفي‌شده است و اثبات‌شده است كه اين بازسازي‌ها باعث درنهايت ايجاد سيستمي با انسجام بيشتر و وابستگي كمتر مي‌شود. هدف اصلي اين كار ارائه مدلي است تا روابط مختلف را حفظ ‌كند و نگاشت كاملي از كد باشد. همچنين اين مدل با ضدالگوهاي ديگري قابل‌گسترش است بدون آنكه در آموزش ضدالگوهاي ديگر، مشكلي ايجاد شود.
  • تاريخ ورود اطلاعات
    1399/10/15
  • عنوان به انگليسي
    A PGM-based approach for the automatic identification and refactoring of anti-patterns in codes
  • تاريخ بهره برداري
    9/17/2021 12:00:00 AM
  • دانشجوي وارد كننده اطلاعات

    رعنا صاحب نسق

  • چكيده به لاتين
    Software programs are developed and go into the production stage in a daily manner. One of the goals of programmers is to produce flexible programs that can be updated quickly and easily. Unfortunately, various reasons such as the lack of time, high costs, workload, as well as the negligence of the programmers themselves lead to the production of software with inappropriate, complex, and unchangeable structures. These complex structures often make the software development process impossible and ultimately destroy the entire system. Developers seek to identify and refactor these complex structures, known as software anti-patterns in software systems as quickly as possible. To identify and refactor software anti-patterns, a lot of research has been performed with the help of artificial intelligence, especially machine learning approaches. These works aim to identify anti-patterns more accurately, faster, and also automatically. To the best of our knowledge, until now, no comprehensive method has been introduced for identifying and refactoring all possible anti-patterns. Also, in several methods, the problem of identification was considered as a classification problem and hence required the extraction of a lot of features from the code structure. Although some of the previous works have been very accurate in identifying anti-patterns, there is still a need for a method that, in addition to system features, reveals the relationships between different structures. There is also a need for a practical method that is trained according to the characteristics of each program or system and performs the process of anti-pattern identification as well as refactoring accordingly. In this dissertation, a framework based on probabilistic graphical models is proposed for both the identification and refactoring of anti-patterns. In this model, first, the classes, the relationships between them, and the characteristics of each class are extracted from the source code and then these entities are mapped to a graphical model. This mapping has been implemented using various structures and based on the existing causal relationships. Finally, by having code anti-patterns, a well-proportioned Bayesian network is trained, which determines the probability of the presence or absence of anti-patterns based on the characteristics of neighboring classes. For evaluating the proposed approach, the model is trained on six different anti-patterns and six different Java programs. The proposed model has identified these anti-patterns with an average accuracy of 85.16% and a recall of 79%. Besides, with the help of this model, several methods for refactoring have been introduced and it has been proved that these refactoring methods will eventually lead to the creation of a system with more cohesion and less coupling. The major aim of this work is to provide a model to maintain the relationships between the software classes and to represent a complete mapping of the code. Also, this model can be expanded with other anti-patterns without causing any problems in the learning process which makes the approach easily extendable.
  • كليدواژه هاي فارسي
    شناسايي ضدالگو نرم‌افزاري , بازسازي كد , مدل گرافي احتمالي
  • كليدواژه هاي لاتين
    Software anti-patterns , Refactoring , Probabilistic graphical models