clang  16.0.0git
WatchedLiteralsSolver.h
Go to the documentation of this file.
1 //===- WatchedLiteralsSolver.h ----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines a SAT solver implementation that can be used by dataflow
10 // analyses.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_WATCHEDLITERALSSOLVER_H
15 #define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_WATCHEDLITERALSSOLVER_H
16 
19 #include "llvm/ADT/DenseSet.h"
20 
21 namespace clang {
22 namespace dataflow {
23 
24 /// A SAT solver that is an implementation of Algorithm D from Knuth's The Art
25 /// of Computer Programming Volume 4: Satisfiability, Fascicle 6. It is based on
26 /// the Davis-Putnam-Logemann-Loveland (DPLL) algorithm, keeps references to a
27 /// single "watched" literal per clause, and uses a set of "active" variables
28 /// for unit propagation.
29 class WatchedLiteralsSolver : public Solver {
30 public:
32 };
33 
34 } // namespace dataflow
35 } // namespace clang
36 
37 #endif // LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_WATCHEDLITERALSSOLVER_H
clang::dataflow::WatchedLiteralsSolver
A SAT solver that is an implementation of Algorithm D from Knuth's The Art of Computer Programming Vo...
Definition: WatchedLiteralsSolver.h:29
Solver.h
clang::dataflow::WatchedLiteralsSolver::solve
Result solve(llvm::DenseSet< BoolValue * > Vals) override
Checks if the conjunction of Vals is satisfiable and returns the corresponding result.
Definition: WatchedLiteralsSolver.cpp:715
llvm::DenseSet
Definition: Sema.h:77
clang::dataflow::Solver
An interface for a SAT solver that can be used by dataflow analyses.
Definition: Solver.h:26
clang
Definition: CalledOnceCheck.h:17
clang::dataflow::Solver::Result
Definition: Solver.h:28
Value.h