Naoki Kobayashi 0001

dblp:k/NaokiKobayashi · DBLP profile ↗
← Back
142ranked-venue papers
53as first author
27since 2021 · last 2026
0000-0002-0537-0604ORCID · verified

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 96 · 31 first-author · 21 since 2021Theory of computation · 54 · 27 first-author · 6 since 2021Artificial intelligence and machine learning · 2 · 1 since 2021Databases, data management, data science and information retrieval · 2Graphics, computer vision, multimedia, augmented reality and games · 2Applied, interdisciplinary, general and emerging computing · 1 · 1 first-author
YearPublicationVenuePosition
2026 Automatic Detection of Reference Counting Bugs in Linux Kernel Drivers
abstract
Abstract Reference counting bugs in Linux kernel drivers can lead to severe resource mismanagement and security vulnerabilities. We introduce DrvHorn , a novel automated tool to detect these bugs by reducing reference counting verification to an assertion checking problem leveraging the Linux driver interface. Through efficient modeling of the Linux kernel and aggressive program slicing, DrvHorn discovered 545 bugs, of which 424 were previously unknown, across all platform drivers in v6.6 Linux kernel, with a lower false positive rate of 29.9% compared to prior studies. To address the root causes of these newly discovered bugs, we submitted patches to the Linux kernel, and 45 of them were merged.
Joe Hattori, Naoki Kobayashi 0001, Ken Sakayori
CAV (3)2
2026 Prophecy-Based Automated Verification of Message-Passing Programs
abstract
We propose a fully automated method for verifying functional correctness of message-passing concurrent programs by reducing verification problems to constrained Horn clause (CHC) solving. Inspired by RustHorn's prophecy-based technique, we represent each sender channel by a list of values to be sent over the channel in the future, which enables modular encoding of sender and receiver threads in CHCs. To capture causal dependencies between different channels, we further attach timestamps to messages. We prove that the resulting reduction is sound and complete: a program is free from assertion failures if and only if the corresponding system of CHCs is satisfiable. We have also implemented a prototype verifier for Rust-like programs and experimentally confirmed the effectiveness of the approach.
Takashi Nagatomi, Musashi Katsura, Naoki Kobayashi 0001, Yusuke Matsushita 0002, Ken Sakayori
CONCUR3
2026 Relational Hoare Logic for High-Level Synthesis of Hardware Accelerators
Izumi Tanaka, Ken Sakayori, Shinya Takamaeda-Yamazaki, Naoki Kobayashi 0001
ESOP (2)4
2026 Solvable Tuple Patterns and Their Applications to Program Verification
abstract
Despite the recent progress of automated program verification techniques, fully automated verification of programs manipulating recursive data structures remains a challenge. We introduce solvable tuple patterns (STPs) and conjunctive STPs (CSTPs), novel formalisms for expressing and inferring invariants between list-like recursive data structures. A distinguishing feature of STPs is that they can be efficiently inferred from only a small number of positive samples; no negative samples are required. After presenting properties and inference algorithms of STPs and CSTPs, we show how to incorporate the CSTP inference into a CHC (Constrained Horn Clauses) solver supporting list-like data structures, which serves as a uniform backend for automated program verification tools. A CHC solver incorporating the (C)STP inference has won the ADT-LIN category of CHC-COMP 2025 by a significant margin.
Naoki Kobayashi 0001, Ryosuke Sato 0001, Ayumi Shinohara, Ryo Yoshinaka
Proc. ACM Program. Lang.1
2025 On the Relationship between Dijkstra Monads and Higher-Order Fixpoint Logic
abstract
Abstract We study the relationship between two approaches to higher-order program verification: a semi-automated method using Dijkstra monads and a fully automated method using a higher-order fixpoint logic called HFL(Z). Although the origins of both approaches are quite different, there are some striking similarities: both convert programs to corresponding predicate transformers, and the conversion is essentially obtained by a CPS transformation. After reviewing the two approaches, we formalize an exact correspondence between the two for a restricted fragment of a functional language. We also point out that, outside the restricted fragment, there are some important differences between the two approaches, suggesting the need for cross-fertilization to obtain the best of the two approaches. As an example of the cross-fertilization, we also propose a semi-automated verification method, which requires less annotations than the Dijkstra monad approach and can scale to larger programs than the HFL(Z) approach.
Risa Yamada, Naoki Kobayashi 0001, Ken Sakayori, Ryosuke Sato 0001
ESOP (2)2
2025 Learning Simple Interpolants for Linear Integer Arithmetic
abstract
Craig interpolation plays a central role in formal verification tasks such as model checking, invariant generation, and abstraction refinement. In the domain of linear integer arithmetic (LIA), interpolants are crucial for deriving inductive invariants that characterize unreachable or safe program states, enabling scalable and precise reasoning about software and hardware correctness. Despite progress in interpolation algorithms, generating concise and interpretable interpolants remains a key challenge. We propose a lightweight learning-based approach to generating simple interpolants for LIA. Our model learns to lazily sample input problems directly and is complementary to existing logical methods. When Z3 is guided by our learned model, the complexity of the interpolants it produces can be reduced by up to 47.3%. For older solvers, the reduction rate can reach up to 69.1%.
Minchao Wu, Naoki Kobayashi 0001
NeurIPS2
2025 Automated Catamorphism Synthesis for Solving Constrained Horn Clauses over Algebraic Data Types
Hiroyuki Katsura, Naoki Kobayashi 0001, Ken Sakayori, Ryosuke Sato 0001
SAS2
2025 Towards neural-network-guided program synthesis and verification
abstract
Abstract We propose a novel framework of program and invariant synthesis called neural network-guided synthesis ( NeuGuS ). We first show that, by suitably designing and training neural networks, we can extract logical formulas over integers from the weights and biases of the trained neural networks. Based on the idea, we have implemented a tool to synthesize formulas from positive/negative examples and implication constraints, and obtained promising experimental results. We also discuss two applications of our synthesis method. One is the use of our tool for qualifier discovery in the framework of ICE-learning-based CHC solving, which can in turn be applied to program verification and inductive invariant synthesis. Another application is to a new program development framework called oracle-based programming, which is a neural-network-guided variation of Solar-Lezama’s program synthesis by sketching.
Naoki Kobayashi 0001, Taro Sekiyama, Issei Sato, Hiroshi Unno 0001
Formal Methods Syst. Des.1
2025 On Decidable and Undecidable Extensions of Simply Typed Lambda Calculus
abstract
The decidability of the reachability problem for finitary PCF has been used as a theoretical basis for fully automated verification tools for functional programs. The reachability problem, however, often becomes undecidable for a slight extension of finitary PCF with side effects, such as exceptions, algebraic effects, and references, which hindered the extension of the above verification tools for supporting functional programs with side effects. In this paper, we first give simple proofs of the undecidability of four extensions of finitary PCF, which would help us understand and analyze the source of undecidability. We then focus on an extension with references, and give a decidable fragment using a type system. To our knowledge, this is the first non-trivial decidable fragment that features higher-order recursive functions containing reference cells.
Naoki Kobayashi 0001
Proc. ACM Program. Lang.1
2024 Mode-based Reduction from Validity Checking of Fixpoint Logic Formulas to Test-Friendly Reachability Problem
Hiroyuki Katsura, Naoki Kobayashi 0001, Ken Sakayori, Ryosuke Sato 0001
APLAS2
2024 Productivity Verification for Functional Programs by Reduction to Termination Verification
abstract
A program generating a co-inductive data structure is called productive if the program eventually generates all the elements of the data structure. We propose a new method for verifying the productivity, which transforms a co-inductive data structure into a function that takes a path as an argument and returns the corresponding element. For example, an infinite binary tree is converted to a function that takes a sequence consisting of 0 (left) and 1 (right), and returns the element in the specified position, and a stream is converted into a function that takes a sequence of the form 0^n (or, simply a natural number n) and returns the n-th element of the stream. A stream-generating program is then productive just if the function terminates for every n. The transformation allows us to reduce the productivity verification problem to the termination problem for call-by-name higher-order functional programs without co-inductive data structures. We formalize the transformation and prove its correctness. We have implemented an automated productivity checker based on the proposed method, by extending an automated HFL(Z) validity checker, which can be used as a termination checker.
Ren Fukaishi, Naoki Kobayashi 0001, Ryosuke Sato 0001
PEPM2
2024 Ownership Types for Verification of Programs with Pointer Arithmetic
abstract
Toman et al. have proposed a type system for automatic verification of low-level programs, which combines ownership types and refinement types to enable strong updates of refinement types in the presence of pointer aliases. We extend their type system to support pointer arithmetic, and prove its soundness. Based on the proposed type system, we have implemented a prototype tool for automated verification of the lack of assertion errors of low-level programs with pointer arithmetic, and confirmed its effectiveness through experiments.
Izumi Tanaka, Ken Sakayori, Naoki Kobayashi 0001
PEPM3
2024 Borrowable Fractional Ownership Types for Verification
Takashi Nakayama, Yusuke Matsushita 0002, Ken Sakayori, Ryosuke Sato 0001, Naoki Kobayashi 0001
VMCAI (2)5
2024 Asynchronous unfold/fold transformation for fixpoint logic
Mahmudul Faisal Al Ameen, Naoki Kobayashi 0001, Ryosuke Sato 0001
Sci. Comput. Program.2
2023 Argument Reduction of Constrained Horn Clauses Using Equality Constraints
Ryo Ikeda, Ryosuke Sato 0001, Naoki Kobayashi 0001
APLAS3
2023 Gradual Tensor Shape Checking
abstract
Abstract Tensor shape mismatch is a common source of bugs in deep learning programs. We propose a new type-based approach to detect tensor shape mismatches. One of the main features of our approach is the best-effort shape inference. As the tensor shape inference problem is undecidable in general, we allow static type/shape inference to be performed only in a best-effort manner. If the static inference cannot guarantee the absence of the shape inconsistencies, dynamic checks are inserted into the program. Another main feature is gradual typing, where users can improve the precision of the inference by adding appropriate type annotations to the program. We formalize our approach and prove that it satisfies the criteria of gradual typing proposed by Siek et al. in 2015. We have implemented a prototype shape checking tool based on our approach and evaluated its effectiveness by applying it to some deep neural network programs.
Momoko Hattori, Naoki Kobayashi 0001, Ryosuke Sato 0001
ESOP2
2023 Neural Network-Guided Synthesis of Recursive List Functions
abstract
Abstract Kobayashi et al. have recently proposed NeuGuS , a framework of neural-network-guided synthesis of logical formulas or simple program fragments, where a neural network is first trained based on data, and then a logical formula over integers is constructed by using the weights and biases of the trained network as hints. The previous method was, however, restricted the class of formulas of quantifier-free linear integer arithmetic. In this paper, we propose a NeuGuS method for the synthesis of recursive predicates over lists definable by using the left fold function. To this end, we design and train a special-purpose recurrent neural network (RNN), and use the weights of the trained RNN to synthesize a recursive predicate. We have implemented the proposed method and conducted preliminary experiments to confirm the effectiveness of the method.
Naoki Kobayashi 0001, Minchao Wu
TACAS (1)1
2023 Higher-Order Property-Directed Reachability
abstract
The property-directed reachability (PDR) has been used as a successful method for automated verification of first-order transition systems. We propose a higher-order extension of PDR, called HoPDR, where higher-order recursive functions may be used to describe transition systems. We formalize HoPDR for the validity checking problem for conjunctive nu-HFL(Z), a higher-order fixpoint logic with integers and greatest fixpoint operators. The validity checking problem can also be viewed as a higher-order extension of the satisfiability problem for Constrained Horn Clauses (CHC), and safety property verification of higher-order programs can naturally be reduced to the validity checking problem. We have implemented a prototype verification tool based on HoPDR and confirmed its effectiveness. We also compare our HoPDR procedure with the PDR procedure for first-order systems and previous methods for fully automated higher-order program verification.
Hiroyuki Katsura, Naoki Kobayashi 0001, Ryosuke Sato 0001
Proc. ACM Program. Lang.2
2023 HFL(Z) Validity Checking for Automated Program Verification
abstract
We propose an automated method for checking the validity of a formula of HFL(Z), a higher-order logic with fixpoint operators and integers. Combined with Kobayashi et al.'s reduction from higher-order program verification to HFL(Z) validity checking, our method yields a fully automated, uniform verification method for arbitrary temporal properties of higher-order functional programs expressible in the modal mu-calculus, including termination, non-termination, fair termination, fair non-termination, and also branching-time properties. We have implemented our method and obtained promising experimental results.
Naoki Kobayashi 0001, Kento Tanahashi, Ryosuke Sato 0001, Takeshi Tsukada
Proc. ACM Program. Lang.1
2022 Parameterized Recursive Refinement Types for Automated Program Verification
Ryoya Mukai, Naoki Kobayashi 0001, Ryosuke Sato 0001
SAS2
2021 Termination Analysis for the $$\pi $$-Calculus by Reduction to Sequential Program Termination
Tsubasa Shoshi, Takuma Ishikawa, Naoki Kobayashi 0001, Ken Sakayori, Ryosuke Sato 0001, Takeshi Tsukada
APLAS3
2021 Sized Types with Usages for Parallel Complexity of Pi-Calculus Processes
abstract
We address the problem of analysing the complexity of concurrent programs written in Pi-calculus. We are interested in parallel complexity, or span, understood as the execution time in a model with maximal parallelism. A type system for parallel complexity has been recently proposed by Baillot and Ghyselen but it is too imprecise for non-linear channels and cannot analyse some concurrent processes. Aiming for a more precise analysis, we design a type system which builds on the concepts of sized types and usages. The new variant of usages we define accounts for the various ways a channel is employed and relies on time annotations to track under which conditions processes can synchronize. We prove that a type derivation for a process provides an upper bound on its parallel complexity.
Patrick Baillot, Alexis Ghyselen, Naoki Kobayashi 0001
CONCUR3
2021 A Cyclic Proof System for HFL_ℕ
abstract
A cyclic proof system allows us to perform inductive reasoning without explicit inductions. We propose a cyclic proof system for HFLN, which is a higher-order predicate logic with natural numbers and alternating fixed-points. Ours is the first cyclic proof system for a higher-order logic, to our knowledge. Due to the presence of higher-order predicates and alternating fixed-points, our cyclic proof system requires a more delicate global condition on cyclic proofs than the original system of Brotherston and Simpson. We prove the decidability of checking the global condition and soundness of this system, and also prove a restricted form of standard completeness for an infinitary variant of our cyclic proof system. A potential application of our cyclic proof system is semi-automated verification of higher-order programs, based on Kobayashi et al.'s recent work on reductions from program verification to HFLN validity checking.
Mayuko Kori, Takeshi Tsukada, Naoki Kobayashi 0001
CSL3
2021 Toward Neural-Network-Guided Program Synthesis and Verification
Naoki Kobayashi 0001, Taro Sekiyama, Issei Sato, Hiroshi Unno 0001
SAS1
2021 Symbolic Automatic Relations and Their Applications to SMT and CHC Solving
Takumi Shimoda, Naoki Kobayashi 0001, Ken Sakayori, Ryosuke Sato 0001
SAS2
2021 A Probabilistic Higher-order Fixpoint Logic
abstract
We introduce PHFL, a probabilistic extension of higher-order fixpoint logic, which can also be regarded as a higher-order extension of probabilistic temporal logics such as PCTL and the $\mu^p$-calculus. We show that PHFL is strictly more expressive than the $\mu^p$-calculus, and that the PHFL model-checking problem for finite Markov chains is undecidable even for the $\mu$-only, order-1 fragment of PHFL. Furthermore the full PHFL is far more expressive: we give a translation from Lubarsky's $\mu$-arithmetic to PHFL, which implies that PHFL model checking is $\Pi^1_1$-hard and $\Sigma^1_1$-hard. As a positive result, we characterize a decidable fragment of the PHFL model-checking problems using a novel type system.
Yo Mitani, Naoki Kobayashi 0001, Takeshi Tsukada
Log. Methods Comput. Sci.2
2021 RustHorn: CHC-based Verification for Rust Programs
abstract
Reduction to satisfiability of constrained Horn clauses (CHCs) is a widely studied approach to automated program verification. Current CHC-based methods, however, do not work very well for pointer-manipulating programs, especially those with dynamic memory allocation. This article presents a novel reduction of pointer-manipulating Rust programs into CHCs, which clears away pointers and memory states by leveraging Rust’s guarantees on permission. We formalize our reduction for a simplified core of Rust and prove its soundness and completeness. We have implemented a prototype verifier for a subset of Rust and confirmed the effectiveness of our method.
Yusuke Matsushita 0002, Takeshi Tsukada, Naoki Kobayashi 0001
ACM Trans. Program. Lang. Syst.3
2020 A New Refinement Type System for Automated $\nu \text {HFL}_\mathbb {Z}$ Validity Checking
Hiroyuki Katsura, Naoki Iwayama, Naoki Kobayashi 0001, Takeshi Tsukada
APLAS3
2020 Grammar Compression with Probabilistic Context-Free Grammar
abstract
We propose a new approach for universal lossless text compression, based on grammar compression. In the literature, a target string T has been compressed as a context-free grammar G in Chomsky normal form satisfying L(G) = T. Such a grammar is often called a straight-line program (SLP). In this paper, we consider a probabilistic grammar G that generates T, but not necessarily as a unique element of L(G). In order to recover the original text T unambiguously, we keep both the grammar G and the derivation tree of T from the start symbol in G, in compressed form. We show some simple evidence that our proposal is indeed more efficient than SLPs for certain texts, both from theoretical and practical points of view.
Hiroaki Naganuma, Diptarama, Ryo Yoshinaka, Ayumi Shinohara, Naoki Kobayashi 0001
DCC5
2020 RustHorn: CHC-Based Verification for Rust Programs
abstract
Abstract Reduction to the satisfiablility problem for constrained Horn clauses (CHCs) is a widely studied approach to automated program verification. The current CHC-based methods for pointer-manipulating programs, however, are not very scalable. This paper proposes a novel translation of pointer-manipulating Rust programs into CHCs, which clears away pointers and heaps by leveraging ownership. We formalize the translation for a simplified core of Rust and prove its correctness. We have implemented a prototype verifier for a subset of Rust and confirmed the effectiveness of our method.
Yusuke Matsushita 0002, Takeshi Tsukada, Naoki Kobayashi 0001
ESOP3
2020 ConSORT: Context- and Flow-Sensitive Ownership Refinement Types for Imperative Programs
abstract
Abstract We present ConSORT, a type system for safety verification in the presence of mutability and aliasing. Mutability requires strong updates to model changing invariants during program execution, but aliasing between pointers makes it difficult to determine which invariants must be updated in response to mutation. Our type system addresses this difficulty with a novel combination of refinement types and fractional ownership types. Fractional ownership types provide flow-sensitive and precise aliasing information for reference variables. ConSORT interprets this ownership information to soundly handle strong updates of potentially aliased references. We have proved ConSORT sound and implemented a prototype, fully automated inference tool. We evaluated our tool and found it verifies non-trivial programs including data structure implementations.
John Toman, Ren Siqi, Kohei Suenaga, Atsushi Igarashi, Naoki Kobayashi 0001
ESOP5
2020 Size-Preserving Translations from Order-(n+1) Word Grammars to Order-n Tree Grammars
abstract
Higher-order grammars have recently been studied actively in the context of automated verification of higher-order programs. Asada and Kobayashi have previously shown that, for any order-(n+1) word grammar, there exists an order-n grammar whose frontier language coincides with the language generated by the word grammar. Their translation, however, blows up the size of the grammar, which inhibited complexity-preserving reductions from decision problems on word grammars to those on tree grammars. In this paper, we present a new translation from order-(n+1) word grammars to order-n tree grammars that is size-preserving in the sense that the size of the output tree grammar is polynomial in the size of an input tree grammar. The new translation and its correctness proof are arguably much simpler than the previous translation and proof.
Kazuyuki Asada, Naoki Kobayashi 0001
FSCD2
2020 A Probabilistic Higher-Order Fixpoint Logic
Yo Mitani, Naoki Kobayashi 0001, Takeshi Tsukada
FSCD2
2020 On Average-Case Hardness of Higher-Order Model Checking
abstract
To prove average-case NP-completeness for a problem, we must choose a known average-case complete problem and reduce it to that problem. Unfortunately, the set of options to choose from is far smaller than for standard (worst-case) NP-completeness. In an effort to help remedy this we focus on tag systems, which due to their extreme simplicity have been a target for other types of reductions for many problems including the matrix mortality problem, the Post correspondence problem, the universality of cellular automaton Rule 110, and all of the smallest universal single-tape Turing machines. Here we show that a tag system can efficiently simulate a Turing machine even when the input is provided in an extremely simple encoding which adds just log n carefully set bits to encode an arbitrary Turing machine input of length n. As a result we show that the bounded halting problem for nondeterministic tag systems is average-case NP-complete. This result is unexpected when one considers that in the current state of the art for simple universal systems it had appeared that there was a trade-off whereby simpler systems required more complicated input encodings. In other words, although simple systems can compute interesting things, they had appeared to require very carefully encoded inputs in order to do so. Our result surprisingly goes in the opposite direction by giving the first average-case completeness result for such a simple model of computation. In ongoing work we have already found applications of our result having used it to give average-case NP-completeness results for a 2D generalization of the Collatz function, a nondeterministic version of the 2D elementary functions studied by Koiran and Moore, 3D piecewise affine maps, and bounded Post correspondence problem instances that use simpler word pairs than previous results.
Yoshiki Nakamura 0001, Kazuyuki Asada, Naoki Kobayashi 0001, Ryoma Sin'ya, Takeshi Tsukada
FSCD3
2020 Predicate Abstraction and CEGAR for $\nu \mathrm {HFL}_\mathbb {Z}$ Validity Checking
Naoki Iwayama, Naoki Kobayashi 0001, Ryota Suzuki 0002, Takeshi Tsukada
SAS2
2020 Fold/Unfold Transformations for Fixpoint Logic
abstract
Abstract Fixpoint logics have recently been drawing attention as common foundations for automated program verification. We formalize fold/unfold transformations for fixpoint logic formulas and show how they can be used to enhance a recent fixpoint-logic approach to automated program verification, including automated verification of relational and temporal properties. We have implemented the transformations in a tool and confirmed its effectiveness through experiments.
Naoki Kobayashi 0001, Grigory Fedyukovich, Aarti Gupta
TACAS (2)1
2020 ICE-Based Refinement Type Discovery for Higher-Order Functional Programs
Adrien Champion, Tomoya Chiba, Naoki Kobayashi 0001, Ryosuke Sato 0001
J. Autom. Reason.3
2020 On the Termination Problem for Probabilistic Higher-Order Recursive Programs
Naoki Kobayashi 0001, Ugo Dal Lago, Charles Grellois
Log. Methods Comput. Sci.1
2019 A Type-Based HFL Model Checking Algorithm
Youkichi Hosoi, Naoki Kobayashi 0001, Takeshi Tsukada
APLAS2
2019 On the Termination Problem for Probabilistic Higher-Order Recursive Programs
abstract
In the last two decades, there has been much progress on model checking of both probabilistic systems and higher-order programs. In spite of the emergence of higher-order probabilistic programming languages, not much has been done to combine those two approaches. In this paper, we initiate a study on the probabilistic higher-order model checking problem, by giving some first theoretical and experimental results. As a first step towards our goal, we introduce PHORS, a probabilistic extension of higher-order recursion schemes (HORS), as a model of probabilistic higher-order programs. The model of PHORS may alternatively be viewed as a higher-order extension of recursive Markov chains. We then investigate the probabilistic termination problem -- or, equivalently, the probabilistic reachability problem. We prove that almost sure termination of order-2 PHORS is undecidable. We also provide a fixpoint characterization of the termination probability of PHORS, and develop a sound (but possibly incomplete) procedure for approximately computing the termination probability. We have implemented the procedure for order-2 PHORSs, and confirmed that the procedure works well through preliminary experiments that are reported at the end of the article.
Naoki Kobayashi 0001, Ugo Dal Lago, Charles Grellois
LICS1
2019 10 Years of the Higher-Order Model Checking Project (Extended Abstract)
abstract
We give an overview of the higher-order model checking project at the University of Tokyo. We provide references to the results obtained in the past 10 years, and explain what the project is now heading for.
Naoki Kobayashi 0001
PPDP1
2019 Temporal Verification of Programs via First-Order Fixpoint Logic
Naoki Kobayashi 0001, Takeshi Nishikawa, Atsushi Igarashi, Hiroshi Unno 0001
SAS1
2019 A Temporal Logic for Higher-Order Functional Programs
Yuya Okuyama, Takeshi Tsukada, Naoki Kobayashi 0001
SAS3
2019 Almost Every Simply Typed Lambda-Term Has a Long Beta-Reduction Sequence
abstract
It is well known that the length of a beta-reduction sequence of a simply typed lambda-term of order k can be huge; it is as large as k-fold exponential in the size of the lambda-term in the worst case. We consider the following relevant question about quantitative properties, instead of the worst case: how many simply typed lambda-terms have very long reduction sequences? We provide a partial answer to this question, by showing that asymptotically almost every simply typed lambda-term of order k has a reduction sequence as long as (k-1)-fold exponential in the term size, under the assumption that the arity of functions and the number of variables that may occur in every subterm are bounded above by a constant. To prove it, we have extended the infinite monkey theorem for strings to a parametrized one for regular tree languages, which may be of independent interest. The work has been motivated by quantitative analysis of the complexity of higher-order model checking.
Kazuyuki Asada, Naoki Kobayashi 0001, Ryoma Sin'ya, Takeshi Tsukada
Log. Methods Comput. Sci.2
2019 Inclusion between the frontier language of a non-deterministic recursive program scheme and the Dyck language is undecidable
Naoki Kobayashi 0001
Theor. Comput. Sci.1
2018 HoIce: An ICE-Based Non-linear Horn Clause Solver
Adrien Champion, Naoki Kobayashi 0001, Ryosuke Sato 0001
APLAS2
2018 Automated Synthesis of Functional Programs with Auxiliary Functions
Shingo Eguchi, Naoki Kobayashi 0001, Takeshi Tsukada
APLAS2
2018 Higher-Order Program Verification via HFL Model Checking
abstract
There are two kinds of higher-order extensions of model checking: HORS model checking and HFL model checking. Whilst the former has been applied to automated verification of higher-order functional programs, applications of the latter have not been well studied. In the present paper, we show that various verification problems for functional programs, including may/must-reachability, trace properties, and linear-time temporal properties (and their negations), can be naturally reduced to (extended) HFL model checking. The reductions yield a sound and complete logical characterization of those program properties. Compared with the previous approaches based on HORS model checking, our approach provides a more uniform, streamlined method for higher-order program verification.
Naoki Kobayashi 0001, Takeshi Tsukada, Keiichi Watanabe
ESOP1
2018 Lambda-Definable Order-3 Tree Functions are Well-Quasi-Ordered
abstract
Asada and Kobayashi [ICALP 2017] conjectured a higher-order version of Kruskal's tree theorem, and proved a pumping lemma for higher-order languages modulo the conjecture. The conjecture has been proved up to order-2, which implies that Asada and Kobayashi's pumping lemma holds for order-2 tree languages, but remains open for order-3 or higher. In this paper, we prove a variation of the conjecture for order-3. This is sufficient for proving that a variation of the pumping lemma holds for order-3 tree languages (equivalently, for order-4 word languages).
Kazuyuki Asada, Naoki Kobayashi 0001
FSTTCS2
2018 ICE-Based Refinement Type Discovery for Higher-Order Functional Programs
abstract
We propose a method for automatically finding refinement types of higher-order function programs. Our method is an extension of the Ice framework of Garg et al. for finding invariants. In addition to the usual positive and negative samples in machine learning, their Ice framework uses implication constraints, which consist of pairs (x, y) such that if x satisfies an invariant, so does y. From these constraints, Ice infers inductive invariants effectively. We observe that the implication constraints in the original Ice framework are not suitable for finding invariants of recursive functions with multiple function calls. We thus generalize the implication constraints to those of the form $$(\{x_1,\dots ,x_k\}, y)$$ , which means that if all of $$x_1,\dots ,x_k$$ satisfy an invariant, so does y. We extend their algorithms for inferring likely invariants from samples, verifying the inferred invariants, and generating new samples. We have implemented our method and confirmed its effectiveness through experiments.
Adrien Champion, Tomoya Chiba, Naoki Kobayashi 0001, Ryosuke Sato 0001
TACAS (1)3
2018 Special issue for the 42nd International Colloquium on Automata, Languages and Programming, ICALP 2015, Kyoto, Japan
Magnús M. Halldórsson, Naoki Kobayashi 0001, Bettina Speckmann
Inf. Comput.2
2017 Modular Verification of Higher-Order Functional Programs
Ryosuke Sato 0001, Naoki Kobayashi 0001
ESOP2
2017 Almost Every Simply Typed λ-Term Has a Long β-Reduction Sequence
Ryoma Sin'ya, Kazuyuki Asada, Naoki Kobayashi 0001, Takeshi Tsukada
FoSSaCS3
2017 Pumping Lemma for Higher-order Languages
abstract
We study a pumping lemma for the word/tree languages generated by higher-order grammars. Pumping lemmas are known up to order-2 word languages (i.e., for regular/context-free/indexed languages), and have been used to show that a given language does not belong to the classes of regular/context-free/indexed languages. We prove a pumping lemma for word/tree languages of arbitrary orders, modulo a conjecture that a higher-order version of Kruskal's tree theorem holds. We also show that the conjecture indeed holds for the order-2 case, which yields a pumping lemma for order-2 tree languages and order-3 word languages.
Kazuyuki Asada, Naoki Kobayashi 0001
ICALP2
2017 Verification of code generators via higher-order model checking
abstract
Dynamic code generation is useful for optimizing code with respect to information available only at run-time. Writing a code generator is, however, difficult and error prone. We consider a simple language for writing code generators and propose an automated method for verifying code generators. Our method is based on higher-order model checking, and can check that a given code generator can generate only closed, well-typed programs. Compared with typed multi-stage programming languages, our approach is less conservative on the typability of generated programs (i.e., can accept valid code generators that would be rejected by typical multi-stage languages) and can check a wider range of properties of code generators. We have implemented the proposed method and confirmed its effectiveness through experiments.
Takashi Suwa, Takeshi Tsukada, Naoki Kobayashi 0001, Atsushi Igarashi
PEPM3
2017 On the relationship between higher-order recursion schemes and higher-order fixpoint logic
abstract
We study the relationship between two kinds of higher-order extensions
Naoki Kobayashi 0001, Étienne Lozes, Florian Bruse
POPL1
2017 Deadlock analysis of unbounded process networks
Naoki Kobayashi 0001, Cosimo Laneve
Inf. Comput.1
2017 Verifying relational properties of functional programs by first-order refinement
Kazuyuki Asada, Ryosuke Sato 0001, Naoki Kobayashi 0001
Sci. Comput. Program.3
2016 Higher-Order Model Checking in Direct Style
Taku Terao, Takeshi Tsukada, Naoki Kobayashi 0001
APLAS3
2016 Verification of Higher-Order Concurrent Programs with Dynamic Resource Creation
Kazuhide Yasukata, Takeshi Tsukada, Naoki Kobayashi 0001
APLAS3
2016 Equivalence-Based Abstraction Refinement for \mu HORS Model Checking
Naoki Kobayashi 0001
ATVA2
2016 On Word and Frontier Languages of Unsafe Higher-Order Grammars
abstract
Higher-order grammars are an extension of regular and context-free grammars, where nonterminals may take parameters. They have been extensively studied in 1980's, and restudied recently in the context of model checking and program verification. We show that the class of unsafe order-(n+1) word languages coincides with the class of frontier languages of unsafe order-n tree languages. We use intersection types for transforming an order-(n+1) word grammar to a corresponding order-n tree grammar. The result has been proved for safe languages by Damm in 1982, but it has been open for unsafe languages, to our knowledge. Various known results on higher-order grammars can be obtained as almost immediate corollaries of our result.
Kazuyuki Asada, Naoki Kobayashi 0001
ICALP2
2016 Compact bit encoding schemes for simply-typed lambda-terms
abstract
We consider the problem of how to compactly encode simply-typed λ-terms into bit strings. The work has been motivated by Kobayashi et al.’s recent work on higher-order data compression, where data are encoded as functional programs (or, λ-terms) that generate them. To exploit its good compression power, the compression scheme has to come with a method for compactly encoding the λ-terms into bit strings. To this end, we propose two type-based bit-encoding schemes; the first one encodes a λ-term into a sequence of symbols by using type information, and then applies arithmetic coding to convert the sequence to a bit string. The second one is more sophisticated; we prepare a context-free grammar (CFG) that describes only well-typed terms, and then use a variation of arithmetic coding specialized for the CFG. We have implemented both schemes and confirmed that they often output more compact codes than previous bit encoding schemes for λ-terms.
Kotaro Takeda, Naoki Kobayashi 0001, Kazuya Yaguchi, Ayumi Shinohara
ICFP2
2016 Automatically disproving fair termination of higher-order functional programs
abstract
We propose an automated method for disproving fair termination of higher-order functional programs, which is complementary to Murase et al.’s recent method for proving fair termination. A program is said to be fair terminating if it has no infinite execution trace that satisfies a given fairness constraint. Fair termination is an important property because program verification problems for arbitrary ω-regular temporal properties can be transformed to those of fair termination. Our method reduces the problem of disproving fair termination to higher-order model checking by using predicate abstraction and CEGAR. Given a program, we convert it to an abstract program that generates an approximation of the (possibly infinite) execution traces of the original program, so that the original program has a fair infinite execution trace if the tree generated by the abstract program satisfies a certain property. The method is a non-trivial extension of Kuwahara et al.’s method for disproving plain termination.
Keiichi Watanabe, Ryosuke Sato 0001, Takeshi Tsukada, Naoki Kobayashi 0001
ICFP4
2016 Temporal verification of higher-order functional programs
abstract
We present an automated approach to verifying arbitrary omega-regular properties of higher-order functional programs. Previous automated methods proposed for this class of programs could only handle safety properties or termination, and our approach is the first to be able to verify arbitrary omega-regular liveness properties. Our approach is automata-theoretic, and extends our recent work on binary-reachability-based approach to automated termination verification of higher-order functional programs to fair termination published in ESOP 2014. In that work, we have shown that checking disjunctive well-foundedness of (the transitive closure of) the ``calling relation'' is sound and complete for termination. The extension to fair termination is tricky, however, because the straightforward extension that checks disjunctive well-foundedness of the fair calling relation turns out to be unsound, as we shall show in the paper. Roughly, our solution is to check fairness on the transition relation instead of the calling relation, and propagate the information to determine when it is necessary and sufficient to check for disjunctive well-foundedness on the calling relation. We prove that our approach is sound and complete. We have implemented a prototype of our approach, and confirmed that it is able to automatically verify liveness properties of some non-trivial higher-order programs.
Akihiro Murase, Tachio Terauchi, Naoki Kobayashi 0001, Ryosuke Sato 0001, Hiroshi Unno 0001
POPL3
2015 Decision Algorithms for Checking Definability of Order-2 Finitary PCF
Sadaaki Kawata, Kazuyuki Asada, Naoki Kobayashi 0001
APLAS3
2015 Automata-Based Abstraction for Automated Verification of Higher-Order Tree-Processing Programs
Yuma Matsumoto, Naoki Kobayashi 0001, Hiroshi Unno 0001
APLAS2
2015 Predicate Abstraction and CEGAR for Disproving Termination of Higher-Order Functional Programs
Takuya Kuwahara, Ryosuke Sato 0001, Hiroshi Unno 0001, Naoki Kobayashi 0001
CAV (2)4
2015 Automata-Based Abstraction Refinement for µHORS Model Checking
abstract
The model checking of higher-order recursion schemes (HORS), aka. Higher-order model checking, is the problem of checking whether the tree generated by a given HORS satisfies a given property. It has recently been studied actively and applied to automated verification of higher-order programs. Kobayashi and Igarashi studied an extension of higher-order model checking called muHORS model checking, where HORS has been extended with recursive types, so that a wider range of programs, including object-oriented programs and multi-threaded programs, can be precisely modeled and verified. Although the muHORS model checking is undecidable in general, they developed a sound but incomplete procedure for muHORS model checking. Unfortunately, however, their procedure was not scalable enough. Inspired by recent progress of (ordinary) HORS model checking, we propose a new procedure for muHORS model checking, based on automata-based abstraction refinement. We have implemented the new procedure and confirmed that it often outperforms the previous procedure.
Naoki Kobayashi 0001
LICS1
2015 Verifying Relational Properties of Functional Programs by First-Order Refinement
abstract
Much progress has been made recently on fully automated verification of higher-order functional programs, based on refinement types and higher-order model checking. Most of those verification techniques are, however, based on first-order refinement types, hence unable to verify certain properties of functions (such as the equality of two recursive functions and the monotonicity of a function, which we call relational properties). To relax this limitation, we introduce a restricted form of higher-order refinement types where refinement predicates can refer to functions, and formalize a systematic program transformation to reduce type checking/inference for higher-order refinement types to that for first-order refinement types, so that the latter can be automatically solved by using an existing software model checker. We also prove the soundness of the transformation, and report on preliminary implementation and experiments.
Kazuyuki Asada, Ryosuke Sato 0001, Naoki Kobayashi 0001
PEPM3
2015 Verification of tree-processing programs via higher-order mode checking
abstract
We propose a new method to verify that a higher-order, tree-processing functional program conforms to an input/output specification. Our method reduces the verification problem to multiple verification problems for higher-order multi-tree transducers, which are then transformed into higher-order recursion schemes and model-checked. Unlike previous methods, our new method can deal with arbitrary higher-order functional programs manipulating algebraic data structures, as long as certain invariants on intermediate data structures are provided by a programmer. We have proved the soundness of the method and implemented a prototype verifier.
Hiroshi Unno 0001, Naoshi Tabuchi, Naoki Kobayashi 0001
Math. Struct. Comput. Sci.3
2014 A ZDD-Based Efficient Higher-Order Model Checking Algorithm
Taku Terao, Naoki Kobayashi 0001
APLAS2
2014 Deadlock Analysis of Unbounded Process Networks
Elena Giachino, Naoki Kobayashi 0001, Cosimo Laneve
CONCUR2
2014 Pairwise Reachability Analysis for Higher Order Concurrent Programs by Higher-Order Model Checking
Kazuhide Yasukata, Naoki Kobayashi 0001, Kazutaka Matsuda
CONCUR2
2014 Efficient Algorithm and Coding for Higher-Order Compression
abstract
Higher-order compression is a scheme for compressing data in the form of functional programs that generate the data. This compression scheme can be viewed a generalization of grammar-based compression, and retains its advantage that compressed data can be manipulated without decompression. Furthermore, the higher-order compression can achieve a high compression ratio and also discover patterns that cannot be found by traditional grammar-based compression. In this paper, we propose an efficient algorithm and a bit-coding scheme for higher-order compression and evaluate their effectiveness through experiments.
Kazuya Yaguchi, Naoki Kobayashi 0001, Ayumi Shinohara
DCC2
2014 Automatic Termination Verification for Higher-Order Functional Programs
Takuya Kuwahara, Tachio Terauchi, Hiroshi Unno 0001, Naoki Kobayashi 0001
ESOP4
2014 Unsafe Order-2 Tree Languages Are Context-Sensitive
Naoki Kobayashi 0001, Kazuhiro Inaba, Takeshi Tsukada
FoSSaCS1
2014 Complexity of Model-Checking Call-by-Value Programs
Takeshi Tsukada, Naoki Kobayashi 0001
FoSSaCS2
2013 Practical Alternating Parity Tree Automata Model Checking of Higher-Order Recursion Schemes
Koichi Fujima, Souhei Ito, Naoki Kobayashi 0001
APLAS3
2013 Saturation-Based Model Checking of Higher-Order Recursion Schemes
abstract
Model checking of higher-order recursion schemes (HORS) has recently been studied extensively and applied to higher-order program verification. Despite recent efforts, obtaining a scalable model checker for HORS remains a big challenge. We propose a new model checking algorithm for HORS, which combines two previous, independent approaches to higher-order model checking. Like previous type-based algorithms for HORS, it directly analyzes HORS and outputs intersection types as a certificate, but like Broadbent et al.'s saturation algorithm for collapsible pushdown systems (CPDS), it propagates information backward, in the sense that it starts with target configurations and iteratively computes their pre-images. We have implemented the new algorithm and confirmed that the prototype often outperforms TRECS and CSHORe, the state-of-the-art model checkers for HORS.
Christopher H. Broadbent, Naoki Kobayashi 0001
CSL2
2013 Model-Checking Higher-Order Programs with Recursive Types
Naoki Kobayashi 0001, Atsushi Igarashi
ESOP1
2013 Pumping by Typing
abstract
Higher-order recursion schemes (HORS), which are higher-order grammars for generating infinite trees, have recently been studied extensively in the context of model checking and its applications to higher-order program verification. We develop a pumping lemma for HORS by using a novel but simple intersection type system for reasoning about reductions of λ-terms. Our proof is arguably much simpler than the proof of Kartzow and Parys' pumping lemma for collapsible pushdown automata. As an application, we give an alternative proof of Kartzow and Parys' result about the strictness of the hierarchy of trees generated by HORS.
Naoki Kobayashi 0001
LICS1
2013 Towards a scalable software model checker for higher-order programs
abstract
In our recent paper, we have shown how to construct a fully-automated program verification tool (so called a "software model checker") for a tiny subset of functional language ML, by combining higher-order model checking, predicate abstraction, and CEGAR. This can be viewed as a higher-order counterpart of previous software model checkers for imperative languages like BLAST and SLAM. The naive application of the proposed approach, however, suffered from scalability problems, both in terms of efficiency and supported language features. To obtain more scalable software model checkers for full-scale functional languages, we propose a series of optimizations and extensions of the previous approach. Among others, we introduce (i) selective CPS transformation,(ii) selective predicate abstraction, and (iii) refined predicate discovery as optimization techniques; and propose (iv) functional encoding of recursive data structures and control operations to support a larger subset of ML. We have implemented the proposed methods, and obtained promising results.
Ryosuke Sato 0001, Hiroshi Unno 0001, Naoki Kobayashi 0001
PEPM3
2013 Automating relatively complete verification of higher-order functional programs
abstract
We present an automated approach to relatively completely verifying safety (i.e., reachability) property of higher-order functional programs. Our contribution is two-fold. First, we extend the refinement type system framework employed in the recent work on (incomplete) automated higher-order verification by drawing on the classical work on relatively complete "Hoare logic like" program logic for higher-order procedural languages. Then, by adopting the recently proposed techniques for solving constraints over quantified first-order logic formulas, we develop an automated type inference method for the type system, thereby realizing an automated relatively complete verification of higher-order programs.
Hiroshi Unno 0001, Tachio Terauchi, Naoki Kobayashi 0001
POPL3
2013 Model Checking Higher-Order Programs
abstract
We propose a novel verification method for higher-order functional programs based on higher-order model checking, or more precisely, model checking of higher-order recursion schemes (recursion schemes, for short). The most distinguishing feature of our verification method for higher-order programs is that it is sound, complete, and automatic for the simply typed λ-calculus with recursion and finite base types, and for various program verification problems such as reachability, flow analysis, and resource usage verification. We first show that a variety of program verification problems can be reduced to model checking problems for recursion schemes, by transforming a program into a recursion scheme that generates a tree representing all the interesting possible event sequences of the program. We then develop a new type-based model-checking algorithm for recursion schemes and implement a prototype recursion scheme model checker. To our knowledge, this is the first implementation of a recursion scheme model checker. Experiments show that our model checker is reasonably fast, despite the worst-case time complexity of recursion scheme model checking being hyperexponential in general. Altogether, the results provide a new, promising approach to verification of higher-order functional programs.
Naoki Kobayashi 0001
J. ACM1
2012 Program Certification by Higher-Order Model Checking
Naoki Kobayashi 0001
CPP1
2012 Functional programs as compressed data
abstract
We propose an application of programming language techniques to lossless data compression, where tree data are compressed as functional programs that generate them. This "functional programs as compressed data" approach has several advantages. First, it follows from the standard argument of Kolmogorov complexity that the size of compressed data can be optimal up to an additive constant. Secondly, a compression algorithm is clean: it is just a sequence of beta-expansions for lambda-terms. Thirdly, one can use program verification and transformation techniques (higher-order model checking, in particular) to apply certain operations on data without decompression. In the paper, we present algorithms for data compression and manipulation based on the approach, and prove their correctness. We also report preliminary experiments on prototype data compression/transformation systems.
Naoki Kobayashi 0001, Kazutaka Matsuda, Ayumi Shinohara
PEPM1
2011 Type-Based Automated Verification of Authenticity in Asymmetric Cryptographic Protocols
Morten Dahl, Naoki Kobayashi 0001, Yunde Sun, Hans Hüttel
ATVA2
2011 A Practical Linear Time Algorithm for Trivial Automata Model Checking of Higher-Order Recursion Schemes
Naoki Kobayashi 0001
FoSSaCS1
2011 Higher-Order Model Checking: From Theory to Practice
abstract
The model checking of higher-order recursion schemes (higher-order model checking for short) has been actively studied in the last decade, and has seen significant progress in both theory and practice. From a practical perspective, higher-order model checking provides a foundation for software model checkers for functional programming languages such as ML and Haskell. This short article aims to provide an overview of the recent progress in higher-order model checking and discuss future directions.
Naoki Kobayashi 0001
LICS1
2011 Predicate abstraction and CEGAR for higher-order model checking
abstract
Higher-order model checking (more precisely, the model checking of higher-order recursion schemes) has been extensively studied recently, which can automatically decide properties of programs written in the simply-typed λ-calculus with recursion and finite data domains. This paper formalizes predicate abstraction and counterexample-guided abstraction refinement (CEGAR) for higher-order model checking, enabling automatic verification of programs that use infinite data domains such as integers. A prototype verifier for higher-order functional programs based on the formalization has been implemented and tested for several programs.
Naoki Kobayashi 0001, Ryosuke Sato 0001, Hiroshi Unno 0001
PLDI1
2011 Environmental bisimulations for higher-order languages
abstract
Developing a theory of bisimulation in higher-order languages can be hard. Particularly challenging can be: (1) the proof of congruence, as well as enhancements of the bisimulation proof method with “up-to context” techniques, and (2) obtaining definitions and results that scale to languages with different features. To meet these challenges, we present environment{} bisimulations , a form of bisimulation for higher-order languages, and its basic theory. We consider four representative calculi: pure λ-calculi (call-by-name and call-by-value), call-by-value λ-calculus with higher-order store, and then Higher-Order π-calculus. In each case: we present the basic properties of environment bisimilarity, including congruence; we show that it coincides with contextual equivalence; we develop some up-to techniques, including up-to context, as examples of possible enhancements of the associated bisimulation method. Unlike previous approaches (such as applicative bisimulations, logical relations, Sumii-Pierce-Koutavas-Wand), our method does not require induction/indices on evaluation derivation/steps (which may complicate the proofs of congruence, transitivity, and the combination with up-to techniques), or sophisticated methods such as Howe's for proving congruence. It also scales from the pure λ-calculi to the richer calculi with simple congruence proofs.
Davide Sangiorgi, Naoki Kobayashi 0001, Eijiro Sumii
ACM Trans. Program. Lang. Syst.2
2010 Verification of Tree-Processing Programs via Higher-Order Model Checking
Hiroshi Unno 0001, Naoshi Tabuchi, Naoki Kobayashi 0001
APLAS3
2010 Untyped Recursion Schemes and Infinite Intersection Types
Takeshi Tsukada, Naoki Kobayashi 0001
FoSSaCS2
2010 Higher-order multi-parameter tree transducers and recursion schemes for program verification
abstract
We introduce higher-order, multi-parameter, tree transducers (HMTTs, for short), which are kinds of higher-order tree transducers that take input trees and output a (possibly infinite) tree. We study the problem of checking whether the tree generated by a given HMTT conforms to a given output specification, provided that the input trees conform to input specifications (where both input/output specifications are regular tree languages). HMTTs subsume higher-order recursion schemes and ordinary tree transducers, so that their verification has a number of potential applications to verification of functional programs using recursive data structures, including resource usage verification, string analysis, and exact type-checking of XML-processing programs.
Naoki Kobayashi 0001, Naoshi Tabuchi, Hiroshi Unno 0001
POPL1
2010 A hybrid type system for lock-freedom of mobile processes
abstract
We propose a type system for lock-freedom in the π-calculus, which guarantees that certain communications will eventually succeed. Distinguishing features of our type system are: it can verify lock-freedom of concurrent programs that have sophisticated recursive communication structures; it can be fully automated; it is hybrid, in that it combines a type system for lock-freedom with local reasoning about deadlock-freedom, termination, and confluence analyses. Moreover, the type system is parameterized by deadlock-freedom/termination/confluence analyses, so that any methods (e.g. type systems and model checking) can be used for those analyses. A lock-freedom analysis tool has been implemented based on the proposed type system, and tested for nontrivial programs.
Naoki Kobayashi 0001, Davide Sangiorgi
ACM Trans. Program. Lang. Syst.1
2009 Types and Recursion Schemes for Higher-Order Program Verification
Naoki Kobayashi 0001
APLAS1
2009 Fractional Ownerships for Safe Memory Deallocation
Kohei Suenaga, Naoki Kobayashi 0001
APLAS2
2009 Type-Based Automated Verification of Authenticity in Cryptographic Protocols
Daisuke Kikuchi, Naoki Kobayashi 0001
ESOP2
2009 Complexity of Model Checking Recursion Schemes for Fragments of the Modal Mu-Calculus
Naoki Kobayashi 0001, C.-H. Luke Ong
ICALP (2)1
2009 A Type System Equivalent to the Modal Mu-Calculus Model Checking of Higher-Order Recursion Schemes
abstract
The model checking of higher-order recursion schemes has important applications in the verification of higher-order programs. Ong has previously shown that the modal mu-calculus model checking of trees generated by order-n recursion scheme is n-EXPTIME complete, but his algorithm and its correctness proof were rather complex. We give an alternative, type-based verification method: Given a modal mu-calculus formula, we can construct a type system in which a recursion scheme is typable if, and only if, the (possibly infinite, ranked) tree generated by the scheme satisfies the formula. The model checking problem is thus reduced to a type checking problem. Our type-based approach yields a simple verification algorithm, and its correctness proof (constructed without recourse to game semantics) is comparatively easy to understand. Furthermore, the algorithm is polynomial-time in the size of the recursion scheme, assuming that the formula and the largest order and arity of non-terminals of the recursion scheme are fixed.
Naoki Kobayashi 0001, C.-H. Luke Ong
LICS1
2009 Types and higher-order recursion schemes for verification of higher-order programs
abstract
We propose a new verification method for temporal properties of higher-order functional programs, which takes advantage of Ong's recent result on the decidability of the model-checking problem for higher-order recursion schemes (HORS's). A program is transformed to an HORS that generates a tree representing all the possible event sequences of the program, and then the HORS is model-checked. Unlike most of the previous methods for verification of higher-order programs, our verification method is sound and complete. Moreover, this new verification framework allows a smooth integration of abstract model checking techniques into verification of higher-order programs. We also present a type-based verification algorithm for HORS's. The algorithm can deal with only a fragment of the properties expressed by modal mu-calculus, but the algorithm and its correctness proof are (arguably) much simpler than those of Ong's game-semantics-based algorithm. Moreover, while the HORS model checking problem is n-EXPTIME in general, our algorithm is linear in the size of HORS, under the assumption that the sizes of types and specification formulas are bounded by a constant.
Naoki Kobayashi 0001
POPL1
2009 Model-checking higher-order functions
abstract
We propose a novel type-based model checking algorithm for higher-order recursion schemes. As shown by Kobayashi, verification problems of higher-order functional programs can easily be translated into model checking problems of recursion schemes. Thus, the model checking algorithm serves as a basis for verification of higher-order functional programs. To our knowledge, this is the first practical algorithm for model checking recursion schemes: all the previous algorithms always suffer from the n-EXPTIME bottleneck, not only in the worst, and there was no implementation of the algorithms. We have implemented a model checker for recursion schemes based on the proposed algorithm, and applied it to verification of functional programs, including reachability, flow analysis and resource usage verification problems. According to our experiments, the model checker is surprisingly fast: it could automatically verify a number of small but tricky higher-order functional programs in less than a second.
Naoki Kobayashi 0001
PPDP1
2009 Dependent type inference with interpolants
abstract
We propose a novel type inference algorithm for a dependently-typed functional language. The novel features of our algorithm are: (i) it can iteratively refine dependent types with interpolants until the type inference succeeds or the program is found to be ill-typed, and (ii) in the latter case, it can generate a kind of counter-example as an explanation of why the program is ill-typed. We have implemented a prototype type inference system and tested it for several programs.
Hiroshi Unno 0001, Naoki Kobayashi 0001
PPDP2
2009 Undecidable equivalences for basic parallel processes
Hans Hüttel, Naoki Kobayashi 0001, Takashi Suto
Inf. Comput.2
2008 A Hybrid Type System for Lock-Freedom of Mobile Processes
Naoki Kobayashi 0001, Davide Sangiorgi
CAV1
2008 Linear Declassification
Yûta Kaneko, Naoki Kobayashi 0001
ESOP2
2008 Tree Automata for Non-linear Arithmetic
Naoki Kobayashi 0001, Hitoshi Ohsaki
RTA1
2008 Translation of tree-processing programs into stream-processing programs based on ordered linear type
abstract
Abstract There are two ways to write a program for manipulating tree-structured data such as XML documents: One is to write a tree-processing program focusing on the logical structure of the data and the other is to write a stream-processing program focusing on the physical structure. While tree-processing programs are easier to write than stream-processing programs, tree-processing programs are less efficient in memory usage since they use trees as intermediate data. Our aim is to establish a method for automatically translating a tree-processing program to a stream-processing one in order to take the best of both worlds. We first define a programming language for processing binary trees and a type system based on ordered linear type, and show that every well-typed program can be translated to an equivalent stream-processing program. We then extend the language and the type system to deal with XML documents. We have implemented an XML stream processor generator based on our algorithm, and obtained promising experimental results.
Koichi Kodama, Kohei Suenaga, Naoki Kobayashi 0001
J. Funct. Program.3
2007 Type-Based Verification of Correspondence Assertions for Communication Protocols
Daisuke Kikuchi, Naoki Kobayashi 0001
APLAS2
2007 Type-Based Analysis of Deadlock for a Concurrent Calculus with Interrupts
Kohei Suenaga, Naoki Kobayashi 0001
ESOP2
2007 Undecidability of 2-Label BPP Equivalences and Behavioral Type Systems for the pi -Calculus
Naoki Kobayashi 0001, Takashi Suto
ICALP1
2007 Environmental Bisimulations for Higher-Order Languages
abstract
Developing a theory of bisimulation in higher-order languages can be hard. Particularly challenging can be: (1) the proof of congruence, as well as enhancements of the bisimulation proof method with "up-to context" techniques, and (2) obtaining definitions and results that scale to languages with different features. To meet these challenges, we present environmental bisimulations, a form of bisimulation for higher-order languages, and its basic theory. We consider four representative calculi: pure lambda-calculi (call-by-name and call-by-value), call-by-value lambda-calculus with higher-order store, and then higher-order pi-calculus. In each case: we present the basic properties of environmental bisimilarity, including congruence; we show that it coincides with contextual equivalence; we develop some up-to techniques, including up-to context, as examples of possible enhancements of the associated bisimulation method. Unlike previous approaches (such as applicative bisimulations, logical relations, Sumii-Pierce-Koutavas-Wand), our method does not require induction/indices on evaluation derivation/steps (which may complicate the proofs of congruence, transitivity, and the combination with up-to techniques), or sophisticated methods such as Howe's for proving congruence. It also scales from the pure lambda-calculi to the richer calculi with simple congruence proofs.
Davide Sangiorgi, Naoki Kobayashi 0001, Eijiro Sumii
LICS2
2006 A New Type System for Deadlock-Free Processes
Naoki Kobayashi 0001
CONCUR1
2006 Resource usage analysis for a functional language with exceptions
abstract
Igarashi and Kobayashi have proposed a general type system for checking whether resources such as files and memory are accessed in a valid manner. Their type system is, however, for call-by-value λ-calculus with resource primitives, and does not deal with non-functional primitives such as exceptions and pointers. We extend their type system to deal with exception primitives and prove soundness of the type system. Dealing with exception primitives is especially important in practice, since many resource access primitives may raise exceptions. The extension is non-trivial: While Igarashi and Kobayashi's type system is based on linear types, our new type system is a combination of linear types and effect systems. We also report on a prototype analyzer based on the new type system.
Futoshi Iwama, Atsushi Igarashi, Naoki Kobayashi 0001
PEPM3
2006 Resource Usage Analysis for the pi-Calculus
Naoki Kobayashi 0001, Kohei Suenaga, Lucian Wischik
VMCAI1
2006 Resource Usage Analysis for the p-Calculus
abstract
We propose a type-based resource usage analysis for the π-calculus extended with resource creation/access primitives. The goal of the resource usage analysis is to statically check that a program accesses resources such as files and memory in a valid manner. Our type system is an extension of previous behavioral type systems for the π-calculus, and can guarantee the safety property that no invalid access is performed, as well as the property that necessary accesses (such as the close operation for a file) are eventually performed unless the program diverges. A sound type inference algorithm for the type system is also developed to free the programmer from the burden of writing complex type annotations. Based on the algorithm, we have implemented a prototype resource usage analyzer for the π-calculus. To the authors' knowledge, ours is the first type-based resource usage analysis that deals with an expressive concurrent language like the pi-calculus.
Naoki Kobayashi 0001, Kohei Suenaga, Lucian Wischik
Log. Methods Comput. Sci.1
2005 Extension of Type-Based Approach to Generation of Stream-Processing Programs by Automatic Insertion of Buffering Primitives
Kohei Suenaga, Naoki Kobayashi 0001, Akinori Yonezawa
LOPSTR2
2005 Type-based information flow analysis for the pi-calculus
Naoki Kobayashi 0001
Acta Informatica1
2005 Resource usage analysis
abstract
It is an important criterion of program correctness that a program accesses resources in a valid manner. For example, a memory region that has been allocated should be eventually deallocated, and after the deallocation, the region should no longer be accessed. A file that has been opened should be eventually closed. So far, most of the methods to analyze this kind of property have been proposed in rather specific contexts (like studies of memory management and verification of usage of lock primitives), and it was not so clear what is the essence of those methods or how methods proposed for individual problems are related. To remedy this situation, we formalize a general problem of analyzing resource usage as a resource usage analysis problem, and propose a type-based method as a solution to the problem.
Atsushi Igarashi, Naoki Kobayashi 0001
ACM Trans. Program. Lang. Syst.2
2004 Translation of Tree-Processing Programs into Stream-Processing Programs Based on Ordered Linear Type
Koichi Kodama, Kohei Suenaga, Naoki Kobayashi 0001
APLAS3
2004 Region-Based Memory Management for a Dynamically-Typed Language
Akihito Nagata, Naoki Kobayashi 0001, Akinori Yonezawa
APLAS2
2004 A generic type system for the Pi-calculus
Atsushi Igarashi, Naoki Kobayashi 0001
Theor. Comput. Sci.2
2003 Useless Code Elimination and Programm Slicing for the Pi-Calculus
Naoki Kobayashi 0001
APLAS1
2003 Information and Computation special issue from TACS 2001
Naoki Kobayashi 0001, Benjamin C. Pierce
Inf. Comput.1
2002 Resource usage analysis
Atsushi Igarashi, Naoki Kobayashi 0001
POPL2
2002 A Type System for Lock-Free Processes
Naoki Kobayashi 0001
Inf. Comput.1
2001 A generic type system for the Pi-calculus
abstract
We propose a general, powerful framework of type systems for the π-calculus, and show that we can obtain as its instances a variety of type systems guaranteeing non-trivial properties like deadlock-freedom and race-freedom. A key idea is to express types and type environments as abstract processes: We can check various properties of a process by checking the corresponding properties of its type environment. The framework clarifies the essence of recent complex type systems, and it also enables sharing of a large amount of work such as a proof of type preservation, making it easy to develop new type systems.
Atsushi Igarashi, Naoki Kobayashi 0001
POPL2
2000 An Implicitly-Typed Deadlock-Free Process Calculus
Naoki Kobayashi 0001, Shin Saito, Eijiro Sumii
CONCUR1
2000 Type-Based Useless Variable Elimination
abstract
Useless variable elimination [25] is a transformation that eliminates variables whose values contribute nothing to the final outcome of a computation. We present a type-based method for useless variable elimination and prove its correctness. The algorithm is a surprisingly simple extension of the usual type reconstruction algorithm. Our method seems more attractive than other methods for useless variable elimination in several respects. First, it is simple, so that the proof of the correctness is clear and the method can be easily extended to deal with a polymorphic language. Second, it is efficient: it runs in time almost linear in the size of an input expression for a simply-typed λ-calculus, while Wand and Siveroni's 0CFA-based method may require a cubic time. Moreover, our transformation is optimal in a certain sense among those that preserve well-typedness, both for the simply-typed language and for an ML-style polymorphically-typed language. On the other hand, Wand and Siveroni's method is not optimal for the polymophically-typed language.
Naoki Kobayashi 0001
PEPM1
2000 Online-and-Offline Partial Evaluation: A Mixed Approach (Extended Abstract)
abstract
This paper presents a hybrid method of partial evaluation (PE), which combines the power of online PE and the efficiency of offline PE, for a typed strict functional language. We begin with a naive online partial evaluator, and make it efficient without sacrificing its power. To this end, we (1) use state (instead of continuation) for let-insertion, (2) take a so-called cogen approach, and (3) decrease unnecessary computations—such as unnecessary let-insertions and unused values/expressions—with a type-based use analysis, which subsumes various monovariant binding-time analyses. Our method yields the same residual programs as the naive online partial evaluator, modulo inlining of redundant let-bindings. We implemented and compared our method and existing methods, both online and offline. Experiments show that our method is at least twice as fast as any other method (e.g., more than 7 times as fast as Thiemann's cogen approach to offline PE in the specialization of the power function, thanks to the reduction of unnecessary let-insertions) when they yield equivalent residual programs.
Eijiro Sumii, Naoki Kobayashi 0001
PEPM2
2000 Type Reconstruction for Linear -Calculus with I/O Subtyping
Atsushi Igarashi, Naoki Kobayashi 0001
Inf. Comput.2
1999 Quasi-Linear Types
abstract
Linear types (types of values that can be used just once) have been drawing a great deal of attention because they are useful for memory management, in-place update of data structures, etc.: an obvious advantage is that a value of a linear type can be immediately deallocated after being used. However, the linear types have not been applied so widely in practice, probably because linear values (values of linear types) in the traditional sense do not so often appear in actual programs. In order to increase the applicability of linear types, we relax the condition of linearity by extending the types with information on an evaluation order and simple dataflow information. The extended type system, called a quasi-linear type system, is formalized and its correctness is proved. We have implemented a prototype type inference system for the core-ML that can automatically find out which value is linear in the relaxed sense. Promising results were obtained from preliminary experiments with the prototype system.
Naoki Kobayashi 0001
POPL1
1999 Distributed Concurrent Linear Logic Programming
Naoki Kobayashi 0001, Toshihiro Shimizu, Akinori Yonezawa
Theor. Comput. Sci.1
1999 Linearity and the pi-calculus
abstract
The economy and flexibility of the pi-calculus make it an attractive object of theoretical study and a clean basis for concurrent language design and implementation. However, such generality has a cost: encoding higher-level features like functional computation in pi-calculus throws away potentially useful information. We show how a linear type system can be used to recover important static information about a process's behavior. In particular, we can guarantee that two processes communicating over a linear channel cannot interfere with other communicating processes. After developing standard results such as soundness of typing, we focus on equivalences, adapting the standard notion of barbed bisimulation to the linear setting and showing how reductions on linear channels induce a useful “partial confluence” of process behaviors. For an extended example of the theory, we prove the validity of a tail-call optimization for higher-order functions represented as processes.
Naoki Kobayashi 0001, Benjamin C. Pierce, David N. Turner
ACM Trans. Program. Lang. Syst.1
1998 A Partially Deadlock-Free Typed Process Calculus
abstract
We propose a novel static type system for a process calculus, which ensures both partial deadlockfreedom and partial confluence.The key novel ideas are (1) introduction of the order of channel use as type information, and (2) classification of communication channels into reliable and unreliable channels based on their usage and a guarantee of the usage by the type system.We can ensure that communication on reliable channels never causes deadlock and also that certain reliable channels never introduce nondeterminism.After presenting the type system and formal proofs of its correctness, we show encodings of the λ-calculus and typical concurrent objects in the deadlockfree fragment of the calculus and demonstrate how type information can be used for reasoning about program behavior.
Naoki Kobayashi 0001
ACM Trans. Program. Lang. Syst.1
1997 A Partially Deadlock-Free Typed Process Calculus
abstract
We propose a novel static type system for a process calculus, which ensures both partial deadlock-freedom and partial confluence. The key novel ideas are: (1) introduction of the order of channel use as type information and (2) classification of communication channels into reliable and unreliable channels based on their usage and a guarantee of the usage by the type system. We can ensure that communication on reliable channels never causes deadlock and also that certain reliable channels never introduce nondeterminism. With the type system, for example, the simply typed /spl lambda/-calculus can be encoded into the deadlock-free and confluent fragment of our process calculus; we can therefore recover behavior of the typed /spl lambda/-calculus in the level of process calculi. We also show that typical concurrent objects can also be encoded into the deadlock-free fragment.
Naoki Kobayashi 0001
LICS1
1997 Type-Based Analysis of Communication for Concurrent Programming Languages
Atsushi Igarashi, Naoki Kobayashi 0001
SAS2
1996 Linearity and the Pi-Calculus
abstract
The economy and flexibility of the pi-calculus make it attractive both as an object of theoretical study and as a basis for concurrent language design and implementation. However, such generality has a cost: encoding higher-level features like functional computation in pi-calculus throws away potentially useful information. We show how a linear type system can be used to recover important static information about a process's behaviour. In particular, we can guarantee that two processes communicating over a linear channel cannot interfere with other communicating processes. This enables more aggressive optimisation of communications over linear channels and allows useful refinements to the usual notions of process equivalence for pi-calculus.After developing standard results such as soundness of typing, we focus on equivalences, adapting the standard notion of barbed bisimulation to the linear setting and showing how reductions on linear channels induce a useful "partial confluence" of process behaviors.
Naoki Kobayashi 0001, Benjamin C. Pierce, David N. Turner
POPL1
1995 Static Analysis of Communication for Asynchronous Concurrent Programming Languages
Naoki Kobayashi 0001, Motoki Nakade, Akinori Yonezawa
SAS1
1995 Asynchronous Communication Model Based on Linear Logic
abstract
Abstract We propose a new framework called ACL for concurrent computation based on linear logic. ACL is a kind oflinear logic programmingframework, where its operational semantics is described in terms ofproof constructionin linear logic. We also give a model-theoretic semantics based onphase semantics, a model of linear logic. Our framework well captures concurrent computation based on asynchronous communication. It will, therefore, provide us with a new insight into other models of asynchronous concurrent computation from alogicalpoint of view. We also expect ACL to become a formal framework for analysis, synthesis and transformation of concurrent programs by the use of techniques for traditional logic programming. ACL's attractive features for concurrent programming paradigms are also discussed.
Naoki Kobayashi 0001, Akinori Yonezawa
Formal Aspects Comput.1
1994 Type-Theoretic Foundations for Concurrent Object-Oriented Programming
abstract
A number of attempts have been made to obtain type systems for object-oriented programming. The view that lies common is “object-oriented programming = λ-calculus + record.” Based on an analogous view “concurrent object-oriented programming = concurrent calculus + record,” we develop a static type system for concurrent object-oriented programming. We choose our own Higher-Order ACL as a basic concurrent calculus, and show that a concurrent object-oriented language can be easily encoded in the Higher-Order ACL extended with record operations. Since Higher-Order ACL has a strong type system with a polymorphic type inference mechanism, programs of the concurrent object-oriented language can be automatically type-checked by the encoding in Higher-Order ACL. Our approach can give clear accounts for complex mechanisms such as inheritance and method overriding within a simple framework.
Naoki Kobayashi 0001, Akinori Yonezawa
OOPSLA1