skip to main content
10.1145/1014007.1014021acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
Article

A type system for resource protocol verification and its correctness proof

Published: 24 August 2004 Publication History

Abstract

We present a new method, based on a form of dependent typing, to verify the correct usage of resources in a program. Our approach allows complex resources to be specified, whose properties are captured by annotated types and conditions on invariance and final states. The protocol itself is specified through a set of pre-defined methods, whose pre-condition and post-condition together, enforce the correct temporal usage of each resource type. We design a simple language together with a type system that shows how resource protocol verification can be achieved. We formalise an operational semantics for the language and provide a correctness proof which confirms that well-typed programs conform to the specified protocol of each resource type.

References

[1]
Martín Abadi and Bruno Blanchet. Computer-Assisted Verification of a Protocol for Certified Email. In Radhia Cousot, editor, Proceedings of the International Static Analysis Symposium (SAS), volume 2694 of Lecture Notes on Computer Science, pages 316--335, San Diego, California, June 2003. Springer Verlag.]]
[2]
J. Aldrich, V. Kostadinov, and C. Chambers. Alias Annotation for Program Understanding. In Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), Seattle, Washington, November 2002.]]
[3]
Hugh Anderson and Siau-Cheng Khoo. Affine-based size-change termination. In Proceedings of the Asian Symposium on Programming Languages and Systems (APLAS), June 2003.]]
[4]
Thomas Ball and Sriram K. Rajamani. The SLAM project: debugging system software via static analysis. In Proceedings of the ACM Symposium on the Principles of Programming Languages (POPL), pages 1--3. ACM Press, 2002.]]
[5]
E. C. Chan, J. Boyland, and W. L. Scherlis. Promises: Limited Specifications for Analysis and Manipulation. In Proceedings of the IEEE International Conference on Software Engineering (ICSE), pages 167--176, Kyoto, Japan, April 1998.]]
[6]
W.N. Chin and S.C. Khoo. Calculating sized types. In Proceedings of the ACM Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM), pages 62--72, Boston, Massachusetts, United States, January 2000.]]
[7]
W.N. Chin, S.C. Khoo, and S.C. Qin. A Sized Type System for Objects with Alias Controls. Technical report, SoC, Natl Univ. of Singapore, January 2004. avail. at http://www.comp.nus.edu.sg/~qinsc/papers/sizedtype.ps.gz.]]
[8]
W.N. Chin, S.C. Khoo, and Dana N. Xu. Deriving pre-conditions for array bound check elimination. In Programs as Data Objects II, pages 2--24, Aarhus, Denmark, May 2001. Springer Verlag.]]
[9]
Thomas Colcombet and Pascal Fradet. Enforcing trace properties by program transformation. In Proceedings of the ACM Symposium on the Principles of Programming Languages (POPL), January 2000.]]
[10]
Manuvir Das, Sorin Lerner, and Mark Seigle. ESP: path-sensitive program verification in polynomial time. In Proceedings of the ACM Symposium on Programming Language Design and Implementation (PLDI), June 2002.]]
[11]
Robert DeLine and Manuel Fahndrich. Enforcing high-level protocols in low-level software. In Proceedings of the ACM Symposium on Programming Language Design and Implementation (PLDI), June 2001.]]
[12]
Amy P. Felty, Douglas J. Howe, and Frank A. Stomp. Protocol verification in Nuprl. In Tenth International Conference on Computer Aided Verification, pages 428--439. Springer-Verlag Lecture Notes in Computer Science, 1998.]]
[13]
Jeffrey S. Foster, Tachio Terauchi, and Alex Aiken. Flow-sensitive type qualifiers. In Proceedings of the ACM Symposium on Programming Language Design and Implementation (PLDI), June 2002.]]
[14]
Thomas A. Henzinger, Ranjit Jhala, Rupak Majumdar, and Gregoire Sutre. Software verification with Blast. In Proceedings of the Tenth International Workshop on Model Checking of Software (SPIN), pages 235--239. Lecture Notes in Computer Science 2648, Springer-Verlag, 2003.]]
[15]
Martin Hofmann. The strength of non-size increasing computation. In Proceedings of the ACM Symposium on the Principles of Programming Languages (POPL), pages 260--269. ACM Press, 2002.]]
[16]
J. Hughes and L. Pareto. Recursion and Dynamic Data-Structures in Bounded Space: Towards Embedded ML Programming. In Proceedings of the ACM Conference on Functional Programming (ICFP), September 1999.]]
[17]
J. Hughes, L. Pareto, and A. Sabry. Proving the correctness of reactive systems using sized types. In Proceedings of the ACM Symposium on the Principles of Programming Languages (POPL), pages 410--423. ACM Press, January 1996.]]
[18]
Atsushi Igarashi and Naoki Kobayashi. Resource usage analysis. In Proceedings of the ACM Symposium on the Principles of Programming Languages (POPL), January 2002.]]
[19]
Naoki Kobayashi. Time regions and effects for resource usage analysis. Technical report, Tokyo Inst. of technology, 2003.]]
[20]
Yitzhak Mandelbaum, David Walker, and Robert Harper. An effective theory of type refinements. In Proceedings of the ACM Conference on Functional Programming (ICFP), Uppsala, Sweden, 2003.]]
[21]
Kim Marriott, Peter Stuckey, and Martin Sulzmann. Resource usage verification. In Proceedings of the Asian Symposium on Programming Languages and Systems (APLAS), Beijing, China, November 2003.]]
[22]
Benjamin C. Pierce. Types and Programming Languages. MIT Press, 2002.]]
[23]
W. Pugh. The Omega Test: A fast practical integer programming algorithm for dependence analysis. Communications of the ACM, 8:102--114, 1992.]]
[24]
F. Smith, D. Walker, and G. Morrisett. Alias Types. In Proceedings of the 9th European Symposium on Programming, Berlin, Germany, March 2000.]]
[25]
H. Xi. Dependent Types in Practical Programming. PhD thesis, Carnegie Mellon University, 1998.]]
[26]
H. Xi. Imperative Programming with Dependent Types. In Proceedings of the IEEE Symposium on Logic in Computer Science (LICS), Santa Barbara, June 2000.]]
[27]
H. Xi. Dependent Types for Program Termination Verification. In Proceedings of the IEEE Symposium on Logic in Computer Science (LICS), Boston, June 2001.]]
[28]
H. Xi and F. Pfenning. Eliminating array bound checking through dependent types. In Proceedings of the ACM Symposium on Programming Language Design and Implementation (PLDI), pages 249--257. ACM Press, June 1998.]]

