Abstract
A formal executable semantics of a programming language has the necessary information to develop program debugging and reasoning techniques. In this paper we choose such a particular technique called program slicing and we introduce a generic algorithm which extracts a set of side-effects inducing constructs, directly from the formal executable semantics of a programming language. These constructs are further used to infer program slices, for given programs and specified slicing criteria. Our proposed approach improves on the parametrization of the language tools development because changes in the formal semantics are automatically carried out in the slicing procedure. We use the rewriting logic and the Maude system to implement a prototype and to test our technique.
Research supported by MICINN Spanish project DESAFIOS10 (TIN2009-14599-C03-01) and Comunidad de Madrid program PROMETIDOS (S2009/TIC-1465).
Chapter PDF
Similar content being viewed by others
References
Agrawal, H., DeMillo, R.A., Spafford, E.H.: Debugging with dynamic slicing and backtracking. Software - Practice and Experience 23(6), 589–616 (1993)
Alpuente, M., Ballis, D., Espert, J., Romero, D.: Backward trace slicing for rewriting logic theories. In: Bjørner, N., Sofronie-Stokkermans, V. (eds.) CADE 2011. LNCS (LNAI), vol. 6803, pp. 34–48. Springer, Heidelberg (2011)
Alpuente, M., Ballis, D., Frechina, F., Romero, D.: Backward trace slicing for conditional rewrite theories. In: Bjørner, N., Voronkov, A. (eds.) LPAR-18. LNCS, vol. 7180, pp. 62–76. Springer, Heidelberg (2012)
Baader, F., Snyder, W.: Unification theory. In: Robinson, A., Voronkov, A. (eds.) Handbook of Automated Reasoning, pp. 445–532. Elsevier (2001)
Bouhoula, A., Jouannaud, J.-P., Meseguer, J.: Specification and proof in membership equational logic. Theoretical Computer Science 236, 35–132 (2000)
Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: All About Maude. LNCS, vol. 4350. Springer, Heidelberg (2007)
Field, J., Ramalingam, G., Tip, F.: Parametric program slicing. In: Proc. of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1995, pp. 379–392. ACM Press (1995)
Field, J., Tip, F.: Dynamic dependence in term rewriting systems and its application to program slicing. Information & Software Technology 40(11-12), 609–636 (1998)
Harman, M., Danicic, S.: Using program slicing to simplify testing. Journal of Software Testing, Verification and Reliability 5, 143–162 (1995)
Horwitz, S., Reps, T.W., Binkley, D.: Interprocedural slicing using dependence graphs. ACM Transactions on Programming Languages Systems 12(1), 26–60 (1990)
Jhala, R., Majumdar, R.: Path slicing. In: Proc. of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2005, pp. 38–47. ACM Press (2005)
Martí-Oliet, N., Meseguer, J.: Rewriting logic: roadmap and bibliography. Theoretical Computer Science 285(2), 121–154 (2002)
Meseguer, J.: Conditional rewriting logic as a unified model of concurrency. Theoretical Computer Science 96(1), 73–155 (1992)
Riesco, A.: Using semantics specified in Maude to generate test cases. In: Roychoudhury, A., D’Souza, M. (eds.) ICTAC 2012. LNCS, vol. 7521, pp. 90–104. Springer, Heidelberg (2012)
Sandberg, C., Ermedahl, A., Gustafsson, J., Lisper, B.: Faster WCET flow analysis by program slicing. In: Proc. of the 2006 ACM SIGPLAN Conference on Languages, Compilers and Tools for Embedded Systems, LCTES 2006, pp. 103–112. ACM Press (2006)
Silva, J., Chitil, O.: Combining algorithmic debugging and program slicing. In: Proc. of the 8th ACM-SIGPLAN International Symposium on Principles and Practice of Declarative Programming, PPDP 2006, pp. 157–166. ACM Press (2006)
Sterling, L., Shapiro, E.Y.: The Art of Prolog - Advanced Programming Techniques. MIT Press (1986)
Tian, C., Feng, M., Gupta, R.: Speculative parallelization using state separation and multiple value prediction. In: Proc. of the 2010 International Symposium on Memory Management, ISMM 2010, pp. 63–72. ACM Press (2010)
Tip, F.: A survey of program slicing techniques. Journal of Programming Languages 3(3), 121–189 (1995)
Verdejo, A., Martí-Oliet, N.: Executable structural operational semantics in Maude. Journal of Logic and Algebraic Programming 67, 226–293 (2006)
Weiser, M.: Program slicing. In: Proc. of the 5th International Conference on Software Engineering, ICSE 1981, pp. 439–449. IEEE Press (1981)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 IFIP International Federation for Information Processing
About this paper
Cite this paper
Riesco, A., Asăvoae, I.M., Asăvoae, M. (2013). A Generic Program Slicing Technique Based on Language Definitions. In: Martí-Oliet, N., Palomino, M. (eds) Recent Trends in Algebraic Development Techniques. WADT 2012. Lecture Notes in Computer Science, vol 7841. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37635-1_15
Download citation
DOI: https://doi.org/10.1007/978-3-642-37635-1_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-37634-4
Online ISBN: 978-3-642-37635-1
eBook Packages: Computer ScienceComputer Science (R0)