dlvhex  2.5.0
BaseModelGenerator::VerifyExternalAnswerAgainstPosNegGuessInterpretationCB Struct Reference

Callback for checking whether external computations reflect guesses of external atom truth values. More...

#include <include/dlvhex2/BaseModelGenerator.h>

Inheritance diagram for BaseModelGenerator::VerifyExternalAnswerAgainstPosNegGuessInterpretationCB:
Collaboration diagram for BaseModelGenerator::VerifyExternalAnswerAgainstPosNegGuessInterpretationCB:

Public Member Functions

 VerifyExternalAnswerAgainstPosNegGuessInterpretationCB (InterpretationPtr guess_pos, InterpretationPtr guess_neg)
 Constructor.
virtual ~VerifyExternalAnswerAgainstPosNegGuessInterpretationCB ()
 Destructor.
virtual bool eatom (const ExternalAtom &eatom)
 Is called when the next eatom is encountered.
virtual bool input (const Tuple &input)
 Is called when the next input tuple is encountered.
virtual bool output (const Tuple &output)
 Is called when the next output tuple is encountered.

Protected Attributes

RegistryPtr reg
 RegistryPtr.
InterpretationPtr guess_pos
 See constructor.
InterpretationPtr guess_neg
 See constructor.
ID pospred
 Cache of positive replacement predicate.
ID negpred
 Cache of negative replacement predicate.
OrdinaryAtom replacement
 Current replacement atom (temporary storage).

Detailed Description

Callback for checking whether external computations reflect guesses of external atom truth values.

Definition at line 186 of file BaseModelGenerator.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
guess_posSet of guessed positive replacement atoms.
guess_negSet of guessed negative replacement atoms.

Definition at line 210 of file BaseModelGenerator.cpp.

References guess_neg, and guess_pos.


Member Function Documentation

Is called when the next eatom is encountered.

Parameters:
eatomThe external atom currently encountered.
Returns:
True if enumeration shall be continued als false to abort.

Implements BaseModelGenerator::ExternalAnswerTupleCallback.

Definition at line 224 of file BaseModelGenerator.cpp.

References ExternalAtom::predicate.

Is called when the next input tuple is encountered.

Preceded by eatom(...).

Parameters:
inputThe input tuple currently encountered.
Returns:
True if enumeration shall be continued als false to abort.

Implements BaseModelGenerator::ExternalAnswerTupleCallback.

Definition at line 239 of file BaseModelGenerator.cpp.

Is called when the next output tuple is encountered.

Preceded by eatom(...) even for empty input tuples.

Parameters:
eatomThe output tuple currently encountered.
Returns:
True if enumeration shall be continued als false to abort.

Implements BaseModelGenerator::ExternalAnswerTupleCallback.

Definition at line 257 of file BaseModelGenerator.cpp.

References ID::address, DBGLOG, and ID_FAIL().


Field Documentation

Cache of negative replacement predicate.

Definition at line 216 of file BaseModelGenerator.h.

Cache of positive replacement predicate.

Definition at line 214 of file BaseModelGenerator.h.

Current replacement atom (temporary storage).

Definition at line 218 of file BaseModelGenerator.h.


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