Cited By

View all
  • (2019)Correct-by-Construction Concurrency: Using Dependent Types to Verify Implementations of Effectful Resource Usage ProtocolsFundamenta Informaticae10.5555/1883634.1883636102:2(145-176)Online publication date: 4-Jan-2019
  • (2009)A Type System for Usage of Software ComponentsTypes for Proofs and Programs10.1007/978-3-642-02444-3_12(186-202)Online publication date: 2009
  • (2005)Verifying safety policies with size properties and alias controlsProceedings of the 27th international conference on Software engineering10.1145/1062455.1062500(186-195)Online publication date: 15-May-2005
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PEPM '04: Proceedings of the 2004 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
August 2004
212 pages
ISBN:1581138350
DOI:10.1145/1014007
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: 24 August 2004

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. correctness proof
  2. dependent type system
  3. path-sensitive analysis
  4. protocol verification
  5. resource specification

Qualifiers

  • Article

Conference

PEPM04
Sponsor:

Acceptance Rates

Overall Acceptance Rate 66 of 120 submissions, 55%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2019)Correct-by-Construction Concurrency: Using Dependent Types to Verify Implementations of Effectful Resource Usage ProtocolsFundamenta Informaticae10.5555/1883634.1883636102:2(145-176)Online publication date: 4-Jan-2019
  • (2009)A Type System for Usage of Software ComponentsTypes for Proofs and Programs10.1007/978-3-642-02444-3_12(186-202)Online publication date: 2009
  • (2005)Verifying safety policies with size properties and alias controlsProceedings of the 27th international conference on Software engineering10.1145/1062455.1062500(186-195)Online publication date: 15-May-2005
  • (2005)Verifying safety policies with size properties and alias controlsProceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005.10.1109/ICSE.2005.1553561(186-195)Online publication date: 2005

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media