class DeltaAlgorithm

Declaration

class DeltaAlgorithm { /* full declaration omitted */ };

Description

DeltaAlgorithm - Implements the delta debugging algorithm (A. Zeller '99) for minimizing arbitrary sets using a predicate function. The result of the algorithm is a subset of the input change set which is guaranteed to satisfy the predicate, assuming that the input set did. For well formed predicates, the result set is guaranteed to be such that removing any single element would falsify the predicate. For best results the predicate function *should* (but need not) satisfy certain properties, in particular: (1) The predicate should return false on an empty set and true on the full set. (2) If the predicate returns true for a set of changes, it should return true for all supersets of that set. It is not an error to provide a predicate that does not satisfy these requirements, and the algorithm will generally produce reasonable results. However, it may run substantially more tests than with a good predicate.

Declared at: llvm/include/llvm/ADT/DeltaAlgorithm.h:35

Method Overview

  • protected virtual bool ExecuteOneTest(const llvm::DeltaAlgorithm::changeset_ty & S)
  • public llvm::DeltaAlgorithm::changeset_ty Run(const llvm::DeltaAlgorithm::changeset_ty & Changes)
  • protected virtual void UpdatedSearchState(const llvm::DeltaAlgorithm::changeset_ty & Changes, const llvm::DeltaAlgorithm::changesetlist_ty & Sets)
  • public virtual ~DeltaAlgorithm()

Methods

virtual bool ExecuteOneTest(
    const llvm::DeltaAlgorithm::changeset_ty& S)

Description

ExecuteOneTest - Execute a single test predicate on the change set \p S.

Declared at: llvm/include/llvm/ADT/DeltaAlgorithm.h:77

Parameters

const llvm::DeltaAlgorithm::changeset_ty& S

llvm::DeltaAlgorithm::changeset_ty Run(
    const llvm::DeltaAlgorithm::changeset_ty&
        Changes)

Description

Run - Minimize the set \p Changes by executing

Declared at: llvm/include/llvm/ADT/DeltaAlgorithm.h:87

Parameters

const llvm::DeltaAlgorithm::changeset_ty& Changes

virtual void UpdatedSearchState(
    const llvm::DeltaAlgorithm::changeset_ty&
        Changes,
    const llvm::DeltaAlgorithm::changesetlist_ty&
        Sets)

Description

UpdatedSearchState - Callback used when the search state changes.

Declared at: llvm/include/llvm/ADT/DeltaAlgorithm.h:73

Parameters

const llvm::DeltaAlgorithm::changeset_ty& Changes
const llvm::DeltaAlgorithm::changesetlist_ty& Sets

virtual ~DeltaAlgorithm()

Declared at: llvm/include/llvm/ADT/DeltaAlgorithm.h:82