Scenario Oriented Program Slicing for Large-Scale Software Through Constraint Logic Programming and Program Transformation

Program slicing, as a technique of program decomposition, is widely used in the field of program testing, model checking, software verification, symbolic execution, and other fields. However, the traditional approaches of program slicing tend to produce too large slices and the static program analyses are hard to be precise enough. Scenario-oriented program slicing, which considers the actual usage of software, gives a more precise perspective of program slicing. In this paper, we propose an approach of scenario-oriented program slicing, which combines constraint logic programming and program transformation. According to the observation that the output of a program transformation is a semantically equivalent program where the properties of interest are preserved, we can apply a sequence of transformations, more powerful than those needed for program specialization, refining the slicing to the desired degree of precision. And constraint logic programming has been shown to be a powerful, flexible formalism to reason about the correctness of programs. The novel contributions of this paper are as follows: 1) converting the problem of program slicing into program transformation and retrieval; 2) presenting a set of constraint handling rules for scenario-oriented program slicing in constraint logical programming programs; and 3) deriving a scenario-oriented program slicing algorithm. The method of scenario-oriented program slicing has been implemented and we have demonstrated its effectiveness and efficiency on three open source software projects in GitHub.

[1]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[2]  Udo Kelter,et al.  Incrementally slicing editable submodels , 2017, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[3]  R. Stephenson A and V , 1962, The British journal of ophthalmology.

[4]  Shengbing Ren,et al.  Visualization Analysis Framework for Large-Scale Software Based on Software Network , 2017, ICPCSEE.

[5]  Mark Weiser,et al.  Programmers use slices when debugging , 1982, CACM.

[6]  R. Senthil Kumar,et al.  An Approach for UML based Scenario Oriented Slicing , 2009 .

[7]  Franz Wotawa,et al.  Combining Slicing and Constraint Solving for Better Debugging: The CONBAS Approach , 2012, Adv. Softw. Eng..

[8]  Alberto Pettorossi,et al.  Generalization strategies for the verification of infinite state systems , 2011, Theory and Practice of Logic Programming.

[9]  Ivar Jacobson,et al.  Use-Case 2.0 , 2016, ACM Queue.

[10]  Alberto Pettorossi,et al.  Verifying Relational Program Properties by Transforming Constrained Horn clauses , 2016, CILC.

[11]  Franz Wotawa,et al.  Reducing the Size of Dynamic Slicing with Constraint Solving , 2012, 2012 12th International Conference on Quality Software.

[12]  Alberto Pettorossi,et al.  Semantics-based generation of verification conditions via program specialization , 2017, Sci. Comput. Program..

[13]  Alberto Pettorossi,et al.  Verification of Imperative Programs by Constraint Logic Program Transformation , 2013, Festschrift for Dave Schmidt.

[14]  Baowen Xu,et al.  Scenario oriented program slicing , 2008, SAC '08.

[15]  Anna Philippou,et al.  Tools and Algorithms for the Construction and Analysis of Systems , 2018, Lecture Notes in Computer Science.

[16]  Alberto Pettorossi,et al.  A Rule-based Verification Strategy for Array Manipulating Programs , 2015, Fundam. Informaticae.

[17]  Sandro Etalle,et al.  Transformations of CLP Modules , 1996, Theor. Comput. Sci..

[18]  Aaas News,et al.  Book Reviews , 1893, Buffalo Medical and Surgical Journal.

[19]  Vahid Rafe,et al.  Deadlock detection in complex software systems specified through graph transformation using Bayesian optimization algorithm , 2017, J. Syst. Softw..