Final Exam Review (extended)

Similar documents
The Strategy Pattern Design Principle: Design Principle: Design Principle:

Software Design COSC 4353/6353 D R. R A J S I N G H

Standard CMMI SM Appraisal Method for Process Improvement. (SCAMPI Version 1.1)

Design Pattern. CMPSC 487 Lecture 10 Topics: Design Patterns: Elements of Reusable Object-Oriented Software (Gamma, et al.)

340 Review Fall Midterm 1 Review

A TSP SM Roadmap to CMMI SM Implementation

What is a Pattern? Lecture 40: Design Patterns. Elements of Design Patterns. What are design patterns?

SDC Design patterns GoF

Factory Method. Comp435 Object-Oriented Design. Factory Method. Factory Method. Factory Method. Factory Method. Computer Science PSU HBG.

Association for Computing Machinery

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 6: Design Patterns

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

OO Frameworks. Introduction. Using Frameworks

An Introduction to Patterns

Laboratorio di Progettazione di Sistemi Software Design Pattern Creazionali. Valentina Presutti (A-L) Riccardo Solmi (M-Z)

CSE 70 Final Exam Fall 2009

Produced by. Design Patterns. MSc in Communications Software. Eamonn de Leastar

1 Software Architecture

A4 Explain how the Visitor design pattern works (4 marks)

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Design Pattern and Software Architecture: IV. Design Pattern

DESIGN PATTERN - INTERVIEW QUESTIONS

Application Architectures, Design Patterns

Design Patterns. CSC207 Fall 2017

SYLLABUS CHAPTER - 1 [SOFTWARE REUSE SUCCESS FACTORS] Reuse Driven Software Engineering is a Business

Creational. Structural

Software Architecture

Topics in Object-Oriented Design Patterns

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE

EINDHOVEN UNIVERSITY OF TECHNOLOGY

Object Oriented Paradigm

Design Patterns Reid Holmes

Introduction to Software Engineering: Object Design I Reuse & Patterns

CSE 331 Final Exam 12/9/13

Design Patterns. CSC207 Winter 2017

Design of Software Systems (Ontwerp van SoftwareSystemen) Design Patterns Reference. Roel Wuyts

Tuesday, October 4. Announcements

Top Down Design vs. Modularization

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

CSCD01 Engineering Large Software Systems. Design Patterns. Joe Bettridge. Winter With thanks to Anya Tafliovich

THOMAS LATOZA SWE 621 FALL 2018 DESIGN PATTERNS

Ch 1: The Architecture Business Cycle

An Introduction to Patterns

Software Design Patterns. Background 1. Background 2. Jonathan I. Maletic, Ph.D.

Review Software Engineering October, 7, Adrian Iftene

Ch 1: The Architecture Business Cycle

Design Patterns. Lecture 10: OOP, autumn 2003

What are patterns? Design Patterns. Design patterns. Creational patterns. The factory pattern. Factory pattern structure. Lecture 10: OOP, autumn 2003

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Lectures 24 and 25 Introduction to Architectural Styles and Design Patterns

Software Reuse and Component-Based Software Engineering

Object-Oriented Design

Design Patterns. SE3A04 Tutorial. Jason Jaskolka

The Design Patterns Matrix From Analysis to Implementation

Lecture 21: Design Patterns III

Keywords: Abstract Factory, Singleton, Factory Method, Prototype, Builder, Composite, Flyweight, Decorator.

GPI Asia Annual Conference 2012 CMMI for Development with CMMI for Service, or with ITIL

CPSC 310 Software Engineering. Lecture 11. Design Patterns

Using Design Patterns in Java Application Development

APPENDIX. Using Google Sites. After you read this appendix, you will be able to:

Summary of the course lectures

Minsoo Ryu. College of Information and Communications Hanyang University.

Software Engineering

A few important patterns and their connections

Plan. A few important patterns and their connections. Singleton. Singleton: class diagram. Singleton Factory method Facade

Part 5. Verification and Validation

Lecture 15 Software Testing

