Abstract
We present SemSlice, a tool which automatically produces very precise slices for C routines. Slicing is the process of removing statements from a program such that defined aspects of its behavior are retained. For producing precise slices, i.e., slices that are close to the minimal number of statements, the program’s semantics must be considered. SemSlice is based on automatic relational regression verification, which SemSlice uses to select valid slices from a set of candidate slices. We present several approaches for producing candidates for precise slices. Evaluation shows that regression verification (based on coupling invariant inference) is a powerful tool for semantics-aware slicing: precise slices for typical slicing challenges can be found automatically and fast.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The SemSlice source code is available at github.com/mattulbrich/llreve/tree/ slicing.
- 2.
- 3.
The benchmarks are available at github.com/ mattulbrich/llreve/tree/slicing/ slicing/testdata/benchmarks.
References
Barros, J.B., Da Cruz, D., Henriques, P.R., Pinto, J.S.: Assertion-based slicing and slice graphs. Formal Aspects Comput. 24(2), 217–248 (2012)
Barthe, G., Crespo, J.M., Kunz, C.: Relational verification using product programs. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 200–214. Springer, Heidelberg (2011). doi:10.1007/978-3-642-21437-0_17
Binkley, D., Harman, M.: A survey of empirical results on program slicing. Adv. Comput. 62, 105–178 (2004)
Canfora, G., Cimitile, A., De Lucia, A.: Conditioned program slicing. Inf. Softw. Technol. 40(11), 595–607 (1998)
da Cruz, D., Henriques, P.R., Pinto, J.S.: Gamaslicer: an online laboratory for program verification and analysis. In: Proceedings of the Tenth Workshop on Language Descriptions, Tools and Applications. p. 3. ACM (2010)
Eranki, K.L., Moudgalya, K.M.: Program slicing technique: a novel approach to improve programming skills in novice learners. In: Proceedings of the Conference on Information Technology Education. pp. 160–165. ACM (2016)
Felsing, D., Grebing, S., Klebanov, V., Rümmer, P., Ulbrich, M.: Automating regression verification. In: Proceedings of the International Conference on Automated Software Engineering, ASE 2014, pp. 349–360. ACM (2014)
Field, J., Ramalingam, G., Tip, F.: Parametric program slicing. In: Proceedings of the Symposium on Principles of Programming Languages, pp. 379–392. ACM (1995)
Halder, R., Cortesi, A.: Abstract program slicing on dependence condition graphs. Sci. Comput. Program. 78(9), 1240–1263 (2013)
Hojjat, H., Konečný, F., Garnier, F., Iosif, R., Kuncak, V., Rümmer, P.: A verification toolkit for numerical transition systems. In: Giannakopoulou, D., Méry, D. (eds.) FM 2012. LNCS, vol. 7436, pp. 247–251. Springer, Heidelberg (2012). doi:10.1007/978-3-642-32759-9_21
Jaffar, J., Murali, V., Navas, J.A., Santosa, A.E.: Path-sensitive backward slicing. In: Miné, A., Schmidt, D. (eds.) SAS 2012. LNCS, vol. 7460, pp. 231–247. Springer, Heidelberg (2012). doi:10.1007/978-3-642-33125-1_17
Kiefer, M., Klebanov, V., Ulbrich, M.: Relational program reasoning using compiler IR. In: Blazy, S., Chechik, M. (eds.) VSTTE 2016. LNCS, vol. 9971, pp. 149–165. Springer, Cham (2016). doi:10.1007/978-3-319-48869-1_12
Komondoor, R.: Precise slicing in imperative programs via term-rewriting and abstract interpretation. In: Logozzo, F., Fähndrich, M. (eds.) SAS 2013. LNCS, vol. 7935, pp. 259–282. Springer, Heidelberg (2013). doi:10.1007/978-3-642-38856-9_15
Lattner, C., Adve, V.: Llvm: A compilation framework for lifelong program analysis and transformation. In: International Symposium on Code Generation and Optimization, CGO 2004, pp. 75–86. IEEE (2004)
Martin, R.C.: Clean Code: A Handbook of Agile Software Craftsmanship, 1st edn. Prentice Hall PTR, Upper Saddle River, NJ (2008)
Mastroeni, I., Nikolić, Đ.: Abstract program slicing: from theory towards an implementation. In: Dong, J.S., Zhu, H. (eds.) ICFEM 2010. LNCS, vol. 6447, pp. 452–467. Springer, Heidelberg (2010). doi:10.1007/978-3-642-16901-4_30
Ward, M.: Properties of slicing definitions. In: Ninth IEEE International Working Conference on Source Code Analysis and Manipulation, SCAM 2009, pp. 23–32. IEEE (2009)
Weiser, M.: Program slicing. In: Proceedings of the 5th International Conference on Software Engineering. pp. 439–449. IEEE Press (1981)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Beckert, B., Bormer, T., Gocht, S., Herda, M., Lentzsch, D., Ulbrich, M. (2017). SemSlice: Exploiting Relational Verification for Automatic Program Slicing. In: Polikarpova, N., Schneider, S. (eds) Integrated Formal Methods. IFM 2017. Lecture Notes in Computer Science(), vol 10510. Springer, Cham. https://doi.org/10.1007/978-3-319-66845-1_20
Download citation
DOI: https://doi.org/10.1007/978-3-319-66845-1_20
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-66844-4
Online ISBN: 978-3-319-66845-1
eBook Packages: Computer ScienceComputer Science (R0)