CSE691 Software Models and Analysis.

Slides:



Advertisements
Similar presentations
Introduction to C++ An object-oriented language Unit - 01.
Advertisements

Abstract Data Types Data abstraction, or abstract data types, is a programming methodology where one defines not only the data structure to be used, but.
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Object Oriented Programming.  OOP Basic Principles  C++ Classes  September 2004  John Edgar 22.
Packages Jim Fawcett Copyright © 1994 – 2010 CSE687 – Object Oriented Design Spring 2010.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Abstract Data Types and Encapsulation Concepts
IT PUTS THE ++ IN C++ Object Oriented Programming.
 2003 Prentice Hall, Inc. All rights reserved. 1 Introduction to Classes and Objects Outline Introduction Classes, Objects, Member Functions and Data.
LECTURE LECTURE 17 More on Templates 20 An abstract recipe for producing concrete code.
An Object-Oriented Approach to Programming Logic and Design
chap13 Chapter 13 Programming in the Large.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
CS212: Object Oriented Analysis and Design Lecture 6: Friends, Constructor and destructors.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Learners Support Publications Classes and Objects.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
Chapter 10 Defining Classes. The Internal Structure of Classes and Objects Object – collection of data and operations, in which the data can be accessed.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
1 Announcements Note from admins: Edit.cshrc.solaris instead of.tcshrc Note from admins: Do not use delta.ece.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
Chapter 10 Classes and Objects In-Depth. Chapter 10 A class provides the foundation for creating specific objects, each of which shares the general attributes,
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Chapter 10: Classes and Data Abstraction. Objectives In this chapter, you will: Learn about classes Learn about private, protected, and public members.
CS-1030 Dr. Mark L. Hornick 1 Basic C++ State the difference between a function/class declaration and a function/class definition. Explain the purpose.
1 Becoming More Effective with C++ … Day Two Stanley B. Lippman
1 CS Programming Languages Class 22 November 14, 2000.
Chapter 12: Programming in the Large By: Suraya Alias 1-1.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Chapter 10: Classes and Data Abstraction. Classes Object-oriented design (OOD): a problem solving methodology Objects: components of a solution Class:
72 4/11/98 CSE 143 Abstract Data Types [Sections , ]
1 Introduction to Object Oriented Programming Chapter 10.
Programming Fundamentals1 Chapter 7 INTRODUCTION TO CLASSES.
1 n Object Oriented Programming. 2 Introduction n procedure-oriented programming consists of writing a list of instructions and organizing these instructions.
Classes CS 162 (Summer 2009). Parts of a Class Instance Fields Methods.
Chapter 5 Introduction to Defining Classes Fundamentals of Java.
Unit 10 Code Reuse. Key Concepts Abstraction Header files Implementation files Storage classes Exit function Conditional compilation Command-line arguments.
Appendix 1 - Packages Jim Fawcett copyright (c)
Copyright © Jim Fawcett Spring 2017
CSE775 - Distributed Objects, Spring 2006
CSE687 – Object Oriented Design
Abstract Data Types and Encapsulation Concepts
Chapter ? Quality Assessment
CSE687 - Object Oriented Design class notes Survey of the C++ Programming Language Jim Fawcett Spring 2004.
objects CIS 421 Kutztown University
Review: Two Programming Paradigms
Chapter 3: Using Methods, Classes, and Objects
11.1 The Concept of Abstraction
Abstract Data Types and Encapsulation Concepts
Component-Level Design
Computer Organization & Compilation Process
Classes and Data Abstraction
Abstract Data Types and Encapsulation Concepts
More Model Elements.
Classes and Objects.
Parameter Passing Actual vs formal parameters
Software Design Lecture : 9.
An Introduction to Software Architecture
Computer Organization & Compilation Process
ENERGY 211 / CME 211 Lecture 8 October 8, 2008.
Jim Fawcett CSE687 – Object Oriented Design Spring 2014
CSE687 – Object Oriented Design
SPL – PS1 Introduction to C++.
11.1 The Concept of Abstraction
Chapter 11 Abstraction - The concept of abstraction is fundamental in
Introduction to Classes and Objects
Presentation transcript:

CSE691 Software Models and Analysis

Models Model: A representation of the most essential features of a physical object or process used as a pattern for reasoning about, analyzing, or predicting behavior Abstract Model: A model with no concrete instances, e.g., a meta-model, or model of a model, used to reason about models. Software Development Model: A model of the phases, activities, products, and roles of people involved with the development of software. Software Computation Model: A model of the structure, behavior, and dependencies of a software component. Logical Model (Process Model): A computational model which focuses on processing to be done and the information necessary to do it. Physical Model: A computational model which focuses on structural and data dependencies of a software product, including source code which implements its design.

Information Cluster Model Type: Abstract system model Logical View: An information cluster encapsulates complex, sensitive, global, or device dependent data, along with functions which manage the data, in a container with internals not accessible to client view. Public access is provided by a series of accessor and mutator functions. Clients don’t have access to private functions or data. Implementation: C module using file scope for encapsulation. All private functions and global data are qualified as static. C++ class using public, protected, and private keywords to implement public and protected interfaces. Each class (or small, intimately related group of classes) should be given its own module. Each module implementing an information cluster contains a manual page and maintenance page which describe the logical model for the cluster and its chronological modification history. public functions private functions private data

Module Model Type: abstract system model Logical View: A module is the implementation package for a C or C++ based information cluster. Implementation: With two C files: Implementation file (with extension .c) contains all definitions of functions and data. Global data and all private functions are qualified with the static keyword. Every server module has a test stub in the implemen-tation file (usually embodied in a main function) which is conditionally compiled when testing the module in isolation. Header file (with extension .h) which contains the declarations of all public functions, data structures, and macros. No data elements should be public. or with two C++ files: Implementation file (with extension .cpp) which contains definitions of member functions and static member data. Server modules have test stubs incorporated in their implementation files. Header file (with extension .hpp) which contains class declaration(s). Public Interface functions go in the public sections of the declaration. Protected and pri-vate functions go in the corresponding sections. All data is defined as private member data in the private section of the class declaration.

Modular System Model Type: abstract system model Logical Model: collection of information clusters communicating through public interfaces. Implementation: One application module and a series of server modules. One C or C++ server module for each major program activity. The application module is the executive coordinator. Each server module has: an implementation file containing a test stub, with conditional compilation controls for stand alone testing. a header file which announces the module’s services to clients, e.g., the other servers and/or the application module. application.cpp server#1.hpp server#2.hpp server#1.cpp test stub #1 server#2.cpp test stub #2

Client-Server Model Type: software system model Logical Model: server provides a specialized service to clients clients are loosely coupled to server via message passing server accepts request messages which invoke its services it delivers report or result messages to its clients server regulates client access to shared resources many clients to one server relationship server is passive, does not initiate transactions server is responsible for data integrity Server may be: a program serving client programs on a network a module serving client modules in a program a class object serving modules or other client objects in a module Server provides a standard public interface to all clients. It provides a simple logical model for cli-ents while its internal processing may be complex. Object and module servers are primary source of software reuse.

C/C++ Compilation Model *.c, *.cpp source file preprocessor *.h, *.hpp header files transformed source code compiler *.obj object file other *.obj object files linker *.lib library files *.exe execution image

UNIX/C/C++ Computational Model C/C++ Program array of strings command line main(argc, agrv) {...} stream of chars function cin, stdin memory model stack static heap cerr, stderr cout, stdout

UNIX/C/C++ Memory Model global functions and data Static memory - public data and functions accessible to linker . Available for the life- time of the program. static memory - data and functions typed static. Accessible to all functions in this file only if defined in global area, outside all functions. Otherwise available only inside defining function. static functions and data stack memory - formal calling parameters & local data, available only in main. main stack frame first function invoked on this thread stack memory- defined only while computational thread passes through first function. more stack frames current function stack frame stack memory - formal calling parameters and local data, available only in this function while computational thread passes through function. free memory heap memory - available to anyone with a pointer to the allocated memory from the time of allocation until deallocated. The pointers must have a lifetime that covers the allocation. allocated heap memory