Neural Termination Analysis

02/07/2021
by   Mirco Giacobbe, et al.
0

We introduce a novel approach to the automated termination analysis of computer programs: we train neural networks to act as ranking functions. Ranking functions map program states to values that are bounded from below and decrease as the program runs. The existence of a valid ranking function proves that the program terminates. While in the past ranking functions were usually constructed using static analysis, our method learns them from sampled executions. We train a neural network so that its output decreases along execution traces as a ranking function would; then, we use formal reasoning to verify whether it generalises to all possible executions. We present a custom loss function for learning lexicographic ranking functions and use satisfiability modulo theories for verification. Thanks to the ability of neural networks to generalise well, our method succeeds over a wide variety of programs. This includes programs that use data structures from standard libraries. We built a prototype analyser for Java bytecode and show the efficacy of our method over a standard dataset of benchmarks.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

08/07/2020

Distilling Programs to Prove Termination

The problem of determining whether or not any program terminates was sho...
09/10/2021

Termination Analysis of Programs with Multiphase Control-Flow

Programs with multiphase control-flow are programs where the execution p...
02/22/2021

Supermartingales, Ranking Functions and Probabilistic Lambda Calculus

We introduce a method for proving almost sure termination in the context...
03/02/2019

2LS: Heap Analysis and Memory Safety (Competition Contribution)

2LS is a framework for analysis of sequential C programs that can verify...
07/07/2020

Program Verification via Predicate Constraint Satisfiability Modulo Theories

This paper presents a verification framework based on a new class of pre...
07/23/2019

Resource Analysis driven by (Conditional) Termination Proofs

When programs feature a complex control flow, existing techniques for re...
11/04/2019

Fast Reliability Ranking of Matchstick Minimal Networks

In this article, we take a closer look at the reliability of large minim...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.