Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/978-3-642-35873-9_19guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Compositional and Lightweight Dependent Type Inference for ML

Published: 20 January 2013 Publication History

Abstract

We consider the problem of inferring expressive safety properties of higher-order functional programs using first-order decision procedures. Our approach encodes higher-order features into first-order logic formula whose solution can be derived using a lightweight counterexample guided refinement loop. To do so, we extract initial verification conditions from dependent typing rules derived by a syntactic scan of the program. Subsequent type-checking and type-refinement phases infer and propagate specifications of higher order functions, which are treated as uninterpreted first-order constructs, via subtyping chains. Our technique provides several benefits not found in existing systems: 1 it enables compositional verification and inference of useful safety properties for functional programs; 2 additionally provides counterexamples that serve as witnesses of unsound assertions: 3 does not entail a complex translation or encoding of the original source program into a first-order representation; and, 4 most importantly, profitably employs the large body of existing work on verification of first-order imperative programs to enable efficient analysis of higher-order ones. We have implemented the technique as part of the MLton SML compiler toolchain, where it has shown to be effective in discovering useful invariants with low annotation burden.

References

[1]
Babić, D., Hu, A.J.: Structural Abstraction of Software Verification Conditions. In: Damm, W., Hermanns, H. eds. CAV 2007. LNCS, vol. 4590, pp. 366---378. Springer, Heidelberg 2007
[2]
Ball, T., Bounimova, E., Kumar, R., Levin, V.: SLAM2: Static Driver Verification with Under 4% False Alarms. In: FMCAD, pp. 35---42 2010
[3]
Barnett, M., Chang, B.-Y.E., DeLine, R., Jacobs, B., Leino, K.R.M.: Boogie: A Modular Reusable Verifier for Object-Oriented Programs. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. eds. FMCO 2005. LNCS, vol. 4111, pp. 364---387. Springer, Heidelberg 2006
[4]
Beyer, D., Henzinger, T.A., Jhala, R., Majumdar, R.: The Software Model Checker Blast: Applications to Software Engineering. Int. J. Softw. Tools Technol. Transf. 9, 505---525 2007
[5]
Beyer, D., Zufferey, D., Majumdar, R.: cSIsat: Interpolation for LA+EUF. In: Gupta, A., Malik, S. eds. CAV 2008. LNCS, vol. 5123, pp. 304---308. Springer, Heidelberg 2008
[6]
http://www.lri.fr/~filliatr/software.en.html
[7]
Clarke, E.M., Grumberg, O., Jha, S., Lu, Y., Veith, H.: Counterexample-Guided Abstraction Refinement. In: Emerson, E.A., Sistla, A.P. eds. CAV 2000. LNCS, vol. 1855, pp. 154---169. Springer, Heidelberg 2000
[8]
Damas, L., Milner, R.: Principal Type-Schemes for Functional Programs. In: POPL, pp. 207---212 1982
[9]
Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for Java. In: PLDI, pp. 234---245 2002
[10]
Freeman, T., Pfenning, F.: Refinement Types for ML. In: PLDI, pp. 268---277 1991
[11]
Graf, S., Saïdi, H.: Construction of Abstract State Graphs with PVS. In: Grumberg, O. ed. CAV 1997. LNCS, vol. 1254, pp. 72---83. Springer, Heidelberg 1997
[12]
Jagannathan, S., Weeks, S.: A Unified Treatment of Flow Analysis in Higher-Order Languages. In: POPL, pp. 393---407 1995
[13]
Jhala, R., Majumdar, R., Rybalchenko, A.: HMC: Verifying Functional Programs Using Abstract Interpreters. In: Gopalakrishnan, G., Qadeer, S. eds. CAV 2011. LNCS, vol. 6806, pp. 470---485. Springer, Heidelberg 2011
[14]
Kawaguci, M., Rondon, P., Jhala, R.: Type-based Data Structure Verification. In: PLDI, pp. 304---315 2009
[15]
Knowles, K., Flanagan, C.: Type Reconstruction for General Refinement Types. In: De Nicola, R. ed. ESOP 2007. LNCS, vol. 4421, pp. 505---519. Springer, Heidelberg 2007
[16]
Kobayashi, N.: Model-Checking Higher-Order Functions. In: PPDP, pp. 25---36 2009
[17]
Kobayashi, N.: Types and Higher-Order Recursion Schemes for Verification of Higher-Order Programs. In: POPL, pp. 416---428 2009
[18]
Kobayashi, N., Sato, R., Unno, H.: Predicate Abstraction and CEGAR for Higher-Order Model Checking. In: PLDI, pp. 222---233 2011
[19]
Kobayashi, N., Tabuchi, N., Unno, H.: Higher-order Multi-Parameter Tree Transducers and Recursion Schemes for Program Verification. In: POPL, pp. 495---508 2010
[20]
Martin-Löf, P.: Constructive Mathematics and Computer Programming 312, 501---518 1984
[21]
McMillan, K.L.: Interpolation and SAT-Based Model Checking. In: Hunt Jr., W.A., Somenzi, F. eds. CAV 2003. LNCS, vol. 2725, pp. 1---13. Springer, Heidelberg 2003
[22]
Ong, C.H.L., Ramsay, S.J.: Verifying Higher-Order Functional Programs with Pattern-Matching Algebraic Data Types. In: POPL, pp. 587---598 2011
[23]
Rondon, P., Kawaguci, M., Jhala, R.: Liquid Types. In: PLDI, pp. 159---169 2008
[24]
Sharir, M., Pnueli, A.: Two Approaches to Interprocedural Data Flow Analysis. In: Program Flow Analysis 1981
[25]
Shivers, O.: Control-Flow analysis in Scheme. In: PLDI, pp. 164---174 1988
[26]
Terauchi, T.: Dependent types from Counterexamples. In: POPL, pp. 119---130 2010
[27]
Unno, H., Kobayashi, N.: Dependent Type Inference with Interpolants. In: PPDP, pp. 277---288 2009
[28]
Xi, H., Pfenning, F.: Dependent Types in Practical Programming. In: POPL, pp. 214---227 1999

