Skip to main content

An Approach for Proving the Correctness of Inspector/Executor Transformations

  • Conference paper
  • First Online:
Languages and Compilers for Parallel Computing (LCPC 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8967))

Abstract

To take advantage of multicore parallelism, programmers and compilers rewrite, or transform, programs to expose loop-level parallelism. Showing the correctness, or legality, of such program transformations enables their incorporation into compilers. However, the correctness of inspector/executor strategies, which develop parallel schedules at runtime for computations with nonaffine array accesses, rests on the correctness of the inspector code itself. Since inspector code is often provided in a run-time library, showing the correctness of an inspector/executor transformation in a compiler requires proving the correctness of any hand-written or compiler-generated inspector code as well. In this paper, we present a formally defined language (called PseudoC) for representing loops with indirect array accesses. We describe how using this language, where the reads and writes in array assignments are distinguished, it is possible to formally prove the correctness of a wavefront parallelism inspector in HOL4. The key idea is to reason about the equivalence of the original code and the inspector/executor code based on operational semantics for the PseudoC grammar and properties of an executable action graph representation of the original and executor loops.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    If there is a non-zero at location \(A_{ij}\) in the sparse matrix and \(i<j\), then there is a dependence between iteration \(i\) and \(j\) (\(i\) must execute before \(j\)).

