ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
CaDiCaL::vivify_clause_later Struct Reference
Collaboration diagram for CaDiCaL::vivify_clause_later:

Public Member Functions

 vivify_clause_later (Internal *i)
 
bool operator() (Clause *a, Clause *b) const
 

Public Attributes

Internalinternal
 

Detailed Description

Definition at line 380 of file cadical_vivify.cpp.

Constructor & Destructor Documentation

◆ vivify_clause_later()

CaDiCaL::vivify_clause_later::vivify_clause_later ( Internal * i)
inline

Definition at line 384 of file cadical_vivify.cpp.

Member Function Documentation

◆ operator()()

bool CaDiCaL::vivify_clause_later::operator() ( Clause * a,
Clause * b ) const
inline

Definition at line 386 of file cadical_vivify.cpp.

386 {
387
388 if (a == b)
389 return false;
390
391 // First focus on clauses scheduled in the last vivify round but not
392 // checked yet since then.
393 //
394 if (!a->vivify && b->vivify)
395 return true;
396 if (a->vivify && !b->vivify)
397 return false;
398
399 // Among redundant clauses (in redundant mode) prefer small glue.
400 //
401 if (a->redundant) {
402 CADICAL_assert (b->redundant);
403 if (a->glue > b->glue)
404 return true;
405 if (a->glue < b->glue)
406 return false;
407 }
408
409 // Then prefer shorter size.
410 //
411 if (a->size > b->size)
412 return true;
413 if (a->size < b->size)
414 return false;
415
416 // Now compare literals in the clauses lexicographically with respect to
417 // the literal order 'vivify_more_noccs' assuming literals are sorted
418 // decreasingly with respect to that order.
419 //
420 const auto eoa = a->end (), eob = b->end ();
421 auto j = b->begin ();
422 for (auto i = a->begin (); i != eoa && j != eob; i++, j++)
423 if (*i != *j)
424 return vivify_more_noccs (internal) (*j, *i);
425
426 return j == eob; // Prefer shorter clauses to be vivified first.
427 }
#define CADICAL_assert(ignore)
Definition global.h:14
Here is the call graph for this function:

Member Data Documentation

◆ internal

Internal* CaDiCaL::vivify_clause_later::internal

Definition at line 382 of file cadical_vivify.cpp.


The documentation for this struct was generated from the following file: