SlideShare a Scribd company logo
1 of 22
KUMARI NUTAN
O901206358
UNDER THE GUIDANCE OF
ER. RAJESH KU. SAHOO
Seminar on:
pROGRAM SLICING TECHNIQUE
Represented by
AJAY BINAY INSTITUTE OF TECHNOLOGY, CUTTACK
BPUT, ODISHA
ABSTRACT
 Slicing is a program analysis technique for
debugging and understanding programs.
 Program slicing is potentially useful analysis for
aiding program understanding.
 A program slice consists of the parts of a program
that potentially affect the values computed at some
point of interest. The task of computing program
slices is called program slicing.
CONTENTS
 Introduction
 Program Slicing basic idea..
 Slices & Slicing criteria
 Why program slicing useful?
 How?
 Intermediate Representation of programs for slicing
 Slicing classification
 Slicing properties
 Applications of slicing
 Characteristics
 Conclusion
 References
INTRODUCTION
 Program slice is a subset of program .
 Program slicing enables programmers to view
subsets of program.
 Proposed as an approach to aid program
understanding task.
 Original concept was introduced by “Mark Weiser”
in his Ph. D thesis (1979).
PROGRAM SLICING BASIC IDEA…..
 Method used for abstracting from programs.
• Start with a subset of a program’s behaviour and
reduce it to a minimal from that still produces that
behavoiur.
 The reduced program is called a “SLICE”.
 Finding a slice is in general unsolvable .
SLICES & SLICING CRITERIA
 Slicing criterion – a pair <i, v>
 “i” is the number of the statement & “v” is the set
of variables to be observed at statement “i”.
 Desirable properties of a slice:
 Must have been got from the actual program by
deletion.
 Must be syntactically correct .
 Behavior of slice must corresponds to original
program behavior.
WHY PROGRAM SLICING USEFUL?
 Debugging:
Slicing visualizes control and data
dependencies
It highlights statements influencing the slice
 Testing:
Tests may be decomposed and test- work
gets faster and more efficient.
 Software measurement & maintEnance , …..
I’ll slice
you into
smaller
pieces
Using This?
Don’t even think about this way!!!
HOW?
 A slice is constructed by deleting those parts of a
program which is irrelevant to the program with
respect to the chosen set of variables at the chosen
point.
 A slice is taken from a program with the slicing
criterion <s , v>, which specifies a location
(Statement s) and a variable (v).
 slicing criterion is provided by the user
Source program Resulting
slice
Slice
Slicing
Criterion
indirectly
relevant
FLOW DIAGRAM
 Intermediate Representation of programs for slicing:
 Control Flow Graph (CFG)
Data Flow equations are solved
 Program Dependence Graph (PDG)
Slice is computed as graph reachability
problem
Entry
x=1 i=0 while i<2
i++ if i<2
x=2 x=3
z=x
Control dependence edges
Data dependence edges
PROGRAM DEPENDENCE GRAPH
1. x=1;
2. i=0;
3. while (i<2) {
4. i++;
5. if (i<2)
6. x=2;
else
7. x=3;
8. z=x;
}
SLICING CLASSIFICATIONS
 Types of slices
 Static
 Dynamic
 Direction of slicing
 Backward
 Forward
 Executability of slice
 Executable
 Closure
 Levels of slices
 Intraprocedural
 Intrprocedural
SLICING PROPERTIES
Static Slicing
 Slices derived from the source code for all possible
input values
 No assumptions made on input
 May leads to relatively big slice
 Contains all statements that may affect a variable
for every possible execution
 Result may not be usefull
SLICING PROPERTIES
Dynamic Slicing
 Computed on a given input
 Deterministic instead of Probabilistic
 Useful for applications that are input driven
(debugging, testing)
BACKWARD STATIC SLICING
 A backward slice of a program with respect to a
program point p and set of program variables V
consists of all statements and predicates in the
program that may affect the value of variables in V
at p
FORWARD STATIC SLICING
 A forward slice of a program with respect to a
program point p and set of program variables V
consists of all statements and predicates in the
program that may be affected by the value of
variables in V at p
APPLICATIONS OF SLICING
 Differencing
 Debugging
 Testing
 Program understanding
 Software maintenance
 Complexity measurement
 Program integration
 Reverse engineering
 Software Quality Assurance
CHARACTERISTICS
 Advantages
 Very easy and fast to compute a dynamic slice at
any execution point.
 Disadvantages
 Dynamic dependence graph is very large for real
programs…so, this scheme is not practical.
CONCLUSION
 No Universal algorithm
 Improving performance
 New algorithms
REFERENCES
 www.google.com.
 www.altavista.com
 www.wikipedia.com.
????

More Related Content

What's hot

