TY - JOUR
T1 - ICE-Based Refinement Type Discovery for Higher-Order Functional Programs
AU - Champion, Adrien
AU - Chiba, Tomoya
AU - Kobayashi, Naoki
AU - Sato, Ryosuke
N1 - Funding Information:
We would like to thank anonymous referees for useful comments. We would also like to thank He Zhu for his help in benchmarking DOrder, Hiroshi Unno for his help and insight on Horn clauses over ADTs and the reviewers for their constructive feedback. This work was supported by JSPS KAKENHI Grant Number JP15H05706 and JP20H00577.
Publisher Copyright:
© 2020, Springer Nature B.V.
PY - 2020/10/1
Y1 - 2020/10/1
N2 - 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 ({ x1, ⋯ , xk} , y) , which means that if all of x1, ⋯ , xk 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.
AB - 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 ({ x1, ⋯ , xk} , y) , which means that if all of x1, ⋯ , xk 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.
UR - http://www.scopus.com/inward/record.url?scp=85088860135&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85088860135&partnerID=8YFLogxK
U2 - 10.1007/s10817-020-09571-y
DO - 10.1007/s10817-020-09571-y
M3 - Article
AN - SCOPUS:85088860135
SN - 0168-7433
VL - 64
SP - 1393
EP - 1418
JO - Journal of Automated Reasoning
JF - Journal of Automated Reasoning
IS - 7
ER -