Higher-Ranked Annotation Polymorphic Dependency Analysis

The precision of a static analysis can be improved by increasing the context-sensitivity of the analysis. In a type-based formulation of static analysis for functional languages this can be achieved by, e.g., introducing let-polyvariance or subtyping. In this paper we go one step further by defining a higher-ranked polyvariant type system so that even properties of lambda-bound identifiers can be generalized over. We do this for dependency analysis, a generic analysis that can be instantiated to a range of different analyses that in this way all can profit. We prove that our analysis is sound with respect to a call-by-name semantics and that it satisfies a so-called noninterference property. We provide a type reconstruction algorithm that we have proven to be terminating, and sound and complete with respect to its declarative specification. Our principled description can serve as a blueprint for making other analyses higher-ranked.

[1]  Ruud Koot Higher-ranked Exception Types , 2014 .

[2]  Jurriaan Hage,et al.  Type-based Exception Analysis for Non-strict Higher-order Functional Languages with Imprecise Exception Semantics , 2015, PEPM.

[3]  Alejandro Russo,et al.  Encoding DCC in Haskell , 2017, PLAS@CCS.

[4]  Guangyu Zhang Binding-Time Analysis : Subtyping versus Subeecting , 2008 .

[5]  Alan Mycroft,et al.  Polymorphic Type Schemes and Recursive Definitions , 1984, Symposium on Programming.

[6]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[7]  Simon L. Peyton Jones,et al.  Practical type inference for arbitrary-rank types , 2007, Journal of Functional Programming.

[8]  Jon G. Riecke,et al.  The SLam calculus: programming with secrecy and integrity , 1998, POPL '98.

[9]  Fritz Henglein,et al.  Type inference with polymorphic recursion , 1993, TOPL.

[10]  Martín Abadi,et al.  A core calculus of dependency , 1999, POPL '99.

[11]  Luís Caires,et al.  Dependent Information Flow Types , 2015, POPL.

[12]  Frank Tip,et al.  A survey of program slicing techniques , 1994, J. Program. Lang..

[13]  Jerzy Tiuryn,et al.  Type Reconstruction in Finite Rank Fragments of the Second-Order lambda-Calculus , 1992, Inf. Comput..

[14]  Dale Miller,et al.  A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification , 1991, J. Log. Comput..

[15]  Benjamin C. Pierce,et al.  Combinators for bi-directional tree transformations: a linguistic approach to the view update problem , 2005, POPL '05.

[16]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[17]  J. Meseguer,et al.  Security Policies and Security Models , 1982, 1982 IEEE Symposium on Security and Privacy.

[18]  Fritz Henglein,et al.  Polymorphic Recursion and Subtype Qualifications: Polymorphic Binding-Time Analysis in Polynomial Time , 1995, SAS.

[19]  Jurriaan Hage,et al.  Polyvariant flow analysis with higher-ranked polymorphic types and higher-order effect operators , 2010, ICFP '10.

[20]  David K. Gifford,et al.  Polymorphic effect systems , 1988, POPL '88.

[21]  Peter J. Stuckey,et al.  Boolean Constraints for Binding-Time Analysis , 2001, PADO.

[22]  Simon L. Peyton Jones,et al.  Once upon a polymorphic type , 1999, POPL '99.

[23]  Ankush Das,et al.  Towards automatic resource bound analysis for OCaml , 2016, POPL.

[24]  François Pottier,et al.  Information flow inference for ML , 2003, TOPL.

[25]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.