Flow-Sensitivity Heuristic for C interval analysis
feature_table: Features for learning flow-sensitivity heuristics. Features present syntactic or semantic properties of variables in C programs. Figure 1: Figure 1 presents the learned flow-sensitivity heuristic (f0, f1). F0 presents the variables that will be analyzed flow-insensitively while F1 presents the variables that will be analyzed flow-sensitively.
Steps to reproduce
The features are from the paper, "Learning a strategy for adapting a program analysis via bayesian optimization." We learned the heuristic in Figure1 with our new algorithm. First, our algorithm constructs an initial formula. Each query in the training programs is expressed as a set of atomic features that can prove the query. Then, among the set of atomic features, the unique subsets are collected, not implied by others. This is the initial formula, and this is the most specific formula in disjunctive normal form. Secondly, our algorithm chooses the smallest clause in the initial formula, representing less program component than other clauses. We eliminate one atomic feature in this clause and check the performance improvement. The performance improvement means that the precision is equal or better than before with maintaining the analysis cost to some extent. If no performance improvement occurs, the removed atomic features are restored. If subtracting any of the atomic features can’t improve performance, our algorithm fixes this clause and check the precision. If the formula meets the precision constraint, our algorithm ends the learning; else, choose other clauses.