- The document summarizes techniques for slicing object-oriented programs. It discusses static and dynamic slicing, and limitations of previous approaches.
- It proposes a new intermediate representation called the Object-Oriented System Dependence Graph (OSDG) to more precisely capture dependencies in object-oriented programs. The OSDG explicitly represents data members of objects.
- An edge-marking algorithm is presented for efficiently performing dynamic slicing of object-oriented programs using the OSDG. This avoids recomputing the entire slice after each statement.
This document presents a new approach called mixed S-D slicing that combines static and dynamic program slicing using object-oriented concepts in C++. Static slicing analyzes the entire program code but produces larger slices, while dynamic slicing produces smaller slices based on a specific execution but is more difficult to compute. The mixed S-D slicing aims to generate dynamic slices faster by leveraging object-oriented features like classes. An example C++ program is provided to demonstrate the S-D slicing approach using concepts like classes, inheritance, and polymorphism. The approach is intended to reduce complexity and aid in debugging object-oriented programs by combining static and dynamic slicing techniques.
The document discusses algorithms and their analysis. It covers:
1) The definition of an algorithm and its key characteristics like being unambiguous, finite, and efficient.
2) The fundamental steps of algorithmic problem solving like understanding the problem, designing a solution, and analyzing efficiency.
3) Methods for specifying algorithms using pseudocode, flowcharts, or natural language.
4) Analyzing an algorithm's time and space efficiency using asymptotic analysis and orders of growth like best-case, worst-case, and average-case scenarios.
Algorithms Lecture 2: Analysis of Algorithms IMohamed Loey
This document discusses analysis of algorithms and time complexity. It explains that analysis of algorithms determines the resources needed to execute algorithms. The time complexity of an algorithm quantifies how long it takes. There are three cases to analyze - worst case, average case, and best case. Common notations for time complexity include O(1), O(n), O(n^2), O(log n), and O(n!). The document provides examples of algorithms and determines their time complexity in different cases. It also discusses how to combine complexities of nested loops and loops in algorithms.
This document provides an overview of a lecture on designing and analyzing computer algorithms. It discusses key concepts like what an algorithm and program are, common algorithm design techniques like divide-and-conquer and greedy methods, and how to analyze algorithms' time and space complexity. The goals of analyzing algorithms are to understand their behavior, improve efficiency, and determine whether problems can be solved within a reasonable time frame.
Static Slicing Technique with Algorithmic ApproachIOSR Journals
This document discusses static slicing techniques for programs. It begins with an introduction to program slicing and the differences between static and dynamic slicing. It then presents an example program and shows how to perform static slicing on it to remove different variables. An algorithm for static slicing is presented that works by removing variables from the program text. The document concludes by discussing applications of static slicing and directions for future work, such as integrating forward and backward slicing algorithms.
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
We will discuss the following: Algorithms, Time Complexity & Space Complexity, Algorithm vs Pseudo code, Some Algorithm Types, Programming Languages, Python, Anaconda.
This document summarizes Praveen Varma's seminar on slicing object-oriented programs. It introduces different types of program slicing including static, dynamic, backward, and forward slicing. It discusses approaches to slicing like control flow graph based and dependence graph based methods. It also covers interprocedural slicing, static and dynamic slicing of object-oriented programs, and applications of program slicing. Limitations of existing work on object-oriented program slicing are presented along with the motivation, objectives, and work done on developing more efficient slicing techniques for object-oriented programs.
This document presents a new approach called mixed S-D slicing that combines static and dynamic program slicing using object-oriented concepts in C++. Static slicing analyzes the entire program code but produces larger slices, while dynamic slicing produces smaller slices based on a specific execution but is more difficult to compute. The mixed S-D slicing aims to generate dynamic slices faster by leveraging object-oriented features like classes. An example C++ program is provided to demonstrate the S-D slicing approach using concepts like classes, inheritance, and polymorphism. The approach is intended to reduce complexity and aid in debugging object-oriented programs by combining static and dynamic slicing techniques.
The document discusses algorithms and their analysis. It covers:
1) The definition of an algorithm and its key characteristics like being unambiguous, finite, and efficient.
2) The fundamental steps of algorithmic problem solving like understanding the problem, designing a solution, and analyzing efficiency.
3) Methods for specifying algorithms using pseudocode, flowcharts, or natural language.
4) Analyzing an algorithm's time and space efficiency using asymptotic analysis and orders of growth like best-case, worst-case, and average-case scenarios.
Algorithms Lecture 2: Analysis of Algorithms IMohamed Loey
This document discusses analysis of algorithms and time complexity. It explains that analysis of algorithms determines the resources needed to execute algorithms. The time complexity of an algorithm quantifies how long it takes. There are three cases to analyze - worst case, average case, and best case. Common notations for time complexity include O(1), O(n), O(n^2), O(log n), and O(n!). The document provides examples of algorithms and determines their time complexity in different cases. It also discusses how to combine complexities of nested loops and loops in algorithms.
This document provides an overview of a lecture on designing and analyzing computer algorithms. It discusses key concepts like what an algorithm and program are, common algorithm design techniques like divide-and-conquer and greedy methods, and how to analyze algorithms' time and space complexity. The goals of analyzing algorithms are to understand their behavior, improve efficiency, and determine whether problems can be solved within a reasonable time frame.
Static Slicing Technique with Algorithmic ApproachIOSR Journals
This document discusses static slicing techniques for programs. It begins with an introduction to program slicing and the differences between static and dynamic slicing. It then presents an example program and shows how to perform static slicing on it to remove different variables. An algorithm for static slicing is presented that works by removing variables from the program text. The document concludes by discussing applications of static slicing and directions for future work, such as integrating forward and backward slicing algorithms.
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
We will discuss the following: Algorithms, Time Complexity & Space Complexity, Algorithm vs Pseudo code, Some Algorithm Types, Programming Languages, Python, Anaconda.
This document summarizes Praveen Varma's seminar on slicing object-oriented programs. It introduces different types of program slicing including static, dynamic, backward, and forward slicing. It discusses approaches to slicing like control flow graph based and dependence graph based methods. It also covers interprocedural slicing, static and dynamic slicing of object-oriented programs, and applications of program slicing. Limitations of existing work on object-oriented program slicing are presented along with the motivation, objectives, and work done on developing more efficient slicing techniques for object-oriented programs.
Algorithm And analysis Lecture 03& 04-time complexity.Tariq Khan
This document discusses algorithm efficiency and complexity analysis. It defines key terms like algorithms, asymptotic complexity, Big O notation, and different complexity classes. It provides examples of analyzing time complexity for different algorithms like loops, nested loops, and recursive functions. The document explains that Big O notation allows analyzing algorithms independent of machine or input by focusing on the highest order term as the problem size increases. Overall, the document introduces methods for measuring an algorithm's efficiency and analyzing its time and space complexity asymptotically.
Design & Analysis of Algorithms Lecture NotesFellowBuddy.com
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
Our Vision & Mission – Simplifying Students Life
Our Belief – “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom
This document provides an overview of algorithm analysis. It discusses how to analyze the time efficiency of algorithms by counting the number of operations and expressing efficiency using growth functions. Different common growth rates like constant, linear, quadratic, and exponential are introduced. Examples are provided to demonstrate how to determine the growth rate of different algorithms, including recursive algorithms, by deriving their time complexity functions. The key aspects covered are estimating algorithm runtime, comparing growth rates of algorithms, and using Big O notation to classify algorithms by their asymptotic behavior.
1) The document discusses complexity analysis of algorithms, which involves determining the time efficiency of algorithms by counting the number of basic operations performed based on input size.
2) It covers motivations for complexity analysis, machine independence, and analyzing best, average, and worst case complexities.
3) Simple rules are provided for determining the complexity of code structures like loops, nested loops, if/else statements, and switch cases based on the number of iterations and branching.
The document provides an overview of algorithms, including definitions, types, characteristics, and analysis. It begins with step-by-step algorithms to add two numbers and describes the difference between algorithms and pseudocode. It then covers algorithm design approaches, characteristics, classification based on implementation and logic, and analysis methods like a priori and posteriori. The document emphasizes that algorithm analysis estimates resource needs like time and space complexity based on input size.
This slides contains assymptotic notations, recurrence relation like subtitution method, iteration method, master method and recursion tree method and sorting algorithms like merge sort, quick sort, heap sort, counting sort, radix sort and bucket sort.
This document discusses algorithm analysis and complexity. It introduces algorithm analysis as a way to predict and compare algorithm performance. Different algorithms for computing factorials and finding the maximum subsequence sum are presented, along with their time complexities. The importance of efficient algorithms for problems involving large datasets is discussed.
This document provides an introduction and overview of programming in C from Dr. C. Saravanan of NIT Durgapur. It covers basic C concepts like data types, variables, operators, functions, selection and iteration statements, pointers, unions, structures, and more. References and examples are provided throughout to illustrate the concepts.
Fundamentals of the Analysis of Algorithm EfficiencySaranya Natarajan
This document discusses analyzing the efficiency of algorithms. It introduces the framework for analyzing algorithms in terms of time and space complexity. Time complexity indicates how fast an algorithm runs, while space complexity measures the memory required. The document outlines steps for analyzing algorithms, including measuring input size, determining the basic operations, calculating frequency counts of operations, and expressing efficiency in Big O notation order of growth. Worst-case, best-case, and average-case time complexities are also discussed.
Recent years have seen the emergence of several static analysis techniques for reasoning about programs. This talk presents several major classes of techniques and tools that implement these techniques. Part of the presentation will be a demonstration of the tools.
Dr. Subash Shankar is an Associate Professor in the Computer Science department at Hunter College, CUNY. Prior to joining CUNY, he received a PhD from the University of Minnesota and was a postdoctoral fellow in the model checking group at Carnegie Mellon University. Dr. Shankar also has over 10 years of industrial experience, mostly in the areas of formal methods and tools for analyzing hardware and software systems.
Lecture 2 role of algorithms in computingjayavignesh86
This document discusses algorithms and their role in computing. It defines an algorithm as a set of steps to solve a problem on a machine in a finite amount of time. Algorithms must be unambiguous, have defined inputs and outputs, and terminate. The document discusses designing algorithms, proving their correctness, and analyzing their performance and complexity. It provides examples of algorithm problems like sorting, searching, and graphs. The goal of analyzing algorithms is to evaluate and compare their performance as the problem size increases.
This document provides an overview of algorithms and algorithm analysis. It discusses key concepts like what an algorithm is, different types of algorithms, and the algorithm design and analysis process. Some important problem types covered include sorting, searching, string processing, graph problems, combinatorial problems, geometric problems, and numerical problems. Examples of specific algorithms are given for some of these problem types, like various sorting algorithms, search algorithms, graph traversal algorithms, and algorithms for solving the closest pair and convex hull problems.
A Comparative Analysis of Slicing for Structured ProgramsEditor IJCATR
Program Slicing is a method for automatically decomposing programs by analyzing their data flow and control flow.
Slicing reduces the program to a minimal form called “slice” which still produces that behavior. Program slice singles out all
statements that may have affected the value of a given variable at a specific program point. Slicing is useful in program
debugging, program maintenance and other applications that involve understanding program behavior. In this paper we have
discuss the static and dynamic slicing and its comparison by taking number of examples
This file contains the contents about dynamic programming, greedy approach, graph algorithm, spanning tree concepts, backtracking and branch and bound approach.
The document discusses algorithms and their complexity. It provides an example of a search algorithm and analyzes its time complexity. The dominating operations are comparisons, and the data size is the length of the array. The algorithm's worst-case time complexity is O(n), as it may require searching through the entire array of length n. The average time complexity depends on the probability distribution of the input data.
PPT on Analysis Of Algorithms.
The ppt includes Algorithms,notations,analysis,analysis of algorithms,theta notation, big oh notation, omega notation, notation graphs
This is an updated version of the opening talk I gave on February 4, 2013 at the Dagstuhl Seminar on Fault Prediction, Localization, and Repair (http://goo.gl/vc6Cl).
Abstract: Software debugging, which involves localizing, understanding, and removing the cause of a failure, is a notoriously difficult, extremely time consuming, and human-intensive activity. For this reason, researchers have invested a great deal of effort in developing automated techniques and tools for supporting various debugging tasks. Although potentially useful, most of these techniques have yet to fully demonstrate their practical effectiveness. Moreover, many current debugging approaches suffer from some common limitations and rely on several strong assumptions on both the characteristics of the code being debugged and how developers behave when debugging such code. This talk provides an overview of the state of the art in the broader area of software debugging, discuss strengths and weaknesses of the main existing debugging techniques, present a set of open challenges in this area, and sketch future research directions that may help address these challenges.
The second part of the talk discusses joint work with Chris Parnin presented at ISSTA 2011: C. Parnin and A. Orso, "Are Automated Debugging Techniques Actually Helping Programmers?", in Proceedings of the International Symposium on Software Testing and Analysis (ISSTA 2011), pp 199-209, http://doi.acm.org/10.1145/2001420.2001445
Algorithm And analysis Lecture 03& 04-time complexity.Tariq Khan
This document discusses algorithm efficiency and complexity analysis. It defines key terms like algorithms, asymptotic complexity, Big O notation, and different complexity classes. It provides examples of analyzing time complexity for different algorithms like loops, nested loops, and recursive functions. The document explains that Big O notation allows analyzing algorithms independent of machine or input by focusing on the highest order term as the problem size increases. Overall, the document introduces methods for measuring an algorithm's efficiency and analyzing its time and space complexity asymptotically.
Design & Analysis of Algorithms Lecture NotesFellowBuddy.com
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
Our Vision & Mission – Simplifying Students Life
Our Belief – “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom
This document provides an overview of algorithm analysis. It discusses how to analyze the time efficiency of algorithms by counting the number of operations and expressing efficiency using growth functions. Different common growth rates like constant, linear, quadratic, and exponential are introduced. Examples are provided to demonstrate how to determine the growth rate of different algorithms, including recursive algorithms, by deriving their time complexity functions. The key aspects covered are estimating algorithm runtime, comparing growth rates of algorithms, and using Big O notation to classify algorithms by their asymptotic behavior.
1) The document discusses complexity analysis of algorithms, which involves determining the time efficiency of algorithms by counting the number of basic operations performed based on input size.
2) It covers motivations for complexity analysis, machine independence, and analyzing best, average, and worst case complexities.
3) Simple rules are provided for determining the complexity of code structures like loops, nested loops, if/else statements, and switch cases based on the number of iterations and branching.
The document provides an overview of algorithms, including definitions, types, characteristics, and analysis. It begins with step-by-step algorithms to add two numbers and describes the difference between algorithms and pseudocode. It then covers algorithm design approaches, characteristics, classification based on implementation and logic, and analysis methods like a priori and posteriori. The document emphasizes that algorithm analysis estimates resource needs like time and space complexity based on input size.
This slides contains assymptotic notations, recurrence relation like subtitution method, iteration method, master method and recursion tree method and sorting algorithms like merge sort, quick sort, heap sort, counting sort, radix sort and bucket sort.
This document discusses algorithm analysis and complexity. It introduces algorithm analysis as a way to predict and compare algorithm performance. Different algorithms for computing factorials and finding the maximum subsequence sum are presented, along with their time complexities. The importance of efficient algorithms for problems involving large datasets is discussed.
This document provides an introduction and overview of programming in C from Dr. C. Saravanan of NIT Durgapur. It covers basic C concepts like data types, variables, operators, functions, selection and iteration statements, pointers, unions, structures, and more. References and examples are provided throughout to illustrate the concepts.
Fundamentals of the Analysis of Algorithm EfficiencySaranya Natarajan
This document discusses analyzing the efficiency of algorithms. It introduces the framework for analyzing algorithms in terms of time and space complexity. Time complexity indicates how fast an algorithm runs, while space complexity measures the memory required. The document outlines steps for analyzing algorithms, including measuring input size, determining the basic operations, calculating frequency counts of operations, and expressing efficiency in Big O notation order of growth. Worst-case, best-case, and average-case time complexities are also discussed.
Recent years have seen the emergence of several static analysis techniques for reasoning about programs. This talk presents several major classes of techniques and tools that implement these techniques. Part of the presentation will be a demonstration of the tools.
Dr. Subash Shankar is an Associate Professor in the Computer Science department at Hunter College, CUNY. Prior to joining CUNY, he received a PhD from the University of Minnesota and was a postdoctoral fellow in the model checking group at Carnegie Mellon University. Dr. Shankar also has over 10 years of industrial experience, mostly in the areas of formal methods and tools for analyzing hardware and software systems.
Lecture 2 role of algorithms in computingjayavignesh86
This document discusses algorithms and their role in computing. It defines an algorithm as a set of steps to solve a problem on a machine in a finite amount of time. Algorithms must be unambiguous, have defined inputs and outputs, and terminate. The document discusses designing algorithms, proving their correctness, and analyzing their performance and complexity. It provides examples of algorithm problems like sorting, searching, and graphs. The goal of analyzing algorithms is to evaluate and compare their performance as the problem size increases.
This document provides an overview of algorithms and algorithm analysis. It discusses key concepts like what an algorithm is, different types of algorithms, and the algorithm design and analysis process. Some important problem types covered include sorting, searching, string processing, graph problems, combinatorial problems, geometric problems, and numerical problems. Examples of specific algorithms are given for some of these problem types, like various sorting algorithms, search algorithms, graph traversal algorithms, and algorithms for solving the closest pair and convex hull problems.
A Comparative Analysis of Slicing for Structured ProgramsEditor IJCATR
Program Slicing is a method for automatically decomposing programs by analyzing their data flow and control flow.
Slicing reduces the program to a minimal form called “slice” which still produces that behavior. Program slice singles out all
statements that may have affected the value of a given variable at a specific program point. Slicing is useful in program
debugging, program maintenance and other applications that involve understanding program behavior. In this paper we have
discuss the static and dynamic slicing and its comparison by taking number of examples
This file contains the contents about dynamic programming, greedy approach, graph algorithm, spanning tree concepts, backtracking and branch and bound approach.
The document discusses algorithms and their complexity. It provides an example of a search algorithm and analyzes its time complexity. The dominating operations are comparisons, and the data size is the length of the array. The algorithm's worst-case time complexity is O(n), as it may require searching through the entire array of length n. The average time complexity depends on the probability distribution of the input data.
PPT on Analysis Of Algorithms.
The ppt includes Algorithms,notations,analysis,analysis of algorithms,theta notation, big oh notation, omega notation, notation graphs
This is an updated version of the opening talk I gave on February 4, 2013 at the Dagstuhl Seminar on Fault Prediction, Localization, and Repair (http://goo.gl/vc6Cl).
Abstract: Software debugging, which involves localizing, understanding, and removing the cause of a failure, is a notoriously difficult, extremely time consuming, and human-intensive activity. For this reason, researchers have invested a great deal of effort in developing automated techniques and tools for supporting various debugging tasks. Although potentially useful, most of these techniques have yet to fully demonstrate their practical effectiveness. Moreover, many current debugging approaches suffer from some common limitations and rely on several strong assumptions on both the characteristics of the code being debugged and how developers behave when debugging such code. This talk provides an overview of the state of the art in the broader area of software debugging, discuss strengths and weaknesses of the main existing debugging techniques, present a set of open challenges in this area, and sketch future research directions that may help address these challenges.
The second part of the talk discusses joint work with Chris Parnin presented at ISSTA 2011: C. Parnin and A. Orso, "Are Automated Debugging Techniques Actually Helping Programmers?", in Proceedings of the International Symposium on Software Testing and Analysis (ISSTA 2011), pp 199-209, http://doi.acm.org/10.1145/2001420.2001445
The document describes the HercuLeS HLS environment, a new high-level synthesis tool marketed by Ajax Compilers. It provides the following key details:
- HercuLeS is an extensible, high-level synthesis environment that allows whole-program hardware compilation from C code through pluggable analyses and optimizations.
- It features an automatic flow from an algorithmic C description to customized digital hardware using an intermediate representation called N-Address Code and construction of control/data flow graphs.
- The generated VHDL code and self-checking testbenches aim to be human-readable, vendor- and technology-independent.
The document presents a general framework for slicing programs and models. It defines a slicing framework with syntax, semantics, projections, and slicing criteria. It applies the framework to program slicing examples and proposes adapting it for model slicing. The framework is then demonstrated on a class model case study, showing how slicing can reduce models for comprehension and debugging.
The document discusses program dependence graphs (PDGs) and system dependence graphs (SDGs). A PDG represents a single program as a graph of nodes for statements connected by edges showing data and control dependencies. An SDG extends a PDG to represent relationships between procedures/processes in a program by adding nodes for calls, arguments, and results and edges connecting them. SDGs allow modeling interdependencies across multiple processes in a program.
Graal is a dynamic meta-circular research compiler for Java that is designed for extensibility and modularity. One of its main distinguishing elements is the handling of optimistic assumptions obtained via profiling feedback and the representation of deoptimization guards in the compiled code. Truffle is a self-optimizing runtime system on top of Graal that uses partial evaluation to derive compiled code from interpreters. Truffle is suitable for creating high-performance implementations for dynamic languages with only moderate effort. The presentation includes a description of the Truffle multi-language API and performance comparisons within the industry of current prototype Truffle language implementations (JavaScript, Ruby, and R). Both Graal and Truffle are open source and form themselves research platforms in the area of virtual machine and programming language implementation (http://openjdk.java.net/projects/graal/).
This document provides an overview of real-time operating systems (RTOS), including their key characteristics, scheduling approaches, and commercial examples. RTOS are used in applications that require tasks to complete work and deliver services on time. They use priority-based and clock-driven scheduling algorithms like rate monotonic analysis and earliest deadline first to ensure real-time constraints are met. Commercial RTOS aim to provide features like priority levels, fast task preemption, and predictable interrupt handling for real-time applications.
The document discusses intermediate code generation in compilers. It describes how compilers generate intermediate code representations after parsing source code. Intermediate representations allow separating the front-end and back-end of compilers, facilitating code optimization and retargeting compilers to different architectures. Common intermediate representations discussed include abstract syntax trees, postfix notation, static single assignment form, and three-address instructions. The document also provides examples of generating three-address code using syntax-directed translation.
The document provides information about real-time systems and real-time operating systems (RTOS). It defines a real-time system as one where the correctness depends not only on logical results but also the time when results are delivered. An RTOS is designed to meet the strict timing constraints of real-time applications through features like multitasking, interrupt handling, and predictable scheduling. Key considerations for selecting an RTOS include its real-time capabilities, footprint, interrupt latencies, available APIs, and development tools.
This document discusses real-time operating systems (RTOS). It defines RTOS as operating systems that are able to respond to inputs immediately within a specified time delay. It compares RTOS to general operating systems and discusses the types, characteristics, functions, and applications of RTOS. Examples of RTOS like VxWorks are provided. The key functions of an RTOS include task management, scheduling, resource allocation, and interrupt handling. RTOS are widely used in applications that require deterministic responses like avionics, medical devices, industrial automation, and more.
This document discusses program slicing techniques for object-oriented programs. It outlines previous approaches to static and dynamic slicing of OOPs and their limitations. The key points are:
1) Early approaches used system dependence graphs but had issues distinguishing between objects and imprecisely modeled polymorphism.
2) Newer work proposes an object-oriented system dependence graph (OSDG) that models objects as trees with members to address earlier limitations.
3) The document also discusses developing efficient algorithms for dynamic slicing of concurrent object-oriented programs.
This document discusses program slicing techniques for reverse engineering and debugging programs. It begins with an introduction to program slicing and outlines some key concepts. It then describes different types of program slices - including static, dynamic, and interprocedural slices. It also discusses different visualization techniques used for program slicing like control flow graphs and data dependence graphs. Finally it provides examples of tools that perform program slicing and areas it has been applied to like debugging and malware analysis.
This document contains a C program to compute the roots of a quadratic equation. It begins by reading in the coefficients a, b, and c from the user. It then calculates the discriminant and determines if the roots are real, equal, or complex. Appropriate messages are printed. If the roots are real and distinct, it calculates and prints them. If equal, it prints the single root. If complex, it separates into real and imaginary parts and prints both roots. The program uses decision making and math functions to systematically solve the quadratic equation.
This document provides an introduction to C++ programming including problem solving skills, software evolution, procedural and object oriented programming concepts, basic C++ programs, operators, header files, conditional statements, loops, functions, pointers, structures and arrays. It discusses topics such as analyzing problems, planning algorithms, coding solutions, evaluating results, procedural and object oriented paradigms, inheritance, polymorphism, flowcharts, basic syntax examples, and more. Various examples are provided to illustrate key concepts in C++.
Introduction to Data Structures Sorting and searchingMvenkatarao
This document provides an overview of data structures and algorithms. It begins by defining a data structure as a way of storing and organizing data in a computer so that it can be used efficiently by algorithms. Data structures can be primitive, directly operated on by machine instructions, or non-primitive, developed from primitive structures. Linear structures maintain adjacency between elements while non-linear do not. Common operations on data structures include adding, deleting, traversing, sorting, searching, and updating elements. The document also defines algorithms and their properties, including finiteness, definiteness, inputs, outputs, and effectiveness. It discusses analyzing algorithms based on time and space complexity and provides examples of different complexities including constant, logarithmic, linear, quadratic,
This document discusses algorithms and their analysis. It defines an algorithm as a finite sequence of unambiguous instructions that terminate in a finite amount of time. It discusses areas of study like algorithm design techniques, analysis of time and space complexity, testing and validation. Common algorithm complexities like constant, logarithmic, linear, quadratic and exponential are explained. Performance analysis techniques like asymptotic analysis and amortized analysis using aggregate analysis, accounting method and potential method are also summarized.
Linear search examines each element of a list sequentially, one by one, and checks if it is the target value. It has a time complexity of O(n) as it requires searching through each element in the worst case. While simple to implement, linear search is inefficient for large lists as other algorithms like binary search require fewer comparisons.
These slides gives you information about path testing and data flow testing in software testing. These slides will be helpful for Engineering, CSE students.
Algorithm and C code related to data structureSelf-Employed
Everything lies inside an algorithm in the world of coding and algorithm formation which is the basis of data structure and manipulation of the algorithm in computer science and information technology which is ultimately used to find a particular problems solution
Principal Sources of Optimization in compiler design LogsAk
This document discusses code optimization techniques used by compilers. It covers the following key points in 3 sentences:
Principal sources of optimization include common subexpression elimination, constant folding and propagation, code motion, dead code elimination, and strength reduction. Data flow analysis is used by optimization techniques to gather information about how data flows through a program. The document also describes local and global optimization, peephole optimization, basic blocks, and efficient data flow algorithms used in compiler design.
The document discusses key concepts in programming including algorithms, flowcharts, pseudocode, and the program development life cycle (PDLC). It provides definitions and examples of each concept. The main points covered are:
- An algorithm is a series of steps to solve a problem with properties like finiteness and definiteness. Qualities of a good algorithm and levels of algorithm description are explained.
- Flowcharts use symbols to visually represent algorithms and program logic with benefits like clear communication. Examples of flowchart symbols and structures are given.
- Pseudocode resembles a simplified programming language and can be used to design algorithms with advantages like readability and ease of conversion to code.
- The PDLC is
Introduction to design and analysis of algorithmDevaKumari Vijay
This document defines algorithms and describes how to analyze their efficiency. It states that an algorithm is a set of unambiguous instructions that accepts input and produces output within a finite number of steps. The document outlines criteria algorithms must satisfy like being definite, finite, and effective. It also describes different representations of algorithms like pseudocode and flowcharts. The document then discusses analyzing algorithms' time and space efficiency using asymptotic notations like Big-O, Big-Omega, and Big-Theta. It defines these notations and provides examples to classify algorithms' order of growth.
This document provides an overview of algorithms including definitions, characteristics, design, and analysis. It defines an algorithm as a finite step-by-step procedure to solve a problem and discusses their key characteristics like input, definiteness, effectiveness, finiteness, and output. The document outlines the design of algorithms using pseudo-code and their analysis in terms of time and space complexity using asymptotic notations like Big O, Big Omega, and Big Theta. Examples are provided to illustrate linear search time complexity and the use of different notations to determine algorithm efficiency.
The document discusses algorithms and their analysis. It defines an algorithm as a sequence of unambiguous steps to solve a problem within a finite time. Characteristics of algorithms include being unambiguous, having inputs/outputs, and terminating in finite time. Algorithm analysis involves determining theoretical and empirical time and space complexity as input size increases. Time complexity is analyzed by counting basic operations, while space complexity considers fixed and variable memory usage. Worst, best, and average cases analyze how efficiency varies with different inputs. Asymptotic analysis focuses on long-term growth rates to compare algorithms.
A seminar in advanced Software Engineering concerning using models to guide the development process, and QVT to transfer a model into another model automatically
The document discusses various software testing techniques for object-oriented systems, including white-box testing, black-box testing, and object-oriented specific methods. It covers topics such as unit testing, integration testing, equivalence partitioning, boundary value analysis, and fault-based versus scenario-based testing. The overall goal is to uncover errors in classes, class collaboration, and subsystem communication through different levels of testing.
Verilog is a hardware description language (HDL) used to model electronic systems. Some key points:
- Verilog originated in 1983 and was standardized as IEEE 1364. It is used to model digital circuits at different levels of abstraction from algorithmic to switch levels.
- Modules are the basic building blocks in Verilog. Designs are constructed in a hierarchical manner using instances of modules.
- Common constructs in Verilog include nets, registers, parameters, tasks, always and initial blocks, and data types like wire and reg.
- Basic gates and larger components like decoders, multiplexers, and adders can be modeled at the gate level in Verilog. Different adder architectures like
The document defines algorithms and describes their characteristics and design techniques. It states that an algorithm is a step-by-step procedure to solve a problem and get the desired output. It discusses algorithm development using pseudocode and flowcharts. Various algorithm design techniques like top-down, bottom-up, incremental, divide and conquer are explained. The document also covers algorithm analysis in terms of time and space complexity and asymptotic notations like Big-O, Omega and Theta to analyze best, average and worst case running times. Common time complexities like constant, linear, quadratic, and exponential are provided with examples.
Similar to Slicing of Object-Oriented Programs (20)
This document discusses dynamic slicing of aspect-oriented programs. It introduces aspect-oriented programming and the AspectJ language. It presents an algorithm for dynamic slicing of aspect-oriented programs that uses an execution trace file to construct a dynamic aspect-oriented dependence graph (DADG) and then performs graph traversal to compute the dynamic slice. The algorithm maps the dynamic slice back to the original program. Experimental results show that the average runtime of the algorithm increases with the size of the program. Future work includes modifying the algorithm to avoid using a trace file and handling other program features.
This document discusses dynamic slicing of aspect-oriented programs. It introduces aspect-oriented programming and the AspectJ language. It presents an algorithm for dynamic slicing of aspect-oriented programs that uses an execution trace file to construct a dynamic aspect-oriented dependence graph (DADG) and then performs graph traversal to compute the dynamic slice. The algorithm maps the dynamic slice back to the original program. The document also discusses applications of program slicing and provides average runtime results for dynamic slicing on programs of different sizes.
Generating test cases using UML Communication Diagram Praveen Penumathsa
1. The document discusses generating test cases from UML communication diagrams. It presents an approach to construct a communication tree from the diagram and then iteratively select predicates from the tree to generate test data and record test cases.
2. Key classes used in the implementation include XmlBoundary to accept diagrams, DocumentParser to parse diagrams into a communication tree, TestDataFinder to generate test data from the tree, and TestCaseBoundary to display test cases.
3. The technique aims to automatically generate test cases for object-oriented programs based on an intermediate graph representation using UML diagrams, and implement the algorithms in Java.
This document proposes a research project to develop techniques for automated testing of object-oriented software. The objectives are to design a framework for test case generation based on an intermediate graph representation of the software and to generate test cases by analyzing this graph. The plan is to use UML diagrams to construct a communication tree and then iteratively select predicates to transform into test data. The performance of the algorithms will be evaluated by testing them on sample data and comparing results.
This document discusses distributed mutual exclusion algorithms. It describes Lamport's algorithm which uses logical timestamps and message passing to ensure only one process is in the critical section at a time. It also covers Ricart-Agarwala's improvement which reduces the number of messages. Maekawa's algorithm is discussed which obtains permission from a quorum or subset of processes. Finally, it summarizes the Suzuki-Kasami and Raymond token-based algorithms.
P.Praveen Varma is seeking an opportunity to contribute his technical skills and knowledge to an organization. He has experience in Java programming, HTML, MySQL, data mining, CMS, Android app development, SEO, blogging, and YouTube. He completed his B.Tech in IT from VNR Vignana Jyothi Institute of Engineering & Technology in 2013 and a diploma in ECE from SMT.B Polytechnic College in 2006. His academic project involved providing security for wireless data transmission using encryption and decryption. He has strong analytical and communication skills and enjoys basketball, computer games, and Android app development in his free time.
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
How to Manage Your Lost Opportunities in Odoo 17 CRMCeline George
Odoo 17 CRM allows us to track why we lose sales opportunities with "Lost Reasons." This helps analyze our sales process and identify areas for improvement. Here's how to configure lost reasons in Odoo 17 CRM
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
How to Fix the Import Error in the Odoo 17Celine George
An import error occurs when a program fails to import a module or library, disrupting its execution. In languages like Python, this issue arises when the specified module cannot be found or accessed, hindering the program's functionality. Resolving import errors is crucial for maintaining smooth software operation and uninterrupted development processes.
বাংলাদেশের অর্থনৈতিক সমীক্ষা ২০২৪ [Bangladesh Economic Review 2024 Bangla.pdf] কম্পিউটার , ট্যাব ও স্মার্ট ফোন ভার্সন সহ সম্পূর্ণ বাংলা ই-বুক বা pdf বই " সুচিপত্র ...বুকমার্ক মেনু 🔖 ও হাইপার লিংক মেনু 📝👆 যুক্ত ..
আমাদের সবার জন্য খুব খুব গুরুত্বপূর্ণ একটি বই ..বিসিএস, ব্যাংক, ইউনিভার্সিটি ভর্তি ও যে কোন প্রতিযোগিতা মূলক পরীক্ষার জন্য এর খুব ইম্পরট্যান্ট একটি বিষয় ...তাছাড়া বাংলাদেশের সাম্প্রতিক যে কোন ডাটা বা তথ্য এই বইতে পাবেন ...
তাই একজন নাগরিক হিসাবে এই তথ্য গুলো আপনার জানা প্রয়োজন ...।
বিসিএস ও ব্যাংক এর লিখিত পরীক্ষা ...+এছাড়া মাধ্যমিক ও উচ্চমাধ্যমিকের স্টুডেন্টদের জন্য অনেক কাজে আসবে ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Diana Rendina
Librarians are leading the way in creating future-ready citizens – now we need to update our spaces to match. In this session, attendees will get inspiration for transforming their library spaces. You’ll learn how to survey students and patrons, create a focus group, and use design thinking to brainstorm ideas for your space. We’ll discuss budget friendly ways to change your space as well as how to find funding. No matter where you’re at, you’ll find ideas for reimagining your space in this session.
A review of the growth of the Israel Genealogy Research Association Database Collection for the last 12 months. Our collection is now passed the 3 million mark and still growing. See which archives have contributed the most. See the different types of records we have, and which years have had records added. You can also see what we have for the future.
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPRAHUL
This Dissertation explores the particular circumstances of Mirzapur, a region located in the
core of India. Mirzapur, with its varied terrains and abundant biodiversity, offers an optimal
environment for investigating the changes in vegetation cover dynamics. Our study utilizes
advanced technologies such as GIS (Geographic Information Systems) and Remote sensing to
analyze the transformations that have taken place over the course of a decade.
The complex relationship between human activities and the environment has been the focus
of extensive research and worry. As the global community grapples with swift urbanization,
population expansion, and economic progress, the effects on natural ecosystems are becoming
more evident. A crucial element of this impact is the alteration of vegetation cover, which plays a
significant role in maintaining the ecological equilibrium of our planet.Land serves as the foundation for all human activities and provides the necessary materials for
these activities. As the most crucial natural resource, its utilization by humans results in different
'Land uses,' which are determined by both human activities and the physical characteristics of the
land.
The utilization of land is impacted by human needs and environmental factors. In countries
like India, rapid population growth and the emphasis on extensive resource exploitation can lead
to significant land degradation, adversely affecting the region's land cover.
Therefore, human intervention has significantly influenced land use patterns over many
centuries, evolving its structure over time and space. In the present era, these changes have
accelerated due to factors such as agriculture and urbanization. Information regarding land use and
cover is essential for various planning and management tasks related to the Earth's surface,
providing crucial environmental data for scientific, resource management, policy purposes, and
diverse human activities.
Accurate understanding of land use and cover is imperative for the development planning
of any area. Consequently, a wide range of professionals, including earth system scientists, land
and water managers, and urban planners, are interested in obtaining data on land use and cover
changes, conversion trends, and other related patterns. The spatial dimensions of land use and
cover support policymakers and scientists in making well-informed decisions, as alterations in
these patterns indicate shifts in economic and social conditions. Monitoring such changes with the
help of Advanced technologies like Remote Sensing and Geographic Information Systems is
crucial for coordinated efforts across different administrative levels. Advanced technologies like
Remote Sensing and Geographic Information Systems
9
Changes in vegetation cover refer to variations in the distribution, composition, and overall
structure of plant communities across different temporal and spatial scales. These changes can
occur natural.
Chapter wise All Notes of First year Basic Civil Engineering.pptxDenish Jangid
Chapter wise All Notes of First year Basic Civil Engineering
Syllabus
Chapter-1
Introduction to objective, scope and outcome the subject
Chapter 2
Introduction: Scope and Specialization of Civil Engineering, Role of civil Engineer in Society, Impact of infrastructural development on economy of country.
Chapter 3
Surveying: Object Principles & Types of Surveying; Site Plans, Plans & Maps; Scales & Unit of different Measurements.
Linear Measurements: Instruments used. Linear Measurement by Tape, Ranging out Survey Lines and overcoming Obstructions; Measurements on sloping ground; Tape corrections, conventional symbols. Angular Measurements: Instruments used; Introduction to Compass Surveying, Bearings and Longitude & Latitude of a Line, Introduction to total station.
Levelling: Instrument used Object of levelling, Methods of levelling in brief, and Contour maps.
Chapter 4
Buildings: Selection of site for Buildings, Layout of Building Plan, Types of buildings, Plinth area, carpet area, floor space index, Introduction to building byelaws, concept of sun light & ventilation. Components of Buildings & their functions, Basic concept of R.C.C., Introduction to types of foundation
Chapter 5
Transportation: Introduction to Transportation Engineering; Traffic and Road Safety: Types and Characteristics of Various Modes of Transportation; Various Road Traffic Signs, Causes of Accidents and Road Safety Measures.
Chapter 6
Environmental Engineering: Environmental Pollution, Environmental Acts and Regulations, Functional Concepts of Ecology, Basics of Species, Biodiversity, Ecosystem, Hydrological Cycle; Chemical Cycles: Carbon, Nitrogen & Phosphorus; Energy Flow in Ecosystems.
Water Pollution: Water Quality standards, Introduction to Treatment & Disposal of Waste Water. Reuse and Saving of Water, Rain Water Harvesting. Solid Waste Management: Classification of Solid Waste, Collection, Transportation and Disposal of Solid. Recycling of Solid Waste: Energy Recovery, Sanitary Landfill, On-Site Sanitation. Air & Noise Pollution: Primary and Secondary air pollutants, Harmful effects of Air Pollution, Control of Air Pollution. . Noise Pollution Harmful Effects of noise pollution, control of noise pollution, Global warming & Climate Change, Ozone depletion, Greenhouse effect
Text Books:
1. Palancharmy, Basic Civil Engineering, McGraw Hill publishers.
2. Satheesh Gopi, Basic Civil Engineering, Pearson Publishers.
3. Ketki Rangwala Dalal, Essentials of Civil Engineering, Charotar Publishing House.
4. BCP, Surveying volume 1
2. Outline of the Seminar
• Introduction
• Interprocedural slicing
• Static Slicing of OOP
• Static Slicing of Concurrent OOP
• Dynamic Slicing of OOP
• Motivation for Research
• Objective of Research
• Work Done/ Work to be done
• publications
3. Program Slicing
• Slice of a program w.r.t. program point p and
variable x:
- All statements and predicates that might
affect the value of x at point p.
• <p, x> known as slicing criterion.
4. Example
1 main( )
2 {
3 int i, sum;
4 sum = 0;
5 i = 1;
6 while(i <= 10)
7 {
8 Sum = sum + 1;
9 ++ i;
10 }
11 printf(“%d”, sum);
12 printf(“%d”, i);
13 }
An Example Program & its slice w.r.t. <12, i>
5. Types of Slice
• Static Slice: Statements that may affect value of
a variable at a program point for all possible
executions.
• Dynamic Slice: Statements that actually affect
value of a variable at a program point for that
particular execution.
• Backward Slice: Statements that might have
affected the variable at a program point.
• Forward Slice: Statements that might be
affected by the variable at a program point.
6. Applications of Slicing
• Debugging
• Program understanding
• Testing
• Software maintenance
• Complexity measurement
• Program integration
• Reverse engineering
• Software reuse
7. Approaches to Slicing
• CFG- based: Data flow equations are solved
• Dependence graph-based:
-PDG is used as intermediate representation
-Slice is computed as a reachability problem
• PDG of an OOP is a directed graph in which
-nodes represent statements and predicates
-edges represent data/control dependence
among the nodes
8. Inter-Procedural Slicing
Horwitz’s Approach
• PDG can not handle programs with multiple
procedures.
• Here the intermediate representation is called as
system dependence graph (SDG).
• SDG is based on procedure dependence graphs
• Same as PDG except that it includes vertices &
edges for call statements, parameter passing
& transitive dependence due to calls.
9. Inter-Procedural Slicing(cont.)
• On calling side, parameter passing is
represented by actual-in & out vertices.
• In called procedure, parameter passing is
represented by formal-in & out vertices.
10. Inter-Procedural slicing (cont.)
• A call edge is added from call site vertex to
corresponding procedure entry vertex.
• A parameter-in edge is added from each actual-
in vertex to corresponding formal-in vertex.
• A parameter-out edge is added from each
formal-out vertex to corresponding actual-out
vertex.
• To find the slice, Horwitz proposed a two-pass
algorithm.
11. Inter-Procedural Slicing (cont.)
• The traversal in pass one starts from desired
vertex & goes backwards along all edges except
parameter-out edges.
• The traversal in pass two starts from all vertices
reached in pass one and goes backwards along
all edges except call & parameter-in edges.
• The slice is the union of 2 sets of vertices.
12.
13. Slicing of OOPs
• Present-day software systems are basically
object-oriented.
• O-O features such as classes, inheritance,
polymorphism need to be considered in slicing.
• Due to presence of polymorphism and dynamic
binding, process of tracing dependencies in
OOPs becomes complex.
14. Static Slicing of OOP
• Larson and Harrold were the first to consider
these O-O features for slicing by extending the
SDG for OOPs.
• They represented each class by a class
dependence grpah (CLDG).
• The CLDG captures the control and data
dependence relationships of a class.
• Each method in a class, is represented by a
procedure dependence graph.
15. Static Slicing of OOP (cont.)
• Each method has a method entry vertex to
represent the entry into the method.
• CLDG contains a class entry vertex that is
connected to the method entry vertex for each
method, by class member edges.
• To represent parameter passing, CLDG creates
formal-in & formal-out vertices.
16. Static Slicing of OOP (cont.)
• CLDG represents method calls by a call vertex.
• It adds actual-in & actual-out vertices at each
call vertex.
20. Representing complete programs
• Construct the partial SDG for main()
• Connect the calls in the partial SDG to methods
in the CLDG for each class, by using
- call edges
- parameter-in edges
- parameter-out edges
22. Slicing the complete program
• Use the two-pass algorithm for computing the
static slice of the OOP.
• Shaded vertices in the SDG, are included in the
slice w.r.t. slicing criterion <39,current_floor>.
23. Limitations of Larson’s Approach
• It can not distinguish data members for different
objects instantiated from the same class.
• It fails to consider the fact that in different
method calls, data members used by the
methods might belong to different objects.
24. Limitations (cont.)
• Thus, it creates spurious data dependences.
• So the resulting slice may be imprecise.
• It can not represent an object that is used as a
parameter or data member of another object.
25. Limitations (cont.)
• It is not fit to represent larger programs, because
for a large program this SDG will be too large to
manage & understand.
• It can not handle dynamic slicing of OOPs.
26. Limitations(cont.)
int a,b; if(b>0) ba.m1();
virtual vm(){ vm(); ba.m2(1);
a=a+b; b=b+1; }
} } D(){
public: }; //end of base Base o;
Base(){ main1(){ C(o);
a=0; Base o; o.m2(1);
b=0; Base ba; }
} ba.m1();
m2 (int i){ ba.m2(1);
b=b+i; o.m2(1);
} }
A2-in
main1()
o.Base()
ba.base()
A2-
out
A1-
out
A2-
out
A1-
out
ba.
m1()
A1-in A2-
out
A1-
out
A3-in A2-in A2-
out
ba.
m2(1)
A3-in A2-
out
A2-in
o. m2(1)
Slice
A1-in: a-in=a
A2-in: b-in=b
A3-in: I-in=1
A1-out: a= a-out
A2-out: b=b-out
Class Base{ m1(){ C(Base &ba){
Control dependence edge
Data dependence edge
Summary edge.
27. Limitations (cont.)
• The data dependence edge between o.base() &
ba.m1() is a spurious data dependence edge.
• C(Base &ba) of the example can not be
represented using this approach.
28. Tonella’s improvement
• Tonella improved this by passing all data
members of an object as actual parameters,
when the object invokes a method.
• But, only few data members might be used in a
method.
• So this method is expensive.
29. Tonella’s improvement (cont.)
• For parameter object, he represented an object
as a single vertex.
• This may yield an imprecise slice.
• At the end of D(), ba.a does not affect o.b .
30. Example
Class Base{ func1( ) {
int a,b; Base o;
virtual vm() { Base ba,
a = a + b ; } ba.m1( );
public: ba.m2(1);
Base( ) { o.m2(1);
a = 0 ; }
b = 0 ; }
m2(int i) { C(Base &ba) {
b = b + i; } ba.m1( );
m1( ) { ba.m2(1); }
if (b > 0) D( ) {
vm( ); Base o;
b = b + 1; } C(o);
} // end of Base o.m2(1) }
31. Dynamic Slicing of OOPs
• Zhao presented the first algorithm, consisting of
two-phases, for dynamic slicing of OOPs.
• Used dynamic object-oriented dependence
graph (DODG) as intermediate representation.
• Defined Slicing Criterion - <s, v, t, i>.
s - statement number
v - variable of interest
t - execution trace
i - input
32. Dynamic Slicing of OOPs(cont.)
• Phase-1: Computing a dynamic slice over
the DODG using DFS/BFS.
• Phase-2: Mapping the slice over the DODG
to source code by defining a mapping
function.
34. Limitations of Zhao’s Approach
• The no.of nodes in a DODG is equal to the no.of
executed statements, which may be unbounded
for programs having many loops.
• Worst case space complexity is O(2n
).
• In the worst case, time complexity becomes
exponential.
35. Motivation
• Slicing is mainly used in interactive applications
such as debugging & testing.
• So, the slicing techniques need to be efficient.
• This requires to develop
- efficient slicing algorithms &
- suitable intermediate representations
• Reports on slicing of OOPs are scarce & less
efficient.
• So, there is a pressing necessity to develop
efficient slicing algorithms for OOPs.
36. Objectives
• Appropriate frame-work to compute slices
- static & dynamic
• Suitable intermediate representation
• Development of efficient dynamic slicing
techniques
• Computing slices of concurrent O-O programs
37. Works done/ Work in progress
• We have proposed an efficient intermediate
representation for representing OOPs.
• We named this as object-oriented system
dependence graph (OSDG).
• We have proposed an algorithm for dynamic
slicing of OOPs.
• We have proposed an algorithm for dynamic
slicing of concurrent OOPs.
38. Our Extended SDG(OSDG)
• For objects present at call site: we use Larson
& Harrold’s representation.
• For parameter object: our OSDG explicitly
represents the data members of the object.
• We represent parameter object as a tree.
39. OSDG (cont.)
• The root represents the object itself.
• Children represent object’s data members.
• The edges represent data dependences
between the object & it’s data members.
• If a data member of an object is another object,
we further expand this data member into a sub-
tree.
40. OSDG (cont.)
• Consider C(o) in function D( ).
• At call site,the actual parameter o is represented
as a tree;
- leaves represent o’s data members a & b.
• From the slice, now ba.a is omitted.
41. OSDG (cont.)
• Polymorphism : lets the type of an object be
decided at run-time.
• We call such an object as polymorphic object.
• We represent a polymorphic object as a tree.
42. OSDG (cont.)
• The root represents the polymorphic object.
• Leaves represent objects of possible types.
• When the polymorphic object is used as a
parameter, the children are further expanded
into trees.
43. Example
class Derived : public Base func2{
{ int i;
int d ; Base *p;
vm( ) { cin>>i;
d = d + b ; if(i > 0)
} p = new Base();
public: Derived(): Base() { else
d = 0; } p = new Derived();
m3() { C(*p);
d = d +1 ; (*p).m(1);
m2(1) ;} }
m4() {
m1(); }
} end of class
44. OSDG of the Example
b a a b b d d b b A-
in
b b A-
in
b
Base Derive
d
Derive
d
Base
ba.m1
()
ba.m2(
1)se
b a a b d a d b a b
Bas
e
Derive
d
Derive
d
Bas
e
a
o
bab
o
C(o
)
A-
in
b
o.m2(1
)se
o.Base(
)
ba
D( )
b
aba
C(Base
&ba)
b
slice
A-in:i-in= 1
Representation for C(Base &) and D( ) in OSDG.
45. Example(cont.)
• The figure shows representation for
C(Base &ba) and D() considering class
Derived and function func2.
• Formal parameter ba is a polymorphic
parameter object.
• So a tree can be used to represent different
references to ba.
46. Slicing the complete program
• Construct the SDG with these modifications
• Use the two-pass algorithm to obtain the slice.
47. Comparison With Other Methods
• It distinguishes data members for different
objects.
• It provides a way to represent object
parameters.
• It represents the effects of polymorphism.
48. Our Dynamic Slicing Algorithm
• We proposed an algorithm known as edge-
marking dynamic slicing algorithm for OOPs.
• SDG is constructed statically only once.
• Based on marking & unmarking the edges as
and when the dependencies arise & cease
during run-time.
49. Our Dynamic Slicing Algorithm(cont.)
• We mark an edge when it’s associated
dependence exists.
• We unmark an edge when the associated
dependence ceases to exist.
50. Current direction of research
• Efficient frame-work and intermediate
representation of OOP.
• Extension of our edge-marking dynamic slicing
algorithm to handle dynamic slicing of
concurrent OOPs.
• Dynamic slicing of distributed OOPs.
51. Publications
• D. P. Mohapatra, R. Mall, R. Kumar, “Dynamic Slicing of Concurrent
Object-Oriented Programs”, In proc. of International Conference on
Information Technology:Progresses & Challenges (ITPC), Kathamandu,
Nepal, pp 283-290, 23-26 May, 2003.
• D. P. Mohapatra, R. Mall, R. Kumar, “An Efficient Technique for Slicing of
Object-Oriented Programs”, In proc. of National Conference on Object-
Oriented Technology (NCOOT), Dr. B. R. Ambedkar Technological
University, Lonere, pp 26-42, 9-10 August, 2003.
• D. P. Mohapatra, R. Mall, R. Kumar, “Dynamic Slicing of Object-
Oriented Programs”, International Conference on Advanced Computing
and Communications (ADCOM)-2003,Coimbatore, December 2003
(Accepted)
• D. P. Mohapatra, G. B. Mund, R. Mall, R. Kumar, “Dynamic Slicing of
Object-Oriented Programs”, International Journal of Software and
Knowledge Engineering, Singapore. (Communicated).