dlvhex
2.5.0
|
TestMLPSolver. More...
#include <boost/cstdint.hpp>
#include "dlvhex2/HexParser.h"
#include "dlvhex2/ProgramCtx.h"
#include "dlvhex2/Printer.h"
#include "dlvhex2/Registry.h"
#include "dlvhex2/MLPSyntaxChecker.h"
#include "dlvhex2/Interpretation.h"
#include "dlvhex2/MLPSolver.h"
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <fstream>
Go to the source code of this file.
Defines | |
#define | BOOST_TEST_MODULE "TestMLPSolver" |
#define | LOG_REGISTRY_PROGRAM(ctx) |
Functions | |
template<typename SolverSoftwareConfiguration > | |
DLVHEX_NAMESPACE_USE void | testInconsistentProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testNoticStratifiedProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testOneMainModules () |
template<typename SolverSoftwareConfiguration > | |
void | testTwoMainModules () |
template<typename SolverSoftwareConfiguration > | |
void | testTwoModuleCalls1 () |
template<typename SolverSoftwareConfiguration > | |
void | testTwoModuleCalls2 () |
template<typename SolverSoftwareConfiguration > | |
void | testReachabilityNonGroundProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testCardinalityProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testABBAProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testDisjunctionProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testNegationProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testIndirectionProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testAFinProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testCsProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testIStratifiedProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testIStratified2Program () |
template<typename SolverSoftwareConfiguration > | |
void | testHanoiProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testComplexProgram () |
template<typename SolverSoftwareConfiguration > | |
void | testAll () |
TestMLPSolver.
Definition in file TestMLPSolver.cpp.
#define BOOST_TEST_MODULE "TestMLPSolver" |
Definition at line 45 of file TestMLPSolver.cpp.
#define LOG_REGISTRY_PROGRAM | ( | ctx | ) |
LOG(INFO, *ctx.registry()); \ RawPrinter printer(std::cerr, ctx.registry()); \ std::cerr << "first edb = " << *ctx.edbList.front() << std::endl; \ LOG(DBG, "first idb"); \ printer.printmany(ctx.idbList.front(),"\n"); \ std::cerr << std::endl; \ LOG(DBG, "idb end");
Definition at line 54 of file TestMLPSolver.cpp.
Referenced by testABBAProgram(), testAFinProgram(), testCardinalityProgram(), testCsProgram(), testDisjunctionProgram(), testInconsistentProgram(), testIndirectionProgram(), testIStratified2Program(), testIStratifiedProgram(), testNegationProgram(), testNoticStratifiedProgram(), testOneMainModules(), testReachabilityNonGroundProgram(), testTwoMainModules(), testTwoModuleCalls1(), and testTwoModuleCalls2().
void testABBAProgram | ( | ) |
Definition at line 527 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testAFinProgram | ( | ) |
Definition at line 727 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testAll | ( | ) |
Definition at line 1023 of file TestMLPSolver.cpp.
void testCardinalityProgram | ( | ) |
Definition at line 477 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testComplexProgram | ( | ) |
Definition at line 974 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), and Logger::WARNING.
void testCsProgram | ( | ) |
Definition at line 776 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testDisjunctionProgram | ( | ) |
Definition at line 578 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testHanoiProgram | ( | ) |
Definition at line 923 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), and Logger::WARNING.
DLVHEX_NAMESPACE_USE void testInconsistentProgram | ( | ) |
Definition at line 70 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testIndirectionProgram | ( | ) |
Definition at line 678 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testIStratified2Program | ( | ) |
Definition at line 874 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testIStratifiedProgram | ( | ) |
Definition at line 825 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testNegationProgram | ( | ) |
Definition at line 628 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testNoticStratifiedProgram | ( | ) |
Definition at line 119 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testOneMainModules | ( | ) |
Definition at line 169 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::INFO, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testReachabilityNonGroundProgram | ( | ) |
Definition at line 426 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testTwoMainModules | ( | ) |
Definition at line 233 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testTwoModuleCalls1 | ( | ) |
Definition at line 297 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.
void testTwoModuleCalls2 | ( | ) |
Definition at line 361 of file TestMLPSolver.cpp.
References Logger::ERROR, Logger::Instance(), LOG, LOG_REGISTRY_PROGRAM, ModuleHexParser::parse(), ProgramCtx::setASPSoftware(), Logger::setPrintLevels(), ProgramCtx::setupRegistry(), MLPSyntaxChecker::verifySyntax(), and Logger::WARNING.