sbse course 4. overview: design translate requirements into a representation of software focuses on...

23
SBSE Course 4

Upload: roy-kelley

Post on 26-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

SBSE

Course 4

Page 2: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Overview: Design

• Translate requirements into a representation of software

• Focuses on– Data structures– Architecture– Interfaces– Algorithmic details

• Also include– Resource and task allocation in a distributed system

Page 3: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Applications: Design

• Multiprocessor scheduling

• Task and resource allocation in distributed systems

• Hardware/software co-design in embedded systems

• Protocol construction

• Architecture design

Page 4: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Design

Page 5: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Multiprocessor scheduling

• Context: multiprocessor system

• Goal: minimize total run time of the task

• Multiprocessor scheduling: static/dynamic– Consider communication– Message passing– Waiting / possible deadlocks

• MPS (s/d): a.k.a. Load Balancing

Page 6: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

◙ A Multiprocessor Scheduling Scheme Using Problem-Space Genetic Algorithms

• Nodes: tasks• Edges:

communication• Weights: cost of

communication

Page 7: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Solution

• Discussion: possible approaches

Page 8: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

◙ A Modified Genetic Algorithm for Task Scheduling in Multiprocessor Systems

• Topic: Multiprocessor scheduling

• Approach: Partitioned GA-s– Divide and conquer– Divide the problem into

subproblems, solve them, then combine them

• Task graph is partitioned• Results: better than the

classical GA

Page 9: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

◙ Efficient Scheduling of Arbitrary Task Graphs toMultiprocessors using A Parallel Genetic Algorithm

• Uses a parallel implementation of GA– Examples of approaches

• Parallel evaluation• Parallel evolution/ island model

Page 10: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Discussion of techniques

Page 11: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Other articles

• Pareto-based Soft Real-Time Task Scheduling in Multiprocessor Systems– Discussion of Pareto: multi-objective

optimization– Discussion of elitism

Page 12: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Task and resource allocation in distributed systems

• Data, functionality usually allocated to specific nodes

• Node may need resources it owns or shared resources

• Inter-node communication may cause delays and reliability problems

Page 13: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Hardware/software co-design in embedded systems

• Hardware and software (designers) must cooperate– Hardware/software co-design

Page 14: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Implementation

Page 15: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Implementation

• Automatic programming, N-version programming, search for compiler optimisations and re-engineering

• Review: GP techniques

Page 16: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

◙ Automatic generation of object-oriented programs using genetic programming

• Generation of OO-programs– Memory zone allocated for “data”– Methods are supposed to learn to operate

properly on the attributes

• Application– Evolved structures like stack, queue using

primitive operations

Page 17: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

◙ Automatic programming and program maintenance with

genetic programming• Turing programs are evolved my means of

GP

• Once such program solves a problem, it is added to a library of reusable code snippets

• -> see modern ADF-s

Page 18: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

◙ Generating Multiple Diverse Software Versions with Genetic Programming

• A variant for N-Version programming

• Start more GP processes, each with its specific settings, aiming to synthesize “new ideas”.

Page 19: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Steps

• 1. The design and implement fitness function by using software specification.

• 2. Decide, which GP system parameters will be varied.• 3. Decide how parameters will vary.• 4. Choose the parameter value combinations to use in

GP runs.• 5. Let GP system to run for each combination of

parameter values.• 6. Measure fitness for each generated GP program.

Calculate the diversity.• 7. Select the program combinations with lowest failure

probability to the software fault tolerance structure.

Page 20: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Re-engineering

• A program becomes too old, to “cracky”, needs to be “refurbished”.

• ◙ Automatic re-engineering of software using genetic programming– Program parallelisation

• ◙ Genetic algorithm based restructuring of object-oriented designs using metrics– Restructure OO design

Page 21: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Search for compiler optimizations

• ◙ Optimizing for Reduced Code Space using Genetic Algorithms– Each optimization method is given a letter, the

problem is to find which is the better sequence of optimizations to apply

• ◙ GAPS: A Compiler Framework for Genetic Algorithm (GA) Optimised Parallelisation

Page 22: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Lab tasks (optional)

• Parameter control in Genetic Algorithms: dwindling mutation rate

• Multi-objective optimization– As many ‘1001’-s as possible– As many ‘11101’-s as possible

• Smart bug (GP application)

• Textual notation for UML research– http://www.infoiasi.ro/~ogh/tep

Page 23: SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic

Tasks

• Read the survey

• Skim over the articles

• Like one? Choose it!

• You are not supposed to like a 2-page article, unless you can implement the techniques described in it.

• Don’t like any? Find your own SBSE article on the net and talk to me about it.