Skip to main content
Log in

Techniques and applications of computation slicing

  • Published:
Distributed Computing Aims and scope Submit manuscript

Abstract.

Writing correct distributed programs is hard. In spite of extensive testing and debugging, software faults persist even in commercial grade software. Many distributed systems should be able to operate properly even in the presence of software faults. Monitoring the execution of a distributed system, and, on detecting a fault, initiating the appropriate corrective action is an important way to tolerate such faults. This gives rise to the predicate detection problem which requires finding whether there exists a consistent cut of a given computation that satisfies a given global predicate.

Detecting a predicate in a computation is, however, an NP-complete problem in general. In order to ameliorate the associated combinatorial explosion problem, we introduce the notion of computation slice. Formally, the slice of a computation with respect to a predicate is a (sub)computation with the least number of consistent cuts that contains all consistent cuts of the computation satisfying the predicate. Intuitively, slice is a concise representation of those consistent cuts of a computation that satisfy a certain condition. To detect a predicate, rather than searching the state-space of the computation, it is much more efficient to search the state-space of the slice.

We prove that the slice of a computation is uniquely defined for all predicates. We also present efficient algorithms for computing the slice for several useful classes of predicates. For an arbitrary predicate, we establish that the problem of computing the slice is NP-complete in general. Nonetheless, for such a predicate, we develop an efficient heuristic algorithm for computing an approximate slice. Our experimental results demonstrate that slicing can lead to an exponential improvement over existing techniques for predicate detection in terms of time and space.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Alagar S, Venkatesan S: Techniques to Tackle State Explosion in Global Predicate Detection. IEEE Trans Software Eng 27(8):704-714 (2001)

    Google Scholar 

  2. Babaoglu Ö, Fromentin E, Raynal M: A Unified Framework for the Specification and Run-time Detection of Dynamic Properties in Distributed Computations. J Syst Software 33(3):287-298 (1996)

    Google Scholar 

  3. Bouge L: Repeated Snapshots in Distributed Systems with Synchronous Communication and their Implementation in CSP. Theor Comput Sci 49:145-169 (1987)

    Google Scholar 

  4. Chase C, Garg VK: On Techniques and their Limitations for the Global Predicate Detection Problem. In: Proceedings of the Workshop on Distributed Algorithms (WDAG), pp 303-317, France, 1995

  5. Chase C, Garg VK: Detection of Global Predicates: Techniques and their Limitations. Distrib Comput (DC) 11(4):191-201 (1998)

    Google Scholar 

  6. Cheng J: Slicing Concurrent Programs - A Graph-Theoretical Approach. In: Proceedings of the International Workshop on Automated Debugging (AADEBUG), pp 223-240, 1993

  7. Chandy KM, Lamport L: Distributed Snapshots: Determining Global States of Distributed Systems. ACM Trans Comput Syst 3(1):63-75 (1985)

    Google Scholar 

  8. Cooper R, Marzullo K: Consistent Detection of Global Predicates. In: Proceedings of the ACM/ONR Workshop on Parallel and Distributed Debugging, pp 163-173, Santa Cruz, California, 1991

  9. Davey BA, Priestley HA: Introduction to Lattices and Order. Cambridge University Press, Cambridge, UK, 1990

  10. Fidge C: Logical Time in Distributed Computing Systems. IEEE Comput 24(8):28-33 (1991)

    Google Scholar 

  11. Garg VK: Algorithmic Combinatorics based on Slicing Posets. In: Proceedings of the 22nd Conference on the Foundations of Software Technology and Theoretical Computer Science (FSTTCS), Kanpur, India, December 2002

  12. Garg VK: Elements of Distributed Computing. Wiley, New York, NY, 2002

  13. Garg VK, Mittal N: On Slicing a Distributed Computation. In: Proceedings of the 21st IEEE International Conference on Distributed Computing Systems (ICDCS), pp 322-329, Phoenix, Arizona, April 2001

  14. Godefroid P: Partial-Order Methods for the Verification of Concurrent Systems, Lect Notes Comput Sci, vol 1032, Springer, 1996

  15. Hurfin M, Mizuno M, Singhal M, Raynal M: Efficient distributed detection of conjunctions of local predicates. IEEE Trans Software Eng 24(8):664-677 (1998)

    Google Scholar 

  16. Jegou R, Medina R, Nourine L: Linear Space Algorithm for On-line Detection of Global Predicates. In: Desel J (ed) Proceedings of the International Workshop on Structures in Concurrency Theory (STRICT), pp 175-189. Springer, 1995

  17. Johnson DB, Zwaenepoel W: Recovery in Distributed Systems Using Optimistic Message Logging and Checkpointing. In: Proceedings of the 6th ACM Symposium on Principles of Distributed Computing (PODC), pp 171-181, August 1988

  18. Korel B, Rilling J: Application of Dynamic Slicing in Program Debugging. In: Kamkar M (ed) Proceedings of the 3rd International Workshop on Automated Debugging (AADEBUG), pp 43-57, Link\” oping, Sweden, May 1997

  19. Kshemkalyani AD: A Framework for Viewing Atomic Events in Distributed Computations. Theor Comput Sci 196(1-2):45-70 (1998)

    Google Scholar 

  20. Lamport L: Time, Clocks, and the Ordering of Events in a Distributed System. Commun ACM (CACM) 21(7):558-565 (1978)

    MATH  Google Scholar 

  21. Mattern F: Virtual Time and Global States of Distributed Systems. In: Parallel and Distributed Algorithms: Proceedings of the Workshop on Distributed Algorithms (WDAG), pp 215-226. Elsevier Science Publishers B. V. (North-Holland), 1989

  22. Mittal N, Garg VK: Computation Slicing: Techniques and Theory. In: Proceedings of the Symposium on Distributed Computing (DISC), pp 78-92, Lisbon, Portugal, October 2001

  23. Mittal N, Garg VK: On Detecting Global Predicates in Distributed Computations. In: Proceedings of the 21st IEEE International Conference on Distributed Computing Systems (ICDCS), pp 3-10, Phoenix, Arizona, April 2001

  24. Mittal N, Garg VK: Software Fault Tolerance of Distributed Programs using Computation Slicing. In: Proceedings of the 23rd IEEE International Conference on Distributed Computing Systems (ICDCS), pp 105-113, Providence, Rhode Island, May 2003

  25. Mittal N, Garg VK: Techniques and Applications of Computation Slicing. Technical Report UTDCS-15-03, Department of Computer Science, The University of Texas at Dallas, April 2003

  26. Mittal N, Garg VK: Finding Missing Synchronization in a Distributed Computation using Controlled Re-execution. Distrib Comput (DC), March 2004. Online First

  27. Mittal N, Sen A, Garg VK, Atreya R: Finding Satisfying Global States: All for One and One for All. In: Proceedings of the International Parallel and Distributed Processing Symposium (IPDPS), April 2004

  28. Netzer RHB, Xu J: Necessary and Sufficient Conditions for Consistent Global Snapshots. IEEE Trans Parallel Distrib Syst (TPDS) 6(2):165-169 (1995)

    Google Scholar 

  29. Rival I: Maximal Sublattices of Finite Distributive Lattices II. Proc Amer Math Soci 44(2):263-268 (1974)

    Google Scholar 

  30. Spezialetti M, Kearns P: Efficient Distributed Snapshots. In: Proceedings of the 6th IEEE International Conference on Distributed Computing Systems (ICDCS), pp 382-388, 1986

  31. Stoller SD, Schneider F: Faster Possibility Detection by Combining Two Approaches. In: Proceedings of the Workshop on Distributed Algorithms (WDAG), Lect Notes Comput Sci (LNCS), vol 972 pp 318-332, France, September 1995

  32. Stoller SD, Unnikrishnan L, Liu YA: Efficient Detection of Global Properties in Distributed Systems Using Partial-Order Methods. In: Proceedings of the 12th International Conference on Computer-Aided Verification (CAV), Lect Notes Comput Sci (LNCS), vol 1855 pp 264-279. Springer, July 2000

  33. Tarafdar A, Garg V:. Predicate Control for Active Debugging of Distributed Programs. In: Proceedings of the 9th IEEE Symposium on Parallel and Distributed Processing (SPDP), pp 763-769, Orlando, 1998

  34. Tip F: A Survey of Program Slicing Techniques. J Programm Lang 3(3):121-189 (1995)

    Google Scholar 

  35. Venkatesh G: Experimental Results from Dynamic Slicing of C Programs. ACM Trans Programm Lang Syst (TOPLAS) 17(2):197-216 (1995)

    Google Scholar 

  36. Wang Y-M: Consistent Global Checkpoints that Contain a Given Set of Local Checkpoints. IEEE Trans Comput 46(4):456-468 (1997)

    Google Scholar 

  37. Weiser M: Programmers Use Slices when Debugging. Commun ACM (CACM) 25(7):446-452 (1982)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Neeraj Mittal.

Additional information

Received: 19 November 2003, Revised: 29 July 2004, Published online: 7 February 2005

Vijay K. Garg: Supported in part by the NSF Grants ECS-9907213, CCR-9988225, Texas Education Board Grant ARP-320, an Engineering Foundation Fellowship, and an IBM grant.

Parts of this paper have appeared earlier in conference proceedings [GM01,MG01a,MG03a].

Rights and permissions

Reprints and permissions

About this article

Cite this article

Mittal, N., Garg, V.K. Techniques and applications of computation slicing. Distrib. Comput. 17, 251–277 (2005). https://doi.org/10.1007/s00446-004-0117-0

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00446-004-0117-0

Keywords:

Navigation