Cited By

View all
  • (2024)Answer Refinement Modification: Refinement Type System for Algebraic Effects and HandlersProceedings of the ACM on Programming Languages10.1145/36332808:POPL(115-147)Online publication date: 5-Jan-2024
  • (2023)Higher-Order MSL Horn ConstraintsProceedings of the ACM on Programming Languages10.1145/35712627:POPL(2017-2047)Online publication date: 11-Jan-2023
  • (2021)Data flow refinement type inferenceProceedings of the ACM on Programming Languages10.1145/34343005:POPL(1-31)Online publication date: 4-Jan-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
VMCAI 2013: Proceedings of the 14th International Conference on Verification, Model Checking, and Abstract Interpretation - Volume 7737
January 2013
554 pages
ISBN:9783642358722

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 20 January 2013

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 01 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Answer Refinement Modification: Refinement Type System for Algebraic Effects and HandlersProceedings of the ACM on Programming Languages10.1145/36332808:POPL(115-147)Online publication date: 5-Jan-2024
  • (2023)Higher-Order MSL Horn ConstraintsProceedings of the ACM on Programming Languages10.1145/35712627:POPL(2017-2047)Online publication date: 11-Jan-2023
  • (2021)Data flow refinement type inferenceProceedings of the ACM on Programming Languages10.1145/34343005:POPL(1-31)Online publication date: 4-Jan-2021
  • (2021)Symbolic Automatic Relations and Their Applications to SMT and CHC SolvingStatic Analysis10.1007/978-3-030-88806-0_20(405-428)Online publication date: 17-Oct-2021
  • (2020)Predicate Abstraction and CEGAR for Validity CheckingStatic Analysis10.1007/978-3-030-65474-0_7(134-155)Online publication date: 18-Nov-2020
  • (2019)Combining higher-order model checking with refinement type inferenceProceedings of the 2019 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/3294032.3294081(47-53)Online publication date: 14-Jan-2019
  • (2018)Nondeterministic Manifest ContractsProceedings of the 20th International Symposium on Principles and Practice of Declarative Programming10.1145/3236950.3236964(1-13)Online publication date: 3-Sep-2018
  • (2018)A Fixpoint Logic and Dependent Effects for Temporal Property VerificationProceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/3209108.3209204(759-768)Online publication date: 9-Jul-2018
  • (2017)Relatively complete refinement type system for verification of higher-order non-deterministic programsProceedings of the ACM on Programming Languages10.1145/31581002:POPL(1-29)Online publication date: 27-Dec-2017
  • (2017)Higher-order constrained horn clauses for verificationProceedings of the ACM on Programming Languages10.1145/31580992:POPL(1-28)Online publication date: 27-Dec-2017
  • Show More Cited By

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media