cprover
cover_goalst Class Reference

Try to cover some given set of goals incrementally. More...

#include <cover_goals.h>

+ Inheritance diagram for cover_goalst:
+ Collaboration diagram for cover_goalst:

Classes

struct  goalt
 
class  observert
 

Public Types

typedef std::list< goaltgoalst
 
- Public Types inherited from messaget
enum  message_levelt {
  M_ERROR =1, M_WARNING =2, M_RESULT =4, M_STATUS =6,
  M_STATISTICS =8, M_PROGRESS =9, M_DEBUG =10
}
 

Public Member Functions

 cover_goalst (prop_convt &_prop_conv)
 
virtual ~cover_goalst ()
 
decision_proceduret::resultt operator() ()
 Try to cover all goals. More...
 
std::size_t number_covered () const
 
unsigned iterations () const
 
goalst::size_type size () const
 
void add (const literalt condition)
 
void register_observer (observert &o)
 
- Public Member Functions inherited from messaget
virtual void set_message_handler (message_handlert &_message_handler)
 
message_handlertget_message_handler ()
 
 messaget ()
 
 messaget (const messaget &other)
 
messagetoperator= (const messaget &other)
 
 messaget (message_handlert &_message_handler)
 
virtual ~messaget ()
 
mstreamtget_mstream (unsigned message_level) const
 
mstreamterror () const
 
mstreamtwarning () const
 
mstreamtresult () const
 
mstreamtstatus () const
 
mstreamtstatistics () const
 
mstreamtprogress () const
 
mstreamtdebug () const
 
void conditional_output (mstreamt &mstream, const std::function< void(mstreamt &)> &output_generator) const
 Generate output to message_stream using output_generator if the configured verbosity is at least as high as that of message_stream. More...
 

Public Attributes

goalst goals
 

Protected Types

typedef std::vector< observert * > observerst
 

Protected Attributes

std::size_t _number_covered
 
unsigned _iterations
 
prop_convtprop_conv
 
observerst observers
 
- Protected Attributes inherited from messaget
message_handlertmessage_handler
 
mstreamt mstream
 

Private Member Functions

void mark ()
 Mark goals that are covered. More...
 
void constraint ()
 Build clause. More...
 
void freeze_goal_variables ()
 Build clause. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from messaget
static unsigned eval_verbosity (const std::string &user_input, const message_levelt default_verbosity, message_handlert &dest)
 Parse a (user-)provided string as a verbosity level and set it as the verbosity of dest. More...
 
static commandt command (unsigned c)
 Create an ECMA-48 SGR (Select Graphic Rendition) command. More...
 
- Static Public Attributes inherited from messaget
static eomt eom
 
static const commandt reset
 return to default formatting, as defined by the terminal More...
 
static const commandt red
 render text with red foreground color More...
 
static const commandt green
 render text with green foreground color More...
 
static const commandt yellow
 render text with yellow foreground color More...
 
static const commandt blue
 render text with blue foreground color More...
 
static const commandt magenta
 render text with magenta foreground color More...
 
static const commandt cyan
 render text with cyan foreground color More...
 
static const commandt bright_red
 render text with bright red foreground color More...
 
static const commandt bright_green
 render text with bright green foreground color More...
 
static const commandt bright_yellow
 render text with bright yellow foreground color More...
 
static const commandt bright_blue
 render text with bright blue foreground color More...
 
static const commandt bright_magenta
 render text with bright magenta foreground color More...
 
static const commandt bright_cyan
 render text with bright cyan foreground color More...
 
static const commandt bold
 render text with bold font More...
 
static const commandt faint
 render text with faint font More...
 
static const commandt italic
 render italic text More...
 
static const commandt underline
 render underlined text More...
 

Detailed Description

Try to cover some given set of goals incrementally.

This can be seen as a heuristic variant of SAT-based set-cover. No minimality guarantee.

Definition at line 21 of file cover_goals.h.

Member Typedef Documentation

◆ goalst

typedef std::list<goalt> cover_goalst::goalst

Definition at line 48 of file cover_goals.h.

◆ observerst

typedef std::vector<observert *> cover_goalst::observerst
protected

Definition at line 96 of file cover_goals.h.

Constructor & Destructor Documentation

◆ cover_goalst()

cover_goalst::cover_goalst ( prop_convt _prop_conv)
inlineexplicit

Definition at line 24 of file cover_goals.h.

◆ ~cover_goalst()

cover_goalst::~cover_goalst ( )
virtual

Definition at line 18 of file cover_goals.cpp.

Member Function Documentation

◆ add()

void cover_goalst::add ( const literalt  condition)
inline

Definition at line 70 of file cover_goals.h.

◆ constraint()

void cover_goalst::constraint ( )
private

Build clause.

Definition at line 43 of file cover_goals.cpp.

◆ freeze_goal_variables()

void cover_goalst::freeze_goal_variables ( )
private

Build clause.

Definition at line 62 of file cover_goals.cpp.

◆ iterations()

unsigned cover_goalst::iterations ( ) const
inline

Definition at line 58 of file cover_goals.h.

◆ mark()

void cover_goalst::mark ( )
private

Mark goals that are covered.

Definition at line 23 of file cover_goals.cpp.

◆ number_covered()

std::size_t cover_goalst::number_covered ( ) const
inline

Definition at line 53 of file cover_goals.h.

◆ operator()()

decision_proceduret::resultt cover_goalst::operator() ( void  )

Try to cover all goals.

Definition at line 73 of file cover_goals.cpp.

◆ register_observer()

void cover_goalst::register_observer ( observert o)
inline

Definition at line 86 of file cover_goals.h.

◆ size()

goalst::size_type cover_goalst::size ( ) const
inline

Definition at line 63 of file cover_goals.h.

Member Data Documentation

◆ _iterations

unsigned cover_goalst::_iterations
protected

Definition at line 93 of file cover_goals.h.

◆ _number_covered

std::size_t cover_goalst::_number_covered
protected

Definition at line 92 of file cover_goals.h.

◆ goals

goalst cover_goalst::goals

Definition at line 49 of file cover_goals.h.

◆ observers

observerst cover_goalst::observers
protected

Definition at line 97 of file cover_goals.h.

◆ prop_conv

prop_convt& cover_goalst::prop_conv
protected

Definition at line 94 of file cover_goals.h.


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