dlvhex
2.5.0
|
Base class for model generators. More...
#include <include/dlvhex2/ModelGenerator.h>
Public Types | |
typedef InterpretationT | Interpretation |
typedef Interpretation::ConstPtr | InterpretationConstPtr |
typedef Interpretation::Ptr | InterpretationPtr |
typedef boost::shared_ptr < ModelGeneratorBase < Interpretation > > | Ptr |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((boost::Convertible< InterpretationT, InterpretationBase >)) | |
ModelGeneratorBase (InterpretationConstPtr input) | |
Initialize with factory and input interpretation. | |
virtual | ~ModelGeneratorBase () |
Destructor. | |
virtual InterpretationPtr | generateNextModel ()=0 |
Generate and return next model, return NULL after last model. | |
virtual const Nogood * | getInconsistencyCause () |
Returns a reason for inconsistency in this instance wrt. | |
virtual void | addNogood (const Nogood *ng) |
Adds a nogood to the model generator. | |
virtual std::ostream & | print (std::ostream &o) const |
Protected Attributes | |
InterpretationConstPtr | input |
Input interpretation. |
Base class for model generators.
A model generator does the following: * it is constructed by a ModelGeneratorFactory which knows the program (and can precompute information for evaluation, and may also provide this to the model generator) * it is evaluated on a (probably empty) input interpretation * this evaluation can be performed online * evaluation yields a (probably empty) set of output interpretations.
Definition at line 78 of file ModelGenerator.h.
typedef InterpretationT ModelGeneratorBase< InterpretationT >::Interpretation |
Definition at line 85 of file ModelGenerator.h.
typedef Interpretation::ConstPtr ModelGeneratorBase< InterpretationT >::InterpretationConstPtr |
Definition at line 87 of file ModelGenerator.h.
typedef Interpretation::Ptr ModelGeneratorBase< InterpretationT >::InterpretationPtr |
Definition at line 88 of file ModelGenerator.h.
typedef boost::shared_ptr<ModelGeneratorBase<Interpretation> > ModelGeneratorBase< InterpretationT >::Ptr |
Definition at line 89 of file ModelGenerator.h.
ModelGeneratorBase< InterpretationT >::ModelGeneratorBase | ( | InterpretationConstPtr | input | ) | [inline] |
Initialize with factory and input interpretation.
input | Input interpretation. |
Definition at line 100 of file ModelGenerator.h.
virtual ModelGeneratorBase< InterpretationT >::~ModelGeneratorBase | ( | ) | [inline, virtual] |
Destructor.
Definition at line 103 of file ModelGenerator.h.
virtual void ModelGeneratorBase< InterpretationT >::addNogood | ( | const Nogood * | ng | ) | [inline, virtual] |
Adds a nogood to the model generator.
This nogood can be, for instance, an inconsistency cause in successor units.
cause | Pointer to the nogood to be added. |
Reimplemented in GenuineGuessAndCheckModelGenerator.
Definition at line 119 of file ModelGenerator.h.
ModelGeneratorBase< InterpretationT >::BOOST_CONCEPT_ASSERT | ( | (boost::Convertible< InterpretationT, InterpretationBase >) | ) |
virtual InterpretationPtr ModelGeneratorBase< InterpretationT >::generateNextModel | ( | ) | [pure virtual] |
Generate and return next model, return NULL after last model.
Implemented in GenuineGuessAndCheckModelGenerator, GuessAndCheckModelGenerator, GenuinePlainModelGenerator, PlainModelGenerator, WellfoundedModelGenerator, and GenuineWellfoundedModelGenerator.
Referenced by OnlineModelBuilder< EvalGraphT >::createNextModel().
virtual const Nogood* ModelGeneratorBase< InterpretationT >::getInconsistencyCause | ( | ) | [inline, virtual] |
Returns a reason for inconsistency in this instance wrt.
the input atoms*
Reimplemented in GenuineGuessAndCheckModelGenerator.
Definition at line 112 of file ModelGenerator.h.
Referenced by OnlineModelBuilder< EvalGraphT >::createNextModel().
virtual std::ostream& ModelGeneratorBase< InterpretationT >::print | ( | std::ostream & | o | ) | const [inline, virtual] |
Definition at line 122 of file ModelGenerator.h.
InterpretationConstPtr ModelGeneratorBase< InterpretationT >::input [protected] |
Input interpretation.
Definition at line 94 of file ModelGenerator.h.