Expressing class specifications via executable constraints is important for various software engineering tasks such as test generation, bug finding and automated debugging, but developers rarely write them. Techniques that infer specifications from code exist to fill this gap, but they are designed to support specific kinds of assertions and are difficult to adapt to support different assertion languages, e.g., to add support for quantification, or additional comparison operators, such as membership or containment.
To address the above issue, we present SpecFuzzer, a novel technique that combines grammar-based fuzzing, dynamic invariant detection, and mutation analysis, to automatically produce class specifications. SpecFuzzer uses: (i) a fuzzer as a generator of candidate assertions derived from a grammar that is automatically obtained from the class definition; (ii) a dynamic invariant detector -- Daikon -- to filter out assertions invalidated by a test suite; and (iii) a mutation-based mechanism to cluster and rank assertions, so that similar constraints are grouped and then the stronger prioritized. Grammar-based fuzzing enables SpecFuzzer to be straightforwardly adapted to support different specification languages, by manipulating the fuzzing grammar, e.g., to include additional operators.
We evaluate our technique on a benchmark of 43 Java methods employed in the evaluation of the state-of-the-art techniques GAssert and EvoSpex. Our results show that SpecFuzzer can easily support a more expressive assertion language, over which is more effective than GAssert and EvoSpex in inferring specifications, according to standard performance metrics.
Ensemble Fuzzing with Dynamic Resource Scheduling and Multidimensional Seed Evaluation
School of Software Technology, Zhejiang University(浙江大学软件学院);The State Key Laboratory of Blockchain and Data Security, Zhejiang University(浙江大学区块链与数据安全国家重点实验室);Central University of Finance and Economics(中央财经大学);Nanjing University(南京大学);Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security(杭州高新区(滨江)区块链与数据安全研究院)
FuzzerGym: A Competitive Framework for Fuzzing and Learning
Carnegie Mellon University(卡内基梅隆大学);Georgia Institute of Technology(佐治亚理工学院);Twentieth Century Fox(二十世纪福克斯公司);Starfleet Academy(星际舰队学院);Tyrell Inc.(泰瑞尔公司)
RITA: A Tool for Automated Requirements Classification and Specification from Online User Feedback
Lero, the Research Ireland Centre for Software, University of Limerick(利默里克大学软件研究爱尔兰研究中心);University College Dublin (UCD)(都柏林大学学院);University of Padova(帕多瓦大学)