//===- DAGDeltaAlgorithm.h - A DAG Minimization Algorithm ------*- C++ -*--===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_DAGDELTAALGORITHM_H #define LLVM_ADT_DAGDELTAALGORITHM_H #include <set> #include <utility> #include <vector> namespace llvm { /// DAGDeltaAlgorithm - Implements a "delta debugging" algorithm for minimizing /// directed acyclic graphs 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 not required by the dependencies on the other /// elements would falsify the predicate. /// /// The DAG should be used to represent dependencies in the changes which are /// likely to hold across the predicate function. That is, for a particular /// changeset S and predicate P: /// /// P(S) => P(S union pred(S)) /// /// The minimization algorithm uses this dependency information to attempt to /// eagerly prune large subsets of changes. As with \see DeltaAlgorithm, the DAG /// is not required to satisfy this property, but the algorithm will run /// substantially fewer tests with appropriate dependencies. \see DeltaAlgorithm /// for more information on the properties which the predicate function itself /// should satisfy. class DAGDeltaAlgorithm { … }; } // end namespace llvm #endif // LLVM_ADT_DAGDELTAALGORITHM_H