Table of Contents
Fetching ...

Synthesizing Test Cases for Narrowing Specification Candidates

Alcino Cunha, Nuno Macedo

TL;DR

The paper addresses selecting a best Alloy specification among multiple candidates by generating a narrowing test suite whose classifications by a domain expert identify a single winner. It proposes two solver-based synthesis strategies: a non-optimal SAT-based algorithm scalable to many candidates and an optimal PM-SAT-based method that guarantees a minimal test set. A prototype implements both approaches for Alloy and evaluates on 28 requirements from Alloy4Fun, showing that the non-optimal method scales better with the number of candidates ($N$) while the optimal method produces smaller $|T|$ but faces scalability limits as $N$ grows. The work situates the problem within the minimum test set literature and outlines future extensions to temporal logic and other formalisms.

Abstract

This paper proposes a technique to help choose the best formal specification candidate among a set of alternatives. Given a set of specifications, our technique generates a suite of test cases that, once classified by the user as desirable or not, narrows down the set of candidates to at most one specification. Two alternative solver-based algorithms are proposed, one that generates a minimal test suite, and another that does not ensure minimality. Both algorithms were implemented in a prototype that can be used generate test suites to help choose among alternative Alloy specifications. Our evaluation of this prototype against a large set of problems showed that the optimal algorithm is efficient enough for many practical problems, and that the non-optimal algorithm can scale up to dozens of candidate specifications while still generating reasonably sized test suites.

Synthesizing Test Cases for Narrowing Specification Candidates

TL;DR

The paper addresses selecting a best Alloy specification among multiple candidates by generating a narrowing test suite whose classifications by a domain expert identify a single winner. It proposes two solver-based synthesis strategies: a non-optimal SAT-based algorithm scalable to many candidates and an optimal PM-SAT-based method that guarantees a minimal test set. A prototype implements both approaches for Alloy and evaluates on 28 requirements from Alloy4Fun, showing that the non-optimal method scales better with the number of candidates () while the optimal method produces smaller but faces scalability limits as grows. The work situates the problem within the minimum test set literature and outlines future extensions to temporal logic and other formalisms.

Abstract

This paper proposes a technique to help choose the best formal specification candidate among a set of alternatives. Given a set of specifications, our technique generates a suite of test cases that, once classified by the user as desirable or not, narrows down the set of candidates to at most one specification. Two alternative solver-based algorithms are proposed, one that generates a minimal test suite, and another that does not ensure minimality. Both algorithms were implemented in a prototype that can be used generate test suites to help choose among alternative Alloy specifications. Our evaluation of this prototype against a large set of problems showed that the optimal algorithm is efficient enough for many practical problems, and that the non-optimal algorithm can scale up to dozens of candidate specifications while still generating reasonably sized test suites.

Paper Structure

This paper contains 12 sections, 1 theorem, 5 equations, 7 figures, 2 algorithms.

Key Result

theorem thmcountertheorem

Given a set of $N$ non-equivalent formulas, if $T$ is a minimal narrowing set, then $\log_2 N \leq |T| \leq N -1$.

Figures (7)

  • Figure 1: An Alloy model with a buggy specification
  • Figure 2: Possible repairs to buggy specification
  • Figure 3: A minimal test suite to narrow down possible repairs
  • Figure 4: Toy example problem
  • Figure 5: Simulation of Algorithm \ref{['alg:nonoptimal']} for the toy example
  • ...and 2 more figures

Theorems & Definitions (2)

  • definition thmcounterdefinition
  • theorem thmcountertheorem