CBMC
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
cnft Class Referenceabstract

#include <cnf.h>

+ Inheritance diagram for cnft:
+ Collaboration diagram for cnft:

Public Member Functions

  cnft (message_handlert &message_handler)
 
 
 
 
  Tseitin encoding of conjunction between multiple literals.
 
  Tseitin encoding of disjunction between multiple literals.
 
  Tseitin encoding of XOR between multiple literals.
 
 
 
 
 
 
 
  Generate a new variable and return it as a literal.
 
bvt  new_variables (std::size_t width) override
  Generate a vector of new variables.
 
 
 
 
  Tseitin encoding of conjunction of two literals.
 
  Tseitin encoding of disjunction of two literals.
 
  Tseitin encoding of XOR of two literals.
 
  Tseitin encoding of NAND of two literals.
 
  Tseitin encoding of NOR of two literals.
 
  Tseitin encoding of equality between two literals.
 
  Tseitin encoding of implication between two literals.
 
- Public Member Functions inherited from propt
  propt (message_handlert &message_handler)
 
 
  asserts a==b in the propositional formula
 
 
 
 
 
 
 
 
 
 
 
 
virtual std::string  solver_text () const =0
 
 
resultt  prop_solve (const bvt &assumptions)
 
 
 
  Returns true if an assumption is in the final conflict.
 
 
 
 
 

Protected Member Functions

  filter 'true' from clause, eliminate duplicates, recognise trivially satisfied clauses
 
- Protected Member Functions inherited from propt
virtual resultt  do_prop_solve (const bvt &assumptions)=0
 

Static Protected Member Functions

  eliminate duplicates from given vector of literals
 
 

Protected Attributes

 
- Protected Attributes inherited from propt
 
 
std::size_t  number_of_solver_calls = 0
 

Additional Inherited Members

- Public Types inherited from propt
 

Detailed Description

Definition at line 17 of file cnf.h.

Constructor & Destructor Documentation

◆  cnft()

cnft::cnft ( message_handlertmessage_handler )
inlineexplicit

Definition at line 22 of file cnf.h.

◆  ~cnft()

virtual cnft::~cnft ( )
inlinevirtual

Definition at line 26 of file cnf.h.

Member Function Documentation

◆  eliminate_duplicates()

bvt cnft::eliminate_duplicates ( const bvtbv )
staticprotected

eliminate duplicates from given vector of literals

parameters: set of literals given as vector
Returns
set of literals, duplicates removed

Definition at line 412 of file cnf.cpp.

◆  gate_and()

void cnft::gate_and ( literalt  a,
literalt  b,
literalt  o 
)

Tseitin encoding of conjunction of two literals.

Side effect: add clauses that encodes relation between inputs/output via lcnf.

parameters: Two input signals to the AND gate, one output

Definition at line 23 of file cnf.cpp.

◆  gate_equal()

void cnft::gate_equal ( literalt  a,
literalt  b,
literalt  o 
)

Tseitin encoding of equality between two literals.

parameters: Two input signals to the EQUAL gate, one output

Definition at line 143 of file cnf.cpp.

◆  gate_implies()

void cnft::gate_implies ( literalt  a,
literalt  b,
literalt  o 
)

Tseitin encoding of implication between two literals.

parameters: Two input signals to the IMPLIES gate, one output

Definition at line 150 of file cnf.cpp.

◆  gate_nand()

void cnft::gate_nand ( literalt  a,
literalt  b,
literalt  o 
)

Tseitin encoding of NAND of two literals.

parameters: Two input signals to the NAND gate, one output

Definition at line 99 of file cnf.cpp.

◆  gate_nor()

void cnft::gate_nor ( literalt  a,
literalt  b,
literalt  o 
)

Tseitin encoding of NOR of two literals.

parameters: Two input signals to the NOR gate, one output

Definition at line 121 of file cnf.cpp.

◆  gate_or()

void cnft::gate_or ( literalt  a,
literalt  b,
literalt  o 
)

Tseitin encoding of disjunction of two literals.

parameters: Two input signals to the OR gate, one output

Definition at line 46 of file cnf.cpp.

◆  gate_xor()

void cnft::gate_xor ( literalt  a,
literalt  b,
literalt  o 
)

Tseitin encoding of XOR of two literals.

parameters: Two input signals to the XOR gate, one output

Definition at line 68 of file cnf.cpp.

◆  is_all()

static bool cnft::is_all ( const bvtbv,
literalt  l 
)
inlinestaticprotected

Definition at line 61 of file cnf.h.

◆  land() [1/2]

literalt cnft::land ( const bvtbv )
overridevirtual

