You are required to read and agree to the below before accessing a full-text version of an article in the IDE article repository.

The full-text document you are about to access is subject to national and international copyright laws. In most cases (but not necessarily all) the consequence is that personal use is allowed given that the copyright owner is duly acknowledged and respected. All other use (typically) require an explicit permission (often in writing) by the copyright owner.

For the reports in this repository we specifically note that

  • the use of articles under IEEE copyright is governed by the IEEE copyright policy (available at
  • the use of articles under ACM copyright is governed by the ACM copyright policy (available at
  • technical reports and other articles issued by M‰lardalen University is free for personal use. For other use, the explicit consent of the authors is required
  • in other cases, please contact the copyright owner for detailed information

By accepting I agree to acknowledge and respect the rights of the copyright owner of the document I am about to access.

If you are in doubt, feel free to contact

On-Demand Slicing



Research group:

Publication Type:

Report - MRTC


Mälardalen Real-Time Research Centre, Mälardalen University




Static slicing selects a part of the program that can possibly affect the slicing criterion in question. The standard algorithm in the slicing is based upon the Program Dependency Graph (PDG). PDG is constructed upon Control Flow Graph (CFG) nodes, which afterwards, are connected by control and data dependencies edges. PDG-Based slicing algorithm requires building in advance a PDG, which can be quite an expensive operation. Two new improvements are proposed to this scheme: rstly, Strongly Live Variables (SLV) data flow analysis is used rather than Reaching Definitions to compute the data dependencies. This has the advantage that the slicing of program statements can be done concurrently with the SLV analysis as well as it eliminates the need to build a Data Dependence Graph (DDG). Secondly, for well-structured code, an Object-Based representation of the code is designed, Objects structured into loops and conditionals, which directly captures the control dependencies: thus, the Control Dependence Graph (CDG) needs not be built. This scheme also allows for a more efficient representation of the SLV sets, and a simpler test that the fixed-point iteration in the combined SLV analysis and slicing has converged.


author = {Husni Khanfar},
title = {On-Demand Slicing},
month = {May},
year = {2014},
publisher = {M{\"a}lardalen Real-Time Research Centre, M{\"a}lardalen University},
url = {}