Presentation is loading. Please wait.

Presentation is loading. Please wait.

This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com I NTRODUCTION SBSE (Search-Based Software.

Similar presentations


Presentation on theme: "This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com I NTRODUCTION SBSE (Search-Based Software."— Presentation transcript:

1 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com I NTRODUCTION SBSE (Search-Based Software Engineering) مهندسی نرم افزار مبتنی بر جستجو ارائه دهنده مسلم افراشته مهر استاد راهنما دکتر کیوان پور دانشگاه آزاد اسلامی – واحد قزوین پاییز 94-93

2 © Copyright Showeet.com Suggestion Resources Analysis Simple Example Algorithms Representation and Fitness Function Why SBSE Introduction

3 © Copyright Showeet.com Introduction

4 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com I NTRODUCTION هدفهدف انتقال مسایل مهندسی نرم افزار از جستجوی مبتنی بر انسان (Human - Based) به جستجوی مبتنی بر ماشین (Machine - Based) با استفاده از تکنیک های بهینه سازی مبتنی بر جستجو (SBO=Search Based Optimization) تاریخچهتاریخچه معرفی توسط Harman و Jones (2001) اگر چه پیش تر دیگران نیز بهینه سازی مبتنی بر جستجو را به جنبه های مهندسی نرم افزار اعمال کردند. به عنوان مثال، در سال 1976 شخصی به نام Miller نیز سعی کرد بهینه سازی را به مسیله ی آزمون نرم افزار اعمال کند.

5 © Copyright Showeet.com Why SBSE Why SBSE

6 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE 1. غلبه بر مشکلات مهندسی نرم افزار سنتی مهندس نرم افزار همیشه دنبال پیدا کردن یه بالانس بین برآورده شدن اهداف مشتری، هزینه، زمان و... است اغلب اوقات پیدا کردن و انتخاب راه حل ها می تواند مشکل باشد به عنوان مثال، در قسمت زیر چند نمونه از سوالات SE را ذکر می کنیم :

7 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE 1. کوچکترین موارد آزمون که می توانند تمام شاخه های موجود در این برنامه را پوشش دهد چیست؟ 2. بهترین راه برای ساختار معماری این سیستم طوری که قابلیت نگهداری آن را افزایش دهد، چیست؟ 3. مجموعه نیازمندی ها که بین هزینه ی توسعه ی نرم افزار و رضایت مشتری، بالانس ایجاد نماید، چیست؟ 4. بهترین تخصیص منابع به این پروژه ی توسعه چیست؟

8 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE همه ی سوالات فوق و خیلی از سوالات مشابه می توانند با SBSE حل شوند

9 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE 2. 2. Generality ( عمومیت ) بهینه کردن مسائل مهندسی نرم افزار تنها با دو تعریف Representation و تابع Fitness 3. 3. Robustness ( قدرتمند ) الگوریتم های قدرتمندی در این زمینه معرفی شدند

10 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE 4. 4. Re-unification ( یکپارپگی مجدد ) ایجاد پیوستگی و ارتباط بین قسمت های مختلف مهندسی نرم افزار که در ظاهر هیچ ارتباطی به همدیگر ندارند. به عنوان مثال، دو مسئله ی مهندسی نیازمندی ها ( RE = Requirements Engineering ) آزمون رگرسیون ( RT = Regression Testing ) در ظاهر دو مسئله ی کاملا غیرمرتبط هستند

11 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com شکل 1. انتخاب نیازمندی ها و موارد آزمون

12 © Copyright Showeet.com Representation and Fitness Function Representation and Fitness Function

13 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE Defining a Representation and Fitness Function SBSE تنها با دو جز کلیدی آغاز می شود : The choice of the Representation of the problem. The definition of the Fitness function. SBSE تنها با دو جز فوق می تواند الگوریتم های بهینه سازی مبتنی بر جستجو را پیاده سازی نموده و نتیجه گیری کند. همین سادگی بحث، باعث جذابیت SBSE شده است.

14 © Copyright Showeet.com Algorithms

15 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE جستجوی تصادفی (Random search ) جستجوی تصادفی، ساده ترین شکل از الگوریتم های جستجویی است که در مهندسی نرم افزار استفاده می شود مشکل اساسی الگوریتم فوق، این است که از تابع برازندگی (Fitness ) استفاده نمی کند به همین دلیل در پیدا کردن یک راه حل بهینه ی سراسری (Global) دچار مشکل می شود

16 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE

17 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE الگوریتم تپه نوردی (Hill Climbing ) الگوریتم تپه نوردی به صورت زیر عمل می کند ابتدا جوابی به شکل تصادفی برای مساله تولید می شود در یک حلقه و تا زمانی که شرط توقف الگوریتم برقرار نشده است، به طور مکرر تعدادی همسایه برای حالت فعلی تولید شده و از میان حالت های همسایه بهترین آن ها انتخاب شده و جایگزین حالت فعلی می شود در حالت کلی بهینگی جوابی که این الگوریتم پیدا می کند محلی است.

18 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE

19 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE مفهوم محلی بودن بهینگی را در شکل زیر شرح می دهیم فرض کنید مسئله ای که می خواهیم به بهینه سازی آن بپردازیم، یک مسئله ماکزیمم سازی باشد. ماکزیمم سازی در تصویر فوق بدین معنی است که شخص نشان داده شده در پایان اجرای الگوریتم بر روی بلندترین قله قرار گیرد.

20 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE

21 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE

22 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE GP ES PSO EDA SS GS ACO SA TS Other Algorithms GA

23 © Copyright Showeet.com Simple Example Simple Example

24 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE Two Simple Example

25 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE EXP 01 Test Case Prioritisation in Regression Testing with Genetic Algorithm در این قسمت یک برنامه بر اساس روش مبتنی بر جستجو برای اولویت بندی مورد تست ( (TCP= Test Case Prioritisation در آزمون رگرسیون (Regression Testing)

26 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE ساده ترین راه این است که تمام آزمون های موجود را اجرا کنیم ( متد Retest-all) اما با بزرگ شدن نرم افزار، مجموعه تست نیز افزایش می یابد در نتیجه استفاده از متد Retest-all هزینه بر می شود. به خاطر محدودیت منابع، احتمالا امکان اجرای کامل مجموعه تست رگرسیون امکان پذیر نباشد بینش پشت تکنیک های TCP این است که مهمترین مجموعه تست ها می بایست زودتر اجرا شوند تست های « مهم » آنهایی هستند که خطاهای رگرسیون را زودتر تشخیص می دهند به عبارت دیگر، هدف TCP ماکزیمم کردن نرخ تشخیص خطای زودتر (earlier fault detection rate) می باشد

27 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE تنظیم پارامترها A. Representation در این قسمت بر روی شکل پایه ی Representation تمرکز می کنیم مجموعه تمام راه حل های کاندید ممکن = مجموعه تمام تست های ممکن موجود در مجموعه تست رگرسیون اگر مجموعه تست شامل n تست باشد، یک بردار با n عنصر نمایش می دهد

28 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE در قسمت زیر، یک راه حل کاندید ممکن برای TCP با اندازه 6 نمایش داده شده است : یک راه حل کاندید ممکن برای TCP با یک مجموعه تست با 6 آزمون {t0,…,t5}

29 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE Tree String Bit-matrix Integer array Integer vector String Binary String Object-based Matrix روش های نمایش معمول Vector

30 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE B. Genetic Parameters 1. عملگر انتخاب (Selection) بسیار وابسته به تابع برازندگی است. روش های انتخاب متعددی وجود دارد از قبیل انتخاب تصادفی، انتخاب رقابتی، انتخاب مبتنی بر چرخ رولت و... 1. عملگر تلفیق (Crossover) این عملگر بر عکس عملگر انتخاب ، مستقیما به ساختار نمایش راه حل ها وابسته است. 3. عملگر جهش (Mutation) این عملگر، برای تولید تغییرات کوچک به راه حل های فرزندان تعریف می شود.

31 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE برای تولید فرزندان o1 و o2 از روی والدین P1 و P2

32 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE 4. تابع برازندگی (Fitness Function) اولین گام پیشنهادی برای تعریف تابع برازندگی این است که دنبال یک Metric موجود باشیم که کیفیت آنچه دنبال بهینه سازیش هستیم را اندازه گیری کند در صورت در اختیار داشتن یک Metric مناسب، نه تنها راهی برای ارزیابی سریع و راحت روش مبتنی بر جستجوی استفاده شده بوده بلکه کانالی برای مقایسه ی نتایج با سایر تکنولوژی های موجود ی باشد. Metr ی که به طور گسترده برای ارزیابی تاثیر تکنیک های TCP مورد استفاده قرار می گیرد، میانگین درصد تشخیص خطا (APFD = Average Percentage of Faults Detected ) می باشد.

33 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE 4. تابع برازندگی (Fitness Function) هر چقدر میزان APFD بالاتر باشد، نشان دهنده ی خطاهایی است که زودتر در آزمون رخ می دهند البته محاسبه ی APFD نیازمند این است که بدانیم کدام آزمون باعث ایجاد کدام خطا می شود

34 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE EXP 02 Software Cost Estimation Using Artificial Neural Networks (ANN)

35 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE

36 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE a back-prop neural network is constructed with 22 input nodes and 2 output nodes The input nodes represent the distinguishing features of software projects the output nodes represent the effort required in terms of person month and the development time required to complete the project

37 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE The input nodes represent the following features of software projects: 1. Type of project (business, process control, scientific, etc.) 2. Programming language used in the project 3. Required software reliability 4. Database size 5. Product complexity 6.Execution time constraints 7. Storage constraints 8. Virtual memory volatility 9. Computer turnaround time 10. Analyst capability

38 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE 11. Application experience 12. Virtual memory experience 13. Programmer capability 14. Programming language experience 15. Modern programming practices 16. Software tools 17. Required development schedule 18. Personnel continuity on project 19. Type of computer used for software development 20. Software development mode 21. Requirements volatility 22. Number of deliverable source instructions

39 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE معماری کلی روش SBSE

40 © Copyright Showeet.com Analysis Analysis

41 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE Publication Numbers

42 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE Topic Areas Testing Maintena nce Design Managem ent Verificatio n General Requirem ents Others

43 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE TotalTestingGeneralSecurityAgentsManagementMetricsMaintenanceVerificationCodingDesignRequirementsNetwork 151131 PHD Thesis 10811 MSc Thesis 532Book

44 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE

45 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE میزان کارهای انجام شده بر روی تست نرم افزار، بیشتر از بقیه ی فیلدها توسط SBSE پوشش داده می شود. یکی از دلایل اصلی این امر، این است که اشیای تست به راحتی به عنوان یک مسئله ی SBSE فرموله بندی می شود.

46 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE تکنیک های بهینه سازی مبتنی بر جستجو (SBO) استفاده شده در SBSE

47 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE یکی از الگوریتم هایی که زیاد استفاده می شود، الگوریتم HC است این الگوریتم جستجوی محلی ساده استفاده بسیار زیادی دارد و همچنان می تواند در این زمینه، موثر باشد به دو دلیل اساسی : It is efficient: both quick to implement and fast in execution Though it may become trapped in a local optima, it can be restated multiple times این ویژگی های HC باعث شده است که برای فیلدهای جدید SBSE ( یا در حقیقت هر مسیله بهینه سازی دیگر ) مناسب باشد

48 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com

49 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com دسته بندی بعضی از کارهای انجام شده Venue Test problemSearchRepresentation methodObjective/ FitnessActivityYearAuthors Workshp :PROMIS E’08 RealGSBit string Maximize the number of attainable requirements, minimize cost Requirements decisions optimization [2008] Jalali et al. Lic. Thesis SyntheticGA A collection of supergenes Improve efficiency, modifiability and complexity Automated Architecture design [2008]Raiha Confere nce: SEAL ’08 SyntheticGPTree Minimize non functional property and error Non functional property optimization [2008]Arcuri لیست جامعی از پژوهش ها به صورت دسته بندی شده در Document آورده شده است.

50 © Copyright Showeet.com Suggestion Resources

51 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com W HY SBSE Hurman, M., Mansouri, S. A., and Zhang, Y. 2012. Search-Based software engineering: Trends, techniques and applications. ACM Comput. Surv. 45, 1, Article 11 (November 2012), 61 pages. Mark Harman, Phil McMinn, Jerffeson Teixeira de Souz, and Shin Yoo 2012. Search Based Software Engineering: Techniques, Taxonomy, Tutorial, pp. 1–59, 2012. Springer-Verlag Berlin Heidelberg 2012

52 This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com Thanks


Download ppt "This work is licensed under a Creative Commons AttributionCreative Commons Attribution © Copyright Showeet.com I NTRODUCTION SBSE (Search-Based Software."

Similar presentations


Ads by Google