Tseitin encoding of conjunction between multiple literals.

parameters: Any number of inputs to the AND gate
Returns
Output signal of the AND gate as literal

Implements propt.

Definition at line 158 of file cnf.cpp.

◆  land() [2/2]

literalt cnft::land ( literalt  a,
literalt  b 
)
overridevirtual
parameters: Two inputs to the AND gate
Returns
Output signal of the AND gate as literal

Implements propt.

Definition at line 263 of file cnf.cpp.

◆  lequal()

literalt cnft::lequal ( literalt  a,
literalt  b 
)
overridevirtual

Implements propt.

Definition at line 329 of file cnf.cpp.

◆  limplies()

literalt cnft::limplies ( literalt  a,
literalt  b 
)
overridevirtual

Implements propt.

Definition at line 334 of file cnf.cpp.

◆  lnand()

literalt cnft::lnand ( literalt  a,
literalt  b 
)
overridevirtual
parameters: Two inputs to the NAND gate
Returns
Output signal of the NAND gate as literal

Implements propt.

Definition at line 317 of file cnf.cpp.

◆  lnor()

literalt cnft::lnor ( literalt  a,
literalt  b 
)
overridevirtual
parameters: Two inputs to the NOR gate
Returns
Output signal of the NOR gate as literal

Implements propt.

Definition at line 324 of file cnf.cpp.

◆  lor() [1/2]

literalt cnft::lor ( const bvtbv )
overridevirtual

Tseitin encoding of disjunction between multiple literals.

parameters: Any number of inputs to the OR gate
Returns
Output signal of the OR gate as literal

Implements propt.

Reimplemented in qbf_bdd_coret.

Definition at line 201 of file cnf.cpp.

◆  lor() [2/2]

literalt cnft::lor ( literalt  a,
literalt  b 
)
overridevirtual
parameters: Two inputs to the OR gate
Returns
Output signal of the OR gate as literal

Implements propt.

Reimplemented in qbf_bdd_coret.

Definition at line 279 of file cnf.cpp.

◆  lselect()

literalt cnft::lselect ( literalt  a,
literalt  b,
literalt  c 
)
overridevirtual

Implements propt.

Definition at line 344 of file cnf.cpp.

◆  lxor() [1/2]

literalt cnft::lxor ( const bvtbv )
overridevirtual

Tseitin encoding of XOR between multiple literals.

parameters: Any number of inputs to the XOR gate
Returns
Output signal of the XOR gate as literal

Implements propt.

Definition at line 244 of file cnf.cpp.

◆  lxor() [2/2]

literalt cnft::lxor ( literalt  a,
literalt  b 
)
overridevirtual
parameters: Two inputs to the XOR gate
Returns
Output signal of the XOR gate as literal

Implements propt.

Definition at line 295 of file cnf.cpp.

◆  new_variable()

literalt cnft::new_variable ( void  )
overridevirtual

Generate a new variable and return it as a literal.

Returns
New variable as literal

Implements propt.

Reimplemented in qbf_bdd_coret, and qbf_bdd_certificatet.

Definition at line 385 of file cnf.cpp.

◆  new_variables()

bvt cnft::new_variables ( std::size_t  width )
overridevirtual

Generate a vector of new variables.

Returns
Vector of new variables.

Reimplemented from propt.

Definition at line 396 of file cnf.cpp.

◆  no_clauses()

virtual size_t cnft::no_clauses ( ) const
pure virtual

Implemented in qbf_squolemt, qbf_squolem_coret, cnf_solvert, cnf_clause_listt, and dimacs_cnf_dumpt.

◆  no_variables()

virtual size_t cnft::no_variables ( ) const
inlineoverridevirtual

Implements propt.

Definition at line 42 of file cnf.h.

◆  process_clause()

bool cnft::process_clause ( const bvtbv,
bvtdest 
) const
protected

filter 'true' from clause, eliminate duplicates, recognise trivially satisfied clauses

Definition at line 424 of file cnf.cpp.

◆  set_no_variables()

virtual void cnft::set_no_variables ( size_t  no )
inlinevirtual

Reimplemented in qbf_squolemt, and qbf_squolem_coret.

Definition at line 43 of file cnf.h.

Member Data Documentation

◆  _no_variables

size_t cnft::_no_variables
protected

Definition at line 57 of file cnf.h.


The documentation for this class was generated from the following files:
  • /home/runner/work/cbmc/cbmc/src/solvers/sat/cnf.h
  • /home/runner/work/cbmc/cbmc/src/solvers/sat/cnf.cpp

AltStyle によって変換されたページ (->オリジナル) /