dlvhex  2.5.0
State Class Reference

State base class. More...

#include <include/dlvhex2/State.h>

Inheritance diagram for State:

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

Detailed Description

State base class.

Each concrete subclass implements one of the member methods.

Definition at line 55 of file State.h.


Constructor & Destructor Documentation

Constructor.

Initialize with state to execute if not implemented function is called.

Parameters:
failureStateDummy for undefined state.

Definition at line 77 of file State.cpp.

State::~State ( ) [virtual]

Destructor.

Definition at line 83 of file State.cpp.


Member Function Documentation

virtual void State::checkLiberalSafety ( ProgramCtx ctx) [virtual]

Checks liberal safety if enabled.

Parameters:
ctxProgramCtx.

Reimplemented in CheckLiberalSafetyState.

virtual void State::convert ( ProgramCtx ctx) [virtual]

Converts the input using PluginInterface::PluginConverter.

Parameters:
ctxProgramCtx.

Reimplemented in ConvertState.

virtual void State::createComponentGraph ( ProgramCtx ctx) [virtual]

Creates the component graph for the parsed input.

Parameters:
ctxProgramCtx.

Reimplemented in CreateComponentGraphState.

virtual void State::createDependencyGraph ( ProgramCtx ctx) [virtual]

Creates the dependency graph for the parsed input.

Parameters:
ctxProgramCtx.

Reimplemented in CreateDependencyGraphState.

virtual void State::createEvalGraph ( ProgramCtx ctx) [virtual]

Reimplemented in CreateEvalGraphState.

virtual void State::evaluate ( ProgramCtx ctx) [virtual]

Evaluates the HEX-program.

Parameters:
ctxProgramCtx to initialize.

Reimplemented in EvaluateState.

virtual void State::mlpSolver ( ProgramCtx ctx) [virtual]

Calls the modular HEX-solver.

Parameters:
ctxProgramCtx.

Reimplemented in MLPSolverState.

virtual void State::moduleSyntaxCheck ( ProgramCtx ctx) [virtual]

Checks the module syntax.

Parameters:
ctxProgramCtx.

Reimplemented in ModuleSyntaxCheckState.

virtual void State::optimizeEDBDependencyGraph ( ProgramCtx ctx) [virtual]

Optimized the input using PluginInterface::PluginOptimizer.

Parameters:
ctxProgramCtx.

Reimplemented in OptimizeEDBDependencyGraphState.

virtual void State::parse ( ProgramCtx ctx) [virtual]

Parses the input.

Parameters:
ctxProgramCtx.

Reimplemented in ParseState.

virtual void State::postProcess ( ProgramCtx ctx) [virtual]

Dumps statistics and benchmark results.

Parameters:
ctxProgramCtx to initialize.

Reimplemented in PostProcessState.

virtual void State::rewriteEDBIDB ( ProgramCtx ctx) [virtual]

Rewrites the input using PluginInterface::PluginRewriter.

Parameters:
ctxProgramCtx.

Reimplemented in RewriteEDBIDBState.

virtual void State::safetyCheck ( ProgramCtx ctx) [virtual]

Checks ordinary safety.

Parameters:
ctxProgramCtx.

Reimplemented in SafetyCheckState.

virtual void State::setupProgramCtx ( ProgramCtx ctx) [virtual]

Initialized ctx.

Parameters:
ctxProgramCtx to initialize.

Reimplemented in SetupProgramCtxState.

virtual void State::showPlugins ( ProgramCtx ctx) [virtual]

Prints names and versions of all loaded plugins using Logger::INFO.

Parameters:
ctxProgramCtx.

Reimplemented in ShowPluginsState.

virtual void State::strongSafetyCheck ( ProgramCtx ctx) [virtual]

Checks safety if enabled.

Parameters:
ctxProgramCtx.

Reimplemented in StrongSafetyCheckState.


Field Documentation

Definition at line 119 of file State.h.


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