Skip to main content

An Array Abstraction to Amortize Reasoning About Parallel Client Code

  • Conference paper
  • First Online:
Intelligent Computing

Part of the book series: Lecture Notes in Networks and Systems ((LNNS,volume 283))

  • 2347 Accesses

Abstract

Data abstraction is important for enabling the automated modular verification of a large class of parallel programs even in the presence of manifest sharing during parallel execution. Though sharing is difficult to avoid when parallel execution is used to gain performance improvements, formal verification of such code still must be modular. The abstraction introduced in this paper supports modular verification by allowing frame conditions to be dispatched only once and then be reused by multiple clients, thus amortizing the verification cost. The approach achieves this objective by introducing a non-interference contract that enables the preservation of desirable performance characteristics of traditional arrays such as constant-time access to elements. Illustrative divide-and-conquer client code using this abstraction is contrasted with similar client code that uses a traditional array. The utility of the in a language with clean semantics is demonstrated by comparing the two clients in terms of the feasibility and tractability of modular verification. The repeated verification of software is expensive, so it should be avoided. Modularization (such as by introducing additional data abstractions) makes it possible to avoid expensive re-verification of entire client programs when only minor changes are made.

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 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.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.

    Because interference contracts are modular, representation fields might themselves have partitions that are members of a partition “one level up”.

  2. 2.

    It is possible for a program to exhibit nondeterminism and still be correct, but for now we are concerned only with provably deterministic parallel programs.

  3. 3.

    While a modified specification could be written in separation logic to handle this particular situation, it becomes extremely complex in the general case [9].

