skip to main content
10.1145/3464971.3468419acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

A generic type system for featherweight Java

Published: 11 July 2021 Publication History

Abstract

We introduce a generic type system for Featherweight Java (FJ) that is parametrized with a monad-like structure, and prove a uniform soundness theorem. Its instances include some region type systems studied by Martin Hofmann et al. as well as a new one that performs more precise analysis of trace-based properties. Their soundness is guaranteed by the uniform theorem. We only need to verify some natural conditions. Instead of refining the FJ type system as in the previous work, our region type system is separate from the FJ type system, making it simpler and also easier to move to larger fragments of Java. Moreover, the uniform framework helps to avoid redundant work on the meta-theory when extending the system to cover other language features such as exception handling.

References

[1]
Massimo Bartoletti, Pierpaolo Degano, and Gian Luigi Ferrari. 2005. Enforcing secure service composition. In 18th IEEE Computer Security Foundations Workshop (CSFW’05). 211–223. https://doi.org/10.1109/CSFW.2005.17
[2]
Lennart Beringer, Robert Grabowski, and Martin Hofmann. 2013. Verifying pointer and string analyses with region type systems. Computer Languages, Systems & Structures, 39, 2 (2013), 49–65. https://doi.org/10.1016/j.cl.2013.01.001
[3]
Sigmund Cherem and Radu Rugina. 2004. Region Analysis and Transformation for Java Programs. In Proceedings of the 4th International Symposium on Memory Management (ISMM ’04). Association for Computing Machinery, New York, NY, USA. 85–96. https://doi.org/10.1145/1029873.1029884
[4]
Serdar Erbatur, Martin Hofmann, and Eugen Zălinescu. 2017. Enforcing Programming Guidelines with Region Types and Effects. In Programming Languages and Systems (APLAS 2017), Bor-Yuh Evan Chang (Ed.) (Lecture Notes in Computer Science, Vol. 10695). Springer, Cham, 85–104. https://doi.org/10.1007/978-3-319-71237-6_5
[5]
Facebook. [n.d.]. Flow - A static type checker for JavaScript. https://flow.org
[6]
James Gosling, Bill Joy, Guy Steele, Gilad Bracha, and Alex Buckley. 2020. The Java Language Specification (Java SE 14 ed.). Oracle America, Inc. http://docs.oracle.com/javase/specs/jls/se14/jls14.pdf
[7]
Robert Grabowski, Martin Hofmann, and Keqin Li. 2012. Type-Based Enforcement of Secure Programming Guidelines — Code Injection Prevention at SAP. In Formal Aspects of Security and Trust (FAST 2011), G. Barthe, A. Datta, and S. Etalle (Eds.) (Lecture Notes in Computer Science, Vol. 7140). Springer, Berlin, Heidelberg, 182–197. https://doi.org/10.1007/978-3-642-29420-4_12
[8]
Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. 2001. Featherweight Java: a minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems, 23, 3 (2001), 396–450. https://doi.org/10.1145/503502.503505
[9]
John M. Lucassen and David K. Gifford. 1988. Polymorphic Effect Systems. In Proceedings of the 15th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’88). Association for Computing Machinery, New York, NY, USA. 47–57. https://doi.org/10.1145/73560.73564
[10]
Microsoft. [n.d.]. TypeScript - Typed JavaScript at any scale. https://www.typescriptlang.org/
[11]
Flemming Nielson and Hanne Riis Nielson. 1999. Type and Effect Systems. In Correct System Design, ER. Olderog and B. Steffen (Eds.) (Lecture Notes in Computer Science, Vol. 1710). Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48092-7_6
[12]
McGill University Sable Group. [n.d.]. Soot - A framework for analyzing and transforming Java and Android applications. https://soot-oss.github.io/soot/
[13]
Helmut Seidl and Vesal Vojdani. 2009. Region Analysis for Race Detection. In Proceedings of the 16th International Symposium on Static Analysis (SAS ’09). Springer-Verlag, Berlin, Heidelberg. 171–187. https://doi.org/10.1007/978-3-642-03237-0_13
[14]
Christian Skalka. 2008. Types and trace effects for object orientation. Higher-Order and Symbolic Computation, 21 (2008), 239–282. https://doi.org/10.1007/s10990-008-9032-6
[15]
Christian Skalka, Scott Smith, and David Van horn. 2008. Types and Trace Effects of Higher Order Programs. Journal of Functional Programming, 18, 2 (2008), 179–249. https://doi.org/10.1017/S0956796807006466
[16]
Stanford. [n.d.]. Securibench Micro. http://too4words.github.io/securibench-micro/
[17]
Mads Tofte and Jean-Pierre Talpin. 1997. Region-Based Memory Management. Information and Computation, 132, 2 (1997), 109–176. https://doi.org/10.1006/inco.1996.2613
[18]
Sen Ye, Yulei Sui, and Jingling Xue. 2014. Region-Based Selective Flow-Sensitive Pointer Analysis. In Static Analysis (SAS 2014), M. Müller-Olm and H. Seidl (Eds.) (Lecture Notes in Computer Science, Vol. 8723). Springer, Cham. 319–336. https://doi.org/10.1007/978-3-319-10936-7_20

Index Terms

  1. A generic type system for featherweight Java

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    FTfJP '21: Proceedings of the 23rd ACM International Workshop on Formal Techniques for Java-like Programs
    July 2021
    67 pages
    ISBN:9781450385435
    DOI:10.1145/3464971
    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 July 2021

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Featherweight Java
    2. program analysis
    3. region types
    4. trace effects

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    ISSTA '21
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 51 of 75 submissions, 68%

    Upcoming Conference

    ISSTA '25

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 101
      Total Downloads
    • Downloads (Last 12 months)15
    • Downloads (Last 6 weeks)3
    Reflects downloads up to 10 Feb 2025

    Other Metrics

    Citations

    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