dlvhex
2.5.0
|
Factory for the GenuineGuessAndCheckModelGenerator. More...
#include <include/dlvhex2/GenuineGuessAndCheckModelGenerator.h>
Public Types | |
typedef ComponentGraph::ComponentInfo | ComponentInfo |
Public Member Functions | |
GenuineGuessAndCheckModelGeneratorFactory (ProgramCtx &ctx, const ComponentInfo &ci, ASPSolverManager::SoftwareConfigurationPtr externalEvalConfig) | |
Constructor. | |
virtual | ~GenuineGuessAndCheckModelGeneratorFactory () |
Destructor. | |
virtual void | addInconsistencyCauseFromSuccessor (const Nogood *cause) |
Informs the model generator about an inconsistency cause in successor units. | |
virtual ModelGeneratorPtr | createModelGenerator (InterpretationConstPtr input) |
Instantiates a model generator for the component. | |
virtual std::ostream & | print (std::ostream &o) const |
Prints information about the model generator for debugging purposes. | |
virtual std::ostream & | print (std::ostream &o, bool verbose) const |
Prints information about the model generator for debugging purposes. | |
Protected Attributes | |
ASPSolverManager::SoftwareConfigurationPtr | externalEvalConfig |
Defines the solver to be used for external evaluation. | |
ProgramCtx & | ctx |
ProgramCtx. | |
ComponentInfo | ci |
ComponentInfo of the component to be solved by the model generators instantiated by this factory. | |
std::vector< ID > | outerEatoms |
Outer external atoms of the component. | |
std::vector< std::pair< Nogood, int > > | succNogoods |
Nogoods learned from successor units. | |
Friends | |
class | GenuineGuessAndCheckModelGenerator |
Factory for the GenuineGuessAndCheckModelGenerator.
Definition at line 344 of file GenuineGuessAndCheckModelGenerator.h.
Definition at line 351 of file GenuineGuessAndCheckModelGenerator.h.
DLVHEX_NAMESPACE_BEGIN GenuineGuessAndCheckModelGeneratorFactory::GenuineGuessAndCheckModelGeneratorFactory | ( | ProgramCtx & | ctx, |
const ComponentInfo & | ci, | ||
ASPSolverManager::SoftwareConfigurationPtr | externalEvalConfig | ||
) |
Constructor.
ctx | See GenuineGuessAndCheckModelGeneratorFactory::ctx. |
ci | See GenuineGuessAndCheckModelGeneratorFactory::ci. |
externalEvalConfig | See GenuineGuessAndCheckModelGeneratorFactory::externalEvalConfig. |
Definition at line 65 of file GenuineGuessAndCheckModelGenerator.cpp.
References BaseModelGeneratorFactory::addDomainPredicatesAndCreateDomainExplorationProgram(), ProgramCtx::config, BaseModelGeneratorFactory::convertRule(), FLPModelGeneratorFactoryBase::createEatomGuessingRules(), FLPModelGeneratorFactoryBase::createFLPRules(), FLPModelGeneratorFactoryBase::deidb, FLPModelGeneratorFactoryBase::deidbInnerEatoms, Configuration::getOption(), FLPModelGeneratorFactoryBase::idb, ComponentGraph::ComponentInfo::innerConstraints, FLPModelGeneratorFactoryBase::innerEatoms, ComponentGraph::ComponentInfo::innerEatoms, ComponentGraph::ComponentInfo::innerRules, LOG, outerEatoms, print(), and FLPModelGeneratorFactoryBase::xidb.
virtual GenuineGuessAndCheckModelGeneratorFactory::~GenuineGuessAndCheckModelGeneratorFactory | ( | ) | [inline, virtual] |
Destructor.
Definition at line 380 of file GenuineGuessAndCheckModelGenerator.h.
void GenuineGuessAndCheckModelGeneratorFactory::addInconsistencyCauseFromSuccessor | ( | const Nogood * | cause | ) | [virtual] |
Informs the model generator about an inconsistency cause in successor units.
cause | Pointer to a nogood which, if violated and no new atoms are introduced, always makes a successor unit inconsistent. Note: Due to nonmonotonicity the introduction of new atoms might invalidate this cause! |
Reimplemented from ModelGeneratorFactoryBase< Interpretation >.
Definition at line 111 of file GenuineGuessAndCheckModelGenerator.cpp.
References ctx, DBGLOG, Nogood::getStringRepresentation(), ProgramCtx::registry(), and succNogoods.
GenuineGuessAndCheckModelGeneratorFactory::ModelGeneratorPtr GenuineGuessAndCheckModelGeneratorFactory::createModelGenerator | ( | InterpretationConstPtr | input | ) | [virtual] |
Instantiates a model generator for the component.
input | The facts to be added before solving. |
Implements ModelGeneratorFactoryBase< Interpretation >.
Definition at line 121 of file GenuineGuessAndCheckModelGenerator.cpp.
References GenuineGuessAndCheckModelGenerator.
std::ostream & GenuineGuessAndCheckModelGeneratorFactory::print | ( | std::ostream & | o | ) | const [virtual] |
Prints information about the model generator for debugging purposes.
o | Stream to print to. |
Reimplemented from ModelGeneratorFactoryBase< Interpretation >.
Definition at line 128 of file GenuineGuessAndCheckModelGenerator.cpp.
Referenced by GenuineGuessAndCheckModelGeneratorFactory().
std::ostream & GenuineGuessAndCheckModelGeneratorFactory::print | ( | std::ostream & | o, |
bool | verbose | ||
) | const [virtual] |
Prints information about the model generator for debugging purposes.
o | Stream to print to. |
verbose | Provides more detailed output if true. |
Definition at line 135 of file GenuineGuessAndCheckModelGenerator.cpp.
References ctx, FLPModelGeneratorFactoryBase::gidb, FLPModelGeneratorFactoryBase::idb, FLPModelGeneratorFactoryBase::innerEatoms, outerEatoms, Printer::printmany(), ProgramCtx::registry(), FLPModelGeneratorFactoryBase::xidb, FLPModelGeneratorFactoryBase::xidbflpbody, and FLPModelGeneratorFactoryBase::xidbflphead.
friend class GenuineGuessAndCheckModelGenerator [friend] |
Definition at line 350 of file GenuineGuessAndCheckModelGenerator.h.
Referenced by createModelGenerator().
ComponentInfo of the component to be solved by the model generators instantiated by this factory.
Definition at line 360 of file GenuineGuessAndCheckModelGenerator.h.
Referenced by GenuineGuessAndCheckModelGenerator::GenuineGuessAndCheckModelGenerator(), and GenuineGuessAndCheckModelGenerator::initializeExplanationAtoms().
ProgramCtx& GenuineGuessAndCheckModelGeneratorFactory::ctx [protected] |
Reimplemented from FLPModelGeneratorFactoryBase.
Definition at line 358 of file GenuineGuessAndCheckModelGenerator.h.
Referenced by addInconsistencyCauseFromSuccessor(), GenuineGuessAndCheckModelGenerator::addNogood(), GenuineGuessAndCheckModelGenerator::finalCompatibilityCheck(), GenuineGuessAndCheckModelGenerator::generalizeNogood(), GenuineGuessAndCheckModelGenerator::generateNextModel(), GenuineGuessAndCheckModelGenerator::GenuineGuessAndCheckModelGenerator(), GenuineGuessAndCheckModelGenerator::getInconsistencyCause(), GenuineGuessAndCheckModelGenerator::identifyInconsistencyCause(), GenuineGuessAndCheckModelGenerator::initializeExplanationAtoms(), GenuineGuessAndCheckModelGenerator::initializeHeuristics(), GenuineGuessAndCheckModelGenerator::initializeInconsistencyAnalysis(), GenuineGuessAndCheckModelGenerator::inlineExternalAtoms(), GenuineGuessAndCheckModelGenerator::isModel(), GenuineGuessAndCheckModelGenerator::learnSupportSets(), print(), GenuineGuessAndCheckModelGenerator::propagate(), GenuineGuessAndCheckModelGenerator::replacePredForInlinedEAs(), GenuineGuessAndCheckModelGenerator::unfoundedSetCheck(), GenuineGuessAndCheckModelGenerator::updateEANogoods(), GenuineGuessAndCheckModelGenerator::verifyExternalAtom(), GenuineGuessAndCheckModelGenerator::verifyExternalAtomByEvaluation(), and GenuineGuessAndCheckModelGenerator::verifyExternalAtomBySupportSets().
ASPSolverManager::SoftwareConfigurationPtr GenuineGuessAndCheckModelGeneratorFactory::externalEvalConfig [protected] |
Defines the solver to be used for external evaluation.
Definition at line 356 of file GenuineGuessAndCheckModelGenerator.h.
std::vector<ID> GenuineGuessAndCheckModelGeneratorFactory::outerEatoms [protected] |
Outer external atoms of the component.
Definition at line 364 of file GenuineGuessAndCheckModelGenerator.h.
Referenced by GenuineGuessAndCheckModelGenerator::GenuineGuessAndCheckModelGenerator(), GenuineGuessAndCheckModelGeneratorFactory(), and print().
std::vector<std::pair<Nogood, int> > GenuineGuessAndCheckModelGeneratorFactory::succNogoods [protected] |
Nogoods learned from successor units.
Definition at line 367 of file GenuineGuessAndCheckModelGenerator.h.
Referenced by addInconsistencyCauseFromSuccessor(), GenuineGuessAndCheckModelGenerator::initializeExplanationAtoms(), and GenuineGuessAndCheckModelGenerator::initializeInconsistencyAnalysis().