Advertisement

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

  • Nick Benton
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3780)

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.

Keywords

Program Logic Auxiliary Variable High Order Logic Program Fragment Hoare Logic 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. 2.
    Ahmed, A.: Semantics of Types for Mutable State. PhD thesis, Princeton University (2004)Google Scholar
  3. 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. 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. 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)CrossRefGoogle Scholar
  6. 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. 7.
    Benton, N.: A typed logic for stacks and jumps. Draft Note (March 2004)Google Scholar
  8. 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. 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)CrossRefGoogle Scholar
  10. 10.
    Borgström, J.: Translation of smart card applications for formal verification. Masters Thesis, SICS, Sweden (2002)Google Scholar
  11. 11.
    Cardelli, L.: Program fragments, linking, and modularization. In: Proc. 24th ACM Symposium on Principles of Programming Languages (POPL) (1997)Google Scholar
  12. 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. 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. 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)CrossRefGoogle Scholar
  15. 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. 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)CrossRefGoogle Scholar
  17. 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. 18.
    Kleymann, T.: Hoare logic and auxiliary variables. Technical Report ECS-LFCS-98-399, LFCS, University of Edinburgh (1998)Google Scholar
  19. 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)CrossRefGoogle Scholar
  20. 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)CrossRefGoogle Scholar
  21. 21.
    Morrisett, G., Crary, K., Glew, N., Walker, D.: Stack-based typed assembly language. Journal of Functional Programming 12(1) (2002)Google Scholar
  22. 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. 23.
    Necula, G.: Proof-carrying code. In: Proceedings of the 24th ACM Symposium on Principles of Programming Languages (POPL) (1997)Google Scholar
  24. 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. 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)CrossRefGoogle Scholar
  26. 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)CrossRefGoogle Scholar
  27. 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. 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)CrossRefGoogle Scholar
  29. 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)CrossRefGoogle Scholar
  30. 30.
    Quigley, C.L.: A Programming Logic for Java Bytecode Programs. PhD thesis, University of Glasgow, Department of Computing Science (2004)Google Scholar
  31. 31.
    Reynolds, J.C.: Idealized Algol and its specification logic. In: Tools and Notions for Program Construction (1982)Google Scholar
  32. 32.
    Smith, F., Walker, D., Morrisett, G.: Alias types. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, p. 366. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  33. 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. 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)CrossRefGoogle Scholar
  35. 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. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Nick Benton
    • 1
  1. 1.Microsoft ResearchCambridge

Personalised recommendations