Progress control
Progress controlProgress control
Progress control
ashamarsha
 
verification and validation
verification and validationverification and validation
verification and validation
Dinesh Pasi
 
Slides ppt
Slides pptSlides ppt
Slides ppt
butest
 

What's hot (20)

Progress control
Progress controlProgress control
Progress control
 
Ch 2 what is software quality
Ch 2 what is software qualityCh 2 what is software quality
Ch 2 what is software quality
 
Introduction To Agile
Introduction To AgileIntroduction To Agile
Introduction To Agile
 
Chapter 4 software project planning
Chapter 4 software project planningChapter 4 software project planning
Chapter 4 software project planning
 
Agile Process models
Agile Process modelsAgile Process models
Agile Process models
 
Software cost estimation techniques presentation
Software cost estimation techniques presentationSoftware cost estimation techniques presentation
Software cost estimation techniques presentation
 
verification and validation
verification and validationverification and validation
verification and validation
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Software Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsSoftware Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and Metrics
 
Software Engineering (Process Models)
Software Engineering (Process Models)Software Engineering (Process Models)
Software Engineering (Process Models)
 
Software development life cycle (SDLC)
Software development life cycle (SDLC)Software development life cycle (SDLC)
Software development life cycle (SDLC)
 
Incremental model
Incremental modelIncremental model
Incremental model
 
software quality
software qualitysoftware quality
software quality
 
Software Project Management
Software Project ManagementSoftware Project Management
Software Project Management
 
Software Project Management (monitoring and control)
Software Project Management (monitoring and control)Software Project Management (monitoring and control)
Software Project Management (monitoring and control)
 
Slides ppt
Slides pptSlides ppt
Slides ppt
 
Agile management.pptx
Agile management.pptxAgile management.pptx
Agile management.pptx
 
Crystal Methodology
Crystal MethodologyCrystal Methodology
Crystal Methodology
 
Requirements validation - requirements engineering
Requirements validation - requirements engineeringRequirements validation - requirements engineering
Requirements validation - requirements engineering
 
Software Measurement and Metrics.pptx
Software Measurement and Metrics.pptxSoftware Measurement and Metrics.pptx
Software Measurement and Metrics.pptx
 

Similar to Program slicing by kumari nutan

Program understanding: What programmers really want
Program understanding: What programmers really wantProgram understanding: What programmers really want
Program understanding: What programmers really want
Einar Høst
 
A review of slicing techniques in software engineering
A review of slicing techniques in software engineeringA review of slicing techniques in software engineering
A review of slicing techniques in software engineering
Salam Shah
 
Soft Eng - Software Process
Soft  Eng - Software ProcessSoft  Eng - Software Process
Soft Eng - Software Process
Jomel Penalba
 
Software Process in Software Engineering SE3
Software Process in Software Engineering SE3Software Process in Software Engineering SE3
Software Process in Software Engineering SE3
koolkampus
 
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
mwpeexdvjgtqujwhog
 
Software reliability engineering
Software reliability engineeringSoftware reliability engineering
Software reliability engineering
Mark Turner CRP
 

Similar to Program slicing by kumari nutan (20)

Slicing and testing
Slicing and testingSlicing and testing
Slicing and testing
 
Program understanding: What programmers really want
Program understanding: What programmers really wantProgram understanding: What programmers really want
Program understanding: What programmers really want
 
A review of slicing techniques in software engineering
A review of slicing techniques in software engineeringA review of slicing techniques in software engineering
A review of slicing techniques in software engineering
 
Software engineering 25 models details
Software engineering 25 models detailsSoftware engineering 25 models details
Software engineering 25 models details
 
Dependence flow graph for analysis
Dependence flow graph for analysisDependence flow graph for analysis
Dependence flow graph for analysis
 
Ch4
Ch4Ch4
Ch4
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
 
Soft Eng - Software Process
Soft  Eng - Software ProcessSoft  Eng - Software Process
Soft Eng - Software Process
 
Ch4
Ch4Ch4
Ch4
 
Software Process in Software Engineering SE3
Software Process in Software Engineering SE3Software Process in Software Engineering SE3
Software Process in Software Engineering SE3
 
A Comparative Analysis of Slicing for Structured Programs
A Comparative Analysis of Slicing for Structured ProgramsA Comparative Analysis of Slicing for Structured Programs
A Comparative Analysis of Slicing for Structured Programs
 
software Processes
software Processessoftware Processes
software Processes
 
Computer1
Computer1Computer1
Computer1
 
Software testing.pdf
Software testing.pdfSoftware testing.pdf
Software testing.pdf
 
Cost xpert
Cost xpertCost xpert
Cost xpert
 
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
 
Software reliability engineering
Software reliability engineeringSoftware reliability engineering
Software reliability engineering
 
5. software process model
5. software process model5. software process model
5. software process model
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Software maintenance
Software maintenanceSoftware maintenance
Software maintenance
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration Tooling
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 

Program slicing by kumari nutan

  • 1. KUMARI NUTAN O901206358 UNDER THE GUIDANCE OF ER. RAJESH KU. SAHOO Seminar on: pROGRAM SLICING TECHNIQUE Represented by AJAY BINAY INSTITUTE OF TECHNOLOGY, CUTTACK BPUT, ODISHA
  • 2. ABSTRACT  Slicing is a program analysis technique for debugging and understanding programs.  Program slicing is potentially useful analysis for aiding program understanding.  A program slice consists of the parts of a program that potentially affect the values computed at some point of interest. The task of computing program slices is called program slicing.
  • 3. CONTENTS  Introduction  Program Slicing basic idea..  Slices & Slicing criteria  Why program slicing useful?  How?  Intermediate Representation of programs for slicing  Slicing classification  Slicing properties  Applications of slicing  Characteristics  Conclusion  References
  • 4. INTRODUCTION  Program slice is a subset of program .  Program slicing enables programmers to view subsets of program.  Proposed as an approach to aid program understanding task.  Original concept was introduced by “Mark Weiser” in his Ph. D thesis (1979).
  • 5. PROGRAM SLICING BASIC IDEA…..  Method used for abstracting from programs. • Start with a subset of a program’s behaviour and reduce it to a minimal from that still produces that behavoiur.  The reduced program is called a “SLICE”.  Finding a slice is in general unsolvable .
  • 6. SLICES & SLICING CRITERIA  Slicing criterion – a pair <i, v>  “i” is the number of the statement & “v” is the set of variables to be observed at statement “i”.  Desirable properties of a slice:  Must have been got from the actual program by deletion.  Must be syntactically correct .  Behavior of slice must corresponds to original program behavior.
  • 7. WHY PROGRAM SLICING USEFUL?  Debugging: Slicing visualizes control and data dependencies It highlights statements influencing the slice  Testing: Tests may be decomposed and test- work gets faster and more efficient.  Software measurement & maintEnance , …..
  • 8. I’ll slice you into smaller pieces Using This? Don’t even think about this way!!!
  • 9. HOW?  A slice is constructed by deleting those parts of a program which is irrelevant to the program with respect to the chosen set of variables at the chosen point.  A slice is taken from a program with the slicing criterion <s , v>, which specifies a location (Statement s) and a variable (v).
  • 10.  slicing criterion is provided by the user Source program Resulting slice Slice Slicing Criterion indirectly relevant FLOW DIAGRAM
  • 11.  Intermediate Representation of programs for slicing:  Control Flow Graph (CFG) Data Flow equations are solved  Program Dependence Graph (PDG) Slice is computed as graph reachability problem
  • 12. Entry x=1 i=0 while i<2 i++ if i<2 x=2 x=3 z=x Control dependence edges Data dependence edges PROGRAM DEPENDENCE GRAPH 1. x=1; 2. i=0; 3. while (i<2) { 4. i++; 5. if (i<2) 6. x=2; else 7. x=3; 8. z=x; }
  • 13. SLICING CLASSIFICATIONS  Types of slices  Static  Dynamic  Direction of slicing  Backward  Forward  Executability of slice  Executable  Closure  Levels of slices  Intraprocedural  Intrprocedural
  • 14. SLICING PROPERTIES Static Slicing  Slices derived from the source code for all possible input values  No assumptions made on input  May leads to relatively big slice  Contains all statements that may affect a variable for every possible execution  Result may not be usefull
  • 15. SLICING PROPERTIES Dynamic Slicing  Computed on a given input  Deterministic instead of Probabilistic  Useful for applications that are input driven (debugging, testing)
  • 16. BACKWARD STATIC SLICING  A backward slice of a program with respect to a program point p and set of program variables V consists of all statements and predicates in the program that may affect the value of variables in V at p
  • 17. FORWARD STATIC SLICING  A forward slice of a program with respect to a program point p and set of program variables V consists of all statements and predicates in the program that may be affected by the value of variables in V at p
  • 18. APPLICATIONS OF SLICING  Differencing  Debugging  Testing  Program understanding  Software maintenance  Complexity measurement  Program integration  Reverse engineering  Software Quality Assurance
  • 19. CHARACTERISTICS  Advantages  Very easy and fast to compute a dynamic slice at any execution point.  Disadvantages  Dynamic dependence graph is very large for real programs…so, this scheme is not practical.
  • 20. CONCLUSION  No Universal algorithm  Improving performance  New algorithms
  • 22. ????