Skip to main content

Forward Slicing of Multi-paradigm Declarative Programs Based on Partial Evaluation

  • Conference paper
  • First Online:
Logic Based Program Synthesis and Transformation (LOPSTR 2002)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2664))

Abstract

Program slicing has been mainly studied in the context of imperative languages, where it has been applied to many software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This paper introduces the first forward slicing technique for multi-paradigm declarative programs. In particular, we show how program slicing can be defined in terms of online partial evaluation. Our approach clarifies the relation between both methodologies and provides a simple way to develop program slicing tools from existing partial evaluators.

This work has been partially supported by CICYT TIC 2001-2705-C03-01, by the Generalitat Valenciana under grant CTIDIA/2002/205, and by the MCYT under grants HA2001-0059, HU2001-0019 and HI2000-0161.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. S.M. Abramov and R. Glück. The Universal Resolving Algorithm: Inverse Computation in a Functional Language. In Mathematics of Program Construction. Proceedings, pages 187–212. Springer LNCS 1837, 2000.

    Chapter  Google Scholar 

  2. E. Albert, M. Hanus, F. Huch, J. Olvier, and G. Vidal. Operational Semantics for Functional Logic Languages. In Proc. of the Int’l Workshop on Functional and (Constraint) Logic Programming (WFLP’02), volume 76 of Electronic Notes in Theoretical Computer Science. Elsevier Science Publishers, 2002.

    Google Scholar 

  3. E. Albert, M. Hanus, and G. Vidal. A Practical Partial Evaluation Scheme for Multi-Paradigm Declarative Languages. Journal of Functional and Logic Programming, 2002(1), 2002.

    Google Scholar 

  4. E. Albert and G. Vidal. The Narrowing-Driven Approach to Functional Logic Program Specialization. New Generation Computing, 20(1):3–26, 2002.

    Article  MATH  MathSciNet  Google Scholar 

  5. M. Alpuente, M. Falaschi, and G. Vidal. Partial Evaluation of Functional Logic Programs. ACM TOPLAS, 20(4):768–844, 1998.

    Article  Google Scholar 

  6. S. Antoy. Definitional trees. In Proc. of the 3rd Int’l Conference on Algebraic and Logic Programming (ALP’92), pages 143–157. Springer LNCS 632, 1992.

    Chapter  Google Scholar 

  7. S. Antoy, R. Echahed, and M. Hanus. A Needed Narrowing Strategy. Journal of the ACM, 47(4): 776–822, 2000.

    Article  MathSciNet  Google Scholar 

  8. M. Das, T. Reps, and P. Van Hentenryck. Semantic Foundations of Binding-Time Analysis for Imperative Programs. In Proc. of the Symp. on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’95), pages 100–110, 1995.

    Google Scholar 

  9. D. De Schreye, R. Glück, J. Jørgensen, M. Leuschel, B. Martens, and M.H. Sørensen. Conjunctive Partial Deduction: Foundations, Control, Algorihtms, and Experiments. Journal of Logic Programming, 41(2&3):231–277, 1999.

    Article  MATH  MathSciNet  Google Scholar 

  10. J. Ferrante, K.J. Ottenstein, and J.D. Warren. The Program Dependence Graph and Its Use in Optimization. ACM Transactions on Programming Languages and Systems, 9(3):319–349, 1987.

    Article  MATH  Google Scholar 

  11. J. Gallagher. Tutorial on Specialisation of Logic Programs. In Proc. of the ACM Symp. on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’93), pages 88–98. ACM, New York, 1993.

    Chapter  Google Scholar 

  12. R. Glück and M.H. Sørensen. A Roadmap to Metacomputation by Supercompilation. In O. Danvy, R. Glück, and P. Thiemann, editors, Partial Evaluation, Int’l Seminar, Dagstuhl Castle, Germany, pages 137–160. Springer LNCS 1110, 1996.

    Google Scholar 

  13. V. Gouranton. Deriving Analysers by Folding/Unfolding of Natural Semantics and a Case Study: Slicing. In Proc. of SAS’98, pages 115–133, 1998.

    Google Scholar 

  14. M. Hanus. A Unified Computation Model for Functional and Logic Programming. In Proc. of ACM Symp. on Principles of Programming Languages (POPL’97), pages 80–93. ACM, New York, 1997.

    Google Scholar 

  15. M. Hanus, S. Antoy, J. Koj, R. Sadre, and F. Steiner. PAKCS 1.2: The Portland Aachen Kiel Curry System User Manual. Technical report, University of Kiel, Germany, 2000.

    Google Scholar 

  16. M. Hanus and C. Prehofer. Higher-Order Narrowing with Definitional Trees. Journal of Functional Programming, 9(1):33–75, 1999.

    Article  MATH  MathSciNet  Google Scholar 

  17. M. Hanus (ed.). Curry: An Integrated Functional Logic Language. Available at: http://www.informatik.uni-kiel.de/~mh/curry/.

  18. J. Hughes. Backwards Analysis of Functional Programs. In Proc. of the Int’l Workshop on Partial Evaluation and Mixed Computation, pages 187–208. North-Holland, Amsterdam, 1988.

    Google Scholar 

  19. D.J. Kuck, R.H. Kuhn, D.A. Padua, B. Leasure, and M. Wolfe. Dependence Graphs and Compiler Optimization. In Proc. of the 8th Symp. on the Principles of Programming Languages (POPL’81), SIGPLAN Notices, pages 207–218, 1981.

    Google Scholar 

  20. M. Leuschel. Program Specialization and Abstract Interpretation Reconciled. In Proc. of the Joint Int’l Conf. and Symp. on Logic Programming (JICSLP’98), pages 220–234. MIT Press, 1998.

    Google Scholar 

  21. M. Leuschel and M.H. Sørensen. Redundant Argument Filtering of Logic Programs. In Proc. of LOPSTR’96, pages 83–103. LNCS 1207 83–103, 1996.

    Google Scholar 

  22. F. López-Fraguas and J. Sánchez-Hernández. TOY: A Multiparadigm Declarative System. In Proc. of RTA’99, pages 244–247. Springer LNCS 1631, 1999.

    Google Scholar 

  23. T. Mogensen. Separating Binding-Times in Language Specifications. In Proc. of 4th Int’l Conf. on Functional Programming and Computer Architecture (FPCA’89), pages 12–25. ACM, New York, 1989.

    Chapter  Google Scholar 

  24. T. Reps and T. Turnidge. Program Specialization via Program Slicing. In O. Danvy, R. Glück, and P. Thiemann, editors, Partial Evaluation. Dagstuhl Castle, Germany, February 1996, pages 409–429. Springer LNCS 1110, 1996.

    Google Scholar 

  25. S. Schoenig and M. Ducasse. A Backward Slicing Algorithm for Prolog. In Proc. of SAS’96, pages 317–331. Springer LNCS 1145, 1996.

    Google Scholar 

  26. J.P. Secher and M.H. Sørensen. From Checking to Inference via Driving and Dag Grammars. In ACM Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’02), pages 41–51. ACM, New York, 2002.

    Chapter  Google Scholar 

  27. P. Sestoft. Deriving a Lazy Abstract Machine. Journal of Functional Programming, 7(3):231–264, 1997.

    Article  MATH  MathSciNet  Google Scholar 

  28. M.H. Sørensen, R. Glück, and N.D. Jones. A Positive Supercompiler. Journal of Functional Programming, 6(6):811–838, 1996.

    MATH  Google Scholar 

  29. G. Szilagyi, T. Gyimothy, and J. Maluszynski. Static and Dynamic Slicing of Constraint Logic Programs. J. Automated Software Engineering, 9(1):41–65, 2002.

    Article  MATH  Google Scholar 

  30. F. Tip. A Survey of Program Slicing Techniques. Journal of Programming Languages, 3:121–189, 1995.

    Google Scholar 

  31. V.F. Turchin. The Concept of a Supercompiler. ACM Transactions on Programming Languages and Systems, 8(3):292–325, July 1986.

    Article  MATH  MathSciNet  Google Scholar 

  32. G. Vidal. Forward Slicing by Partial Evaluation. Technical report, DSIC, Technical University of Valencia, 2003. Available from http://www.dsic.upv.es/~gvidal.

  33. M.D. Weiser. Program Slices: Formal, Psychological, and Practical Investigations of an Automatic Program Abstraction Method. PhD thesis, The University of Michigan, 1979.

    Google Scholar 

  34. M.D. Weiser. Program Slicing. IEEE Transactions on Software Engineering, 10(4):352–357, 1984.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Vidal, G. (2003). Forward Slicing of Multi-paradigm Declarative Programs Based on Partial Evaluation. In: Leuschel, M. (eds) Logic Based Program Synthesis and Transformation. LOPSTR 2002. Lecture Notes in Computer Science, vol 2664. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45013-0_17

Download citation

  • DOI: https://doi.org/10.1007/3-540-45013-0_17

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40438-5

  • Online ISBN: 978-3-540-45013-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics