dlvhex  2.5.0
testsuite/TestPlainHEX.cpp File Reference
#include "dlvhex2/HexParser.h"
#include "dlvhex2/PlatformDefinitions.h"
#include "dlvhex2/Logger.h"
#include "dlvhex2/ID.h"
#include "dlvhex2/Table.h"
#include "dlvhex2/TermTable.h"
#include "dlvhex2/OrdinaryAtomTable.h"
#include "dlvhex2/BuiltinAtomTable.h"
#include "dlvhex2/AggregateAtomTable.h"
#include "dlvhex2/ExternalAtomTable.h"
#include "dlvhex2/RuleTable.h"
#include "dlvhex2/ASPSolverManager.h"
#include "dlvhex2/ASPSolver.h"
#include "dlvhex2/Registry.h"
#include "dlvhex2/Printer.h"
#include "dlvhex2/ProgramCtx.h"
#include "dlvhex2/PluginInterface.h"
#include "dlvhex2/EvalGraphBuilder.h"
#include "dlvhex2/EvalHeuristicOldDlvhex.h"
#include "dlvhex2/EvalHeuristicTrivial.h"
#include "dlvhex2/EvalHeuristicEasy.h"
#include "dlvhex2/InputProvider.h"
#include "dlvhex2/DependencyGraph.h"
#include "dlvhex2/ComponentGraph.h"
#include "dlvhex2/ModelGenerator.h"
#include "dlvhex2/Benchmarking.h"
#include "dlvhex2/OnlineModelBuilder.h"
#include "dlvhex2/OfflineModelBuilder.h"
#include <boost/algorithm/string/replace.hpp>
#include <boost/bind.hpp>
#include <boost/ref.hpp>
#include <iostream>
#include <fstream>
#include <cstdlib>
#include "graphviz.h"
Include dependency graph for TestPlainHEX.cpp:

Go to the source code of this file.

Data Structures

class  AbovePluginAtom
class  SenseNotArmed1PluginAtom
class  SenseNotArmed2PluginAtom
class  GenPluginAtom1
class  GenPluginAtom2

Defines

#define DLVHEX_BENCHMARK
#define LOG_REGISTRY_PROGRAM(ctx)

Typedefs

typedef boost::function< void(std::ostream &)> GraphVizFunc
typedef FinalEvalGraph::EvalUnit EvalUnit
typedef OnlineModelBuilder
< FinalEvalGraph
FinalOnlineModelBuilder
typedef OfflineModelBuilder
< FinalEvalGraph
FinalOfflineModelBuilder

Functions

void writeGraphVizFunctors (GraphVizFunc vfunc, GraphVizFunc tfunc, const std::string &fnamestart)
template<typename GraphVizzyT >
void writeGraphViz (const GraphVizzyT &gv, const std::string &fnamestart)
DLVHEX_NAMESPACE_USE void breakLinesAndGraphViz (const std::string &str, std::ostream &o)
template<typename ModelGraphT >
void writeEgMgGraphViz (std::ostream &o, bool verbose, const FinalEvalGraph &eg, const ModelGraphT &mg, boost::optional< std::set< typename ModelGraphT::Model > > onlyForModels=boost::none)
int main (int argn, char **argv)

Define Documentation

Definition at line 36 of file TestPlainHEX.cpp.

#define LOG_REGISTRY_PROGRAM (   ctx)
Value:
DBGLOG(DBG,*ctx.registry()); \
    RawPrinter printer(std::cerr, ctx.registry()); \
    std::cerr << "edb = " << *ctx.edb << std::endl; \
    DBGLOG(DBG,"idb"); \
    printer.printmany(ctx.idb,"\n"); \
    std::cerr << std::endl; \
    DBGLOG(DBG,"idb end");

Definition at line 81 of file TestPlainHEX.cpp.


Typedef Documentation

Definition at line 148 of file TestPlainHEX.cpp.

typedef boost::function<void (std::ostream&)> GraphVizFunc

Definition at line 97 of file TestPlainHEX.cpp.


Function Documentation

DLVHEX_NAMESPACE_USE void breakLinesAndGraphViz ( const std::string &  str,
std::ostream &  o 
)

Definition at line 126 of file TestPlainHEX.cpp.

Referenced by writeEgMgGraphViz().

int main ( int  argn,
char **  argv 
)

Definition at line 575 of file TestPlainHEX.cpp.

References EvalGraph< EvalUnitPropertyBaseT, EvalUnitDepPropertyBaseT >::addDependency(), ProgramCtx::addPluginAtom(), EvalGraph< EvalUnitPropertyBaseT, EvalUnitDepPropertyBaseT >::addUnit(), ProgramCtx::associateExtAtomsWithPluginAtoms(), EvalHeuristicOldDlvhex::build(), EvalHeuristicTrivial::build(), EvalHeuristicEasy::build(), OfflineModelBuilder< EvalGraphT >::buildIModelsRecursively(), EvalGraph< EvalUnitPropertyBaseT, EvalUnitDepPropertyBaseT >::countEvalUnitDeps(), EvalGraph< EvalUnitPropertyBaseT, EvalUnitDepPropertyBaseT >::countEvalUnits(), DBGLOG, DLVHEX_BENCHMARK_REGISTER, DLVHEX_BENCHMARK_REGISTER_AND_START, DLVHEX_BENCHMARK_START, DLVHEX_BENCHMARK_STOP, benchmark::nestingAware::NestingAwareController::finish(), OfflineModelBuilder< EvalGraphT >::getEvalGraph(), ModelBuilder< EvalGraphT >::getEvalGraph(), EvalGraph< EvalUnitPropertyBaseT, EvalUnitDepPropertyBaseT >::getEvalUnits(), OfflineModelBuilder< EvalGraphT >::getModelGraph(), ModelBuilder< EvalGraphT >::getModelGraph(), OnlineModelBuilder< EvalGraphT >::getNextIModel(), ProgramCtx::idb, benchmark::nestingAware::NestingAwareController::Instance(), LOG, ModelGraph< EvalGraphT, ModelPropertyBaseT, ModelDepPropertyBaseT >::modelsAt(), MT_IN, ModuleHexParser::parse(), benchmark::nestingAware::NestingAwareController::printDuration(), OfflineModelBuilder< EvalGraphT >::printEvalGraphModelGraph(), OnlineModelBuilder< EvalGraphT >::printEvalGraphModelGraph(), ModelGraph< EvalGraphT, ModelPropertyBaseT, ModelDepPropertyBaseT >::propsOf(), ProgramCtx::registry(), benchmark::nestingAware::NestingAwareController::setOutput(), benchmark::nestingAware::NestingAwareController::setPrintInterval(), ProgramCtx::setupPluginContainer(), ProgramCtx::setupRegistry(), writeGraphViz(), and writeGraphVizFunctors().

template<typename ModelGraphT >
void writeEgMgGraphViz ( std::ostream &  o,
bool  verbose,
const FinalEvalGraph eg,
const ModelGraphT &  mg,
boost::optional< std::set< typename ModelGraphT::Model > >  onlyForModels = boost::none 
)
template<typename GraphVizzyT >
void writeGraphViz ( const GraphVizzyT &  gv,
const std::string &  fnamestart 
) [inline]

Definition at line 117 of file TestPlainHEX.cpp.

References writeGraphVizFunctors().

Referenced by main().

void writeGraphVizFunctors ( GraphVizFunc  vfunc,
GraphVizFunc  tfunc,
const std::string &  fnamestart 
) [inline]

Definition at line 99 of file TestPlainHEX.cpp.

References LOG, and makeGraphVizPdf().

Referenced by main(), and writeGraphViz().