Data Quality and Integrity

Cpt S 122 Data Structures. Course Review Midterm Exam # 2

CSC207H: Software Design Lecture 6

Design Engineering. Overview

Design and Information Hiding

CS 520 Theory and Practice of Software Engineering Fall 2018

Creational Patterns. Factory Method (FM) Abstract Factory (AF) Singleton (SI) Prototype (PR) Builder (BU)

SA-CMM and the CMMI sm A Comparison

CS SOFTWARE ENGINEERING QUESTION BANK SIXTEEN MARKS

Design Pattern- Creational pattern 2015

Design Pattern What is a Design Pattern? Design Pattern Elements. Almas Ansari Page 1

Software Testing TEST CASE SELECTION AND ADEQUECY TEST EXECUTION

Design Patterns Design patterns advantages:

DESIGN PATTERNS FOR MERE MORTALS

Design Patterns. Manuel Mastrofini. Systems Engineering and Web Services. University of Rome Tor Vergata June 2011

Object Relationships

What is Software Architecture

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Applying Design Patterns to accelerate development of reusable, configurable and portable UVCs. Accellera Systems Initiative 1

Design Patterns. Dr. Rania Khairy. Software Engineering and Development Tool

2.5.1: Reforms in Continuous Internal Evaluation (CIE) System at the Institutional Level

CS 370 Design Heuristics D R. M I C H A E L J. R E A L E F A L L

OODP Session 4. Web Page: Visiting Hours: Tuesday 17:00 to 19:00

Exam in TDDB84: Design Patterns,

Topics. Software Process. Agile. Requirements. Basic Design. Modular Design. Design Patterns. Testing. Quality. Refactoring.

Adapter pattern. Acknowledgement: Freeman & Freeman

Lecture Chapter 2 Software Development

Rapid Bottleneck Identification A Better Way to do Load Testing. An Oracle White Paper June 2008

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

Design Patterns. CSC207 Fall 2017

Software Engineering

WHAT IS SOFTWARE ARCHITECTURE?

Component Design. Systems Engineering BSc Course. Budapest University of Technology and Economics Department of Measurement and Information Systems

Transcription:

Final Exam Review (extended) 15-413: Introduction to Software Engineering Jonathan Aldrich Hoare Logic { N > 0, M > 0 } p := 1 i := N while (i > 0) p := p * M; i := i - 1; { p = M N } Loop invariant? p=m^(n-i) && i >=0 Variant function? i Loop verification condition? INV && i>0 => p*m=m^(n-(i-1)) && (i-1) >= 0 p*m = M^(N-i+1) && i > 0 p = M^(N-i) && i > 0 1

Translation of Temporal Logic p = p holds in the current state A f = for all paths from the current state f E f = there exists some path from the current state such that f X f = in the next state on the path f G f = in all states along the path f f U g = along the path there will eventually be a state where g and for every state before that f F g = true U g = along the path there will eventually be a state where g Examples AG p = for all paths from the current state, in all states along the path, p holds EF p = there exists a path from the current state such that along the path there will eventually be a state where p holds Temporal Logic Translate these statements into temporal logic No matter what happens, the dike will never overflow at any time AG ~overflow No matter how I use my computer, at any point, there is always something I can do that will eventually shut down AG EF shutdown No matter how I use my computer, at any point, if I press the reset button then the computer will restart immediately afterwards AG (reset => AX restart) 2

Behavioral: Visitor Structure with many classes Want to perform operations that depend on classes Set of classes is stable Want to define new operations Easy to add new operations Groups related behavior in Visitor Adding new elements is hard Visitor can store state Elements must expose interface Behavioral: Observer When an abstraction has two aspects, one dependent on the other, and you want to reuse each When change to one object requires changing others, and you don t know how many objects need to be changed When an object should be able to notify others without knowing who they are Loose coupling between subject and observer, enhancing reuse Support for broadcast communication Notification can lead to further updates, causing a cascade effect 3

