skip to main content
10.1145/2103776.2103782acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

A hoare calculus for the verification of synchronous languages

Published:24 January 2012Publication History

ABSTRACT

The synchronous model of computation divides the execution of a program into macro steps that consist of finitely many atomic micro steps (like assignments). The micro steps of a macro step are executed within the same variable environment (i.e. in parallel) but all updates to the variables are synchronously performed at the level of macro steps. The availability of a formally defined semantics allows one to use formal methods for the verification of synchronous programs. To this end, model checking is already widely used for synchronous programs, but the use of interactive verification e.g. by using a Hoare calculus, is only in its infancies. One reason for this situation is that the assignment rule of the classic Hoare calculus implicitly defines a sequential programming model which is only a special case of the synchronous model of computation.

In this paper, we therefore suggest a generalization of the classic Hoare calculus to deal with synchronous programs. The main idea is thereby that the assignment rule refers to all assignments made in a macro step so that the synchronous model of computation is axiomatized. It is possible to rewrite all synchronous programs so that the assignments of every macro step are collected in a single tuple assignment. This way, our generalization of the assignment rule is applicable to arbitrary synchronous programs. We present non-trivial case studies that show the feasibility of our approach.

References

  1. G. Andrews. Parallel programs: proofs, principles, and practice. Communications of the ACM (CACM), 24(3):140--145, March 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. K. Apt. Ten years of Hoare's logic: A survey - part I. ACM Transactions on Programming Languages and Systems (TOPLAS), 3(4):431--483, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. Apt and E.-R. Olderog. Verification of Sequential and Concurrent Programs. Springer, 2 edition, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. E. Ashcroft and Z. Manna. The translation of "go to" programs to "while" programs. Technical Report CS-TR-71--188, Department of Computer Science, University of California, Stanford, California, USA, January 1971. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. T. Ball, A. Podelski, and S. Rajamani. Relative completeness of abstraction refinement for software model checking. In J.-P. Katoen and P. Stevens, editors, Tools and Algorithms for the Construction and Analysis of Systems (TACAS), volume 2280 of LNCS, pages 158--172, Grenoble, France, 2002. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. Benveniste, P. Caspi, S. Edwards, N. Halbwachs, P. Le Guernic, and R. de Simone. The synchronous languages twelve years later. Proceedings of the IEEE, 91(1):64--83, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  7. G. Berry. The constructive semantics of pure Esterel. http://www-sop.inria.fr/esterel.org/, July 1999.Google ScholarGoogle Scholar
  8. C. Boehm and G. Jacopini. Flow diagrams, Turing machines, and languages with only two formation rules. Communications of the ACM (CACM), 9(5):366--371, 1966. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Brandt and K. Schneider. Formal reasoning about causality analysis. In O. A. Mohamed, C. Muñoz, and S. Tahar, editors, Theorem Proving in Higher Order Logics (TPHOL), volume 5170 of LNCS, pages 118--133, Montréal, Québec, Canada, 2008. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Brandt and K. Schneider. Round trip to asynchrony and synchrony. In Methoden und Beschreibungssprachen zur Modellierung und Verifikation von Schaltungen und Systemen (MBMV), Oldenburg, Germany, 2011.Google ScholarGoogle Scholar
  11. J. Brandt and K. Schneider. Separate translation of synchronous programs to guarded actions. Internal Report 382/11, Department of Computer Science, University of Kaiserslautern, Kaiserslautern, Germany, March 2011.Google ScholarGoogle Scholar
  12. S. Brookes. On the axiomatic treatment of concurrency. In S. Brookes, A. Roscoe, and G. Winskel, editors, Seminar on Concurrency (CONCUR), volume 197 of LNCS, pages 1--34, Pittsburgh, Pennsylvania, USA, 1985. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Bruno and K. Steiglitz. The expression of algorithms by charts. Journal of the ACM (JACM), 19(3):517--525, July 1972. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Chaki, E. Clarke, A. Groce, J. Ouaknine, O. Strichman, and K. Yorav. Efficient verification of sequential and concurrent C programs. Formal Methods in System Design (FMSD), 25(2--3):129--166, September 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. P. Cousot. Methods and logics for proving programs. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B: Formal Models and Semantics, chapter 15, pages 841--993. Elsevier, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. F. de Boer, U. Hannemann, and W.-P. de Roever. Hoare-style compositional proof systems for reactive shared variable concurrency. In S. Ramesh and G. Sivakumar, editors, Foundations of Software Technology and Theoretical Computer Science (FSTTCS), volume 1346 of LNCS, pages 267--283, Kharagpur, India, 1997. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. W. de Roever. Concurrency Verification. Cambridge University Press, 2001.Google ScholarGoogle Scholar
  18. J. Dingel. Towards a unified development methodology for shared-variable parallel and distributed programs. In W. Grieskamp, T. Santen, and B. Stoddart, editors, Integrated Formal Methods (IFM), volume 1945 of LNCS, pages 214--234, Dagstuhl, Germany, 2000. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. C. Elgot. Structured programming with and without "go to" statements. IEEE Transactions on Software Engineering (T-SE), SE-2(1):41--54, March 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Floyd. Assigning meanings to programs. In J. Schwartz, editor, Mathematical Aspects of Computer Science, volume 19 of Symposia in Applied Mathematics, pages 19--32, Providence, Rhode Island, USA, 1967. American Mathematical Society.Google ScholarGoogle Scholar
  21. P. Godefroid. Software model checking: The VeriSoft approach. Formal Methods in System Design (FMSD), 26(2):77--101, March 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. D. Gries. The Science of Programming. Springer, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. N. Halbwachs. Synchronous programming of reactive systems. Kluwer, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. C. Hoare. An axiomatic basis for computer programming. Communications of the ACM (CACM), 12(10):576--580, 1969. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Joyce and C.-J. Seger. The HOL-Voss system: Model-checking inside a general-purpose theorem-prover. In J. Joyce and C.-J. Seger, editors, Theorem Proving in Higher Order Logics (TPHOL), volume 780 of LNCS, pages 185--198, Vancouver, British Columbia, Canada, 1994. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. V. Kahlon and C. Wang. Universal causality graphs: A precise happens-before model for detecting bugs in concurrent programs. In T. Touili, B. Cook, and P. Jackson, editors, Computer Aided Verification (CAV), volume 6174 of LNCS, pages 434--449, Edinburgh, Scotland, UK, 2010. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. R. Karp and V. Ramachandran. A survey of parallel algorithms for shared-memory machines. Technical Report UCB/CSD-88--408, EECS Department, University of California, Berkeley, http://www.eecs.berkeley.edu/Pubs/TechRpts/1988/CSD-88--408.pdf, March 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. C. Kern and M. Greenstreet. Formal verification in hardware design: A survey. ACM Transactions on Design Automation of Electronic Systems (TODAES), 4(2):123--193, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. L. Lamport. The "Hoare Logic" of concurrent programs. Acta Informatica, 14:21--37, 1980.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. L. Lamport and F. Schneider. The "Hoare" logic CSP, and all that. ACM Transactions on Programming Languages and Systems (TOPLAS), 6(2):281--296, April 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. A. Martin and J. Tucker. The concurrent assignment representation of synchronous systems. Parallel Computing, 9(2):227--256, 1989.Google ScholarGoogle Scholar
  32. P. Metaxas. Thinking and programming in parallel, 1997. Lecture Notes.Google ScholarGoogle Scholar
  33. H. Mills. The new math of computer programming. Communications of the ACM (CACM), 18(1):43--48, January 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Nvidia Corporation. NVIDIA CUDA Compute Unified Device Architecture -- Programming Guide. Nvidia Corporation, 2008.Google ScholarGoogle Scholar
  35. S. Owicki and D. Gries. An axiomatic proof technique for parallel programs I. Acta Informatica, 6(4):319--340, 1976.Google ScholarGoogle Scholar
  36. S. Owicki and D. Gries. Verifying properties of parallel programs: An axiomatic approach. Communications of the ACM (CACM), 19(5):279--284, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. S. Owicki and L. Lamport. Proving liveness properties of concurrent programs. ACM Transactions on Programming Languages and Systems (TOPLAS), 4(3):455--495, July 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. D. Potop-Butucaru, S. Edwards, and G. Berry. Compiling Esterel. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. K. Schneider. The synchronous programming language Quartz. Internal Report 375, Department of Computer Science, University of Kaiserslautern, Kaiserslautern, Germany, December 2009.Google ScholarGoogle Scholar
  40. K. Schneider and J. Brandt. Performing causality analysis by bounded model checking. In Application of Concurrency to System Design (ACSD), pages 78--87, Xi'an, China, 2008. IEEE Computer Society.Google ScholarGoogle Scholar
  41. K. Schneider, J. Brandt, and T. Schuele. A verified compiler for synchronous programs with local declarations. Electronic Notes in Theoretical Computer Science (ENTCS), 153(4):71--97, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. K. Schneider, J. Brandt, T. Schuele, and T. Tuerk. Maximal causality analysis. In J. Desel and Y. Watanabe, editors, Application of Concurrency to System Design (ACSD), pages 106--115, St. Malo, France, 2005. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. L. Seiler, D. Carmean, E. Sprangle, T. Forsyth, M. Abrash, P. Dubey, S. Junkins, A. Lake, J. Sugerman, R. Cavin, R. Espasa, E. Grochowski, T. Juan, and P. Hanrahan. Larrabee: A many-core x86 architecture for visual computing. ACM Transactions on Graphics (TOG), 27(3):18, August 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. C. Stirling. A generalization of Owicki-Gries's Hoare logic for a concurrent while language. Theoretical Computer Science (TCS), 58(1--3):347--359, June 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. M. Stokelya, S. Chakia, and J. Ouaknine. Parallel assignments in software model checking. Electronic Notes in Theoretical Computer Science (ENTCS), 157:77--94, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. S. Tini. An axiomatic semantics for Esterel. Theoretical Computer Science (TCS), 269(1--2):231--282, October 2001.Google ScholarGoogle Scholar

Index Terms

  1. A hoare calculus for the verification of synchronous languages

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          PLPV '12: Proceedings of the sixth workshop on Programming languages meets program verification
          January 2012
          90 pages
          ISBN:9781450311250
          DOI:10.1145/2103776

          Copyright © 2012 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 24 January 2012

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate18of25submissions,72%

          Upcoming Conference

          POPL '25

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader