dlvhex  2.5.0
ExternalAtomMask Class Reference

Mask for external atoms. More...

#include <include/dlvhex2/PredicateMask.h>

Inheritance diagram for ExternalAtomMask:
Collaboration diagram for ExternalAtomMask:

Public Member Functions

 ExternalAtomMask ()
 Constructor.
 ~ExternalAtomMask ()
 Destructor.
void setEAtom (const ProgramCtx &ctx, const ExternalAtom &eatom, const std::vector< ID > &groundidb)
 Sets the ExternalAtom to watch.
void addOutputAtoms (InterpretationConstPtr intr)
 Allows for adding additional atoms to the mask, which are not in the IDB passed in setEatom.
virtual void updateMask ()
 Incrementally updates mask for all predicates.
const InterpretationConstPtr getAuxInputMask () const
 Returns the set of all auxiliaries belonging to ExternalAtomMask::eatom.

Protected Member Functions

bool matchOutputAtom (const Tuple &togatom)
 Checks if a given tuple of a ground atom matches this external atom.

Private Attributes

const ProgramCtxctx
 ProgramCtx.
const ExternalAtomeatom
 ExternalAtom to watch.
InterpretationPtr outputAtoms
 Bits of all ground output atoms (positive and negative ground replacement atoms) that are relevant in the respective ground program.
InterpretationPtr auxInputMask
 Bits of all ground auxiliary input replacement atoms (that are relevant in the respective ground program).
Tuple preparedTuple
 Cache for replacement tuple: first=positive_repl, including auxinputpred if IncludeAuxInputInAuxiliaries, including constants and variables should not be modified.
Tuple workTuple
 Can be modified if protected by mutex, should always be reset to preparedTuple.

Detailed Description

Mask for external atoms.

Extends PredicateMask by support for auxiliary atoms related to an external atom.

Definition at line 110 of file PredicateMask.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 186 of file PredicateMask.cpp.

Destructor.

Definition at line 191 of file PredicateMask.cpp.


Member Function Documentation

Allows for adding additional atoms to the mask, which are not in the IDB passed in setEatom.

The mask will include all atoms in intr which belong to ExternalAtomMask::eatom.

Parameters:
intrA set of ground atoms.

Definition at line 284 of file PredicateMask.cpp.

References ctx, DBGLOG, eatom, PredicateMask::maski, matchOutputAtom(), ExternalAtom::predicate, ProgramCtx::registry(), OrdinaryAtom::text, and Atom::tuple.

Referenced by setEAtom().

Returns the set of all auxiliaries belonging to ExternalAtomMask::eatom.

Returns:
Interpretation containing all auxiliaries belonging to ExternalAtomMask::eatom.

Definition at line 536 of file PredicateMask.cpp.

References auxInputMask.

bool ExternalAtomMask::matchOutputAtom ( const Tuple togatom) [protected]
void ExternalAtomMask::setEAtom ( const ProgramCtx ctx,
const ExternalAtom eatom,
const std::vector< ID > &  groundidb 
)

Field Documentation

Bits of all ground auxiliary input replacement atoms (that are relevant in the respective ground program).

Definition at line 120 of file PredicateMask.h.

Referenced by getAuxInputMask(), matchOutputAtom(), setEAtom(), and updateMask().

ProgramCtx.

Definition at line 114 of file PredicateMask.h.

Referenced by addOutputAtoms(), matchOutputAtom(), and setEAtom().

ExternalAtom to watch.

Definition at line 116 of file PredicateMask.h.

Referenced by addOutputAtoms(), matchOutputAtom(), setEAtom(), and updateMask().

Bits of all ground output atoms (positive and negative ground replacement atoms) that are relevant in the respective ground program.

Definition at line 118 of file PredicateMask.h.

Referenced by setEAtom(), and updateMask().

Cache for replacement tuple: first=positive_repl, including auxinputpred if IncludeAuxInputInAuxiliaries, including constants and variables should not be modified.

Definition at line 122 of file PredicateMask.h.

Referenced by matchOutputAtom(), and setEAtom().

Tuple ExternalAtomMask::workTuple [mutable, private]

Can be modified if protected by mutex, should always be reset to preparedTuple.

Definition at line 124 of file PredicateMask.h.

Referenced by matchOutputAtom(), and setEAtom().


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