Deriving Analysers by Folding/Unfolding of Natural Semantics and a Case Study: Slicing

  • Valérie Gouranton
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1503)


We consider specifications of analysers expressed as compositions of two functions: a semantic function, which returns a natural semantics derivation tree, and a property defined by recurrence on derivation trees. A recursive definition of a dynamic analyser can be obtained by fold/unfold program transformation combined with deforestation. A static analyser can then be derived by abstract interpretation of the dynamic analyser. We apply our framework to the derivation of a dynamic backward slicing analysis for a logic programming language.


Logic Programming Program Execution Abstract Interpretation Program Variable Semantic Function 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    S. Abramsky. Abstract interpretation, logical relations and Kan extensions. Journal of Logic and Computation, 1:5–40, 1990.zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    R. M. Burstall and J. Darlington. A transformation system for developing recursive programs. Journal of the ACM, 24:44–67, 1977.zbMATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    W.N. Chin. Automatic methods for program transformation. PhD thesis, Imperial College, 1990.Google Scholar
  4. 4.
    P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In POPL, pages 238–252, 1977.Google Scholar
  5. 5.
    J. Darlington. A synthesis of several sorting algorithms. Acta Informatica, 11:1–30, 1978.zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    J. Darlington and R. M. Burstall. A system which automatically improves programs. Acta Informatica, 6:41–60, 1976.zbMATHCrossRefGoogle Scholar
  7. 7.
    T. Despeyroux. Typol: a formalism to implement natural semantics. Technical Report 94, INRIA, France, 1988.Google Scholar
  8. 8.
    J. Field, G. Ramalingam, and F. Tip. Parametric program slicing. In POPL, pages 379–392, 1995.Google Scholar
  9. 9.
    A. Gill, J. Launchbury, and S.L. Peyton Jones. A short cut to deforestation. In FPCA, pages 223–232, 1993.Google Scholar
  10. 10.
    V. Gouranton. Dérivation d’analyseurs dynamiques et statiques à partir de spécifications opérationnelles. PhD thesis, Université de Rennes, France, 1997.Google Scholar
  11. 11.
    V. Gouranton. Deriving analysers by folding/unfolding of natural semantics and a case study: slicing. Technical Report 3413, INRIA, France, 1998.Google Scholar
  12. 12.
    V. Gouranton and D. Le Métayer. Dynamic slicing: a generic analysis based on a natural semantics format. Technical Report 3375, INRIA, France, 1998.Google Scholar
  13. 13.
    H. Ibraheem and D. A. Schmidt. Adapting big-step semantics to small-step style: coinductive interpretations and ”higher-order” derivations. In Second Workshop on Higher-Order Techniques in Operational Semantics (HOOTS2), 1997.Google Scholar
  14. 14.
    G. Kahn. Natural semantics. In STACS 87, number 247 in Lecture Notes in Computer Science, pages 22–39. Springer-Verlag, 1987.CrossRefGoogle Scholar
  15. 15.
    B. Le Charlier, K. Musumbu, and P. Van Hentenryck. A generic interpretation algorithm and its complexity analysis. In ICLP, pages 64–78, 1991.Google Scholar
  16. 16.
    D. Miller and G. Nadathur. Higher-order logic programming. In ILPC, volume 225 of LNCS, pages 448–462, 1986.Google Scholar
  17. 17.
    H. Riis Nielson and F. Nielson. Semantics With Applications. John Wiley & Sons, 1992.Google Scholar
  18. 18.
    T. Reps and T. Turnidge. Program specialization via program slicing. In International Seminar on Partial Evaluation, 1996.Google Scholar
  19. 19.
    T. Reps and W. Yang. The semantics of program slicing. Technical Report 777, University of Wisconsin, Madison, 1988.Google Scholar
  20. 20.
    D. Sands. Proving the correctness of recursion-based automatic program transformations. In TAPSOFT. Springer-Verlag, 1995.Google Scholar
  21. 21.
    D. Sands. Total correctness by local improvement in the transformation of functional programs. TOPLAS, 18:175–234, 1996.CrossRefGoogle Scholar
  22. 22.
    D.A. Schmidt. Abstract interpretation of small-step semantics. In 5th LOMAPS Workshop on Analysis and Verification of Multiple-Agent Languages. LNCS, 1996.Google Scholar
  23. 23.
    S. Schoenig and M. Ducassé. A backward slicing algorithm for prolog. In SAS, number 1145 in LNCS, pages 317–331. Springer-Verlag, 1996.Google Scholar
  24. 24.
    B. Steffen. Generating data flow analysis algorithms from modal specifications. Science of Computer Science, 21(2):115–139, 1993.zbMATHGoogle Scholar
  25. 25.
    F. Tip. A survey of program slicing techniques. Journal of Programming Languages, 3:121–189, 1995.Google Scholar
  26. 26.
    G.A. Venkatesh. A framework for construction and evaluation of high-level specifications for program analysis techniques. In PLDI, volume 24, pages 1–12, 1989.Google Scholar
  27. 27.
    G.A. Venkatesh. The semantics approach to program slicing. In PLDI, pages 107–119, 1991.Google Scholar
  28. 28.
    P. Wadler. Deforestation: transforming programs to eliminate trees. Theoretical Computer Science, 73:231–248, 1990.zbMATHCrossRefMathSciNetGoogle Scholar
  29. 29.
    M. Weiser. Program slicing. IEEE Transactions on Software Engineering, 4:352–357, 1984.CrossRefGoogle Scholar
  30. 30.
    K. Yi and W. L. Harrison III. Automatic generation and management of interprocedural program analyses. In POPL, pages 246–259, 1993.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Valérie Gouranton
    • 1
  1. 1.IRISA/INRIA, IFSICRennesFrance

Personalised recommendations