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

Verifying event-driven programs using ramified frame properties

Published: 23 January 2010 Publication History

Abstract

Interactive programs, such as GUIs or spreadsheets, often maintain dependency information over dynamically-created networks of objects. That is, each imperative object tracks not only the objects its own invariant depends on, but also all of the objects which depend upon it, in order to notify them when it changes.
These bidirectional linkages pose a serious challenge to verification, because their correctness relies upon a global invariant over the object graph.
We show how to modularly verify programs written using dynamically-generated bidirectional dependency information. The critical idea is to distinguish between the footprint of a command, and the state whose invariants depends upon the footprint. To do so, we define an application-specific semantics of updates, and introduce the concept of a ramification operator to explain how local changes can alter our knowledge of the rest of the heap. We illustrate the applicability of this style of proof with a case study from functional reactive programming, and formally justify reasoning about an extremely imperative implementation as if it were pure.

References

[1]
U. A. Acar, G. E. Blelloch, and R. Harper. Adaptive functional programming. ACM Transactions on Programming Languages and Systems (TOPLAS), 28 (6): 990--1034, 2006.
[2]
Anindya Banerjee, David A. Naumann 2, and Stan Rosenberg. Regional logic for local reasoning about global invariants. In ECOOP, pages 387--411, 2008.
[3]
Mike Barnett and David A. Naumann. Friends need a little bit more: Maintaining invariants over shared state. In MPC, pages 54--64, 2004.
[4]
Bodil Biering, Lars Birkedal, and Noah Torp-Smith. BI-hyperdoctrines, higher-order separation logic, and abstraction. ACM TOPLAS, 29 (5): 24, 2007. ISSN 0164-0925.
[5]
R. Bird and P. Wadler. An introduction to functional programming. Prentice Hall International (UK) Ltd. Hertfordshire, UK, UK, 1988.
[6]
L. Birkedal, N. Torp-Smith, and H. Yang. Semantics of separation-logic typing and higher-order frame rules. In Proc. of LICS'05, pages 260--269, 2005.
[7]
Lars Birkedal, Kristian Støvring, and Jacob Thamsborg. Realizability semantics of parametric polymorphism, general references, and recursive types. In Luca de Alfaro, editor, FOSSACS, volume 5504 of LNCS, pages 456--470. Springer, 2009. ISBN 978-3-642-00595-4.
[8]
Magnus Carlsson. Monads for incremental computing. In ICFP, pages 26--35, 2002.
[9]
Gregory H. Cooper and Shriram Krishnamurthi. Embedding dynamic dataflow in a call-by-value language. In Peter Sestoft, editor, ESOP, volume 3924 of LNCS, pages 294--308. Springer, 2006. ISBN 3-540-33095-X.
[10]
C. Elliott and P. Hudak. Functional reactive animation. In Proceedings of ICFP'97, pages 263--273. ACM New York, NY, USA, 1997.
[11]
J. J. Finger. Exploiting constraints in design synthesis. PhD thesis, Stanford University, Stanford, CA, USA, 1987.
[12]
Paul Hudak, Antony Courtney, Henrik Nilsson, and John Peterson. Arrows, robots, and functional reactive programming. In Johan Jeuring and Simon L. Peyton Jones, editors, Advanced Functional Programming, volume 2638 of LNCS, pages 159--187. Springer, 2002. ISBN 3-540-40132-6.
[13]
Cliff B. Jones. Tentative steps toward a development method for interfering programs. ACM Transactions on Programming Languages and Systems (TOPLAS), 5 (4): 596--619, 1983.
[14]
N. Krishnaswami, J. Aldrich, and L. Birkedal. Modular verification of the subject-observer pattern via higher-order separation logic. In Proceedings of FTfJP: Formal Techniques for Java-like Programs, 2007.
[15]
N. Krishnaswami, J. Aldrich, L. Birkedal, K. Svendsen, and A. Buisse. Design patterns in separation logic. In Proceedings of TLDI'09, pages 105--116. ACM New York, NY, USA, 2009.
[16]
Neelakantan R. Krishnaswami. Verifying Higher-Order Programming Languages with Higher-Order Separation Logic. PhD thesis, forthcoming. Carnegie Mellon University, Pittsburgh, PA, USA, 2009.
[17]
K. Rustan M. Leino and Wolfram Schulte. Using history invariants to verify observers. In Rocco De Nicola, editor, ESOP, volume 4421 of LNCS, pages 80--94. Springer, 2007. ISBN 978-3-540-71314-2.
[18]
Barbara H. Liskov and Jeannette M. Wing. Behavioural subtyping using invariants and constraints. In Formal Methods for Distributed Processing: a Survey of Object-Oriented Approaches, pages 254--280. Cambridge University Press, New York, NY, USA, 2001. ISBN 0-521-77184-6.
[19]
John McCarthy and Patrick J. Hayes. Some philosophical problems from the standpoint of artificial intelligence. In B. Meltzer and D. Michie, editors, Machine Intelligence 4, pages 463--502. Edinburgh University Press, 1969.
[20]
Sean McDirmid and Wilson C. Hsieh. Superglue: Component programming with object-oriented signals. In Dave Thomas, editor, ECOOP, volume 4067 of LNCS, pages 206--229. Springer, 2006. ISBN 3-540-35726-2.
[21]
Aleksandar Nanevski, Greg Morrisett, and Lars Birkedal. Polymorphism and separation in hoare type theory. In Proceedings ICFP, pages 62--73, New York, NY, USA, 2006. ACM. ISBN 1-59593-309-3.
[22]
M. Parkinson. Class invariants: The end of the road. Proceedings IWACO, 2007.
[23]
Matthew J. Parkinson and Gavin M. Bierman. Separation logic, abstraction and inheritance. In George C. Necula and Philip Wadler, editors, POPL, pages 75--86. ACM, 2008. ISBN 978-1-59593-689-9.
[24]
Frank Pfenning and Rowan Davies. A judgmental reconstruction of modal logic. phMathematical Structures in Computer Science, 11 (4): 511--540, 2001. ISSN 0960-1295.
[25]
John C. Reynolds. Separation logic: A logic for shared mutable data structures. In Logic in Computer Science (LICS 2002), pages 55--74. IEEE Computer Society, 2002. ISBN 0-7695-1483-9.
[26]
Steve M. Shaner, Gary T. Leavens, and David A. Naumann. Modular verification of higher-order methods with mandatory calls specified by model programs. In OOPSLA, pages 351--368, 2007.

