clang 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::dataflow::Formula Class Reference

#include "clang/Analysis/FlowSensitive/Formula.h"

Public Types

enum  Kind : unsigned {
  AtomRef , Literal , Not , And ,
  Or , Implies , Equal
}
 
using AtomNames = llvm::DenseMap< Atom, std::string >
 

Public Member Functions

Kind kind () const
 
Atom getAtom () const
 
bool literal () const
 
bool isLiteral (bool b) const
 
ArrayRef< const Formula * > operands () const
 
void print (llvm::raw_ostream &OS, const AtomNames *=nullptr) const
 

Static Public Member Functions

static const Formulacreate (llvm::BumpPtrAllocator &Alloc, Kind K, ArrayRef< const Formula * > Operands, unsigned Value=0)
 

Detailed Description

Definition at line 49 of file Formula.h.

Member Typedef Documentation

◆ AtomNames

using clang::dataflow::Formula::AtomNames = llvm::DenseMap<Atom, std::string>

Definition at line 87 of file Formula.h.

Member Enumeration Documentation

◆ Kind

Enumerator
AtomRef 

A reference to an atomic boolean variable.

We name these e.g. "V3", where 3 == atom identity == Value.

Literal 

Constant true or false.

Not 
And 

True if its only operand is false.

Or 

True if LHS and RHS are both true.

Implies 

True if either LHS or RHS is true.

Equal 

True if LHS is false or RHS is true.

Definition at line 51 of file Formula.h.

Member Function Documentation

◆ create()

const Formula & clang::dataflow::Formula::create ( llvm::BumpPtrAllocator &  Alloc,
Kind  K,
ArrayRef< const Formula * >  Operands,
unsigned  Value = 0 
)
static

◆ getAtom()

Atom clang::dataflow::Formula::getAtom ( ) const
inline

◆ isLiteral()

bool clang::dataflow::Formula::isLiteral ( bool  b) const
inline

◆ kind()

Kind clang::dataflow::Formula::kind ( ) const
inline

◆ literal()

bool clang::dataflow::Formula::literal ( ) const
inline

◆ operands()

ArrayRef< const Formula * > clang::dataflow::Formula::operands ( ) const
inline

◆ print()

void clang::dataflow::Formula::print ( llvm::raw_ostream &  OS,
const AtomNames Names = nullptr 
) const

Definition at line 58 of file Formula.cpp.

References AtomRef, getAtom(), kind(), Literal, literal(), operands(), and clang::dataflow::sigil().

Referenced by clang::dataflow::operator<<().


The documentation for this class was generated from the following files: