dlvhex
2.5.0
|
Allows for implementing evaluation heuristics by manually specifying the units. More...
#include <include/dlvhex2/ManualEvalHeuristicsPlugin.h>
Data Structures | |
class | CtxData |
Public Member Functions | |
ManualEvalHeuristicsPlugin () | |
Constructor. | |
virtual | ~ManualEvalHeuristicsPlugin () |
Destructor. | |
virtual void | printUsage (std::ostream &o) const |
Output help message for this plugin. | |
virtual void | processOptions (std::list< const char * > &pluginOptions, ProgramCtx &) |
Processes options for this plugin. | |
virtual std::vector < HexParserModulePtr > | createParserModules (ProgramCtx &) |
Provide parser modules. | |
virtual PluginRewriterPtr | createRewriter (ProgramCtx &ctx) |
Rewriter for hex-programs. |
Allows for implementing evaluation heuristics by manually specifying the units.
Definition at line 43 of file ManualEvalHeuristicsPlugin.h.
Constructor.
Definition at line 462 of file ManualEvalHeuristicsPlugin.cpp.
References PluginInterface::setNameVersion().
ManualEvalHeuristicsPlugin::~ManualEvalHeuristicsPlugin | ( | ) | [virtual] |
Destructor.
Definition at line 469 of file ManualEvalHeuristicsPlugin.cpp.
std::vector< HexParserModulePtr > ManualEvalHeuristicsPlugin::createParserModules | ( | ProgramCtx & | ) | [virtual] |
Provide parser modules.
This is the preferred way to extend the input language by supplying dlvhex with parser modules that plug into the HEX grammar and extend the syntax for valid program input.
See the QueryPlugin and the StrongNegationPlugin for example plugins that use this feature.
Reimplemented from PluginInterface.
Definition at line 653 of file ManualEvalHeuristicsPlugin.cpp.
References DBGLOG, ManualEvalHeuristicsPlugin::CtxData::enabled, and ProgramCtx::getPluginData().
PluginRewriterPtr ManualEvalHeuristicsPlugin::createRewriter | ( | ProgramCtx & | ) | [virtual] |
Rewriter for hex-programs.
The rewriters are called on the parsed HEX program (which may have been rewritten by a PluginConverter). Hence, a rewriter can expect a well-formed HEX-program represented in ProgramCtx::edb and ProgramCtx::idb as input and must of course also take care of keeping that representation correct program.
Reimplemented from PluginInterface.
Definition at line 701 of file ManualEvalHeuristicsPlugin.cpp.
References ManualEvalHeuristicsPlugin::CtxData::enabled, and ProgramCtx::getPluginData().
void ManualEvalHeuristicsPlugin::printUsage | ( | std::ostream & | o | ) | const [virtual] |
Output help message for this plugin.
Reimplemented from PluginInterface.
Definition at line 475 of file ManualEvalHeuristicsPlugin.cpp.
void ManualEvalHeuristicsPlugin::processOptions | ( | std::list< const char * > & | pluginOptions, |
ProgramCtx & | ctx | ||
) | [virtual] |
Processes options for this plugin.
If you override this method, remove all options your plugin recognizes from pluginOptions. (Do not free the pointers, the const char* directly come from argv.) You can store configuration of your plugin using PluginData and ProgramCtx::getPluginData (see there for more information.)
Reimplemented from PluginInterface.
Definition at line 489 of file ManualEvalHeuristicsPlugin.cpp.
References DBGLOG, ManualEvalHeuristicsPlugin::CtxData::enabled, ProgramCtx::evalHeuristic, ProgramCtx::getPluginData(), and WARNING().