Discovering relational specifications

  title={Discovering relational specifications},
  author={Calvin Smith and Gabriel Ferns and Aws Albarghouthi},
  journal={Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering},
Formal specifications of library functions play a critical role in a number of program analysis and development tasks. We present Bach, a technique for discovering likely relational specifications from data describing input-output behavior of a set of functions comprising a library or a program. Relational specifications correlate different executions of different functions; for instance, commutativity, transitivity, equivalence of two functions, etc. Bach combines novel insights from program… 

Figures and Tables from this paper

Specification and inference of trace refinement relations
An algorithm for automatically synthesizing refinement relations, based on a mixture of semantic program abstraction, KAT inclusion, a custom edit-distance algorithm on counterexamples, and case-analysis on nondeterministic branching is presented and proved to be sound.
Inferring Concise Specifications of APIs
This work analyzes the implementation of each method in an API to infer a formal postcondition and develops an algorithm that converts such exponentially large specifications into a form that is more concise and thus more usable.
Cheap Remarks About Concurrent Programs
Co, the Concurrency Commentator, is a tool that recovers a declarative view of concurrent Haskell functions operating on some shared state as a collection of automatically discovered properties.
Mining Hyperproperties from Behavioral Traces
This paper introduces a framework for mining hyperproper-ties from execution traces of SoC designs, and introduces novel algorithms based on coverage-guided fuzzing that enable the generation of good input traces for the hyperproperty miner.
Program Synthesis with Equivalence Reduction
This work uses relational specifications to discover a canonical representative per equivalence class of programs, and shows how to design synthesis procedures that only consider programs in normal form, thus pruning the search space.
Tools for discovery, refinement and generalization of functional properties by enumerative testing
This thesis presents techniques for discovery, refinement and generalization of properties about functional programs. These techniques work by reasoning from test results: their results are
Advancing Practical Specification Techniques for Modern Software Systems
The work presented in this dissertation lays out a path to producing sophisticated, automated tools for inferring large, complex code bases, tools for allowing engineers to share and reuse specifications, and specification languages for specifying information flow policies that can be written separately from program code.
Learning stateful preconditions modulo a test generator
This paper instantiate the learning framework with a specific learner and test generator to realize a precondition synthesis tool for C# that is highly effective in synthesizing preconditions for avoiding exceptions as well as synthesizing conditions under which methods commute.
An Empirical Study on API Parameter Rules
An empirical study investigates what types of parameter rules there are, and how these rules distribute inside documents and source files, and reveals the challenges for automating parameter rule extraction.
An Empirical Study on API Usages
  • Hao Zhong, Hong Mei
  • Computer Science, Business
    IEEE Transactions on Software Engineering
  • 2019
An empirical study on API usages, with an emphasis on how different types of APIs are used, finds that single-type usages are mostly strict orders, but multi-type weages are more complicated since they include both strict orders and partial orders.


Symbolic mining of temporal specifications
  • Mark Gabel, Z. Su
  • Computer Science
    2008 ACM/IEEE 30th International Conference on Software Engineering
  • 2008
This paper precisely defines this form of specification mining and shows that its general form is NP-complete, and introduces a symbolic algorithm, based on binary decision diagrams (BDDs), that exploits a great deal of regularity in the representation and tracking of all possible combinations of system components.
Mining specifications
Program verification is a promising approach to improving program quality, because it can search all possible program executions for specific errors. However, the need to formally describe correct
Recovering Software Specifications with Inductive Logic Programming
It is demonstrated that off-the-shelf inductive logic programming methods can be successfully used for specification recovery; specifically, Grendel2 can extract specifications for about one-third of the modules in a test suite with high rates of precision and recall.
Mining library specifications using inductive logic programming
This work proposes a methodology for learning interface specifications using Inductive Logic Programming (ILP) and runs several unit tests on the library in order to generate relations describing the operation of the library.
Specification Mining with Few False Positives
This is the first specification miner with such a low false positive rate, and thus a low associated burden of manual inspection, and the technique identifies which input is most indicative of program behavior, which allows off-the-shelf techniques to learn the same number of specifications using only 60% of their original input.
Synthesis of interface specifications for Java classes
This paper proposes a novel solution for automatically extracting temporal specifications for Java classes using algorithms for learning finite automata and symbolic model checking for branching-time logics and describes an implementation of the proposed techniques in the tool JIST--- Java Interface Synthesis Tool---and demonstrates that the tool can construct interfaces accurately and efficiently for sample Java2SDK library classes.
Mining temporal specifications from object usage
A caller must satisfy the callee’s precondition—that is, reach a state in which the callee may be called. Preconditions describe the state that needs to be reached, but not how to reach it. We
Dynamic inference of likely data preconditions over predicates by tree learning
This work presents a technique to infer likely data preconditions for procedures written in an imperative programming language that successfully learns a precondition that captures a safe and permissive calling environment.
Perracotta: mining temporal API rules from imperfect traces
Why scaling dynamic inference techniques has proven difficult is identified, and solutions that enable a dynamic inference technique to scale to large programs and work effectively with the imperfect traces typically available in industrial scenarios are introduced.
QuickSpec: Guessing Formal Specifications Using Testing
It is demonstrated how QUICKSPEC can improve one's understanding of a program module by exploring the laws that are generated using two case studies: a heap library for Haskell and a fixed-point arithmetic library for Erlang.