Type-based Data Structure Verification

被引:7
|
作者
Kawaguchi, Ming [1 ]
Rondon, Patrick [1 ]
Jhala, Ranjit [1 ]
机构
[1] Univ Calif San Diego, San Diego, CA 92103 USA
关键词
Languages; Reliability; Verification; Dependent Types; Hindley-Milner; Predicate Abstraction; Type Inference;
D O I
10.1145/1543135.1542510
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present a refinement type-based approach for the static verification of complex data structure invariants. Our approach is based on the observation that complex data structures are typically fashioned from two elements: recursion (e.g., lists and trees), and maps (e.g., arrays and hash tables). We introduce two novel type-based mechanisms targeted towards these elements: recursive refinements and polymorphic refinements. These mechanisms automate the challenging work of generalizing and instantiating rich universal invariants by piggybacking simple refinement predicates on top of types, and carefully dividing the labor of analysis between the type system and an SMT solver [6]. Further, the mechanisms permit the use of the abstract interpretation framework of liquid type inference [ 22] to automatically synthesize complex invariants from simple logical qualifiers, thereby almost completely automating the verification. We have implemented our approach in DSOLVE, which uses liquid types to verify OCAML programs. We present experiments that show that our type-based approach reduces the manual annotation required to verify complex properties like sortedness, balancedness, binary-search-ordering, and acyclicity by more than an order of magnitude.
引用
收藏
页码:304 / 315
页数:12
相关论文
共 50 条
  • [1] Type-based Data Structure Verification
    Kawaguchi, Ming
    Rondon, Patrick
    Jhala, Ranjit
    PLDI'09 PROCEEDINGS OF THE 2009 ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2009, : 304 - 315
  • [2] Type-based verification of electronic voting protocols
    Cortier, Véronique
    Eigner, Fabienne
    Kremer, Steve
    Maffei, Matteo
    Wiedling, Cyrille
    Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2015, 9036 : 303 - 323
  • [3] ADsafety: Type-based verification of javascript sandboxing
    Politz, Joe Gibbs
    Eliopoulos, Spiridon Aristides
    Guha, Arjun
    Krishnamurthi, Shriram
    Proceedings of the 20th USENIX Security Symposium, 2011, : 171 - 186
  • [4] Type-Based Automated Verification of Authenticity in Cryptographic Protocols
    Kikuchi, Daisuke
    Kobayashi, Naoki
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2009, 5502 : 222 - 236
  • [5] Type-based verification of correspondence assertions for communication protocols
    Kikuchi, Daisuke
    Kobayashi, Naoki
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2007, 4807 : 191 - 205
  • [6] Type-Based Verification of Connectivity Constraints in Lattice Surgery
    Wakizaka, Ryo
    Suzuki, Yasunari
    Igarashi, Atsushi
    PROGRAMMING LANGUAGES AND SYSTEMS, APLAS 2024, 2025, 15194 : 216 - 237
  • [7] Type-based compression of XML data
    League, Christopher
    Eng, Kenjone
    DCC 2007: DATA COMPRESSION CONFERENCE, PROCEEDINGS, 2007, : 273 - +
  • [8] Type-Based Automated Verification of Authenticity in Asymmetric Cryptographic Protocols
    Dahl, Morten
    Kobayashi, Naoki
    Sun, Yunde
    Huttel, Hans
    AUTOMATED TECHNOLOGY FOR VERIFICATION AND ANALYSIS, 2011, 6996 : 75 - +
  • [9] Covering All the Bases: Type-Based Verification of Test Input Generators
    Zhou, Zhe
    Mishra, Ashish
    Delaware, Benjamin
    Jagannathan, Suresh
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (PLDI):
  • [10] Type-based confinement
    Zhao, T
    Palsberg, J
    Vitek, J
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2006, 16 (83-128) : 83 - 128