Skip to main content

A Typed, Compositional Logic for a Stack-Based Abstract Machine

  • Conference paper
Programming Languages and Systems (APLAS 2005)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3780))

Included in the following conference series:

Abstract

We define a compositional program logic in the style of Floyd and Hoare for a simple, typed, stack-based abstract machine with unstructured control flow, global variables and mutually recursive procedure calls. Notable features of the logic include a careful treatment of auxiliary variables and quantification and the use of substructural typing to permit local, modular reasoning about program fragments. Semantic soundness is established using an interpretation of types and assertions defined by orthogonality with respect to sets of contexts.

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 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M., Leino, K.R.M.: A logic of object-oriented programs. In: Proc. 7th International Joint Conference on Theory and Practice of Software Development (TAPSOFT) (1997)

    Google Scholar 

  2. Ahmed, A.: Semantics of Types for Mutable State. PhD thesis, Princeton University (2004)

    Google Scholar 

  3. Appel, A., Felty, A.: A semantic model of types and machine instructions for proof-carrying code. In: Proc. 27th ACM Symposium on Principles of Programming Languages (POPL) (2000)

    Google Scholar 

  4. Appel, A., McAllester, D.: An indexed model of recursive types for foundational proof-carrying code. ACM Transactions on Programming Languages and Systems 23(5) (2001)

    Google Scholar 

  5. Aspinall, D., Beringer, L., Hofmann, M., Loidl, H.-W., Momigliano, A.: A program logic for resource verification. In: Slind, K., Bunker, A., Gopalakrishnan, G.C. (eds.) TPHOLs 2004. LNCS, vol. 3223, pp. 34–49. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  6. Bannwart, F., Muller, P.: A program logic for bytecode. In: Proc. 1st Workshop on Bytecode Semantics, Verification, Analysis and Transformation (BYTECODE) (April 2005)

    Google Scholar 

  7. Benton, N.: A typed logic for stacks and jumps. Draft Note (March 2004)

    Google Scholar 

  8. Benton, N.: A typed, compositional logic for a stack-based abstract machine. Technical Report MSR-TR-2005-84, Microsoft Research (June 2005)

    Google Scholar 

  9. Benton, N., Leperchey, B.: Relational reasoning in a nominal semantics for storage. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 86–101. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  10. Borgström, J.: Translation of smart card applications for formal verification. Masters Thesis, SICS, Sweden (2002)

    Google Scholar 

  11. Cardelli, L.: Program fragments, linking, and modularization. In: Proc. 24th ACM Symposium on Principles of Programming Languages (POPL) (1997)

    Google Scholar 

  12. Freund, S.N., Mitchell, J.C.: A type system for object initialization in the Java bytecode language. ACM Transactions on Programming Languages and Systems (TOPLAS) 21(6) (1999)

    Google Scholar 

  13. Gordon, A.D., Syme, D.: Typing a multi-language intermediate code. In: Proc. 28th ACM Symposium on Principles of Programming Languages (POPL) (2001)

    Google Scholar 

  14. Hamid, N.A., Shao, Z.: Interfacing Hoare logic and type systems for foundational proof-carrying code. In: Slind, K., Bunker, A., Gopalakrishnan, G.C. (eds.) TPHOLs 2004. LNCS, vol. 3223, pp. 118–135. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  15. Honda, K., Yoshida, N., Berger, M.: An observationally complete program logic for imperative higher-order functions. In: Proc. 20th IEEE Symposium on Logic in Computer Science (LICS) (2005)

    Google Scholar 

  16. Huisman, M., Jacobs, B.: Java program verification via a Hoare logic with abrupt termination. In: Maibaum, T. (ed.) FASE 2000. LNCS, vol. 1783, p. 284. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  17. Jia, L., Spalding, F., Walker, D., Glew, N.: Certifying compilation for a language with stack allocation. In: Proc. 20th IEEE Symposium on Logic in Computer Science (LICS) (2005)

    Google Scholar 

  18. Kleymann, T.: Hoare logic and auxiliary variables. Technical Report ECS-LFCS-98-399, LFCS, University of Edinburgh (1998)

    Google Scholar 

  19. Lindley, S., Stark, I.: Reducibility and ⊤ ⊤ lifting for computation types. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 262–277. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  20. Morrisett, G., Amal, A., Fluet, M.: L3: A linear language with locations. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 293–307. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  21. Morrisett, G., Crary, K., Glew, N., Walker, D.: Stack-based typed assembly language. Journal of Functional Programming 12(1) (2002)

    Google Scholar 

  22. Morrisett, G., Walker, D., Crary, K., Glew, N.: From System F to typed assembly language. ACM Transactions on Programming Languages and Systems (TOPLAS) 21(3) (1999)

    Google Scholar 

  23. Necula, G.: Proof-carrying code. In: Proceedings of the 24th ACM Symposium on Principles of Programming Languages (POPL) (1997)

    Google Scholar 

  24. Necula, G., Lee, P.: Safe kernel extensions without run-time checking. In: 2nd Symposium on Operating Systems Design and Implementation (OSDI) (1996)

    Google Scholar 

  25. O’Hearn, P.W., Reynolds, J.C., Yang, H.: Local reasoning about programs that alter data structures. In: Fribourg, L. (ed.) CSL 2001 and EACSL 2001. LNCS, vol. 2142, p. 1. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  26. von Oheimb, D., Nipkow, T.: Hoare logic for NanoJava: Auxiliary variables, side effects and virtual methods revisited. In: Eriksson, L.-H., Lindsay, P.A. (eds.) FME 2002. LNCS, vol. 2391, p. 89. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  27. Pitts, A.M., Stark, I.D.B.: Operational reasoning for functions with local state. In: Higher Order Operational Techniques in Semantics. CUP, Cambridge (1998)

    Google Scholar 

  28. Poetzsch-Heffter, A., Müller, P.: A programming logic for sequential Java. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, p. 162. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  29. Quigley, C.: A programming logic for Java bytecode programs. In: Basin, D., Wolff, B. (eds.) TPHOLs 2003. LNCS, vol. 2758, pp. 41–54. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  30. Quigley, C.L.: A Programming Logic for Java Bytecode Programs. PhD thesis, University of Glasgow, Department of Computing Science (2004)

    Google Scholar 

  31. Reynolds, J.C.: Idealized Algol and its specification logic. In: Tools and Notions for Program Construction (1982)

    Google Scholar 

  32. Smith, F., Walker, D., Morrisett, G.: Alias types. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, p. 366. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  33. Stata, R., Abadi, M.: A type system for Java bytecode subroutines. In: Proc. 25th ACM Symposium on Principles of Programming Languages (POPL) (1998)

    Google Scholar 

  34. von Oheimb, D.: Hoare logic for mutual recursion and local variables. In: Pandu Rangan, C., Raman, V., Sarukkai, S. (eds.) FST TCS 1999. LNCS, vol. 1738, p. 168. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  35. Vouillon, J., Mellies, P.-A.: Semantic types: A fresh look at the ideal model for types. In: Proc. 31st ACM Symposium on Principles of Programming Languages (POPL) (2004)

    Google Scholar 

  36. Yu, D., Kennedy, A., Syme, D.: Formalization of generics for the.NET common language runtime. In: Proceedings of the 31st ACM Symposium on Principles of Programming Languages (POPL) (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Benton, N. (2005). A Typed, Compositional Logic for a Stack-Based Abstract Machine. In: Yi, K. (eds) Programming Languages and Systems. APLAS 2005. Lecture Notes in Computer Science, vol 3780. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11575467_24

Download citation

  • DOI: https://doi.org/10.1007/11575467_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-29735-2

  • Online ISBN: 978-3-540-32247-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics