Towards a Software Model Checker for ML. Naoki Kobayashi Tohoku University

Similar documents
Predicate Abstraction and CEGAR for Higher Order Model Checking

Verifying Liveness Properties of ML Programs

Programming Languages

Predicate Refinement Heuristics in Program Verification with CEGAR

Programming Languages Lecture 14: Sum, Product, Recursive Types

Simply-Typed Lambda Calculus

Harvard School of Engineering and Applied Sciences Computer Science 152

Negations in Refinement Type Systems

CS131 Typed Lambda Calculus Worksheet Due Thursday, April 19th

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Having a BLAST with SLAM

The Safe λ-calculus. William Blum. Joint work with C.-H. Luke Ong. BCTCS, 2 5 April Oxford University Computing Laboratory

Finite Model Generation for Isabelle/HOL Using a SAT Solver

CMSC 330: Organization of Programming Languages

Verification of Higher-Order Computation: A Game-Semantic Approach

CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008

CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011

Programming Language Features. CMSC 330: Organization of Programming Languages. Turing Completeness. Turing Machine.

CMSC 330: Organization of Programming Languages

Having a BLAST with SLAM

Lecture #13: Type Inference and Unification. Typing In the Language ML. Type Inference. Doing Type Inference

Programming Languages Lecture 15: Recursive Types & Subtyping

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011

1 Introduction. 3 Syntax

CS-XXX: Graduate Programming Languages. Lecture 9 Simply Typed Lambda Calculus. Dan Grossman 2012

Research Collection. Formal background and algorithms. Other Conference Item. ETH Library. Author(s): Biere, Armin. Publication Date: 2001

CS-XXX: Graduate Programming Languages. Lecture 17 Recursive Types. Dan Grossman 2012

Introduction to System F. Lecture 18 CS 565 4/20/09

Model Checking Revision: Model Checking for Infinite Systems Revision: Traffic Light Controller (TLC) Revision: 1.12

Lists. Michael P. Fourman. February 2, 2010

HECTOR: An Equivalence Checker for a Higher-Order Fragment of ML

Typed Lambda Calculus and Exception Handling

A Brief Introduction to Standard ML

Compositional Software Model Checking

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan

Static Program Analysis

CSE-505: Programming Languages. Lecture 20.5 Recursive Types. Zach Tatlock 2016

MPRI course 2-4 Functional programming languages Exercises

Having a BLAST with SLAM

More on Verification and Model Checking

Processes as Types: A Generic Framework of Behavioral Type Systems for Concurrent Processes

Mini-ML. CS 502 Lecture 2 8/28/08

5. Introduction to the Lambda Calculus. Oscar Nierstrasz

CSCI-GA Scripting Languages

Verifying Safety Property of Lustre Programs: Temporal Induction

CSE-321 Programming Languages 2012 Midterm

On Reasoning about Finite Sets in Software Checking

Having a BLAST with SLAM

Higher-Order Model Checking

CSE505, Fall 2012, Midterm Examination October 30, 2012

Recursion Schemes, Games, and Model Checking of Higher-Order Computation

Recursive Definitions, Fixed Points and the Combinator

Programming Language Concepts: Lecture 19

Software Model Checking. From Programs to Kripke Structures

Review. CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Let bindings (CBV) Adding Stuff. Booleans and Conditionals

Higher-Order Logic. Specification and Verification with Higher-Order Logic

Part VI. Imperative Functional Programming

COS 320. Compiling Techniques

Counterexample Guided Abstraction Refinement in Blast

Polymorphism. Lecture 19 CS 565 4/17/08

Lambda Calculus and Type Inference

Program verification. Generalities about software Verification Model Checking. September 20, 2016

Software Model Checking with Abstraction Refinement

The design of a programming language for provably correct programs: success and failure

Lecture Notes on Program Equivalence

Programming Languages Assignment #7

Metaprogramming assignment 3

CSE-321 Programming Languages 2011 Final

Lecture Note: Types. 1 Introduction 2. 2 Simple Types 3. 3 Type Soundness 6. 4 Recursive Types Subtyping 17

Lecture 2: Symbolic Model Checking With SAT

Lecture #23: Conversion and Type Inference

Conversion vs. Subtyping. Lecture #23: Conversion and Type Inference. Integer Conversions. Conversions: Implicit vs. Explicit. Object x = "Hello";

Talen en Compilers. Jurriaan Hage , period 2. November 13, Department of Information and Computing Sciences Utrecht University

Lambda Calculus as a Programming Language

Functional Programming

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

More Lambda Calculus and Intro to Type Systems

Lecture 13: Subtyping

4/24/18. Overview. Program Static Analysis. Has anyone done static analysis? What is static analysis? Why static analysis?

Integration of SMT Solvers with ITPs There and Back Again

CS 510/13. Predicate Abstraction

1KOd17RMoURxjn2 CSE 20 DISCRETE MATH Fall

λ calculus is inconsistent

Formal Methods. CITS5501 Software Testing and Quality Assurance

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

Semantic Subtyping with an SMT Solver

Software Model Checking. Xiangyu Zhang

CMSC 330: Organization of Programming Languages

Homework 3 COSE212, Fall 2018

Graph Query Verification using Monadic 2 nd -Order Logic

Program Static Analysis. Overview

Combining Programming with Theorem Proving

CMSC 330: Organization of Programming Languages. Operational Semantics

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis

Consistent Subtyping for All

No model may be available. Software Abstractions. Recap on Model Checking. Model Checking for SW Verif. More on the big picture. Abst -> MC -> Refine

Functional programming languages

Exercise 1 ( = 22 points)

Exercise 1 ( = 24 points)

Dynamic Types, Concurrency, Type and effect system Section and Practice Problems Apr 24 27, 2018

Transcription:

Towards a Software Model Checker for ML Naoki Kobayashi Tohoku University Joint work with: Ryosuke Sato and Hiroshi Unno (Tohoku University) in collaboration with Luke Ong (Oxford), Naoshi Tabuchi and Takeshi Tsukada (Tohoku)

This Talk Overview of our project to construct: Software Model Checker for ML, based on higher-order model checking (or, model checking of higher-order recursion schemes)

Outline Introduction to higher-order model checking What are higher-order recursion schemes? What are model checking problems? Applications to program verification Verification of higher-order boolean programs Dealing with infinite data domains (integers, lists,...) Towards a full-scale model checker for ML Conclusion

Higher-Order Recursion Scheme Grammar for generating an infinite tree Order-0 scheme (regular tree grammar) S a c B B b S S a a a c B c b c S c S a B b c B S... a c b a b c b a a B c b

Higher-Order Recursion Scheme Grammar for generating an infinite tree Tree whose paths Order-1 scheme are labeled by a S A c m+1 b m c A x a x (A (b x)) c S: o, A: o o S A c a a... c A(b c) c a b A(b(b c)) c a b c a b b c a b b b c a...

Higher-Order Recursion Scheme Grammar for generating an infinite tree Order-1 scheme S A c A x a x (A (b x)) S: o, A: o o Higher-order recursion schemes Call-by-name simply-typed λ-calculus + recursion, tree constructors

Model Checking Recursion Schemes Given G: higher-order recursion scheme A: alternating parity tree automaton (APT) (a formula of modal μ-calculus or MSO), does A accept Tree(G)? e.g. - Does every finite path end with c? - Does a occur below b?

Higher-Order Recursion Scheme Grammar for generating an infinite tree Order-1 scheme S A c a A x a x (A (b x)) S: o, A: o o Q1. Does every finite path end with c? YES! c b c a b b a b a... Q2. Does a occur below b? NO! c b b c

Model Checking Recursion Schemes Given G: higher-order recursion scheme A: alternating parity tree automaton (APT) (a formula of modal μ-calculus or MSO), does A accept Tree(G)? e.g. - Does every finite path end with c? - Does a occur eventually whenever b occurs? k-exptime-complete [Ong, LICS06] (for order-k recursion scheme) 2 p(x) 2.. 2

TRecS [K., PPDP09] http://www.kb.ecei.tohoku.ac.jp/~koba/trecs/ - First model checker for recursion schemes, restricted to safety property checking - Based on reduction from higher-order model checking to type checking - Uses a practical algorithm that does not always suffer from k-exptime bottleneck

