dlvhex  2.5.0
NogoodContainer Class Reference

Base class for nogood containers. More...

#include <include/dlvhex2/Nogood.h>

Inheritance diagram for NogoodContainer:

Public Types

typedef boost::shared_ptr
< NogoodContainer
Ptr
typedef boost::shared_ptr
< const NogoodContainer
ConstPtr

Public Member Functions

virtual void addNogood (Nogood ng)=0
 Adds a nogood to the container.

Static Public Member Functions

static ID createLiteral (ID lit)
 Transforms a literal into a generic form by stripping off all property flags from the ID (keeping only the NAF flag if present).
static ID createLiteral (IDAddress litadr, bool truthValue=true, bool ground=true)
 Transforms an atom address into a generic ID form by dropping all property flags from the ID (keeping only the NAF flag if present).

Detailed Description

Base class for nogood containers.

Definition at line 294 of file Nogood.h.


Member Typedef Documentation


Member Function Documentation

virtual void NogoodContainer::addNogood ( Nogood  ng) [pure virtual]

Adds a nogood to the container.

Parameters:
ngThe nogood to add.

Implemented in SimpleNogoodContainer, CDNLSolver, and GenuineSolver.

static ID NogoodContainer::createLiteral ( ID  lit) [inline, static]

Transforms a literal into a generic form by stripping off all property flags from the ID (keeping only the NAF flag if present).

This method must be called for dlvhex literal IDs before using them in an instance of Nogood (which is automatically done by Nogood::insert).

Parameters:
litA positive or negative literal ID.
Returns:
Simplified ID.

Definition at line 311 of file Nogood.h.

References ID::address, ID::isNaf(), ID::isOrdinaryGroundAtom(), ID::MAINKIND_LITERAL, ID::NAF_MASK, ID::SUBKIND_ATOM_ORDINARYG, and ID::SUBKIND_ATOM_ORDINARYN.

Referenced by Nogood::applyVariableSubstitution(), CDNLSolver::clearFact(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemBasicEABehavior(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemDefineAuxiliaries(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemFacts(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemNecessaryPart(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemNonempty(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemOptimizationPartBasicEAKnowledge(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemOptimizationPartEAEnforement(), EncodingBasedUnfoundedSetChecker::constructUFSDetectionProblemOptimizationPartRestrictToCompatibleSet(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemRestrictToSCC(), AssumptionBasedUnfoundedSetChecker::constructUFSDetectionProblemRule(), InternalGroundASPSolver::createNewAtom(), InternalGroundASPSolver::createNogoodsForRule(), InternalGroundASPSolver::createNogoodsForRuleBody(), InternalGroundASPSolver::createShiftedProgram(), InternalGroundASPSolver::createSingularLoopNogoods(), Nogood::dbgload(), PluginAtom::generalizeNogood(), FLPModelGeneratorBase::getFLPNogood(), CDNLSolver::getGuess(), InternalGroundASPSolver::getInitialNewlyUnfoundedAtomsAfterSetFact(), InternalGroundASPSolver::getLoopNogood(), ExternalLearningHelper::getOutputAtom(), ExternalLearningHelper::getOutputAtoms(), UnfoundedSetChecker::getUFSNogoodReductBased(), UnfoundedSetChecker::getUFSNogoodUFSBased(), InternalGroundASPSolver::getUnfoundedSet(), CDNLSolver::handlePreviousModel(), GenuineGuessAndCheckModelGenerator::initializeInconsistencyAnalysis(), Nogood::insert(), ExternalLearningHelper::learnFromNegativeAtoms(), Nogood::match(), Nogood::Nogood(), EncodingBasedUnfoundedSetChecker::nogoodTransformation(), AssumptionBasedUnfoundedSetChecker::nogoodTransformation(), ExternalLearningHelper::DefaultInputNogoodProvider::operator()(), Nogood::resolve(), CDNLSolver::resolve(), CDNLSolver::restartWithAssumptions(), TestSetMinusNogoodBasedLearningAtom::retrieve(), TestSetMinusNongroundNogoodBasedLearningAtom::retrieve(), TestPlugin::TestSetUnionAtom::retrieve(), TestASPQueryAtom::retrieveOrLearnSupportSets(), InternalGroundASPSolver::satisfiesIndependently(), InternalGroundASPSolver::setEDB(), CDNLSolver::startWatching(), CDNLSolver::stopWatching(), InternalGroundASPSolver::updateUnfoundedSetStructuresAfterSetFact(), CDNLSolver::updateWatchingStructuresAfterAddNogood(), CDNLSolver::updateWatchingStructuresAfterClearFact(), and CDNLSolver::updateWatchingStructuresAfterSetFact().

static ID NogoodContainer::createLiteral ( IDAddress  litadr,
bool  truthValue = true,
bool  ground = true 
) [inline, static]

Transforms an atom address into a generic ID form by dropping all property flags from the ID (keeping only the NAF flag if present).

Parameters:
litadrIDAddress of a ground or nonground atom.
truthValueDefines whether to generate a positive or negative literal from the given IDAddress.
groundDefines whether the given IDAddress refers to a ground or nonground literal.
SimplifiedID.

Definition at line 328 of file Nogood.h.

References ID::MAINKIND_LITERAL, ID::NAF_MASK, ID::SUBKIND_ATOM_ORDINARYG, and ID::SUBKIND_ATOM_ORDINARYN.


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