14#ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_SOLVER_H
15#define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_SOLVER_H
19#include "llvm/ADT/ArrayRef.h"
20#include "llvm/ADT/DenseMap.h"
68 std::optional<llvm::DenseMap<Atom, Assignment>>
getSolution()
const {
74 std::optional<llvm::DenseMap<Atom, Assignment>> Solution)
75 : SATCheckStatus(SATCheckStatus), Solution(
std::move(Solution)) {}
78 std::optional<llvm::DenseMap<Atom, Assignment>> Solution;
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
An interface for a SAT solver that can be used by dataflow analyses.
virtual ~Solver()=default
virtual Result solve(llvm::ArrayRef< const Formula * > Vals)=0
Checks if the conjunction of Vals is satisfiable and returns the corresponding result.
virtual bool reachedLimit() const =0
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, Atom A)
The JSON file list parser is used to communicate input to InstallAPI.
static Result TimedOut()
Constructs a result indicating that satisfiability checking on the queried boolean formula was not co...
Status getStatus() const
Returns the status of satisfiability checking on the queried boolean formula.
static Result Unsatisfiable()
Constructs a result indicating that the queried boolean formula is unsatisfiable.
std::optional< llvm::DenseMap< Atom, Assignment > > getSolution() const
Returns a truth assignment to boolean values that satisfies the queried boolean formula if available.
Assignment
A boolean value is set to true or false in a truth assignment.
static Result Satisfiable(llvm::DenseMap< Atom, Assignment > Solution)
Constructs a result indicating that the queried boolean formula is satisfiable.
@ TimedOut
Indicates that the solver gave up trying to find a satisfying assignment for a boolean formula.
@ Unsatisfiable
Indicates that there is no satisfying assignment for a boolean formula.
@ Satisfiable
Indicates that there exists a satisfying assignment for a boolean formula.