dlvhex  2.5.0
ManualEvalHeuristicsPlugin Class Reference

Allows for implementing evaluation heuristics by manually specifying the units. More...

#include <include/dlvhex2/ManualEvalHeuristicsPlugin.h>

Inheritance diagram for ManualEvalHeuristicsPlugin:
Collaboration diagram for ManualEvalHeuristicsPlugin:

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.

Detailed Description

Allows for implementing evaluation heuristics by manually specifying the units.

Definition at line 43 of file ManualEvalHeuristicsPlugin.h.


Constructor & Destructor Documentation


Member Function Documentation

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().

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().


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