(Non-exhaustive) History 70s: (1 st -order) Recursive program schemes [Nivat;Coucelle-Nivat;...] 70-80s: Studies of high-level grammars [Damm; Engelfriet;..] 2002: Model checking of higher-order recursion schemes [Knapik-Niwinski-Urzyczyn02FoSSaCS] Decidability for safe recursion schemes 2006: Decidability for arbitrary recursion schemes [Ong06LICS] 2009: Model checker for higher-order recursion schemes [K09PPDP] Applications to program verification [K09POPL]

Outline Introduction to higher-order model checking What are higher-order recursion schemes? What are model checking problems? Applications to program verification Verification of higher-order boolean programs Rechability Temporal properties Dealing with infinite data domains (integers, lists,...) Towards a full-scale model checker for ML

Reachability verification for higher-order boolean programs Theorem: Given a closed term M of (call-by-name or call-by-value) simply-typed λ-calculus with: recursion finite base types (including booleans and special constant fail ) non-determinism, it is decidable whether M * fail Proof: Translate M into a recursion scheme G s.t. M * fail if and only if Tree(G) contains fail.

Example fun repeateven f x = if then x else f (repeatodd f x) fun repeatodd f x = f (repeateven f x) fun main( ) = if (repeateven not true) then ( ) else fail Higher-order recursion scheme that generates the tree containing all the possible outputs: + end + end + end...

Example fun repeateven f x = if then x else f (repeatodd f x) fun repeatodd f x = f (repeateven f x) fun main( ) = if (repeateven not true) then ( ) else fail call-by-value CPS + encoding of booleans RepeatEven k f x If TF (k x) (RepeatOdd (f k) f x) RepeatOdd k f x RepeatEven (f k) f x Main RepeatEven C Not True Generated tree C b If b end fail + Not k b If b (k False) (k True) If b x y b x y end + encoding of booleans True x y x False x y y bool end + = o->o->o TF x y + x y end...

Outline Introduction to higher-order model checking What are higher-order recursion schemes? What are model checking problems? Applications to program verification Verification of higher-order boolean programs Rechability Temporal properties Dealing with infinite data domains (integers, lists,...) Current status and remaining challenges

Verification of temporal properties by higher-order model checking [K. POPL 2009] Higher-order program + specification Program Transformation Rec. scheme (describing all event sequences) + Tree automaton, recognizing valid event sequences Model Checking

From Program Verification to Model Checking: Example let f(x) = if then close(x) else read(x); f(x) in let y = open foo in f (y) Is the file foo accessed according to read* close? F x k + (c k) (r(f x k)) S F d + c c r + c r + r... Is each path of the tree labeled by r*c?

From Program Verification continuation to parameter, Model Checking: expressing how foo is accessed after the call returns Example let f(x) = if then close(x) else read(x); f(x) in let y = open foo in f (y) Is the file foo accessed according to read* close? F x k + (c k) (r(f x k)) S F d + CPS c Transformation! c r + c r + r... Is each path of the tree labeled by r*c?

From Program Verification to Model Checking: Example let f(x) = if then close(x) else read(x); f(x) in let y = open foo in f (y) Is the file foo accessed according to read* close? F x k + (c k) (r(f x k)) S F d + c c r + c r + r... Is each path of the tree labeled by r*c?

From Program Verification to Model Checking: Example let f(x) = if then close(x) else read(x); f(x) in let y = open foo in f (y) Is the file foo accessed according to read* close? F x k + (c k) (r(f x k)) S F d + c c r + c r + r... Is each path of the tree labeled by r*c?

From Program Verification to Model Checking: Example let f(x) = if then close(x) else read(x); f(x) in let y = open foo in f (y) Is the file foo accessed according to read* close? F x k + (c k) (r(f x k)) S F d + c c r + c r + r... Is each path of the tree labeled by r*c?

Program Verification by Higher-order Model Checking Higher-order program + specification Program Transformation Rec. scheme (describing all event sequences) + automaton for infinite trees Model Checking Sound, complete, and automatic for: - A large class of higher-order programs: finitary PCF (simply-typed λ-calculus + recursion + finite base types) - A large class of verification problems: resource usage verification (or typestate checking), reachability, flow analysis,...

