239 research outputs found

    A survey of program slicing techniques

    Get PDF

    Slicing unconditional jumps with unnecessary control dependencies

    Full text link
    [EN] Program slicing is an analysis technique that has a wide range of applications, ranging from compilers to clone detection software, and that has been applied to practically all programming languages. Most program slicing techniques are based on a widely extended program representation, the System Dependence Graph (SDG). However, in the presence of unconditional jumps, there exist some situations where most SDG-based slicing techniques are not as accurate as possible, including more code than strictly necessary. In this paper, we identify one of these scenarios, pointing out the cause of the inaccuracy, and describing the initial solution to the problem proposed in the literature, together with an extension, which solves the problem completely. These solutions modify both the SDG generation and the slicing algorithm. Additionally, we propose an alternative solution, that solves the problem by modifying only the SDG generation, leaving the slicing algorithm untouched.This work has been partially supported by the EU (FEDER) and the Spanish MCI/AEI under grants TIN2016-76843-C4-1-R and PID2019-104735RB-C41, by the Generalitat Valenciana under grant Prometeo/2019/098 (DeepTrust), and by TAILOR, a project funded by EU Horizon 2020 research and innovation programme under GA No 952215Galindo-JimĂŠnez, CS.; PĂŠrez-Rubio, S.; Silva, J. (2021). Slicing unconditional jumps with unnecessary control dependencies. Lecture Notes in Computer Science. 12561:293-308. https://doi.org/10.1007/978-3-030-68446-4_15S2933081256

    System dependence graphs in sequential Erlang

    Full text link
    The system dependence graph (SDG) is a data structure used in the imperative paradigm for different static analysis, and particularly, for program slicing. Program slicing allows us to determine the part of a program (called slice) that influences a given variable of interest. Thanks to the SDG, we can produce precise slices for interprocedural programs. Unfortunately, the SDG cannot be used in the functional paradigm due to important features that are not considered in this formalism (e.g., pattern matching, higher-order, composite expressions, etc.). In this work we propose the first adaptation of the SDG to a functional language facing these problems. We take Erlang as the host language and we adapt the algorithms used to slice the SDG to produce precise slices of Erlang interprocedural programs. As a proof-of-concept, we have implemented a program slicer for Erlang based on our SDGs.This work has been partially supported by the Spanish Ministerio de Ciencia e Innovaci´on under grant TIN2008-06622-C03-02 and by the Generalitat Valenciana under grant PROMETEO/2011/052. Salvador Tamarit was partially supported by the Spanish MICINN under FPI grant BES-2009-015019Silva Galiana, JF.; Tamarit Muñoz, S.; Tomás Franco, C. (2012). System dependence graphs in sequential Erlang. En Fundamental Approaches to Software Engineering. Springer Verlag (Germany). 486-500. https://doi.org/10.1007/978-3-642-28872-2_33S486500Agrawal, H., Horgan, J.R.: Dynamic program slicing. In: Programming Language Design and Implementation (PLDI), pp. 246–256 (1990)Brown, C.: Tool Support for Refactoring Haskell Programs. PhD thesis, School of Computing, University of Kent, Canterbury, Kent, UK (2008)Cheda, D., Silva, J., Vidal, G.: Static slicing of rewrite systems. Electron. Notes Theor. Comput. Sci. 177, 123–136 (2007)Ferrante, J., Ottenstein, K.J., Warren, J.D.: The Program Dependence Graph and Its Use in Optimization. ACM Transactions on Programming Languages and Systems 9(3), 319–349 (1987)Field, J., Ramalingam, G., Tip, F.: Parametric program slicing. In: Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1995, pp. 379–392. ACM, New York (1995)Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. ACM Transactions Programming Languages and Systems 12(1), 26–60 (1990)Korel, B., Laski, J.: Dynamic Program Slicing. Information Processing Letters 29(3), 155–163 (1988)Larsen, L., Harrold, M.J.: Slicing object-oriented software. In: Proceedings of the 18th International Conference on Software Engineering, ICSE 1996, pp. 495–505. IEEE Computer Society, Washington, DC (1996)Liang, D., Harrold, M.J.: Slicing objects using system dependence graphs. In: Proceedings of the International Conference on Software Maintenance, ICSM 1998, pp. 358–367. IEEE Computer Society, Washington, DC (1998)Lindahl, T., Sagonas, K.F.: Typer: a type annotator of erlang code. In: Sagonas, K.F., Armstrong, J. (eds.) Erlang Workshop, pp. 17–25. ACM (2005)Lindahl, T., Sagonas, K.F.: Practical type inference based on success typings. In: Bossi, A., Maher, M.J. (eds.) PPDP, pp. 167–178. ACM (2006)Ochoa, C., Silva, J., Vidal, G.: Dynamic slicing based on redex trails. In: Proceedings of the 2004 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, PEPM 2004, pp. 123–134. ACM, New York (2004)Reps, T., Turnidge, T.: Program Specialization via Program Slicing. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 409–429. Springer, Heidelberg (1996)Rodrigues, N.F., Barbosa, L.S.: Component identification through program slicing. In: Proc. of Formal Aspects of Component Software (FACS 2005). Elsevier ENTCS, pp. 291–304. Elsevier (2005)Tip, F.: A survey of program slicing techniques. Journal of Programming Languages 3(3), 121–189 (1995)Tóth, M., Bozó, I., Horváth, Z., Lövei, L., Tejfel, M., Kozsik, T.: Impact Analysis of Erlang Programs Using Behaviour Dependency Graphs. In: Horváth, Z., Plasmeijer, R., Zsók, V. (eds.) CEFP 2009. LNCS, vol. 6299, pp. 372–390. Springer, Heidelberg (2010)Walkinshaw, N., Roper, M., Wood, M., Roper, N.W.M.: The java system dependence graph. In: Third IEEE International Workshop on Source Code Analysis and Manipulation, p. 5 (2003)Weiser, M.: Program Slicing. In: Proceedings of the 5th International Conference on Software Engineering, pp. 439–449. IEEE Press (1981)Widera, M.: Flow graphs for testing sequential erlang programs. In: Proceedings of the 2004 ACM SIGPLAN Workshop on Erlang, ERLANG 2004, pp. 48–53. ACM, New York (2004)Widera, M., Informatik, F.: Concurrent erlang flow graphs. In: Proceedings of the Erlang/OTP User Conference (2005)Zhao, J.: Slicing aspect-oriented software. In: Proceedings of the 10th International Workshop on Program Comprehension, IWPC 2002, pp. 251–260. IEEE Computer Society, Washington, DC (2002

    Static Execute After algorithms as alternatives for impact analysis

    Get PDF
    Impact analysis plays an important role in many software engineering tasks such as software maintenance, regression testing and debugging. In this paper, we present a static method to compute the impact sets of particular program points. For large programs, this method is more effective than the slightly more precise slicing. Our technique can also be used on larger programs with over thousands of lines of code where no slicers can be applied since the determination of the program dependence graphs, which are the bases of slicing, is an especially expensive task. As a result, our method could be efficiently used in the field of impact analysis

    On the computational complexity of dynamic slicing problems for program schemas

    Get PDF
    This is the preprint version of the Article - Copyright @ 2011 Cambridge University PressGiven a program, a quotient can be obtained from it by deleting zero or more statements. The field of program slicing is concerned with computing a quotient of a program that preserves part of the behaviour of the original program. All program slicing algorithms take account of the structural properties of a program, such as control dependence and data dependence, rather than the semantics of its functions and predicates, and thus work, in effect, with program schemas. The dynamic slicing criterion of Korel and Laski requires only that program behaviour is preserved in cases where the original program follows a particular path, and that the slice/quotient follows this path. In this paper we formalise Korel and Laski's definition of a dynamic slice as applied to linear schemas, and also formulate a less restrictive definition in which the path through the original program need not be preserved by the slice. The less restrictive definition has the benefit of leading to smaller slices. For both definitions, we compute complexity bounds for the problems of establishing whether a given slice of a linear schema is a dynamic slice and whether a linear schema has a non-trivial dynamic slice, and prove that the latter problem is NP-hard in both cases. We also give an example to prove that minimal dynamic slices (whether or not they preserve the original path) need not be unique.This work was partly supported by the Engineering and Physical Sciences Research Council, UK, under grant EP/E002919/1

    An Analysis of the Current Program Slicing and Algorithmic Debugging Based Techniques

    Full text link
    This thesis presents a classification of program slicing based techniques. The classification allows us to identify the differences between existing techniques, but it also allows us to predict new slicing techniques. The study identifies and compares the dimensions that influence current techniques.Silva Galiana, JF. (2008). An Analysis of the Current Program Slicing and Algorithmic Debugging Based Techniques. http://hdl.handle.net/10251/14300Archivo delegad
    • …
    corecore