Advertisement

Acta Informatica

, Volume 56, Issue 4, pp 321–383 | Cite as

Equivalence checking of Petri net models of programs using static and dynamic cut-points

  • Soumyadip BandyopadhyayEmail author
  • Dipankar Sarkar
  • Chittaranjan Mandal
Original Article

Abstract

Extensive optimizing and parallelizing transformations are carried out on programs, both by (untrusted) compilers and human experts, before deploying them on some platform architecture which is by and large parallel. It is therefore important to devise some suitable modelling paradigm which is capable of capturing parallelism in such a way that proving equivalence of the source programs and their transformed versions becomes easier. In the present work, an untimed Petri net model with data constraints, called CPN model (Coloured Petri net), is used to model the parallel behaviours. Being value based, such models depict more vividly the data dependencies which lie at the core of such transformations; accordingly, they are likely to provide more suitable internal representations (IRs) of both the source and the transformed programs than the IRs like sequential control flow graphs (CFGs). A path based equivalence checking method for CPN models with rigorous treatment of the complexity and correctness issues have been presented. Experimental results show the effectiveness of the approach.

Notes

Acknowledgements

We would like to thanks the anonymous reviewers for comments, it has helped us to make the paper more readable. We would also like to thanks Prof. Holger Giese and Prof. Sandeep K Shukla for their support and fruitful comments.