References

  1. Saltz, J.H.: Aggregation methods for solving sparse triangular systems on multiprocessors. SIAM J. Sci. Stat. Comput. 11(1), 123–144 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  2. Koelbel, C., Mehrotra, P.: Compiling global name-space parallel loops for distributed execution. IEEE Trans. Parallel Distrib. Syst. 2(4), 440–451 (1991)

    Article  Google Scholar 

  3. Saltz, J., Chang, C., Edjlali, G., Hwang, Y.S., Moon, B., Ponnusamy, R., Sharma, S., Sussman, A., Uysal, M., Agrawal, G., Das, R., Havlak, P.: Programming irregular applications: runtime support, compilation and tools. Adv. Comput. 45, 105–153 (1997)

    Article  Google Scholar 

  4. Mitchell, N., Carter, L., Ferrante, J.: Localizing non-affine array references. In: Proceedings of the International Conference on Parallel Architectures and Compilation Techniques (PACT), pp. 192–202, October 1999

    Google Scholar 

  5. Ding, C., Kennedy, K.: Improving cache performance in dynamic applications through data and computation reorganization at run time. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 229–241, May 1999

    Google Scholar 

  6. Han, H., Tseng, C.W.: Efficient compiler and run-time support for parallel irregular reductions. Parallel Comput. 26(13–14), 1861–1887 (2000)

    Article  MATH  Google Scholar 

  7. Mellor-Crummey, J., Whalley, D., Kennedy, K.: Improving memory hierarchy performance for irregular applications using data and computation reorderings. Int. J. Parallel Prog. 29(3), 217–247 (2001)

    Article  MATH  Google Scholar 

  8. Douglas, C.C., Hu, J., Kowarschik, R., Rüde, U., Weiß, C.: Cache optimization for structured and unstructured grid multigrid. Electron. Trans. Numer. Anal. 10, 21–40 (2000)

    MATH  MathSciNet  Google Scholar 

  9. Strout, M.M., Carter, L., Ferrante, J., Freeman, J., Kreaseck, B.: Combining performance aspects of irregular Gauss-Seidel via sparse tiling. In: Pugh, B., Tseng, C.-W. (eds.) LCPC 2002. LNCS, vol. 2481, pp. 90–110. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  10. Mohiyuddin, M., Hoemmen, M., Demmel, J., Yelick, K.: Minimizing communication in sparse matrix solvers. In: Supercomputing (2009)

    Google Scholar 

  11. Das, R., Uysal, M., Saltz, J., Hwang, Y.S.S.: Communication optimizations for irregular scientific computations on distributed memory architectures. J. Parallel Distrib. Comput. 22(3), 462–478 (1994)

    Article  Google Scholar 

  12. Slind, K., Norrish, M.: A brief overview of HOL4. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 28–32. Springer, Heidelberg (2008). http://hol.sourceforge.net

    Chapter  Google Scholar 

  13. Saltz, J.H.: Automated problem scheduling and reduction of communication delay effects. Technical report, Yale University (1987)

    Google Scholar 

  14. Rauchwerger, L., Amato, N.M., Padua, D.A.: A scalable method for run-time loop parallelization. Int. J. Parallel Prog. 23(6), 537–576 (1995)

    Article  Google Scholar 

  15. Zhuang, X., Eichenberger, A., Luo, Y., O’Brien, K., O’Brien, K.: Exploiting parallelism with dependence-aware scheduling. In: International Conference on Parallel Architectures and Compilation Techniques (PACT), pp. 193–202 (2009)

    Google Scholar 

  16. Davis, T.A., Hu, Y.: The University of Florida sparse matrix collection. ACM Trans. Math. Softw. 38(1), 1:1–1:25 (2011)

    MathSciNet  Google Scholar 

  17. Banerjee, U., Eigenmann, R., Nicolau, A., Padua, D.A.: Automatic program parallelization. Proc. IEEE 81(2), 211–243 (1993)

    Article  Google Scholar 

  18. Lengauer, C.: Loop parallelization in the polytope model. In: Best, E. (ed.) CONCUR 1993. LNCS, vol. 715, pp. 398–416. Springer, Heidelberg (1993)

    Google Scholar 

  19. Feautrier, P.: Automatic parallelization in the polytope model. In: Perrin, G.-R., Darte, A. (eds.) The Data Parallel Programming Model. LNCS, vol. 1132, pp. 79–103. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  20. Kennedy, K., Allen, J.R.: Optimizing Compilers for Modern Architectures: A Dependence-based Approach. Morgan Kaufmann Publishers Inc., San Francisco (2002)

    Google Scholar 

  21. Yang, Y.Q., Ancourt, C., Irigoin, F.: Minimal data dependence abstractions for loop transformations: extended version. Int. J. Parallel Prog. 23(4), 359–388 (1995)

    Article  Google Scholar 

  22. Pugh, W., Wonnacott, D.: Nonlinear array dependence analysis. In: Third Workshop on Languages, Compilers, and Run-Time Systems for Scalable Computers, Troy, New York, May 1995

    Google Scholar 

  23. Rus, S., Hoeflinger, J., Rauchwerger, L.: Hybrid analysis: static & dynamic memory reference analysis. Int. J. Parallel Program. 31(4), 251–283 (2003)

    Article  MATH  Google Scholar 

  24. Oancea, C.E., Rauchwerger, L.: Logical inference techniques for loop parallelization. In: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2012, pp. 509–520 (2012)

    Google Scholar 

  25. Strout, M.M., Carter, L., Ferrante, J.: Compile-time composition of run-time data and iteration reorderings. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM, New York, June 2003

    Google Scholar 

  26. Strout, M.M., LaMielle, A., Carter, L., Ferrante, J., Kreaseck, B., Olschanowsky, C.: An approach for code generation in the sparse polyhedral framework. Technical report CS-13-109, Colorado State University, December 2013

    Google Scholar 

  27. Kelly, W., Maslov, V., Pugh, W., Rosser, E., Shpeisman, T., Wonnacott, D.: The Omega calculator and library, version 1.1.0, November 1996

    Google Scholar 

  28. Strout, M.M., Carter, L., Ferrante, J.: Proof of correctness for sparse tiling of Gauss-Seidel. Technical report, UCSD Department of Computer Science and Engineering, Technical report #CS2003-0741, April 2003

    Google Scholar 

  29. Yang, X., Chen, Y., Eide, E., Regehr, J.: Finding and understanding bugs in C compilers. In: Hall, M.W., Padua, D.A. (eds.) PLDI, pp. 283–294. ACM, New York (2011)

    Google Scholar 

  30. Leroy, X.: Formal verification of a realistic compiler. Commun. ACM 52(7), 107–115 (2009)

    Article  Google Scholar 

  31. Arnold, G., Hölzl, J., Köksal, A.S., Bodík, R., Sagiv, M.: Specifying and verifying sparse matrix codes. In: Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming (ICFP), ICFP 2010, pp. 249–260 (2010)

    Google Scholar 

Download references

Acknowledgements and Availability

This project is supported by a Department of Energy Early Career Grant DE-SC0003956. NICTA is funded by the Australian Government through the Department of Communications and the Australian Research Council through the ICT Centre of Excellence Program.

Our source code is available from github at https://github.com/mn200/inspector- strategies.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Michael Norrish .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Norrish, M., Strout, M.M. (2015). An Approach for Proving the Correctness of Inspector/Executor Transformations. In: Brodman, J., Tu, P. (eds) Languages and Compilers for Parallel Computing. LCPC 2014. Lecture Notes in Computer Science(), vol 8967. Springer, Cham. https://doi.org/10.1007/978-3-319-17473-0_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-17473-0_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-17472-3

  • Online ISBN: 978-3-319-17473-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics