dlvhex  2.5.0
src/State.cpp File Reference

State class. More...

#include "dlvhex2/State.h"
#include "dlvhex2/ProgramCtx.h"
#include "dlvhex2/Error.h"
#include "dlvhex2/Printhelpers.h"
#include "dlvhex2/Benchmarking.h"
#include "dlvhex2/ASPSolverManager.h"
#include "dlvhex2/ASPSolver.h"
#include "dlvhex2/HexParser.h"
#include "dlvhex2/Printer.h"
#include "dlvhex2/Registry.h"
#include "dlvhex2/PluginContainer.h"
#include "dlvhex2/LiberalSafetyChecker.h"
#include "dlvhex2/DependencyGraph.h"
#include "dlvhex2/ComponentGraph.h"
#include "dlvhex2/FinalEvalGraph.h"
#include "dlvhex2/EvalGraphBuilder.h"
#include "dlvhex2/DumpingEvalGraphBuilder.h"
#include "dlvhex2/AnswerSetPrinterCallback.h"
#include "dlvhex2/PlainAuxPrinter.h"
#include "dlvhex2/SafetyChecker.h"
#include "dlvhex2/MLPSyntaxChecker.h"
#include "dlvhex2/MLPSolver.h"
#include <boost/foreach.hpp>
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
Include dependency graph for State.cpp:

Go to the source code of this file.

Defines

#define STATE_FUNC_DEFAULT_IMPL(function)
#define MANDATORY_STATE_CONSTRUCTOR(state)   state :: state (): State() {}
#define OPTIONAL_STATE_CONSTRUCTOR(state, skiptostate)   state :: state (): State(StatePtr(new skiptostate)) {}

Functions

 STATE_FUNC_DEFAULT_IMPL (showPlugins)
 STATE_FUNC_DEFAULT_IMPL (convert)
 STATE_FUNC_DEFAULT_IMPL (parse)
 STATE_FUNC_DEFAULT_IMPL (moduleSyntaxCheck)
 STATE_FUNC_DEFAULT_IMPL (mlpSolver)
 STATE_FUNC_DEFAULT_IMPL (rewriteEDBIDB)
 STATE_FUNC_DEFAULT_IMPL (safetyCheck)
 STATE_FUNC_DEFAULT_IMPL (checkLiberalSafety)
 STATE_FUNC_DEFAULT_IMPL (createDependencyGraph)
 STATE_FUNC_DEFAULT_IMPL (optimizeEDBDependencyGraph)
 STATE_FUNC_DEFAULT_IMPL (createComponentGraph)
 STATE_FUNC_DEFAULT_IMPL (strongSafetyCheck)
 STATE_FUNC_DEFAULT_IMPL (createEvalGraph)
 STATE_FUNC_DEFAULT_IMPL (setupProgramCtx)
 STATE_FUNC_DEFAULT_IMPL (evaluate)
 STATE_FUNC_DEFAULT_IMPL (postProcess)
 OPTIONAL_STATE_CONSTRUCTOR (ShowPluginsState, ConvertState)
 OPTIONAL_STATE_CONSTRUCTOR (ConvertState, ParseState)
 MANDATORY_STATE_CONSTRUCTOR (ParseState)
 MANDATORY_STATE_CONSTRUCTOR (ModuleSyntaxCheckState)
 MANDATORY_STATE_CONSTRUCTOR (MLPSolverState)
 OPTIONAL_STATE_CONSTRUCTOR (RewriteEDBIDBState, SafetyCheckState)
 OPTIONAL_STATE_CONSTRUCTOR (SafetyCheckState, CheckLiberalSafetyState)
 MANDATORY_STATE_CONSTRUCTOR (CheckLiberalSafetyState)
 MANDATORY_STATE_CONSTRUCTOR (CreateDependencyGraphState)
 OPTIONAL_STATE_CONSTRUCTOR (OptimizeEDBDependencyGraphState, CreateComponentGraphState)
 MANDATORY_STATE_CONSTRUCTOR (CreateComponentGraphState)
 OPTIONAL_STATE_CONSTRUCTOR (StrongSafetyCheckState, CreateEvalGraphState)
 MANDATORY_STATE_CONSTRUCTOR (CreateEvalGraphState)
 MANDATORY_STATE_CONSTRUCTOR (SetupProgramCtxState)
 MANDATORY_STATE_CONSTRUCTOR (EvaluateState)
 MANDATORY_STATE_CONSTRUCTOR (PostProcessState)

Detailed Description

State class.

Author:
Thomas Krennwallner
Peter Schller
Date:

Definition in file State.cpp.


Define Documentation

#define MANDATORY_STATE_CONSTRUCTOR (   state)    state :: state (): State() {}

Definition at line 150 of file State.cpp.

#define OPTIONAL_STATE_CONSTRUCTOR (   state,
  skiptostate 
)    state :: state (): State(StatePtr(new skiptostate)) {}

Definition at line 153 of file State.cpp.

#define STATE_FUNC_DEFAULT_IMPL (   function)
Value:
void State:: function (ProgramCtx* ctx) \
    { \
        if( !!failureState ) \
        { \
            changeState(ctx, failureState); /* <-- this destructs *this */ \
            ctx->state-> function (ctx); \
        } \
        else \
        { \
            throw std::runtime_error("tried to skip execution of '" \
            #function "' in State!"); \
        } \
    }

Definition at line 114 of file State.cpp.


Function Documentation

STATE_FUNC_DEFAULT_IMPL ( showPlugins  )
STATE_FUNC_DEFAULT_IMPL ( convert  )
STATE_FUNC_DEFAULT_IMPL ( moduleSyntaxCheck  )
STATE_FUNC_DEFAULT_IMPL ( mlpSolver  )
STATE_FUNC_DEFAULT_IMPL ( rewriteEDBIDB  )
STATE_FUNC_DEFAULT_IMPL ( safetyCheck  )
STATE_FUNC_DEFAULT_IMPL ( checkLiberalSafety  )
STATE_FUNC_DEFAULT_IMPL ( createDependencyGraph  )
STATE_FUNC_DEFAULT_IMPL ( optimizeEDBDependencyGraph  )
STATE_FUNC_DEFAULT_IMPL ( createComponentGraph  )
STATE_FUNC_DEFAULT_IMPL ( strongSafetyCheck  )
STATE_FUNC_DEFAULT_IMPL ( createEvalGraph  )
STATE_FUNC_DEFAULT_IMPL ( setupProgramCtx  )
STATE_FUNC_DEFAULT_IMPL ( evaluate  )
STATE_FUNC_DEFAULT_IMPL ( postProcess  )