References

  1. 1.
    Arendt, F., Kluhe, B.: Modelling and verification of real-time software using interpreted petri nets. Ann. Rev. Autom. Programm. 15, 35–40 (1990)CrossRefGoogle Scholar
  2. 2.
    Armstrong, D.B.: A programmed algorithm for assigning internal codes to sequential machines. IRE. Trans. Elect. Comput., EC-11, Aug (1962)Google Scholar
  3. 3.
    Baier, C., Katoen, J.-P.: Principles of Model Checking. MIT Press, Cambridge (2008)zbMATHGoogle Scholar
  4. 4.
    Bandyopadhyay, S., Banerjee, K., Sarkar, D., Mandal, C.: Translation validation for pres+ models of parallel behaviours via an fsmd equivalence checker. In: Progress in VLSI Design and Test (VDAT), vol. 7373, pp. 69–78. Springer, (2012)Google Scholar
  5. 5.
    Bandyopadhyay, S., Banerjee, K.: Presgen: A fully automatic equivalence checker for validating optimizing and parallelizing transformations. In: Proceedings of the 2017 Workshop on Software Engineering Methods for Parallel and High Performance Applications, SEM4HPC ’17, pp. 13–20 (2017)Google Scholar
  6. 6.
    Bandyopadhyay, S., Sarkar, D., Banerjee, K., Mandal, C.: A path-based equivalence checking method for petri net based models of programs. In: ICSOFT-EA 2015—Proceedings of the 10th International Conference on Software Engineering and Applications, Colmar, Alsace, France, 20–22 July, 2015., pp. 319–329 (2015)Google Scholar
  7. 7.
    Bandyopadhyay, S., Sarkar, D., Mandal, C.: An efficient equivalence checking method for petri net based models of programs. In: 37th IEEE/ACM International Conference on Software Engineering, ICSE 2015 (Poster), Florence, Italy, May 16–24, 2015, vol. 2, pp. 827–828 (2015)Google Scholar
  8. 8.
    Bandyopadhyay, S., Sarkar, D., Mandal, C.A.: Validating SPARK: high level synthesis compiler. In: 2015 IEEE Computer Society Annual Symposium on VLSI, ISVLSI 2015, Montpellier, France, July 8–10, 2015, pp. 195–198 (2015)Google Scholar
  9. 9.
    Bandyopadhyay, S., Sarkar, S., Sarkar, D., Mandal, C.: Samatulyata: An efficient path based equivalence checking tool. In: ATVA (2017)Google Scholar
  10. 10.
    Bandyopadhyay, S.: Behavioural verification of petri net based models of programs. In: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL (SRC) 2015, Mumbai, India, 15–17 January (2015)Google Scholar
  11. 11.
    Bandyopadhyay, S.: Path based equivalence checking of Petri net representation of programs for translation validation. Ph.D. thesis, I.I.T Kharagpur, India (2016)Google Scholar
  12. 12.
  13. 13.
    Bandyopadhyay, S., Sarkar, D., Mandal, C.A., Banerjee, K., Duddu, K.R.: A path construction algorithm for translation validation using PRES+ models. Parallel Process. Lett. 26(2), 1–25 (2016)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Banerjee, K., Karfa, C., Sarkar, D., Mandal, Chittaranjan: Verification of code motion techniques using value propagation. IEEE TCAD, 33(8) (2014)Google Scholar
  15. 15.
    Bondhugula, U., Hartono, A., Ramanujam, J., Sadayappan, P.: Pluto: a practical and fully automatic polyhedral program optimization system. In: PLDI 08 (2008)Google Scholar
  16. 16.
    Cortes, L.A., Eles, P., Peng, Z.: Verification of embedded systems using a petri net based representation. In: Proceedings of the 13th International Symposium on System Synthesis 2000, pp. 149–155 (2000)Google Scholar
  17. 17.
    Cortés, L.A., Eles, P., Peng, Z.: Modeling and formal verification of embedded systems based on a petri net representation. JSA 49(12–15), 571–598 (2003)Google Scholar
  18. 18.
    Edwards, S., Lavagno, L., Lee, E.A., Sangiovanni-Vincentellni, A.: Design of embedded systems: formal models, validation and synthesis. Proc. IEEE 85(3), 366–390 (1997)CrossRefGoogle Scholar
  19. 19.
    Fornaciari, W., Sciuto, D., Silvano, C., Zaccaria, V.: A design framework to efficiently explore energy-delay tradeoffs. In: Proceedings of the Ninth International Symposium on Hardware/Software Codesign, pp. 260–265. ACM Press (2001)Google Scholar
  20. 20.
    Gupta, S., Dutt, N., Gupta, R., Nicolau, A.: Spark: a high-level synthesis framework for applying parallelizing compiler transformations. In: Proceedings of International Conference on VLSI Design, pp. 461–466, Washington, DC, USA, Jan 2003. IEEE Computer SocietyGoogle Scholar
  21. 21.
    Gupta, S., Dutt, N., Gupta, R., Nicolau, A.: Using global code motions to improve the quality of results for high-level synthesis. IEEE Trans. CAD ICS 23(2), 302–312 (2004)CrossRefGoogle Scholar
  22. 22.
    Jensen, K.: Coloured Petri Nets: Basic Concepts, Analysis Methods and Practical Use—Volume 3. Monographs in Theoretical Computer Science. An EATCS Series. Springer, Berlin (1997)CrossRefGoogle Scholar
  23. 23.
    Jensen, K., Kristensen, L.M.: Coloured Petri Nets—Modelling and Validation of Concurrent Systems. Springer, Berlin (2009)CrossRefzbMATHGoogle Scholar
  24. 24.
    Jensen, K., Kristensen, L.M., Wells, L.: Coloured petri nets and cpn tools for modelling and validation of concurrent systems. Int. J. Softw. Tools Technol. Transf. 9(3), 213–254 (2007)CrossRefGoogle Scholar
  25. 25.
    Kandemir, M., Son, S.W., Chen, G.: An evaluation of code and data optimizations in the context of disk power reduction. In: ISLPED ’05: Proceedings of the 2005 International Symposium on Low Power Electronics and Design, pp. 209–214 (2005)Google Scholar
  26. 26.
    Kandemir, M.T.: Reducing energy consumption of multiprocessor soc architectures by exploiting memory bank locality. ACM Trans. Des. Autom. Electron. Syst. 11(2), 410–441 (2006)CrossRefGoogle Scholar
  27. 27.
    Kandemir, M.T.: Reducing energy consumption of multiprocessor soc architectures by exploiting memory bank locality. ACM Trans. Des. Autom. Electron. Syst. 11(2), 410–441 (2006)CrossRefGoogle Scholar
  28. 28.
    Kandemir, M., Vijaykrishnan, N., Irwin, M.J., Ye, W.: Influence of compiler optimizations on system power. IEEE Trans. Very Large Scale Integr. Syst. 9, 801–804 (2001)CrossRefGoogle Scholar
  29. 29.
    Kandemir, M., Vijaykrishnan, N., Irwin, M.J., Ye, W.: Influence of compiler optimizations on system power. IEEE Trans. VLSI Syst. 9, 801–804 (2001)CrossRefGoogle Scholar
  30. 30.
    Karfa, C., Mandal, C., Sarkar, D.: Formal verification of code motion techniques using data-flow-driven equivalence checking. ACM Trans. Des. Autom. Electron. Syst. 17(3), 30 (2012)CrossRefGoogle Scholar
  31. 31.
    Kim, T., Liu, X.: A functional unit and register binding algorithm for interconnect reduction. Trans. Comput. Aided Des. Integr. Circuits Syst. 29, 641–646 (2010)CrossRefGoogle Scholar
  32. 32.
    King, J.C.: A Program Verifier. Ph.D. thesis, Carnegie-Mellon University (1970)Google Scholar
  33. 33.
    King, J.C.: Program correctness: on inductive assertion methods. IEEE Trans. Softw. Eng. 6(5), 465–479 (1980)MathSciNetCrossRefzbMATHGoogle Scholar
  34. 34.
    Knoop, J., Steffen, B.: Code motion for explicitly parallel programs. In: PPoPP ’99, pp. 13–24 (1999)Google Scholar
  35. 35.
    Kundu, S., Lerner, S., Gupta, R.: Validating high-level synthesis. In: Proceedings of the 20th International Conference on Computer Aided Verification, CAV ’08, pp. 459–472, Springer, Berlin, Heidelberg (2008)Google Scholar
  36. 36.
    Kundu, S., Lerner, S., Gupta, R.: Translation validation of high-level synthesis. IEEE Trans. CAD ICS 29(4), 566–579 (2010)CrossRefGoogle Scholar
  37. 37.
    Lee, C.-H., Shih, C.-H., Huang, J.-D., Jou, J.-Y.: Equivalence checking of scheduling with speculative code transformations in high-level synthesis. In: (ASP-DAC), 2011 16th Asia and South Pacific, pp. 497–502 (2011)Google Scholar
  38. 38.
    Mandal, C., Banerjee, K., Sarkar, D.: Deriving bisimulation relations from path extension based equivalence checkers. In: WEPL, pp. 1–2 (2015)Google Scholar
  39. 39.
    Manna, Z.: Mathematical Theory of Computation. McGraw-Hill Kogakusha, Tokyo (1974)zbMATHGoogle Scholar
  40. 40.
    Marwedel, P.: Embedded System Design. Springer, New Delhi (2006)zbMATHGoogle Scholar
  41. 41.
    Mukherjee, R., Joshi, S., Griesmayer, A., Kroening, D., Melham, T.: Equivalence checking of a floating-point unit against a high-level C model. In: FM 2016: Formal Methods—21st International Symposium, Limassol, Cyprus, 9-11 November 2016, Proceedings, pp. 551–558 (2016)Google Scholar
  42. 42.
    Mukherjee, R., Tautschnig, M., Kroening, D.: v2c—a verilog to C translator. In: Tools and Algorithms for the Construction and Analysis of Systems—22nd International Conference, TACAS 2016, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2016, Eindhoven, The Netherlands, 2–8 April, 2016, Proceedings, pp. 580–586 (2016)Google Scholar
  43. 43.
    Necula, G.C.: Translation validation for an optimizing compiler. In: PLDI, pp. 83–94 (2000)Google Scholar
  44. 44.
  45. 45.
    Petri, C.A., Reisig, W.: Petri net. Scholarpedia 3(4), 6477 (2008)CrossRefGoogle Scholar
  46. 46.
    Pnueli, A., Siegel, M., Singerman, E.: Translation validation. In: TACAS, pp. 151–166 (1998)Google Scholar
  47. 47.
    Podymov, V.: An efficient equivalence-checking algorithm for a model of programs with commutative and absorptive statements. Fundam. Inf. 147(2–3), 315–336 (2016)MathSciNetCrossRefzbMATHGoogle Scholar
  48. 48.
    Rim, M., Fann, Y., Jain, R.: Global scheduling with code motions for high-level synthesis applications. IEEE Trans. VLSI Syst. 3(3), 379–392 (1995)CrossRefGoogle Scholar
  49. 49.
    Rinard, M., Diniz, P.: Credible compilation. Technical Report MIT-LCS-TR-776, MIT (1999)Google Scholar
  50. 50.
    Rodríguez, C., Schwoon, S.: Verification of petri nets with read arcs. In: CONCUR 2012—Concurrency Theory—23rd International Conference, CONCUR 2012, Newcastle upon Tyne, UK, 4–7 September, 2012. Proceedings, pp. 471–485 (2012)Google Scholar
  51. 51.
    Santos, L.C.V.D., Jress, J.A.G.: A reordering technique for efficient code motion. In: Proceedings of the 36th ACM/IEEE Design Automation Conference, DAC ’99, pp. 296–299, New York, NY, USA, ACM (1999)Google Scholar
  52. 52.
    Sarkar, D., De Sarkar, S.C.: A theorem prover for verifying iterative programs over integers. IEEE Trans. Softw. Eng. 15(12), 1550–1566 (1989)CrossRefGoogle Scholar
  53. 53.
    Sawa, Z., Jancar, P.: Hardness of equivalence checking for composed finite-state systems. Acta Inf. 46(3), 169–191 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  54. 54.
    Singh, K.: Construction of Petri net based models for C programs, M.Tech. Dissertation, Dept. of Computer Sc. & Engg., I.I.T., Kharagpur, INDIA. https://cse.iitkgp.ac.in/~chitta/pubs/rep/thesisKulwant.pdf, https://github.com/soumyadipcsis/Equivalence-checker/blob/master/thesisKulwant.pdf, May (2016)
  55. 55.
    Trickey, H.: Flamel: a high level hardware compiler. IEEE Trans. CAD 6, 259–269 (1987)CrossRefGoogle Scholar
  56. 56.
    Westergaard, M.: Verifying parallel algorithms and programs using coloured petri nets. T. Petri Nets Other Models Concurr. 6, 146–168 (2012)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2018

Authors and Affiliations

  • Soumyadip Bandyopadhyay
    • 1
    Email author
  • Dipankar Sarkar
    • 2
  • Chittaranjan Mandal
    • 2
  1. 1.Hasso Plattner InstitutePotsdamGermany
  2. 2.Indian Institute of TechnologyKharagpurIndia

Personalised recommendations