Abstract
Functional correctness is of vital importance for safety-critical software systems. Formal veri?cation aims at either proving or falsifying particular property of a given system. However, most existing veri?cation techniques suffer from the scalability problems due to various reasons, such as the limited capacity of constraint solving techniques, the lack of program invariants, and the path/state explosion problem. Meanwhile, a variety of machine learning techniques have been widely and successfully applied in other ?elds and even achieved superhuman performance. Despite their popularity, it is their capability of scaling well to large problems that attracts our attention. We wonder whether existing learning techniques can be leveraged to overcome the scalability problem in formal veri?cation.Considering the differences between formal veri?cation and machine learning, em-ploying learning techniques to solve veri?cation problems properly and ef?ciently is not trivial. In this thesis, we attempt to improve existing formal veri?cation techniques through invariant learning. In particular, we take loop program veri?cation, compo-sitional software veri?cation, and parametric model veri?cation as three scenarios to illustrate how learning techniques could be adapted to facilitate system veri?cation.Firstly, we apply classi?cation techniques to discover loop invariants and adopt selective sampling techniques in order to infer invariants effectively with a small number of samples. In order to handle more complicated invariants, we further extend our approach through partitioning states based on loop structures. In the second scenario, we apply invariant learning techniques to verify programs compositionally. By learning a precondition for the low-level function, any invocation to the function can be substituted with the learned precondition, and thus a program can be analyzed compositionally, e.g. by focusing on one function at a time. Lastly, we apply invariant learning techniques to improve existing parameterised veri?cation techniques. The idea is to learn and validate a constraint which guarantees required safety properties, instead of computing through symbolic methods.In a nutshell, we investigate several scenarios and enhance existing formal veri?ca-tion approaches through learning proper invariants in this thesis.