Comparison with Other Model Checking Program Classes Programs with while-loops Programs with 1 st -order recursion Higher-order functional programs with arbitrary recursion Verification Methods Finite state model checking Pushdown model checking Higher-order model checking infinite state model checking

Outline Introduction to higher-order model checking What are higher-order recursion schemes? What are model checking problems? Applications to program verification Verification of higher-order boolean programs Dealing with infinite data domains (integers, lists,...) Current status and remaining challenges

Dealing with Infinite Data Domains Abstractions of data structures by tree automata [K.,Tabuchi&Unno, POPL 2010] Predicate abstraction and CEGAR [K-Sato-Unno, PLDI 2011] (c.f. BLAST, SLAM, )

f(g,x)=g(x+1) λx.x>0 Predicate Abstraction and CEGAR for Higher-Order Model Checking Higher-order functional program Predicate abstraction New predicates Program is unsafe! Real error path? yes Error path Higher-order boolean program F(g, b)= if b then g(true) else g( ) Higher-order model checking property not satisfied property satisfied Program is safe!

What are challenges? Predicate abstraction How to consistently abstract a program, so that the resulting HOBP is a safe abstraction? let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) CEGAR (counterexample-guided abstraction refinement) How to find new predicates to abstract each term to guarantee progress (i.e. any spurious counterexample is eliminated)?

What are challenges? Predicate abstraction How to consistently abstract a program, so that the resulting HOBP is a safe abstraction? let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) Abstracted with λx.x m How to find new predicates to abstract each term to guarantee progress (i.e. any spurious counterexample is eliminated)? CEGAR

What are challenges? Predicate abstraction Should be abstracted How to consistently abstract a program, with λx.x n so that the resulting HOBP is a safe abstraction? Abstracted with λx.x m How to find new predicates to abstract each term to guarantee progress (i.e. any spurious counterexample is eliminated)? CEGAR let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m))

What are challenges? Predicate abstraction Should be abstracted How to consistently abstract a program, with λx.x n so that the resulting HOBP is a safe abstraction? CEGAR let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) Abstracted with λx.x m Should be abstracted with λx.x n-1 How to find new predicates to abstract each term to guarantee progress (i.e. any spurious counterexample is eliminated)?

Abstraction Types as Abstraction Interface int[p 1,...,P n ] Integers that should be abstracted by P 1,...,P n e.g. 3: int[λx.x>0, even?] (true, false) x:int[p 1,...,P n ] int[q 1,...,Q m ] Assuming that argument x is abstracted by P 1,...,P n, x>0? abstract the return value by Q 1,...,Q m e.g. λx.x+x: (x:int[λx.x>0] int[λy.y>x]) λb.b λx.x+x: (x:int[λx.x>1, even?] int[λy.y>0]) x+x>x? λ(b 1,b 2 ).if b 1 then true else

Type-based Predicate Abstraction Γ M 1 : (x:τ 2 τ ) N 1 Γ M 2 :τ 2 N 2 Γ M 1 M 2 :[M 2 /x]τ N 1 N 2 source program abstraction type abstract program Γ, x:τ x M: τ N Γ λx.m: (x:τ x τ ) λx.n

Type-based Predicate Abstraction Γ M 1 : (x:τ 2 τ ) N 1 Γ M 2 :τ 2 N 2 Γ M 1 M 2 :[M 2 /x]τ N 1 N 2 Γ, x:τ x M: τ N Γ λx.m: (x:τ x τ ) λx.n

Example (predicate abstraction) let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) Abstraction type environment: sum: (n:int[] (int[λx.x n] ) ) let sum n k = if then k true else sum ( ) (λb.k(if b then true else )) in sum ( ) (λb.assert(b))

Example (predicate abstraction) let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) Abstraction type environment: sum: (n:int[] (int[λx.x n] ) ) let sum n k = if then k true else sum ( ) (λb.k(if b then true else )) in sum ( ) (λb.assert(b))

Example (predicate abstraction) let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) Abstraction type environment: sum: (n:int[] (int[λx.x n] ) ) let sum n k = if then k true else sum ( ) (λb.k(if b then true else )) in sum ( ) (λb.assert(b))

