dlvhex
2.5.0
|
#include <include/dlvhex2/State.h>
Public Member Functions | |
State (StatePtr failureState=StatePtr()) | |
Constructor. | |
virtual | ~State () |
Destructor. | |
virtual void | showPlugins (ProgramCtx *ctx) |
Prints names and versions of all loaded plugins using Logger::INFO. | |
virtual void | convert (ProgramCtx *ctx) |
Converts the input using PluginInterface::PluginConverter. | |
virtual void | parse (ProgramCtx *ctx) |
Parses the input. | |
virtual void | moduleSyntaxCheck (ProgramCtx *ctx) |
Checks the module syntax. | |
virtual void | mlpSolver (ProgramCtx *ctx) |
Calls the modular HEX-solver. | |
virtual void | rewriteEDBIDB (ProgramCtx *ctx) |
Rewrites the input using PluginInterface::PluginRewriter. | |
virtual void | safetyCheck (ProgramCtx *ctx) |
Checks ordinary safety. | |
virtual void | createDependencyGraph (ProgramCtx *ctx) |
Creates the dependency graph for the parsed input. | |
virtual void | checkLiberalSafety (ProgramCtx *ctx) |
Checks liberal safety if enabled. | |
virtual void | optimizeEDBDependencyGraph (ProgramCtx *ctx) |
Optimized the input using PluginInterface::PluginOptimizer. | |
virtual void | createComponentGraph (ProgramCtx *ctx) |
Creates the component graph for the parsed input. | |
virtual void | strongSafetyCheck (ProgramCtx *ctx) |
Checks safety if enabled. | |
virtual void | createEvalGraph (ProgramCtx *ctx) |
virtual void | setupProgramCtx (ProgramCtx *ctx) |
Initialized ctx . | |
virtual void | evaluate (ProgramCtx *ctx) |
Evaluates the HEX-program. | |
virtual void | postProcess (ProgramCtx *ctx) |
Dumps statistics and benchmark results. | |
Protected Member Functions | |
void | changeState (ProgramCtx *ctx, StatePtr newState) |
Changes to anogher state. | |
Protected Attributes | |
StatePtr | failureState |
State base class.
Each concrete subclass implements one of the member methods.
DLVHEX_NAMESPACE_BEGIN State::State | ( | StatePtr | failureState = StatePtr() | ) |
State::~State | ( | ) | [virtual] |
void State::changeState | ( | ProgramCtx * | ctx, |
StatePtr | newState | ||
) | [protected] |
Changes to anogher state.
ctx | ProgramCtx. |
newState | State to change to. |
Definition at line 99 of file State.cpp.
References ProgramCtx::changeState(), LOG, print_function(), and ProgramCtx::state.
Referenced by CheckLiberalSafetyState::checkLiberalSafety(), ConvertState::convert(), CreateComponentGraphState::createComponentGraph(), CreateDependencyGraphState::createDependencyGraph(), CreateEvalGraphState::createEvalGraph(), EvaluateState::evaluate(), MLPSolverState::mlpSolver(), ModuleSyntaxCheckState::moduleSyntaxCheck(), OptimizeEDBDependencyGraphState::optimizeEDBDependencyGraph(), ParseState::parse(), PostProcessState::postProcess(), RewriteEDBIDBState::rewriteEDBIDB(), SafetyCheckState::safetyCheck(), SetupProgramCtxState::setupProgramCtx(), ShowPluginsState::showPlugins(), and StrongSafetyCheckState::strongSafetyCheck().
virtual void State::checkLiberalSafety | ( | ProgramCtx * | ctx | ) | [virtual] |
Checks liberal safety if enabled.
ctx | ProgramCtx. |
Reimplemented in CheckLiberalSafetyState.
virtual void State::convert | ( | ProgramCtx * | ctx | ) | [virtual] |
Converts the input using PluginInterface::PluginConverter.
ctx | ProgramCtx. |
Reimplemented in ConvertState.
virtual void State::createComponentGraph | ( | ProgramCtx * | ctx | ) | [virtual] |
Creates the component graph for the parsed input.
ctx | ProgramCtx. |
Reimplemented in CreateComponentGraphState.
virtual void State::createDependencyGraph | ( | ProgramCtx * | ctx | ) | [virtual] |
Creates the dependency graph for the parsed input.
ctx | ProgramCtx. |
Reimplemented in CreateDependencyGraphState.
virtual void State::createEvalGraph | ( | ProgramCtx * | ctx | ) | [virtual] |
Reimplemented in CreateEvalGraphState.
virtual void State::evaluate | ( | ProgramCtx * | ctx | ) | [virtual] |
virtual void State::mlpSolver | ( | ProgramCtx * | ctx | ) | [virtual] |
virtual void State::moduleSyntaxCheck | ( | ProgramCtx * | ctx | ) | [virtual] |
virtual void State::optimizeEDBDependencyGraph | ( | ProgramCtx * | ctx | ) | [virtual] |
Optimized the input using PluginInterface::PluginOptimizer.
ctx | ProgramCtx. |
Reimplemented in OptimizeEDBDependencyGraphState.
virtual void State::parse | ( | ProgramCtx * | ctx | ) | [virtual] |
virtual void State::postProcess | ( | ProgramCtx * | ctx | ) | [virtual] |
Dumps statistics and benchmark results.
ctx | ProgramCtx to initialize. |
Reimplemented in PostProcessState.
virtual void State::rewriteEDBIDB | ( | ProgramCtx * | ctx | ) | [virtual] |
Rewrites the input using PluginInterface::PluginRewriter.
ctx | ProgramCtx. |
Reimplemented in RewriteEDBIDBState.
virtual void State::safetyCheck | ( | ProgramCtx * | ctx | ) | [virtual] |
virtual void State::setupProgramCtx | ( | ProgramCtx * | ctx | ) | [virtual] |
virtual void State::showPlugins | ( | ProgramCtx * | ctx | ) | [virtual] |
Prints names and versions of all loaded plugins using Logger::INFO.
ctx | ProgramCtx. |
Reimplemented in ShowPluginsState.
virtual void State::strongSafetyCheck | ( | ProgramCtx * | ctx | ) | [virtual] |
StatePtr State::failureState [protected] |