References

  1. Sitaraman, M., et al.: Building a push-button RESOLVE verifier: progress and challenges. Formal Aspects Comput. 23(5), 607–626 (2011)

    Article  Google Scholar 

  2. Harms, D.E., Weide, B.W.: Copying and swapping: influences on the design of reusable software components. IEEE Trans. Softw. Eng. 17, 424–435 (1991)

    Article  Google Scholar 

  3. Kulczycki, G.: Direct Reasoning. Ph.d. dissertation, Clemson University, School of Computing (2004)

    Google Scholar 

  4. Kulczycki, G., et al.: A language for building verified software components. In: Favaro, J., Morisio, M. (eds.) ICSR 2013. LNCS, vol. 7925, pp. 308–314. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38977-1_23

    Chapter  Google Scholar 

  5. Weide, A., Sivilotti, P.A.G., Sitaraman, M.: Enabling modular verification with abstract interference specifications for a concurrent queue. In: Blazy, S., Chechik, M. (eds.) VSTTE 2016. LNCS, vol. 9971, pp. 119–128. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-48869-1_9

    Chapter  Google Scholar 

  6. Weide, A., Sivilotti, P.A.G., Sitaraman, M.: Array abstractions to simplify reasoning about concurrent client code. Technical Report RSRG-17-05, Clemson University - School of Computing, Clemson, SC 29634, November 2017

    Google Scholar 

  7. Weide, A., Sivilotti, P.A., Sitaraman, M.: Toward a modular proof rule for parallel operation calls. Technical Report OSU-CISRC-3/20-TR01, The Ohio State University, Columbus, OH, March 2020

    Google Scholar 

  8. Weide, A., Sivilotti, P.A.G., Sitaraman, M.: Enabling modular verication of concurrent programs with abstract interference contracts. Technical Report RSRG-16-05, Clemson University - School of Computing, December 2016

    Google Scholar 

  9. Tschannen, J., Furia, C.A., Nordio, M., Meyer, B.: Usable verification of object-oriented programs by combining static and dynamic techniques. In: Barthe, G., Pardo, A., Schneider, G. (eds.) Software Engineering and Formal Methods, (Berlin, Heidelberg), pp. 382–398, Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24690-6_26

  10. Leavens, G.T., Leino, K.R.M., Müller, P.: Specification and verification challenges for sequential object-oriented programs. Form. Aspects Comput. 19, 159–189 (2007)

    Article  Google Scholar 

  11. Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science, LICS 2002, Washington, DC, USA, pp. 55–74. IEEE Computer Society (2002)

    Google Scholar 

  12. Chlipala, A., Malecha, G., Morrisett, G., Shinnar, A., Wisnesky, R.: Effective interactive proofs for higher-order imperative programs. In: Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, ICFP 2009, New York, NY, USA, pp. 79–90. ACM (2009)

    Google Scholar 

  13. Chen, H., Ziegler, D., Chajed, T., Chlipala, A.,. Kaashoek, M.F, Zeldovich, N.: Using crash Hoare logic for certifying the FSCQ file system. In: Proceedings of the 25th Symposium on Operating Systems Principles, SOSP 2015, New York, NY, USA, pp. 18–37. ACM (2015)

    Google Scholar 

  14. Jacobs, B., Smans, J., Piessens, F.: Verifying the composite pattern using separation logic. In: Proceedings of the 7th International Workshop on Specification and Verification of Component-Based Systems, SAVCBS 2008, pp. 83–88 (2008)

    Google Scholar 

  15. Jacobs, B., Smans, J., Piessens, F.: A quick tour of the VeriFast program verifier. In: Proceedings of the 8th Asian conference on Programming Languages and Systems, APLAS 2010, pp. 304–311. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-17164-2_21

  16. Bobot, F., Filliâtre, J.-C.: Separation predicates: a taste of separation logic in first-order logic. In: Aoki, T., Taguchi, K. (eds.) ICFEM 2012. LNCS, vol. 7635, pp. 167–181. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-34281-3_14

    Chapter  Google Scholar 

  17. Botinčan, M., Parkinson, M., Schulte, W.: Separation Logic Verification of C Programs with an SMT Solver. Electron. Notes Theor. Comput. Sci. 254, 5–23 (2009)

    Google Scholar 

  18. Piskac, R., Wies, T., Zufferey, D.: Automating separation logic using SMT. In: Sharygina, N., Veith, H. (eds), CAV 2013. LNCS, vol. 8044, pp. 773–789. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39799-8_54

  19. Piskac, R., Wies, T., Zufferey, D.: Automating separation logic with trees and data. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 711–728. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08867-9_47

    Chapter  Google Scholar 

  20. Bouillaguet, C., Kuncak, V., Wies, T., Zee, K., Rinard, M.: Using first-order theorem provers in the Jahob data structure verification system. In: Cook, B., Podelski, A. (eds.) VMCAI 2007. LNCS, vol. 4349, pp. 74–88. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-69738-1_5

    Chapter  MATH  Google Scholar 

  21. Brookes, S.: A semantics for concurrent separation logic. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 16–34. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-28644-8_2

    Chapter  Google Scholar 

  22. Krebbers, R., Jung, R., Bizjak, A., Jourdan, J.-H., Dreyer, D., Birkedal, L.: The essence of higher-order concurrent separation logic. In: Yang, H., (ed.) Programming Languages and Systems. LNCS, vol. 10201, pp. 696–723, Springer, Heidelberg (2017). https://doi.org/10.1007/978-3-662-54434-1_26

  23. Bocchino Jr., R.L., et al.: A type and effect system for deterministic parallel Java. In: Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2009, New York, NY, USA, pp. 97–116. ACM (2009)

    Google Scholar 

  24. Taft, T., Hendrick, J.: Designing ParaSail, a new programming language (2017). http://parasail-programming-language.blogspot.com/

  25. The Deterministic Parallel Java Tutorial, Version 1.0 (2010). http://dpj.cs.illinois.edu/DPJ/Download_files/DPJTutorial.html

  26. Taft, T.: Tutorial: multicore programming using divide-and-conquer and work stealing (2013). https://drive.google.com/file/d/0B6Vq5QaY4U7uUktTcUpySmVjaW8/edit

  27. Class DPJArray. https://dpj.cs.illinois.edu/DPJ/Download_files/DPJRuntime/DPJArray.html

  28. Class DPJPartition. https://dpj.cs.illinois.edu/DPJ/Download_files/DPJRuntime/DPJPartition.html

  29. Array.prototype.slice(). https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice

  30. An informal introduction to Python. https://docs.python.org/3/tutorial/introduction.html#lists

  31. Engler, D., Ashcraft, K.: RacerX: effective, static detection of race conditions and deadlocks. In: Proceedings of the Nineteenth ACM Symposium on Operating Systems Principles, SOSP 2003, New York, NY, USA, pp. 237–252. ACM (2003)

    Google Scholar 

  32. Naik, M., Aiken, A., Whaley, J.: Effective static race detection for Java. In: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2006, New York, NY, USA, pp. 308–319. ACM (2006)

    Google Scholar 

  33. Freund, S.N., Qadeer, S.: Checking concise specifications for multithreaded software. J. Object Technol. 3(6), 81–101 (2004)

    Article  Google Scholar 

  34. Flanagan, C., Qadeer, S.: A type and effect system for atomicity. In: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, PLDI 2003, New York, NY, USA, pp. 338–349. ACM (2003)

    Google Scholar 

  35. Naik, M., Aiken, A.: Conditional must not aliasing for static race detection. In: Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2007, New York, NY, USA, pp. 327–338. ACM (2007)

    Google Scholar 

  36. Kawaguchi, M., Rondon, P., Bakst, A., Jhala, R.: Deterministic parallelism via liquid effects. In: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2012, New York, NY, USA, pp. 45–54. ACM (2012)

    Google Scholar 

  37. Pozniansky, E., Schuster, A.: MultiRace: efficient on-the-fly data race detection in multithreaded C++ programs: research articles. Concurr. Comput. Pract. Exper. 19, 327–340 (2007)

    Article  Google Scholar 

  38. Pozniansky, E., Schuster, A.: Efficient On-the-fly data race detection in multithreaded C++ program. In: Proceedings of the Ninth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2003, New York, NY, USA, pp. 179–190. ACM (2003)

    Google Scholar 

  39. Flanagan, C., Freund, S.N.: FastTrack: efficient and precise dynamic race detection. In: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2009, New York, NY, USA, pp. 121–133. ACM (2009)

    Google Scholar 

  40. Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: a dynamic data race detector for multi-threaded programs. In: Proceedings of the Sixteenth ACM Symposium on Operating Systems Principles, SOSP 1997, New York, NY, USA, pp. 27–37. ACM (1997)

    Google Scholar 

  41. ResolveOnline. http://resolveonline.cse.ohio-state.edu/

  42. RESOLVE Web IDE. https://resolve.cs.clemson.edu/teaching

Download references

Acknowledgments

We thank the members of our research groups at Clemson, Ohio State, and other institutions who have contributed to the discussions on topics contained in this paper. This research is funded in part by US NSF grant DUE-1022941. Any opinions, findings, conclusions, or recommendations expressed here are those of the authors and do not necessarily reflect the views of the NSF.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alan Weide .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Weide, A., Sivilotti, P.A.G., Sitaraman, M. (2022). An Array Abstraction to Amortize Reasoning About Parallel Client Code. In: Arai, K. (eds) Intelligent Computing. Lecture Notes in Networks and Systems, vol 283. Springer, Cham. https://doi.org/10.1007/978-3-030-80119-9_20

Download citation

Publish with us

Policies and ethics