Download presentation
Presentation is loading. Please wait.
1
CSE691 Software Models and Analysis
2
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.
3
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
4
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.
5
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
6
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.
7
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
8
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
9
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.