Behavioral: Template Method When an algorithm consists of varying and invariant parts that must be customized When common behavior in subclasses should be factored and localized to avoid code duplication To control subclass extensions to specific operations Code reuse Inverted Hollywood control: don t call us, we ll call you Ensures the invariant parts of the algorithm are not changed by subclasses Creational: Abstract factory System should be independent of product creation Want to configure with multiple families of products Want to ensure that a product family is used together Isolates concrete classes Makes it easy to change product families Helps ensure consistent use of family Hard to support new kinds of products 4

Creational: Factory Method A class can t anticipate the class of objects it must create A class wants its subclasses to specify the objects it creates Provides hooks for subclasses to customize creation behavior Connects parallel class hierarchies Creational: Singleton There must be exactly one instance of a class When it must be accessible to clients from a well-known place When the sole instance should be extensible by subclassing, with unmodified clients using the subclass Controlled access to sole instance Reduced name space (vs. global variables) Can be refined in subclass or changed to allow multiple instances More flexible than class operations Can change later if you need to Implementation Constructor is protected Instance variable is private Public operation returns singleton May lazily create singleton Subclassing Instance() method can look up subclass to create in environment 5

Structural: Proxy Whenever you need a more sophisticated object reference than a simple pointer Local representative for a remote object Create or load expensive object on demand Control access to an object Reference count an object Introduces a level of indirection Hides distribution from client Hides optimizations from client Adds housekeeping tasks What is an architecture? A software architecture is the structure or structures of a system, which comprise elements, their externally-visible properties, and the relationships among them But what kinds of structure? modules: showing composition/decomposition runtime: components at runtime allocation: how software is deployed Each is the basis of an Architectural View 6

Component-and-Connector (C&C) View Decomposition of system into components Components: principal units of run-time computation and data stores Examples: client, server Typically hierarchical And connectors Connectors: define an abstraction of the interactions between components Examples: procedure call, pipe, event announce Using architectural styles Guide composition of components and connectors And constraints (or invariants) What Is Institutionalization? Institutionalization involves implementing practices that Ensure processes can be communicated about (they are defined, documented, understood) Ensure the processes are effective, repeatable and lasting Provide needed infrastructure support Enable organizational learning to improve the process 7

Staged for a pre-defined set of process areas across an organization Maturity Level 5 OID, CAR Maturity Level 4 OPP, QPM Maturity Level 3 RD, TS, PI, VER, VAL, OPF, OPD, OT, IPM, RSKM, DAR, OEI, IT, ISM Maturity Level 2 REQM, PP, PMC, MA, PPQA, CM, SAM Maturity Level 1 Initial: Process Unpredictable, Poorly Controlled, and Reactive Model Representations Optimizing: Focus on Process Improvement Quantitatively Managed: Process Measured and Controlled Defined: Process Characterized for the Organization and Is Proactive Continuous PA z PA y PA x Essentially the Same Content but Organized in a Different Way. Copyright 2003, CSSA, Inc. Used with permission. 5 4 3 2 Managed: Process Characterized for Projects and Is Often Reactive CL5 CL4 CL3 CL2 CL1 (Initial) Process Area Capability CL0 (Incomplete) Black-box Testing Verify each piece of functionality of the system Black-box: don t look at the code Systematic testing Test each use case Test combinations of functionality (bold + italic + font + size) Generally have to sample Test incorrect user input Test each equivalence class (similar input/output) Test uncommon cases Generating all error messages Using uncommon functionality Test borderline cases Edges of ranges, overflow inputs, array of size 0 or 1 8

White-box Testing Look at the code (white-box) and try to systematically cause it to fail Coverage criteria: a way to be systematic Function coverage Execute each function Statement coverage Most common Edge coverage Take both sides of each branch Path coverage Note: infinite number of paths! Typical compromise: 0-1-many loop iterations Condition coverage Choose a set of predicates Cover each statement with each combination of predicates Exercise data structures Each conceptual state or sequence of states Typically cannot reach 100% coverage Especially true of paths, conditions 9