Cited By

View all
  • (2023)Omnisemantics: Smooth Handling of NondeterminismACM Transactions on Programming Languages and Systems10.1145/357983445:1(1-43)Online publication date: 8-Mar-2023
  • (2021)Method for Organizing Network Requests in iOS Applications2021 International Siberian Conference on Control and Communications (SIBCON)10.1109/SIBCON50419.2021.9438849(1-9)Online publication date: 13-May-2021
  • (2020)Separation logic for sequential programs (functional pearl)Proceedings of the ACM on Programming Languages10.1145/34089984:ICFP(1-34)Online publication date: 3-Aug-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
TLDI '10: Proceedings of the 5th ACM SIGPLAN workshop on Types in language design and implementation
January 2010
108 pages
ISBN:9781605588919
DOI:10.1145/1708016
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

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 23 January 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. dataflow
  2. frame rule
  3. functional reactive programming
  4. ramification problem
  5. separation logic
  6. subject-observer

Qualifiers

  • Research-article

Conference

POPL '10
Sponsor:

Acceptance Rates

Overall Acceptance Rate 11 of 26 submissions, 42%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all
  • (2023)Omnisemantics: Smooth Handling of NondeterminismACM Transactions on Programming Languages and Systems10.1145/357983445:1(1-43)Online publication date: 8-Mar-2023
  • (2021)Method for Organizing Network Requests in iOS Applications2021 International Siberian Conference on Control and Communications (SIBCON)10.1109/SIBCON50419.2021.9438849(1-9)Online publication date: 13-May-2021
  • (2020)Separation logic for sequential programs (functional pearl)Proceedings of the ACM on Programming Languages10.1145/34089984:ICFP(1-34)Online publication date: 3-Aug-2020
  • (2016)Verifying Custom Synchronization Constructs Using Higher-Order Separation LogicACM Transactions on Programming Languages and Systems10.1145/281863838:2(1-72)Online publication date: 4-Jan-2016
  • (2014)Abstract effects and proof-relevant logical relationsACM SIGPLAN Notices10.1145/2578855.253586949:1(619-631)Online publication date: 8-Jan-2014
  • (2014)Abstract effects and proof-relevant logical relationsProceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2535838.2535869(619-631)Online publication date: 11-Jan-2014
  • (2014)A Logical Analysis of Framing for Specifications with Pure Method CallsVerified Software: Theories, Tools and Experiments10.1007/978-3-319-12154-3_1(3-20)Online publication date: 14-Oct-2014
  • (2014)Object PropositionsProceedings of the 19th International Symposium on FM 2014: Formal Methods - Volume 844210.1007/978-3-319-06410-9_34(497-513)Online publication date: 12-May-2014
  • (2013)Local Reasoning for Global Invariants, Part IIJournal of the ACM10.1145/248598160:3(1-73)Online publication date: 1-Jun-2013
  • (2013)Complete instantiation-based interpolationACM SIGPLAN Notices10.1145/2480359.242913248:1(537-548)Online publication date: 23-Jan-2013
  • Show More Cited By

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