dlvhex  2.5.0
NogoodGrounder Class Reference

Instantiates nonground nogoods. More...

#include <include/dlvhex2/NogoodGrounder.h>

Inheritance diagram for NogoodGrounder:
Collaboration diagram for NogoodGrounder:

Public Types

typedef boost::shared_ptr
< NogoodGrounder
Ptr

Public Member Functions

 NogoodGrounder (RegistryPtr reg, SimpleNogoodContainerPtr watched, SimpleNogoodContainerPtr destination, AnnotatedGroundProgram &agp)
 Initializes the nogood grounder for a container of watched nogoods and a destination for resulting ground nogoods.
virtual void update (InterpretationConstPtr partialInterpretation=InterpretationConstPtr(), InterpretationConstPtr factWasSet=InterpretationConstPtr(), InterpretationConstPtr changed=InterpretationConstPtr())=0
 Makes another grounding step.
virtual void resetWatched (SimpleNogoodContainerPtr watched)
 Changes the watched nogood container.

Protected Attributes

RegistryPtr reg
 RegistryPtr.
SimpleNogoodContainerPtr watched
 Set of nogoods currently watched for being instantiated.
SimpleNogoodContainerPtr destination
 Set of instantiated nogoods (can be still nonground in case of partial instantiation!).
AnnotatedGroundProgramagp
 Ground program with meta information.

Detailed Description

Instantiates nonground nogoods.

Definition at line 50 of file NogoodGrounder.h.


Member Typedef Documentation

typedef boost::shared_ptr<NogoodGrounder> NogoodGrounder::Ptr

Definition at line 86 of file NogoodGrounder.h.


Constructor & Destructor Documentation

Initializes the nogood grounder for a container of watched nogoods and a destination for resulting ground nogoods.

Parameters:
regRegistryPtr
watchedA container with the nogoods to ground
destinationThe container where the resulting nogoods shall be added (possibly the same as watched)
agpThe ground program for which the nogoods shall be learned

Definition at line 49 of file NogoodGrounder.cpp.


Member Function Documentation

Changes the watched nogood container.

Parameters:
watchedPointer to the new watched nogood container

Reimplemented in LazyNogoodGrounder, and ImmediateNogoodGrounder.

Definition at line 55 of file NogoodGrounder.cpp.

References watched.

virtual void NogoodGrounder::update ( InterpretationConstPtr  partialInterpretation = InterpretationConstPtr(),
InterpretationConstPtr  factWasSet = InterpretationConstPtr(),
InterpretationConstPtr  changed = InterpretationConstPtr() 
) [pure virtual]

Makes another grounding step.

Parameters:
partialInterpretationThe current (partial) assignment
factWasSetThe atoms which have been assigned so far
changedThe changes in partialInterpretation since the last call (possibly helps the grounder to find relevant ground instances)

Implemented in LazyNogoodGrounder, and ImmediateNogoodGrounder.


Field Documentation

Ground program with meta information.

Definition at line 60 of file NogoodGrounder.h.

Referenced by ImmediateNogoodGrounder::update().

Set of instantiated nogoods (can be still nonground in case of partial instantiation!).

Definition at line 58 of file NogoodGrounder.h.

Referenced by ImmediateNogoodGrounder::update(), and LazyNogoodGrounder::update().

RegistryPtr.

Definition at line 54 of file NogoodGrounder.h.

Referenced by ImmediateNogoodGrounder::update(), and LazyNogoodGrounder::update().

Set of nogoods currently watched for being instantiated.

Definition at line 56 of file NogoodGrounder.h.

Referenced by resetWatched(), ImmediateNogoodGrounder::update(), and LazyNogoodGrounder::update().


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