Automatic Generation and Checking of Program Specifications
Abstract
Producing specifications by dynamic (runtime) analysis of program executions is potentially unsound, because the analyzed executions may not fully characterize all possible executions of the program.In practice, how accurate are the results of a dynamic analysis?This paper describes the results of an investigation into this question, comparing specifications generalized from program runs with specifications verified by a static checker.The surprising result is that for a collection of modest programs, small test suites captured all or nearly all program behavior necessary for a specific type of static checking, permitting the inference and verification of useful specifications.For ten programs of 100-800 lines, the average precision, a measure of correctness, was .95 and the average recall, a measure of completeness, was .94.This is a positive result for testing, because it suggests that dynamic analyses can capture all semantic information of interest for certain applications.The experimental results demonstrate that a specific technique, dynamic invariant detection, is effective at generating consistent, sufficient specifications.Finally, the research shows that combining static and dynamic analyses over program specifications has benefits for users of each technique.
Read the paper
Related studies
- Knowledge Management Perspective of Generative Artificial Intelligence
- Navigating Generative Artificial Intelligence Promises and Perils for Knowledge and Creative Work
- Characterizing the evolving research on enterprise content management
- Large language models and multimodal foundation models for precision oncology
- From Generative AI to Extended Reality: Multidisciplinary Perspectives on the Challenges, Opportunities, and Future of Educational Computing
- Generative Artificial Intelligence: A New Engine for Advancing Environmental Science and Engineering
Go deeper in Evidence Hub
Evidence Hub adds a study data sheet (design, sample size, evidence level, key numbers), an AI summary and a chat grounded in the paper's text.