Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1111037.1111065acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Frame rules from answer types for code pointers

Published: 11 January 2006 Publication History

Abstract

We define a type system, which may also be considered as a simple Hoare logic, for a fragment of an assembly language that deals with code pointers and jumps. The typing is aimed at local reasoning in the sense that only the type of a code pointer is needed, and there is no need to know the whole code itself. The main features of the type system are separation logic connectives for describing the heap, and polymorphic answer types of continuations for keeping track of jumps. Specifically, we address an interaction between separation and answer types: frame rules for local reasoning in the presence of jumps are recovered by instantiating the answer type. However, the instantiation of answer types is not sound for all types. To guarantee soundness, we restrict instantiation to closed types, where the notion of closedness arises from biorthogonality (in a sense inspired by Krivine and Pitts). A machine state is orthogonal to a disjoint heap if their combination does not lead to a fault. Closed types are sets of machine states that are orthogonal to a set of heaps. We use closed types as well-behaved answer types.

References

[1]
Andrew A. Appel and David McAllester. An indexed model for recursive types for foundational proof-carrying code. ACM Transactions on Programming Languages and Systems (TOPLAS), 23(5):657--683, 2001.]]
[2]
Andrew W. Appel and Amy P. Felty. A semantic model of types and machine instructions for proof-carrying code. In Proceedings 27th Principles of Programming Languages (POPL '00), pages 243--253. ACM, 2000.]]
[3]
Josh Berdine. Linear Typing of Continuation Passing Style. PhD thesis, Queen Mary, University of London, 2002.]]
[4]
Josh Berdine and Peter W. O'Hearn. Strong update, disposal and encapsulation in bunched typing. Draft, October 2005.]]
[5]
Josh Berdine, Peter W. O'Hearn, Uday Reddy, and Hayo Thielecke. Linear continuation passing. Higher-order and Symbolic Computation, 15(2/3):181--208, 2002.]]
[6]
Richard Bornat, Cristiano Calcagno, Peter W. O'Hearn, and Matthew J. Parkinson. Permission accounting in separation logic. In Principles of Programming Languages (POPL'05), pages 259--270. ACM, 2005.]]
[7]
Matthias Felleisen and Daniel P. Friedman. Control operators, the SECD-machine, and the λ-calculus. In Martin Wirsing, editor, Formal Description of Programming Concepts, pages 193--217. North-Holland, 1986.]]
[8]
Timothy G. Griffin. A formulae-as-types notion of control. In Principles of Programming Languages (POPL '90), pages 47--58. ACM, 1990.]]
[9]
Samin S. Ishtiaq and Peter O'Hearn. BI as an assertion language for mutable data structures. In Principles of Programming Languages (POPL '01), pages 14--26. ACM, 2001.]]
[10]
Pierre Jouvelot and David K. Gifford. Reasoning about continuations with control effects. In Programming Language Design and Implementation (PLDI), pages 218--226. ACM, 1988.]]
[11]
Jean-Louis Krivine. Typed lambda-calculus in classical Zermelo-Fraenkel set theory. Archive of Mathematical Logic, 40(3):189--205, 2001.]]
[12]
Jean-Louis Krivine. Dependent choice, 'quote' and the clock. Theoretical Computer Science, 308(1--3):259--276, 2003.]]
[13]
Sam Lindley and Ian Stark. Reducibility and TT-lifting for computation types. In Typed lambda calculus and applications (TLCA), number 3461 in LNCS, pages 262--277. Springer, 2005.]]
[14]
John M. Lucassen and David K. Gifford. Polymorphic effect systems. In Principles of Programming Languages (POPL '88), pages 47--57. ACM, 1988.]]
[15]
Paul-André Melliés and Jérôme Vouillon. Recursive polymorphic types and parametricity in an operational framework. In Logic and Computer Science (LICS'05). IEEE, 2005.]]
[16]
Greg Morrisett, David Walker, Karl Crary, and Neal Glew. From system F to typed assembly language. In Principles of Programming Languages (POPL '98), pages 85--97. ACM, 1998.]]
[17]
Gregory Morrisett, Amal J. Ahmed, and Matthew Fluet. L3: A linear language with locations. In Typed Lambda Calculus and Applications (TLCA), volume 3461, pages 293--307. Springer, 2005.]]
[18]
Gregory Morrisett, F. Smith, and D. Walker. Alias types. In Proceedings European Symposium on Programming (ESOP), volume 1782 of LNCS, pages 366--381. Springer, 2000.]]
[19]
George C. Necula. Proof-carrying code. In Principles of Programming Languages (POPL '97), pages 106--119. ACM, 1997.]]
[20]
Zhaozhong Ni and Zhong Shao. Certified assembly programming with embedded code pointers. In Proc. 33rd ACM Symposium on Principles of Programming Languages (POPL'06). ACM, January 2006. (to appear).]]
[21]
Peter W. O'Hearn. On bunched typing. Journal of Functional Programming, 13(4):747--796, 2003.]]
[22]
Peter W. O'Hearn, Hongseok Yang, and John C. Reynolds. Separation and information hiding. In Principles of Programming Languages (POPL'04), pages 268--280, 2004.]]
[23]
Andrew M. Pitts. Parametric polymorphism and operational equivalence. Mathematical Structures in Computer Science, 10:321--359, 2000.]]
[24]
David J. Pym. The Semantics and Proof Theory of the Logic of Bunched Implications. Kluwer Academic Publishers, 2002.]]
[25]
David J. Pym, Peter W. O'Hearn, and Hongseok Yang. Possible worlds and resources: the semantics of BI. Theoretical Computer Science, 315(1):257--305, 2004.]]
[26]
John C. Reynolds. Types, abstraction and parametric polymorphism. In R. E. A. Mason, editor, Information Processing 83, pages 513--523, Amsterdam, 1983. Elsevier Science Publishers B. V. (North-Holland).]]
[27]
John C. Reynolds. Separation logic: A logic for shared mutable data structures. In Logic in Computer Science (LICS), pages 55--74. IEEE, 2002.]]
[28]
Hayo Thielecke. Comparing control constructs by double-barrelled CPS. Higher-order and Symbolic Computation, 15(2/3):141--160, 2002.]]
[29]
Hayo Thielecke. From control effects to typed continuation passing. In 30th SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'03), pages 139--149. ACM, 2003.]]
[30]
Hayo Thielecke. Answer type polymorphism in call-by-name continuation passing. In European Symposium on Programming (ESOP 2004), volume 2986 of LNCS, pages 279--293. Springer, 2004.]]
[31]
Jérôme Vouillon and Paul-André Melliés. Semantic types: a fresh look at the ideal model for types. In Principles of Programming Languages (POPL'04), pages 52--63, 2004.]]
[32]
Philip Wadler. Theorems for free! In 4th International Conference on Functional Programming and Computer Architecture (FPCA'89), pages 347--359. ACM, 1989.]]

Cited By

View all
  • (2011)Characteristic formulae for the verification of imperative programsProceedings of the 16th ACM SIGPLAN international conference on Functional programming10.1145/2034773.2034828(418-430)Online publication date: 19-Sep-2011
  • (2011)Characteristic formulae for the verification of imperative programsACM SIGPLAN Notices10.1145/2034574.203482846:9(418-430)Online publication date: 19-Sep-2011
  • (2009)A Logic of Secure Systems and its Application to Trusted ComputingProceedings of the 2009 30th IEEE Symposium on Security and Privacy10.1109/SP.2009.16(221-236)Online publication date: 17-May-2009
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2006
432 pages
ISBN:1595930272
DOI:10.1145/1111037
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 1
    Proceedings of the 2006 POPL Conference
    January 2006
    421 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1111320
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 January 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Hoare logic
  2. code pointers
  3. continuations
  4. polymorphism
  5. typed assembly language

Qualifiers

  • Article

Conference

POPL06

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2011)Characteristic formulae for the verification of imperative programsProceedings of the 16th ACM SIGPLAN international conference on Functional programming10.1145/2034773.2034828(418-430)Online publication date: 19-Sep-2011
  • (2011)Characteristic formulae for the verification of imperative programsACM SIGPLAN Notices10.1145/2034574.203482846:9(418-430)Online publication date: 19-Sep-2011
  • (2009)A Logic of Secure Systems and its Application to Trusted ComputingProceedings of the 2009 30th IEEE Symposium on Security and Privacy10.1109/SP.2009.16(221-236)Online publication date: 17-May-2009
  • (2009)Program logics for sequential higher-order controlProceedings of the Third IPM international conference on Fundamentals of Software Engineering10.1007/978-3-642-11623-0_11(194-211)Online publication date: 15-Apr-2009
  • (2008)Hiding Local State in Direct StyleProceedings of the 2008 23rd Annual IEEE Symposium on Logic in Computer Science10.1109/LICS.2008.16(331-340)Online publication date: 24-Jun-2008
  • (2008)Reasoning about B+ Trees with Operational Semantics and Separation LogicElectronic Notes in Theoretical Computer Science (ENTCS)10.1016/j.entcs.2008.10.021218(355-369)Online publication date: 1-Oct-2008
  • (2006)Strong Update, Disposal, and Encapsulation in Bunched TypingElectronic Notes in Theoretical Computer Science (ENTCS)10.1016/j.entcs.2006.04.006158(81-98)Online publication date: 1-May-2006
  • (2006)Separation logic for higher-order storeProceedings of the 20th international conference on Computer Science Logic10.1007/11874683_38(575-590)Online publication date: 25-Sep-2006
  • (2008)Reasoning about B+ Trees with Operational Semantics and Separation LogicElectronic Notes in Theoretical Computer Science (ENTCS)10.1016/j.entcs.2008.10.021218(355-369)Online publication date: 1-Oct-2008

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media