Dependency Analysis Use Cases

Slides:



Advertisements
Similar presentations
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Advertisements

XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
INTRODUCTION SOFTWARE HARDWARE DIFFERENCE BETWEEN THE S/W AND H/W.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Introduction to C Programming CE Lecture 7 Compiler options and makefiles.
Board Activity Find your seat on the seating chart Login – Remember your login is your first initial your last name and the last three numbers of your.
Large Scale Software Systems Derived from Dr. Fawcett’s Notes Phil Pratt-Szeliga Fall 2010.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Created By: Kevin Cherry. A library that creates a display to run on top of your game allowing you to retrieve/set values and invoke methods.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
I Power Higher Computing Software Development Development Languages and Environments.
INFO 637Lecture #71 Software Engineering Process II Product Implementation INFO 637 Glenn Booker.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
Software Design Derived from Dr. Fawcett’s slides CSE784 – Software Studio Fall 2009.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Building C# Applications
Appendix 1 - Packages Jim Fawcett copyright (c)
DEPTT. OF COMP. SC & APPLICATIONS
CSE691 Software Models and Analysis.
CSE791 - Distributed Objects, Spring 2002
Chapter 2: The Visual Studio .NET Development Environment
Abstract Factory Pattern
Visit for more Learning Resources
INF230 Basics in C# Programming
CSE775 - Distributed Objects, Spring 2006
Test-Driven Development
Software Metrics 1.
Dependency Analysis Use Cases
Project Center Use Cases Revision 2
MODULAR PROGRAMMING Many programs are too large to be developed by one person. programs are routinely developed by teams of programmers The linker program.
CSE687 – Object Oriented Design
The Development Process of Web Applications
Chapter ? Quality Assessment
Configuration Management Why do we need it? What does it do?
Project Center Use Cases
Cross Platform Development using Software Matrix
1. Introduction to Visual Basic
Satisfying Open/Closed Principle
Project Center Use Cases Revision 3
Project Center Use Cases Revision 3
Abstract Factory Pattern
Intent (Thanks to Jim Fawcett for the slides)
Module 1: Getting Started
Unit# 8: Introduction to Computer Programming
TRANSLATORS AND IDEs Key Revision Points.
CSC235 - Visual Studio Getting Started.
PROGRAM STRUCTURE CSC 111.
SLOC and Size Reporting
Hands-on Introduction to Visual Basic .NET
ASP.NET
Informatics 121 Software Design I
Social Media And Global Computing Using DLLs with MVC
Chapter 1 Introduction(1.1)
Charles Tappert Seidenberg School of CSIS, Pace University
How to organize and document your classes
ICT Programming Lesson 1:
Executable Specifications
CSE687 – Object Oriented Design
IS 135 Business Programming
Dependency Architecture
C# and ASP.NET Programming
Jim Fawcett CSE687 – Object Oriented Design Spring 2015
Presentation transcript:

Dependency Analysis Use Cases Jim Fawcett CSE681 – SW Modeling & Analysis Fall 2002

Background This presentation is concerned with dependencies between a program’s modules. A module is a relatively small partition of a program’s source code into a cohesive part. A typical module should consist of about 400 source lines of code (SLOC). Obviously some will be smaller, some larger, but this is a good target size Typical project sizes are: Modest size research project – 10,000 sloc  25 modules Modest size commercial product – 500 kslocs  1,250 modules

So, What is a Module? Microsoft, in .Net literature, defines a module as an Exe or DLL file, composed of metadata (type and other info) and IL (.Net intermediate language). An assembly is an Exe file and all the DLL files it loads to form an execution image. That is, an assembly is a collection of modules.

So, What is a Module – again! We mean something entirely different! A module is a logical partition of source code into a relatively small, cohesive part. It should contain: Comments that describe its purpose and history A public interface and private implementation A test stub with compilation directives that allow it to be selected for compilation or deselected. We will discuss C# and C++ module examples tonight.

Dependency Analysis Uses Test Plans It is essential to start testing those modules that have no dependencies other than on library code and working reused code. After those are tested we want to test just those depending on already tested code. For this use we want to know what other files a specific file depends on.

Dependency Analysis Uses Maintenance After a project is released to its customers it will be subjected to many maintenance changes. Fix latent errors Add new capabilities For this activity it is important to know what files depend on a specific file. What may break if I make this change? NOTE: this is the inverse relationship of the test case use.

Dependency Analysis Uses Documentation It is often easiest to understand a complex project if we study the top level modules, then study each of the modules it depends on, and so forth. This implies a need for the same type of dependency information as on the previous slide.

Dependency Information – C++ In C++ source code: All dependency information is encoded in #include statements. #include <someSystemFile> #include “someProjectFile” It is easy to find files that this file depends on. Just make a list of all the included files. This finds dependencies in documentation order

Dependency Information – C# Dependency information is not directly encoded in C# source code. Dependencies are established by references. In IDE, right-click references in solution explorer and choose add reference references.doc From command line add /r<filelist> switch, e.g., csc /r myLib.dll mySource.cs This information is encoded in the assembly’s metadata. Note that no information about the original source code is used or stored in the assembly metadata.

Extracting Dependencies from C# Source Given a set of source files to search and a specific file: Find all the class and struct declarations in the file, saving their names. Find all the files in the set that use those class and struct names. This finds all the files that depend on this file (Test Plan order).

Extracting Dependencies from Project The project file, e.g., myProj.csproj.txt, is an XML file that encodes, among other things, the source files that this file depends on. We could extract the required dependency information by a simple parsing of this file. This method has the drawback that the project may have been compiled from the command line without a project file. Also, in a typical project workspace there may be several projects. Which project file do we choose to analyze?

Display There are two types of dependency orders we have discussed: Test Plan order – C++ include analysis: Files that this file depends on. Documentation order – C# type analysis: Files that depend on this file. Our Dependency program should be able to display dependencies in either order. Remember that we need to display both direct and indirect source code dependencies.

Dependencies dependencies.vsd Pr2CRCs.vsd