[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ Skip to main content
Log in

Slicing from formal semantics: Chisel—a tool for generic program slicing

  • FASE 2017
  • Published:
International Journal on Software Tools for Technology Transfer Aims and scope Submit manuscript

Abstract

We describe Chisel, a tool that synthesizes a program slicer directly from a given algebraic specification of a programming language operational semantics \(\mathcal {S}\). \(\mathcal {S}\) is assumed to be a rewriting logic specification, given in Maude, while the program is a ground term of this specification. Chisel takes \(\mathcal {S}\) and synthesizes language constructs, i.e., instructions, that produce features relevant for slicing, e.g., data dependency. We implement syntheses adjusted to each feature as model checking properties over an abstract representation of \(\mathcal {S}\). The syntheses results are used by a traditional interprocedural slicing algorithm that we parameterize by the synthesized language features. We present the tool on two language paradigms: high-level, imperative and low-level, assembly languages. Computing program slices for these languages allows for extracting traceability properties in standard compilation chains and makes our tool fitting for the validation of embedded system designs. Chisel’s slicing benchmark evaluation is based on benchmarks used in avionics.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
£29.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (United Kingdom)

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15

Similar content being viewed by others

Notes

  1. Note that these programs are defined to illustrate Chisel features, so they do not produce any relevant output when executed.

  2. Actually, Chisel works without an explicit distinction between syntax and memory modules, because it operates at the sort level. We present this scenario to simplify the description.

  3. The instruction skip is introduced to mark the end of the evaluation of each instruction and stands for a fully evaluated program.

  4. Note that s denotes a sort while w denotes a list of sorts.

  5. It is unlikely to find one of these sorts only in the co-arity, except for constructors.

References

  1. Alpuente, M., Ballis, D., Frechina, F., Sapina, J.: Combining runtime checking and slicing to improve Maude error diagnosis. In: Martí-Oliet, N., Ölveczky, P., Talcott, C. (eds.) Logic, Rewriting, and Concurrency. LNCS, vol. 9200, pp. 72–96. Springer, Cham (2015)

    Chapter  Google Scholar 

  2. Arinc. ARINC Specification 653-2: avionics application software standard interface: part 1—required services. Technical report, Avionics Electronic Engineering Committee (ARINC), March (2006)

  3. Asavoae, I.M., Asavoae, M., Riesco, A.: Towards a formal semantics-based technique for interprocedural slicing. In: iFM 2014. LNCS, vol. 8739, pp. 291–306. Springer (2014)

  4. Asavoae, I.M., Asavoae, M., Riesco, A.: Context-updates analysis and refinement in Chisel. CoRR abs/1709.06897 (2017)

  5. Asavoae, M.: K semantics for assembly languages: a case study. Electr. Notes Theor. Comput. Sci. 304, 111–125 (2014)

    Article  MathSciNet  Google Scholar 

  6. Balakrishnan, G., Gruian, R., Reps, T.W., Teitelbaum, T.: CodeSurfer/x86-a platform for analyzing x86 executables. In: CC. LNCS, vol. 3443, pp. 250–254. Springer (2005)

  7. Benveniste, A., Borgne, M.L., Guernic, P.L.: SIGNAL as a model for real-time and hybrid systems. In: ESOP ’92 Proceedings, pp. 20–38 (1992)

    Chapter  Google Scholar 

  8. Benveniste, A., Caspi, P., Edwards, S.A., Halbwachs, N., Guernic, P.L., de Simone, R.: The synchronous languages 12 years later. Proc. IEEE 91(1), 64–83 (2003)

    Article  Google Scholar 

  9. Berry, G., Gonthier, G.: The Esterel synchronous programming language: design, semantics, implementation. Sci. Comput. Program. 19(2), 87–152 (1992)

    Article  Google Scholar 

  10. Binkley, D., Gold, N., Harman, M., Islam, S., Krinke, J., Yoo, S.: ORBS: Language-independent program slicing. In: FSE14, pp. 109–120 (2014)

  11. Bouhoula, A., Jouannaud, J.P., Meseguer, J.: Specification and proof in membership equational logic. Theor. Comput. Sci. 236, 35–132 (2000)

    Article  MathSciNet  Google Scholar 

  12. Boulanger, J.L., Fornari, F.X., Camus, J.L., Dion, B.: SCADE: Language and Applications, 1st edn. Wiley-IEEE Press, Hoboken (2015)

    Google Scholar 

  13. Calcagno, C., Distefano, D.: Infer: an automatic program verifier for memory safety of C programs. In: Proceedings of the 3rd International Conference on NASA Formal Methods, NFM’11, pp. 459–465 (2011)

    Google Scholar 

  14. Caspi, P., Pilaud, D., Halbwachs, N., Plaice, J.: Lustre: a declarative language for programming synchronous systems. In: Symposium on Principles of Programming Languages, vol. 1987, pp. 178–188 (1987)

  15. Clarke, E.M., Grumberg, O., Peled, D.A.: Model Checking. MIT Press, Cambridge (2001)

    Book  Google Scholar 

  16. Clarke, E.M., Schlingloff, B.: Model checking. In: Robinson, J.A., Voronkov, A. (eds.) Handbook of Automated Reasoning (in 2 Volumes), pp. 1635–1790. Elsevier and MIT Press, New York, Cambridge (2001)

    Chapter  Google Scholar 

  17. Clavel, M., Duran, F., Eker, S., Lincoln, P., Marti-Oliet, N., Meseguer, J., Talcott, C.: All About Maude. LNCS, vol. 4350. Springer, Berlin (2007)

    MATH  Google Scholar 

  18. Danicic, S., Harman, M.: Espresso: a slicer generator. In: SAC, pp. 831–839 (2000)

  19. Dershowitz, N., Plaisted, D.A.: Rewriting. In: Robinson, J.A., Voronkov, A. (eds.) Handbook of Automated Reasoning (in 2 Volumes), pp. 535–610. Elsevier and MIT Press, New York and Cambridge (2001)

    Chapter  Google Scholar 

  20. Field, J., Ramalingam, G., Tip, F.: Parametric program slicing. In: POPL, pp. 379–392. ACM Press (1995)

  21. Fink, S.J., Yahav, E., Dor, N., Ramalingam, G., Geay, E.: Effective typestate verification in the presence of aliasing. In: ISSTA, pp. 133–144. ACM (2006)

  22. Gamatié, A., Gautier, T., Besnard, L.: Modeling of avionics applications and performance evaluation techniques using the synchronous language SIGNAL. Electr. Notes Theor. Comput. Sci. 88, 87–103 (2004)

    Article  Google Scholar 

  23. Hennessy, J.L., Patterson, D.A.: Computer Architecture, Fifth Edition: A Quantitative Approach, 5th edn. Morgan Kaufmann Publishers Inc., Burlington (2011)

    Google Scholar 

  24. Hoffmann, J., Ussath, M., Holz, T., Spreitzenbarth, M.: Slicing droids: program slicing for smali code. In: SAC, pp. 1844–1851. ACM (2013)

  25. Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. In: Conference on Programming Language Design and Implementation, PLDI ’88, pp. 35–46 (1988)

  26. Kirchner, F., Kosmatov, N., Prevosto, V., Signoles, J., Yakobowski, B.: Frama-C: a software analysis perspective. Form. Asp. Comput. 27(3), 573–609 (2015)

    Article  MathSciNet  Google Scholar 

  27. Langdon, W.B., Yoo, S., Harman, M.: Inferring automatic test oracles. In: ICSE, pp. 5–6 (2017)

  28. Meseguer, J.: Conditional rewriting logic as a unified model of concurrency. Theor. Comput. Sci. 96(1), 73–155 (1992)

    Article  MathSciNet  Google Scholar 

  29. Meseguer, J., Rosu, G.: The rewriting logic semantics project. Theor. Comput. Sci. 373(3), 213–237 (2007)

    Article  MathSciNet  Google Scholar 

  30. Meseguer, J., Roşu, G.: The rewriting logic semantics project: a progress report. Inf. Comput. 231, 38–69 (2013)

    Article  MathSciNet  Google Scholar 

  31. Nemer, F., Casse, H., Sainrat, P., Bahsoun, J.P., Michiel, M.D.: PapaBench: a free real-time benchmark. In: WCET (2006)

  32. Riesco, A., Asavoae, I.M., Asavoae, M.: A generic program slicing technique based on language definitions. In: WADT 2012. LNCS, vol. 7841, pp. 248–264 (2013)

    Chapter  Google Scholar 

  33. Riesco, A., Asavoae, I.M., Asavoae, M.: Memory policy analysis for semantics specifications in Maude. In: LOPSTR. LNCS, vol. 9527, pp. 293–310. Springer (2015)

  34. Riesco, A., Asavoae, I.M., Asavoae, M.: Slicing from formal semantics: Chisel. In: FASE, pp. 374–378 (2017)

  35. Roşu, G.: Matching logic. Logical Methods in Computer Science to appear (2017)

  36. Rosu, G.: K—a semantic framework for programming languages and formal analysis tools. In: Peled, D., Pretschner, A. (eds.) Dependable Software Systems Engineering. NATO Science for Peace and Security. IOS Press, Amsterdam (2017)

    Google Scholar 

  37. Sahoo, S.K., Criswell, J., Geigle, C., Adve, V.S.: Using likely invariants for automated software fault localization. In: ASPLOS, pp. 139–152. ACM (2013)

  38. Schüle, T., Schneider, K.: Abstraction of assembler programs for symbolic worst case execution time analysis. DAC 2004, 107–112 (2004)

    Google Scholar 

  39. Srinivasan, V., Reps, T.W.: An improved algorithm for slicing machine code. In: OOPSLA, pp. 378–393 (2016)

    Article  Google Scholar 

  40. Teitelbaum, T.: CodeSurfer. ACM SIGSOFT Softw. Eng. Notes 25(1), 99 (2000)

    Article  Google Scholar 

  41. Tip, F.: A survey of program slicing techniques. J. Program. Lang. 3(3), 121–189 (1995)

    Google Scholar 

  42. Verdejo, A., Marti-Oliet, N.: Executable structural operational semantics in Maude. J. Log. Algebr. Program. 67, 226–293 (2006)

    Article  MathSciNet  Google Scholar 

  43. Weiser, M.: Program slicing. In: ICSE, pp. 439–449. IEEE Press (1981)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Adrián Riesco.

Additional information

This research has been partially supported by the MINECO Spanish project TRACES (TIN2015-67522-C3-3-R) and by the Comunidad de Madrid project N-Greens Software-CM (S2013/ICE-2731).

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Asăvoae, I.M., Asăvoae, M. & Riesco, A. Slicing from formal semantics: Chisel—a tool for generic program slicing. Int J Softw Tools Technol Transfer 20, 739–769 (2018). https://doi.org/10.1007/s10009-018-0500-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10009-018-0500-y

Keywords

Navigation