Example (predicate abstraction) let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) Abstraction type environment: sum: (n:int[] (int[λx.x n] ) ) let sum n k = if then k true else sum ( ) (λb.k(if b then true else )) in sum ( ) (λb.assert(b))

Example (predicate abstraction) let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) Abstraction type environment: sum: (n:int[] (int[λx.x n] ) ) let sum n k = if then k true else sum ( ) (λb.k(if b then true else )) in sum ( ) (λb.assert(b)) x n-1

Example (predicate abstraction) let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) Abstraction type environment: sum: (n:int[] (int[λx.x n] ) ) let sum n k = if then k true else sum ( ) (λb.k(if b then true else )) in sum ( ) (λb.assert(b)) x n-1

Predicate Abstraction and CEGAR for Higher-Order Model Checking Higher-order functional program Predicate abstraction New New abstraction predicates types Program is unsafe! Real error path? yes Error path Higher-order boolean program Higher-order model checking property not satisfied property satisfied Program is safe!

Finding new abstraction types from a spurious error path Reduction to a dependent type inference problem for SHP (straightline higher-order program) that exactly corresponds to the spurious path Source program + SHP Spurious error path (a kind of) slicing dependent type inference New abstraction types

Example (predicate discovery) let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) sum: (n:int[] (int[ ] ) ) let sum n k = if then k ( ) else sum ( ) (λx.k ( )) in sum ( ) (λx.assert( )) spurious error path (with k = λx.assert(*) ): sum ( ) k if then k( ) else... k( ) assert(*) fail

Example (predicate discovery) let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx.assert(x m)) Spurious error path: sum ( ) k if then k( ) else... k( ) assert( ) fail

