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

Resource usage analysis for a functional language with exceptions

Published: 09 January 2006 Publication History

Abstract

Igarashi and Kobayashi have proposed a general type system for checking whether resources such as files and memory are accessed in a valid manner. Their type system is, however, for call-by-value λ-calculus with resource primitives, and does not deal with non-functional primitives such as exceptions and pointers. We extend their type system to deal with exception primitives and prove soundness of the type system. Dealing with exception primitives is especially important in practice, since many resource access primitives may raise exceptions. The extension is non-trivial: While Igarashi and Kobayashi's type system is based on linear types, our new type system is a combination of linear types and effect systems. We also report on a prototype analyzer based on the new type system.

References

[1]
A. Aiken, M. Fähndrich, and R. Levien. Improving region-based analysis of higher-order languages. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 174--185, 1995.]]
[2]
T. Ball and S. K. Rajamani. The SLAM project: Debugging system software via static analysis. In Proceedings of ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, pages 1--3, 2002.]]
[3]
G. Bigliardi and C. Laneve. A type system for JVM threads. In Proceedings of 3rd ACM SIGPLAN Workshop on Types in Compilation (TIC2000), Montreal, Canada, 2000.]]
[4]
R. DeLine and M. Fähndrich. Adoption and focus: Practical linear types for imperative programming. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, 2002.]]
[5]
R. DeLine and M. Fähndrich. Typestates for objects. In M. Odersky, editor, ECOOP, volume 3086 of Lecture Notes in Computer Science, pages 465--490. Springer, 2004.]]
[6]
J. Field, D. Goyal, G. Ramalingam, and E. Yahav. Typestate verification: Abstraction techniques and complexity results. In R. Cousot, editor, SAS, volume 2694 of Lecture Notes in Computer Science, pages 439--462. Springer. 2003.]]
[7]
J. S. Foster, T. Terauchi, and A. Aiken. Flow-sensitive type qualifiers. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, 2002.]]
[8]
S. N. Freund and J. C. Mitchell. The type system for object initialization in the Java bytecode language. ACM Transactions on Programming Languages and Systems, 21(6):1196--1250, 1999.]]
[9]
T. A. Henzinger, R. Jhala, R. Majumdar, and G. Sutre. Lazy abstraction. In Proceedings of ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, pages 58--70, 2002.]]
[10]
A. Igarashi and N. Kobayashi. Resource usage analysis. ACM Transactions on Programming Languages and Systems, 27(2):264--313, Mar. 2005.]]
[11]
F. Iwama, A. Igarashi, and N. Kobayashi. Resource usage analysis for a functional language with exceptions, 2005. Full version. Available from http://www.kb.ecei.tohoku.ac.jp/~iwama/rue/res-use-exce-full.pdf.]]
[12]
F. Iwama and N. Kobayashi. A new type system for JVM lock primitives. In Proceedings of ASIA-PEPM'02, pages 156--168. ACM Press, 2002.]]
[13]
N. Kobayashi. Quasi-linear types. In Proceedings of ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, pages 29--42, 1999.]]
[14]
N. Kobayashi. Time regions and effects for resource usage analysis. In Proceedings of ACM SIGPLAN International Workshop on Types in Languages Design and Implementation (TLDI'03), pages 50--61, 2003.]]
[15]
N. Kobayashi, K. Suenaga, and L. Wischik. Resource usage analysis for π-calculus. In Proceedings of VMCAI'06, 2006.]]
[16]
I. Mackie. Lilac: A functional programming language based on linear logic. Journal of Functional Programming, 4(4):1--39, October 1994.]]
[17]
F. Pessaux and X. Leroy. Type-based analysis of uncaught exceptions. In Proceedings of ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, pages 276--290, 1999.]]
[18]
J. Rehof and T. Mogensen. Tractable constraints in finite semilattices. Science of Computer Programming, 35(2):191--221, 1999.]]
[19]
C. Skalka and S. Smith. History effects and verification. In Proceedings of APLAS 2004, volume 3302 of Lecture Notes in Computer Science, pages 107--128. Springer-Verlag, 2004.]]
[20]
R. E. Strom and S. Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE, Transactions on Software Engineering, 12(1):157--171, Jan. 1986.]]
[21]
J.-P. Talpin and P. Jouvelot. The type and effect discipline. In Proceedings of IEEE Symposium on Logic in Computer Science, pages 162--173, 1992.]]
[22]
M. Tofte and J.-P. Talpin. Region-based memory management. Information and Computation, 132(2):109--176, 1997.]]
[23]
D. N. Turner, P. Wadler, and C. Mossin. Once upon a type. In Proceedings of Functional Programming Languages and Computer Architecture, pages 1--11, 1995.]]
[24]
D. Walker, K. Crary, and J. G. Morrisett. Typed memory management via static capabilities. ACM Transactions on Programming Languages and Systems, 22(4):701--771, 2000.]]
[25]
Z. Xu, B. P. Miller, and T. Reps. Safety checking of machine code. In PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, pages 70--82, New York, NY, USA, 2000. ACM Press.]]
[26]
Z. Xu, T. W. Reps, and B. P. Miller. Typestate checking of machine code. In ESOP '01: Proceedings of the 10th European Symposium on Programming Languages and Systems, pages 335--351, London, UK, 2001. Springer-Verlag.]]
[27]
K. Yi. Compile-time detection of uncaught exceptions in Standard ML programs. In Proceedings of SAS'94, volume 864 of Lecture Notes in Computer Science, pages 238--254, 1994.]]

Cited By

View all
  • (2024)Law and Order for Typestate with BorrowingProceedings of the ACM on Programming Languages10.1145/36897638:OOPSLA2(1475-1503)Online publication date: 8-Oct-2024
  • (2023)Temporal Verification with Answer-Effect Modification: Dependent Temporal Type-and-Effect System with Delimited ContinuationsProceedings of the ACM on Programming Languages10.1145/35712647:POPL(2079-2110)Online publication date: 9-Jan-2023
  • (2019)Quantitative program reasoning with graded modal typesProceedings of the ACM on Programming Languages10.1145/33417143:ICFP(1-30)Online publication date: 26-Jul-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PEPM '06: Proceedings of the 2006 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
January 2006
176 pages
ISBN:1595931961
DOI:10.1145/1111542
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: 09 January 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. effect system
  2. exception
  3. resource usage analysis
  4. type inference
  5. type system

Qualifiers

  • Article

Conference

PEPM06
Sponsor:
PEPM06: Partial Evaluation and Program Manipulation 2006
January 9 - 10, 2006
South Carolina, Charleston

Acceptance Rates

Overall Acceptance Rate 66 of 120 submissions, 55%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all
  • (2024)Law and Order for Typestate with BorrowingProceedings of the ACM on Programming Languages10.1145/36897638:OOPSLA2(1475-1503)Online publication date: 8-Oct-2024
  • (2023)Temporal Verification with Answer-Effect Modification: Dependent Temporal Type-and-Effect System with Delimited ContinuationsProceedings of the ACM on Programming Languages10.1145/35712647:POPL(2079-2110)Online publication date: 9-Jan-2023
  • (2019)Quantitative program reasoning with graded modal typesProceedings of the ACM on Programming Languages10.1145/33417143:ICFP(1-30)Online publication date: 26-Jul-2019
  • (2018)Types and trace effects for object orientationHigher-Order and Symbolic Computation10.1007/s10990-008-9032-621:3(239-282)Online publication date: 15-Dec-2018
  • (2013)Model Checking Higher-Order ProgramsJournal of the ACM (JACM)10.1145/2487241.248724660:3(1-62)Online publication date: 1-Jun-2013
  • (2012)Safe locking for multi-threaded Java with exceptionsThe Journal of Logic and Algebraic Programming10.1016/j.jlap.2011.11.00281:3(257-283)Online publication date: Apr-2012
  • (2009)Model-checking higher-order functionsProceedings of the 11th ACM SIGPLAN conference on Principles and practice of declarative programming10.1145/1599410.1599415(25-36)Online publication date: 7-Sep-2009
  • (2009)Types and higher-order recursion schemes for verification of higher-order programsACM SIGPLAN Notices10.1145/1594834.148093344:1(416-428)Online publication date: 21-Jan-2009
  • (2009)Local policies for resource usage analysisACM Transactions on Programming Languages and Systems (TOPLAS)10.1145/1552309.155231331:6(1-43)Online publication date: 26-Aug-2009
  • (2009)Types and higher-order recursion schemes for verification of higher-order programsProceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages10.1145/1480881.1480933(416-428)Online publication date: 21-Jan-2009
  • 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

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media