MCPA: Program Analysis as Machine Learning

11/12/2019
by   Marcel Böhme, et al.
0

Static program analysis today takes an analytical approach which is quite suitable for a well-scoped system. Data- and control-flow is taken into account. Special cases such as pointers, procedures, and undefined behavior must be handled. A program is analyzed precisely on the statement level. However, the analytical approach is ill-equiped to handle implementations of complex, large-scale, heterogeneous software systems we see in the real world. Existing static analysis techniques that scale, trade correctness (i.e., soundness or completeness) for scalability and build on strong assumptions (e.g., language-specificity). Scalable static analysis are well-known to report errors that do *not* exist (false positives) or fail to report errors that *do* exist (false negatives). Then, how do we know the degree to which the analysis outcome is correct? In this paper, we propose an approach to scale-oblivious greybox program analysis with bounded error which applies efficient approximation schemes (FPRAS) from the foundations of machine learning: PAC learnability. Given two parameters δ and ϵ, with probability at least (1-δ), our Monte Carlo Program Analysis (MCPA) approach produces an outcome that has an average error at most ϵ. The parameters δ>0 and ϵ>0 can be chosen arbitrarily close to zero (0) such that the program analysis outcome is said to be probably-approximately correct (PAC). We demonstrate the pertinent concepts of MCPA using three applications: (ϵ,δ)-approximate quantitative analysis, (ϵ,δ)-approximate software verification, and (ϵ,δ)-approximate patch verification.

READ FULL TEXT
research
05/13/2021

Gradual Program Analysis for Null Pointers

Static analysis tools typically address the problem of excessive false p...
research
05/29/2021

Formally Validating a Practical Verification Condition Generator (extended version)

A program verifier produces reliable results only if both the logic used...
research
05/10/2018

Ariadne: Analysis for Machine Learning Program

Machine learning has transformed domains like vision and translation, an...
research
10/15/2018

Memory Vulnerability: A Case for Delaying Error Reporting

To face future reliability challenges, it is necessary to quantify the r...
research
09/25/2022

Using Multiple Code Representations to Prioritize Static Analysis Warnings

In order to ensure the quality of software and prevent attacks from hack...
research
06/02/2017

Capri: A Control System for Approximate Programs

Approximate computing trades off accuracy of results for resources such ...

Please sign up or login with your details

Forgot password? Click here to reset