Example (predicate discovery) let sum n k = if n 0 then k 0 else sum (n-1) (λx.k(x+n)) in sum m (λx. if x m then () else fail) Spurious error path: sum ( ) k if then k( ) else... k( ) assert( ) fail Straightline higher-order program (SHP): let sum n k = if (n 0) then k 0 else _ in sum m (λx.if x m then _ else fail) Dependent type inference with interpolants [Unno&K. PPDP09] Typing for SHP: sum: (n:int ({x:int x n} ) Abstraction type: sum: (n:int[] (x:int[λx.x n] )

Predicate Abstraction and CEGAR for Higher-Order Model Checking Higher-order functional program Predicate abstraction New New abstraction predicates types Program is unsafe! Real error path? yes Error path Higher-order boolean program Higher-order model checking property not satisfied property satisfied Program is safe!

Summary (up to this point) Higher-order model checking provides a sound and complete verification method for higher-order boolean programs Combination with predicate abstraction and CEGAR provides a sound verification method for simply-typed higher-order programs Dependent types are used in the background

Outline Introduction to higher-order model checking What are higher-order recursion schemes? What are model checking problems? Applications to program verification Verification of higher-order boolean programs Dealing with infinite data domains (integers, lists,...) Current status and remaining challenges Conclusion

Current Status of MoCHi Reachability verification for: Call-by-value simply-typed λ-calculus with recursion, booleans and integers (or, call-by-value PCF) Ongoing work to support: Exceptions Algebraic data types

How far is the goal? ( software model checker for ML ) Missing features: algebraic data types exceptions let-polymorphism modules references Scalability problems Inline let-definitions or use intersection types bottleneck: predicate discovery and higher-order model checking

How far is the goal? ( software model checker for ML ) Missing features: algebraic data types exceptions let-polymorphism modules references Scalability problems exception handlers as auxiliary continuations bottleneck: predicate discovery and higher-order model checking

Dealing with Exceptions Extend CPS transformation by: [try e 1 with x e 2 ] k h = [e 1 ] k (λx.[e 2 ]k h) [raise e] k h = [e] h h Ordinary continuation Exception handler

How far is the goal? ( software model checker for ML ) Missing features: algebraic data types exceptions let-polymorphism modules references Scalability problems bottleneck: predicate discovery and higher-order model checking

Dealing with algebraic data types Algebraic data types as functions [ τ list ] = int (int [τ] ) nil = (0, λx. fail ) cons = λx.λ(len,f). (len+1, λi.if i=0 then x else f(i-1)) hd (len,f) = f(0) tl (len, f) = assert(len>0); (len-1, λi. f(i+1)) Pros: - Can reuse predicate abstraction and cegar for integers - Generalization of container abstraction [Dillig-Dillig-Aiken] Cons: length function from indices to elements - More burden on model checker and cegar

How far is the goal? ( software model checker for ML ) Missing features: algebraic data types exceptions let-polymorphism modules references Scalability problem store passing (and stores as functions)? bottleneck: predicate discovery and higher-order model checking

Problems on Predicate Abstraction and Discovery Too specific predicates are discovered let copy n = if n=0 then 0 else 1+copy(n-1) in assert(copy(copy m) = m) - discovered predicates (for return values) r=0, r=1, r=2,... - what we want: r=n (for argument n) Supported predicates are limited only linear constraints on base types let rec rev l = (* list reverse *) in assert(rev(rev l) = l)

How far is the goal? ( software model checker for ML ) Missing features: algebraic data types exceptions let-polymorphism modules references Scalability problems bottleneck: predicate discovery and higher-order model checking

Higher-Order Model Checker TRecS [PPDP09]: Current Status Can verify recursion schemes of a few hundred lines in a few seconds Can become a bottleneck if: The order of a program is very high (after CPS) Direct support of call-by-value semantics? Many irrelevant predicates are used in abstractions BDD-like implementation techniques?

FAQ Does HO model checking scale? (It shouldn t, because of k-exptime completeness) Answer: Don t know yet. But there is a good hope it does, because: (i) worst-case complexity is linear time in the program size (for safety properties) (AQ) 1+ε 2.. 2 2 O( G ) (ii) the worst-case behavior seems to come from the expressive power of higher-order functions

Recursion schemes generating m 2 a c Order-1: S F S F 1 1 c, c, FF 1 1 x F x F 2 (F 2 (F 2 2 x),..., x),..., FF m m x a(a x a(a x) x) Order-0: S a G 1, G 1 a G 2,..., G n c (n=2 m ) Exponential time algorithm for order-1 Polynomial time algorithm for order-0

Recursion schemes generating m 2 a c Order-1: S F S F 1 1 c, c, FF 1 1 x F x F 2 (F 2 (F 2 2 x),..., x),..., FF m m x a(a x a(a x) x) Order-0: S a G 1, G 1 a G 2,..., G n c (n=2 m ) k-exptime algorithm for order-k Polynomial time algorithm for order-0

Recursion schemes generating m 2 a c Order-1: S F S F 1 1 c, c, FF 1 1 x F x F 2 (F 2 (F 2 2 x),..., x),..., FF m m x a(a x a(a x) x) Order-0: S a G 1, G 1 a G 2,..., G n c (n=2 m ) (fixed-parameter) Polynomial time algorithm for order-k [K11FoSSaCS] >> Polynomial time algorithm for order-0

FAQ Does HO model checking scale? (It shouldn t, because of n-exptime completeness) Answer: Don t know yet. But there is a good hope it does, because: (i) worst-case complexity is linear time in the program size (for safety properties) (ii) the worst-case behavior seems to come from the expressive power of higher-order functions

Outline Introduction to higher-order model checking What are higher-order recursion schemes? What are model checking problems? Applications to program verification Verification of higher-order boolean programs Dealing with infinite data domains (integers, lists,...) Current status and remaining challenges Conclusion

Conclusion Higher-order model checking is useful for verification of functional programs MoCHi: software model checker for a tiny subset of ML A long way to construct a scalable, full-scale software model checker for ML Support of more features: algebraic data structures,... Better predicate abstraction and discovery Better algorithms and implementations of higher-order model checker Modular verification Exciting research topics for the next decade!

A short survey: [K, LICS11] References Applications to program verification [K,POPL09] [K&Tabuchi&Unno, POPL10] [K&Sato&Unno, PLDI11] From model checking to type checking [K,POPL09] [K&Ong,LICS09] [Tsukada&K, FoSSaCS10] HO model checking algorithms [K, PPDP09] [K, FoSSaCS11] Complexity of HO model checking [K&Ong, ICALP09]